As mentioned previously the 2B heuristic to improve the solving is to rewrite each equation as the equality of two different terms, to determine if the interval evaluation of both terms are consistent and if not to adjust the interval for one term and by using the inverse function for this term to improve the width for one or more unknowns.
For example imagine that one of the equation is
. The procedure will introduce a new variable
such
that
and compute its interval evaluation. If
has a
negative upper bound the equation has no solution for the current
range for
. If the upper bound
of
is positive then the inverse function of
indicates that
should
lie in
: we may then update the interval for
if this is not
the case. If the lower bound
of
is positive then the inverse function of
indicates that
should
lie outside
. If the range for
is included
in this interval, then there is no solution to the equation for this
range for
.
We have already seen that the procedure HullConsistency of ALIAS-Maple implements this consistency. But this is only a partial implementation as only linear and square terms in the unknowns are considered. A more general implementation has been written by G. Chabert.
To use this implementation you need to prepare first a file such as:
size : 1 2 vars : x y constraints : x*y^2-x+y-sin(x)-3=0size is followed by the number of equations and number of variables, vars indicate the unknown names and constraints is followed by the equations which are written using a standard mathematical notation.
This description of the system is loaded using the C++ procedure
load_equation.
This procedure has an optional second argument which is a floating
point number whose use will be described later on.
The 2B procedure is then used by calling the C++ procedure _2b(P), where P is an interval vector which defines the range for each unknown. If this procedure returns -1, then the equations have no solution in P, otherwise P may have been improved (i.e. one or more of the ranges of P may have now a smaller diameter).
The role of in load_equation is that as soon as a range for
one (or more) unknown has a diameter that has been decreased by more
than
compared to its initial value, then the 2B procedure will be
repeated for all equations and all unknowns.
Note: