    Next: Dealing with inequalities Up: Parser, Generic Solver and Previous: Example of use of   Contents

The generic Solver

A generic solver, called Interval_Solver, based on the parser is available in the ALIAS distribution. The basic arguments of this program is a formula file which defines the equations to be solved and a range file which describe the possible ranges for each of the unknowns in the equations. A line of this range file starts by the name of the variable, followed by two numbers which indicate the range for the variable. For example the following lines define a valid range file

psi 0 0.2
x 1 2.5
If f denotes a formula file and r a range file then you may run:

Interval_Solver -F f -R r
In that case the program will call the procedure Solve_General_Interval12.1 of the ALIAS library.

Instead of using the Solve_General_Interval procedure of ALIAS you may use the
Solve_General_Gradient_Interval procedure which requires the gradient of the equations. The gradient equations are defined in a formula file (e.g. g) and you may then run:

Interval_Solver -F f -G g -R r
Note that the equations in the gradient formula file should be ordered with respect to the unknowns using the same ordering than the one used in the range file. Thus for the range file:

x 1 2.5
y 0 0.2
and the formula file f:

eq=y+3*x
eq=x^2+x*y
denoted eq1, eq2, the first line of the gradient formula file should be deq1/dx, the second line deq1/dy and so on, which will lead to the following gradient file:

eq=3
eq=1
eq=2*x+y
eq=x

Similarly, instead of using the Solve_General_Gradient_Interval procedure of ALIAS you may use the Solve_General_JH_Interval procedure which requires the gradient and hessian of the equations. The hessian equations are defined in a formula file (e.g. h) and you may then run:

Interval_Solver -F f -G g -H h -R r
Note that the hessian formula file should respect the same ordering than for the gradient formula file. For our previous example the hessian file will be:

eq=0
eq=0
eq=0
eq=0
eq=2
eq=1
eq=1
eq=0
Note also that the various formula files may be easily obtained by using the MAPLE procedures described in the next section (12.3).

The result of the computation will be written in a result file. Each line of the result file gives the range for one of the unknowns, using the same ordering than for the range file (in our example the range of x, followed by the range for y). A range is indicated by two reals separated by a blanc character. If instead of range the result file contain the keyword FAILED it means that the solver has been unable to solve the equations. This keyword is followed by an integer which indicate the reason of the failure:

• -1: an insufficient storage space has been defined for the solver
• -4: the number of equation in the formula file is incorrect
The default name for the result file is .result_IS.

Whatever the used solving procedure, some parameters are to be set. The solver will prompt you to give the values of these parameters. If you want to avoid this interactive behavior you may define the parameters in a configuration file and the solver will proceed directly to the solution. A configuration file consists in a list of keywords followed by a value. Most of these keywords refers to parameters in the solving procedure of ALIAS, please refer to the corresponding section for their meaning:

• Result_File name: the result will be stored in the name file instead of the default .result_IS file.
• Iteration integer: the maximum number of boxes that may be used by the algorithm
• Debug integer: the debug level for the solving procedure as indicated by Debug_Level_Solve_General
• AccuracyF real: the epsilonf parameter of the solving procedure
• AccuracyV real: the epsilon parameter of the solving procedure
• Order integer: the Order parameter of the solving procedure
• Stop integer: the Stop parameter of the solving procedure
• MaxSol integer: the maximum number of solutions you are looking for
• Kanto integer: the ApplyKanto parameter of the solving procedure
• DifferenceS real: the Dist parameter of the solving procedure
• Machine_Name char: the name of a computer that will be used during a run of the parallel version of the solver
• Single_Bisection: if you use the solver with the -H or -G option the bisection process will bisect only one variable at a time

Subsections    Next: Dealing with inequalities Up: Parser, Generic Solver and Previous: Example of use of   Contents
Jean-Pierre Merlet 2012-12-20