Please note that the recommended version of Scilab is 6.0.2. This page might be outdated.

See the recommended documentation of this function

# daeoptions

set options for dae solver

### Calling Sequence

daeoptions()

### Description

Sets a variable `%DAEOPTIONS`

that is used in function `dae`

to set solver options.

This daeoptions function interactively displays a window which sets various options of the dae solver.

The `dae` function checks if this variable
exists and in this case it uses it. For using default values you should
clear this variable. Note that `daeoptions` does not
create this variable. To create it you must execute the command line
displayed by `daeoptions` . |

The variable `%DAEOPTIONS`

is a list with the following elements:

list(tstop,imode,band,maxstep,stepin,nonneg,isest)

The default value is:

list([],0,[],[],[],0,0)

The meaning of the elements is described below.

- solver
if it is 0,

`dae`

will use the dassl/dasrt solver, and if it is 1,`dae`

will use daskr.- tstop
a real scalar or an empty matrix, gives the maximum time for which

`g`

is allowed to be evaluated. An empty matrix means "no limits" imposed for time.- imode
if it is 0,

`dae`

returns only the user specified time point values, and if it is 1,`dae`

returns its intermediate computed values.- band
a two components vector which give the definition

`[ml,mu]`

of band matrix computed by`jac`

;`r(i - j + ml + mu + 1,j)`

=`dg(i)/dy(j)+cj*dg(i)/dydot(j)`

. If`jac`

returns a full matrix set`band=[]`

- maxstep
a scalar or an empty matrix, the maximum step size, empty matrix means "no limitation".

- stepin
a scalar or an empty matrix, the minimum step size, empty matrix means "not specified".

- nonneg
a scalar, must be set to 0 if

*the solution is known to be non negative*. In the other case it must be set to 1.- isest
a scalar, must be set to 0 if the given initial condition is compatible:

`g(t0,x0,xdot0)=0`

. If`xdot0`

is just an estimation, then set to 1 if you are using dassl, or set to`[+-1, ..., +-1]`

, with:`1`

if y(i) is a differential variable and`-1`

if y(i) is an algebraic variable (if its derivatives do not appear explicitly in the function g(t, y, ydot)).- method
a scalar, direct / Krylov method. Set to

`1`

and provide a routine`psol`

in`dae()`

if you want the solver to use Krylov iterations, else (daskr's direct method) set to`0`

.- Kry_params
a vector, treat as dummy argument if you have set method=0. Otherwise, set to

`[]`

or to`[maxl kmp nrmax epli]`

, where: -`maxl`

= maximum number of iterations in the GMRes algorithm (default min(5, neq)), -`kmp`

= number of vectors on which orthogonalization is done in the GMRes algorithm (default maxl), -`nrmax`

= maximum number of restarts of the GMRes algorithm per nonlinear iteration (default 5), -`epli`

= convergence test constant in GMRes algorithm (default 0.05).- init
a scalar, treat as dummy argument if you have set isest=0. Set to 1 if the solver should stop right after computation of the initial conditions, else set to 0.

- precond
a scalar, preconditioner computation and LU-factorization routine for

`psol`

. Treat as dummy argument if method=0. Set to 1 and provide a`pjac`

routine in`dae`

if the external`psol`

should use a specific routine, else set to 0.- control
a vector, treat as dummy argument if you have set isest=0if you wish to control errors locally on all the variables then set to []. Otherwise, set to [+-1, ..., +-1], 1 if

`y(i)`

is a differential variable and -1 if`y(i)`

is an algebraic variable (if its derivatives do not appear explicitly in the function`g(t, y, ydot)`

).- heuristic
a vector, heuristic parameters. Treat as dummy argument if isest=0. Otherwise, set to [] or to

`[mxnit mxnj mxnh lsoff stptol epinit]`

, where: -`mxnit`

= maximum number of Newton iterations per Jacobian or preconditioner evaluation (default 5 if info(8)=0, 15 otherwise), -`mxnj`

= maximum number of Jacobian or preconditioner evaluations (default 6 if info(8)=0, 2 otherwise), -`mxnh`

= maximum number of values of the artificial stepsize parameter h to be tried if info(7) ≠ [] (default 5), -`lsoff`

= flag to turn off the linesearch algorithm (lsoff = 0 means linesearch is on, lsoff = 1 means it is turned off) (default 0), -`stptol`

= minimum scaled step in linesearch algorithm (default (unit roundoff)^(2/3)), -`epinit`

= swing factor in the Newton iteration convergence test (default 0.01).- verbosity
a scalar, verbosity. Set to 1 for minimal extra printing, 2 for full printing, else set to 0.

### See Also

- dae — Differential algebraic equations solver

## Comments

Add a comment:Please login to comment this page.