« Previous « Start » Next »
3 Setting CONOPT Options
All CONOPT control parameters are possible to set from Matlab .
3.1 Setting options using the CONOPT.options structure
The parameters can be set as subfields in the
Prob.CONOPT
structure. The following example shows how to set a limit on the
maximum number of iterations.
Prob = conAssign(...); % Setup problem, see help conAssign for more information
Prob.CONOPT.options.LFITER = 10000; % Setting maximum number of iterations
The maximum number of iterations can also be done through the TOMLAB
parameter
MaxIter :
Prob.optParam.MaxIter = 200;
In the cases where a solver specific parameter has a corresponding
TOMLAB general parameter, the latter is used only if the user has not
given the solver specific parameter.
A complete description of the available CONOPT parameters can be
found in Section
4.0.1.
3.2 Using the CONOPT Options file
CONOPT supports reading parameter settings from a text file named
in the field Prob.CONOPT.OptFile. This can be used together with
options set in
Prob.CONOPT.options , which will override any
settings made in the file. To use this feature, simply write a pure
text file named for example
“conopt.opts” and give the
location of this file as
Prob.CONOPT.Optsfile .
The format of the CONOPT Options file consists in its simplest
form of a number of lines like these:
rtmaxv := 1.e8;
lfnsup := 500;
An optional
"set" verb can be added in front of the assignment
statements, and the separators “:”, “=”, and “;” are silently
ignored, so the first line could also be written as
“set rtmaxv
1.e8” or simply
"rtmaxv 1.e8". Lower case letters are
converted to upper case so the second line could also be written as
"LFNSUP := 500;".
The assignment or set statement is used to assign a new value to
internal CONOPT variables, so-called CR-Cells. The optional set
verb, the name of the CR-Cell, and the value must be separated by
blanks, tabs, commas, colons, and/or equal signs.
The value must be written
using legal Fortran format with a maximum of 10 characters, i.e. a
real number may contain an optional E and D exponent, but a number may
not contain blanks.
The value must have the same type as the CR-Cell,
i.e. real CR-Cells must be assigned real values, integer CR-Cells
must be assigned integer values, and logical CR-Cells must be assigned
logical values. Values can also be the name of a CR-Cell of the same
type.
« Previous « Start » Next »