TomRun: Difference between revisions

From TomWiki
Jump to navigationJump to search
(Created page with "Category:Utility Functions ==tomRun== ===Purpose=== General multi-solver driver routine for TOMLAB. ===Calling Syntax=== {| class="wikitable" class="wikitable" |-valign=...")
 
No edit summary
Line 8: Line 8:
===Calling  Syntax===
===Calling  Syntax===


{| class="wikitable" class="wikitable"
Call ''Solver'' on the problem defined in structure ''Prob''
|-valign="top"
<syntaxhighlight lang="matlab">
|Result = tomRun(Solver, Prob, PriLev, ask)||Call ''Solver'' on the problem defined in structure ''Prob''
Result = tomRun(Solver, Prob, PriLev, ask)
|-valign="top"
</syntaxhighlight>
|Result = tomRun(Solver, probFile, probNumber, Prob, PriLev, ask)||Call ''Solver ''on problem ''probNumber ''in  
 
Call ''Solver ''on problem ''probNumber ''in Init File ''probFile.m''
<syntaxhighlight lang="matlab">
Result = tomRun(Solver, probFile, probNumber, Prob, PriLev, ask)
</syntaxhighlight>
 
Call ''Solver'' on problem number ''probNumber'' in the default Init File for problem type ''probType''
<syntaxhighlight lang="matlab">
Result = tomRun(Solver, probType, probNumber, PriLev, ask)
</syntaxhighlight>


Init File ''probFile.m''
Display all solvers for ''probType''
|-valign="top"
<syntaxhighlight lang="matlab">
|Result = tomRun(Solver, probType, probNumber, PriLev, ask)||Call ''Solver'' on problem    number ''probNumber 
tomRun(probType)
</syntaxhighlight>


''in  the  default  Init    File for problem type ''probType''
Display all available solvers for all problem types
|-valign="top"
<syntaxhighlight lang="matlab">
|tomRun(probType)||Display all solvers for ''probType''
tomRun
|-valign="top"
</syntaxhighlight>
|tomRun||Display all available solvers for all problem types
|}


===Description  of Inputs===
===Inputs===


{| class="wikitable"
{| class="wikitable"
!Input||Description
|-valign="top"
|-valign="top"
|''Solver''||The name of the solver that should be used to optimize the problem. If the solver may run several  
|''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.optParam.Method'' determines which algorithm and method to be used.
 
different optimization algorithms, then the values of ''Prob.Solver.Alg ''and ''Prob.optParam.Method'' determines  
 
which algorithm and method to be used.
|-valign="top"
|-valign="top"
|''Prob''||Problem description structure, see [[TOMLAB Appendix A]].
|''Prob''||Problem description structure, see [[TOMLAB Appendix A]].
|-
|-valign="top"
|''ask''||Flag if questions should be asked during problem definition.
|''ask''||Flag if questions should be asked during problem definition.


Line 47: Line 52:
''ask ''= [] If ''uP ''= [], ''ask'' = ''-''1, else ''ask ''= 0.
''ask ''= [] If ''uP ''= [], ''ask'' = ''-''1, else ''ask ''= 0.
|-valign="top"
|-valign="top"
|''PriLev''||Print level when displaying the result of the optimization in the routine ''PrintResult''. See  
|''PriLev''||Print level when displaying the result of the optimization in the routine ''PrintResult''. See [[addPwLinFun]].
 
[[#addPwLinFun|addPwLinFun]].


''PriLev'' = 0 No output.
''PriLev'' = 0 No output.
Line 66: Line 69:
|}
|}


===Description  of Outputs===
===Outputs===


{| class="wikitable"
{| class="wikitable"
!Output||Description
|-
|''Result''||Structure with result from optimization, see [[TOMLAB Appendix A]].
|''Result''||Structure with result from optimization, see [[TOMLAB Appendix A]].
|}
|}
Line 74: Line 79:
===Description===
===Description===


The driver routine ''tomRun ''is called from the command line. If called with less than the required two  
The driver routine ''tomRun ''is called from the command line. If called with less than the required two parameters, a list of available solvers are printed.
 
parameters, a list of available solvers are printed.


===M-files  Used===
===M-files  Used===


''PrintResult.m'', ''probInit.m'', ''mkbound.m''
''PrintResult.m'', ''probInit.m'', ''mkbound.m''

Revision as of 05:04, 22 July 2011

tomRun

Purpose

General multi-solver driver routine for TOMLAB.

Calling Syntax

Call Solver on the problem defined in structure Prob

Result = tomRun(Solver, Prob, PriLev, ask)

Call Solver on problem probNumber in Init File probFile.m

Result = tomRun(Solver, probFile, probNumber, Prob, PriLev, ask)

Call Solver on problem number probNumber in the default Init File for problem type probType

Result = tomRun(Solver, probType, probNumber, PriLev, ask)

Display all solvers for probType

tomRun(probType)

Display all available solvers for all problem types

tomRun

Inputs

Input Description
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.optParam.Method determines which algorithm and method to be used.
Prob Problem description structure, see TOMLAB Appendix A.
ask Flag if questions should be asked during problem definition.

ask < 0 Use values in uP if defined or defaults.

ask = 0 Use defaults.

ask = 1 Ask questions in probFile.

ask = [] If uP = [], ask = -1, else ask = 0.

PriLev Print level when displaying the result of the optimization in the routine PrintResult. See addPwLinFun.

PriLev = 0 No output.

PriLev = 1 Final result, shorter version.

PriLev = 2 Final result.

PriLev = 3 Full results.

The printing level in the optimization solver is controlled by setting the parameter Prob.PriLevOpt.

probFile User problem Init File.
probNumber Problem number in probFile. probNumber = 0 gives a menu in probFile.

Outputs

Output Description
Result Structure with result from optimization, see TOMLAB Appendix A.

Description

The driver routine tomRun is called from the command line. If called with less than the required two parameters, a list of available solvers are printed.

M-files Used

PrintResult.m, probInit.m, mkbound.m