TomRun: Difference between revisions
(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 |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:Utility Functions]] | [[Category:Utility Functions]] | ||
== | ==Purpose== | ||
== | General multi-solver driver routine for TOMLAB. | ||
==Calling Syntax== | |||
Call ''Solver'' on the problem defined in structure ''Prob'' | |||
<source lang="matlab"> | |||
Result = tomRun(Solver, Prob, PriLev, ask) | |||
</source> | |||
== | Call ''Solver ''on problem ''probNumber ''in Init File ''probFile.m'' | ||
<source lang="matlab"> | |||
Result = tomRun(Solver, probFile, probNumber, Prob, PriLev, ask) | |||
</source> | |||
Call ''Solver'' on problem number ''probNumber'' in the default Init File for problem type ''probType'' | |||
<source lang="matlab"> | |||
Result = tomRun(Solver, probType, probNumber, PriLev, ask) | |||
</source> | |||
Display all solvers for ''probType'' | |||
<source lang="matlab"> | |||
tomRun(probType) | |||
</source> | |||
Display all available solvers for all problem types | |||
<source lang="matlab"> | |||
tomRun | |||
</source> | |||
== | ==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 50: | ||
''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]]. | ||
[[ | |||
''PriLev'' = 0 No output. | ''PriLev'' = 0 No output. | ||
Line 66: | Line 67: | ||
|} | |} | ||
== | ==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]]. | ||
|} | |} | ||
==Description== | |||
parameters, a list of available solvers are printed. | 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'' | ''PrintResult.m'', ''probInit.m'', ''mkbound.m'' |
Latest revision as of 08:13, 10 January 2012
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