next up previous contents
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:

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:



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