|
TOMLAB OPTIMIZATION ENVIRONMENT: tomRun |
![]() |
tomRun
Purpose
General driver routine for TOMLAB
Syntax
tomRun; tomRun(probType); [Result] = tomRun(Solver, Prob, ask, PriLev); [Result] = tomRun(Solver, [], [], Prob, ask, PriLev); [Result] = tomRun(Solver, probFile, probNumber, Prob, ask, PriLev); [Result] = tomRun(Solver, probType, probNumber, Prob, ask, PriLev);
Description
If using the TOMLAB Quick format (TQ), call with:
[Result] = tomRun(Solver, Prob, ask, PriLev);
The following call will also work (similar 6-input format as below)
[Result] = tomRun(Solver, [], [], Prob, ask, PriLev);
If using the TOMLAB Init File format, call with:
[Result] = tomRun(Solver, probFile, probNumber, Prob, ask, PriLev);
A third alternative is the call
[Result] = tomRun(Solver, probType, probNumber, Prob, ask, PriLev);
Then the default file for problems of type probType is used.
If calling with tomRun; (no arguments), a list of available solvers is given
If calling with tomRun(probType);
a list of available solvers for probType is given
tomRun checks if the second argument is a string, a structure, a number,
or is empty, to determine which input format is used.
if isempty(Solver), tomRun is using the TOMLAB default solver for the
problem type as default (calling GetSolver)
if isempty(probFile), tomRun is using con_prob as default
A problem available in the TOMLAB Init File format is defined using a
call
Prob=probInit(probFile, probNumber, ask, Prob)
Input Parameters
If [] is given or less parameters are given, default values
are used
Solver The name of the solver that should be used to optimize the problem.
If the Solver may run several different optimization algorithms,
then the values of Prob.Solver.Alg and Prob.Solver.SubAlg
determines which algorithm.
The Solver name is put in Prob.Solver.Name
probFile User problem initialization file. The GUI and meny system
is using the different probFile's defined by call to nameprob.
To make a new probFile permanent, run AddProblemFile.
If empty or left out, either probFile=Prob.probFile (if set) or
the default probFile returned from nameprob is used.
probNumber Problem number in probFile.
If empty of left out, either probNumber=Prob.P (if set) or
otherwise probNumber=1.
When calling the probFile with probNumber=0, probFile must
return a string matrix with the names of the problems defined.
(Used by the menu routines and GUI)
Prob Problem structure. Either define the structure with the
call: Prob=probInit(probFile,probNumber,ask);
or set in Prob the parameters with special values.
See the manual for a description of the Prob structure
P probNumber (YOU MUST SET THIS, IF SETTING PROB AS INPUT!)
Examples of other fields to set:
probFile probFile
uP User problem parameters, which you can use when computing
the functions. See the variable ask .
optParam A substructure with optimization parameters. Default value
from optParamSet(Solver,probType)
x_0 Starting point for the problem.
ask If ask>=1: ask questions in probFile. If ask = 0: use defaults
If ask < 0: use values in user params uP if defined or defaults.
If isempty(ask): If length(uP) > 0, ask=-1, else ask=0
PriLev Print level when displaying the result of the optimization in
routine PrintResult.
=0 No output, =1 Final result, shorter version,
=2 Final result, longer version, =3 All output
If isempty(PriLev), Prob.PriLev is used, if nonempty
The printing level in the optimization solver is controlled
by setting the parameter Prob.PriLevOpt
Output Parameters
Result Structure with optimization results. See manual for description
Result.Prob holds the input Prob structure
![]() |
checkdll | GetSolver | ![]() |