<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://tomwiki.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=213.114.77.5</id>
	<title>TomWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://tomwiki.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=213.114.77.5"/>
	<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=Special:Contributions/213.114.77.5"/>
	<updated>2026-11-03T06:23:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>http://tomwiki.com/index.php?title=TOMLAB_Appendix_C&amp;diff=114</id>
		<title>TOMLAB Appendix C</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=TOMLAB_Appendix_C&amp;diff=114"/>
		<updated>2011-06-28T16:09:53Z</updated>

		<summary type="html">&lt;p&gt;213.114.77.5: Created page with &amp;quot;=&amp;#039;&amp;#039;TomSym&amp;#039;&amp;#039; - the Modeling Engine=  This appendix describes the details and functions of relevance to the user when modeling optimization and optimal control problems with TomSym...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&#039;&#039;TomSym&#039;&#039; - the Modeling Engine=&lt;br /&gt;
&lt;br /&gt;
This appendix describes the details and functions of relevance to the user when modeling optimization and optimal control problems with TomSym. It is possible to solve the modeling problems, either with &#039;&#039;ezsolve &#039;&#039;or by converting the problem to a standard TOMLAB  &#039;&#039;Prob &#039;&#039;struct with &#039;&#039;sym2prob&#039;&#039;. The latter provides for the option of controlling all solver settings per the TOMLAB  standard (see the solver manuals for more information).  The procedure for using MAD (Matlab Automatic Differentiation) is also described in the sections below.&lt;br /&gt;
&lt;br /&gt;
==Main functions==&lt;br /&gt;
&lt;br /&gt;
The following Matlab  functions are used directly  by the user when modeling problems for processing by the TOMLAB  solvers.&lt;br /&gt;
&lt;br /&gt;
===tom - Generate  a tomSym  symbol===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
x = tom creates a scalar tomSym  symbol with  an automatic name. &lt;br /&gt;
x = tom(label)  creates a scalar symbol with  the  provided name. &lt;br /&gt;
x = tom(label,m,n)  creates a m-by-n matrix  symbol.&lt;br /&gt;
x = tom(\[\],m,n)  creates a matrix symbol with  an automatic name. &lt;br /&gt;
x = tom(label,m,n,&#039;int&#039;) creates an integer  matrix symbol.&lt;br /&gt;
x = tom(label,m,n,&#039;symmetric&#039;)  creates a symmetric  matrix  symbol.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because constructs like &amp;lt;code&amp;gt;&amp;quot;x = tom(&#039;x&#039;)&amp;quot;&amp;lt;/code&amp;gt; are very common, there is the shorthand notation &amp;quot;toms x&amp;quot;. See also: toms, tomSym&lt;br /&gt;
&lt;br /&gt;
===toms - Create  tomSym  objects===&lt;br /&gt;
&lt;br /&gt;
Toms is a shorthand notation, possibly replacing several calls to &#039;tom&#039;.&lt;br /&gt;
&lt;br /&gt;
A symbol is created in the current workspace for each name listed.  If a size is specified on the format &amp;quot;NxM&amp;quot; where N and M are integers, then all subsequent symbols will get that size. If the size specification  ends with an exclamation point (as in &amp;quot;3x4!&amp;quot;)  then a symbolic array of concatenated scalar symbols is created instead of one matrix symbol.&lt;br /&gt;
&lt;br /&gt;
The flags &amp;quot;integer&amp;quot; (or &amp;quot;int&amp;quot;) and &amp;quot;symmetric&amp;quot; are recognized. If a flag is encountered, then all subsequent symbols will get the properties of that flag.&lt;br /&gt;
&lt;br /&gt;
-integer: The variable is constrained to integer values, resulting in a&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mixed-integer problem  (which  requires a compatible solver.)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
-symmetric: The variable is symmetric, so that &amp;lt;code&amp;gt;x&#039; == x&amp;lt;/code&amp;gt;. This requires that&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
the  dimensions  be square. An NxN symmetric matrix only contains &lt;br /&gt;
N\*(N+1)/2  unknowns, and the resulting symbolic object uses the &lt;br /&gt;
setSymmetric  function.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
toms x y z&lt;br /&gt;
is  equivalent to &lt;br /&gt;
x = tom(&#039;x&#039;);&lt;br /&gt;
y = tom(&#039;z&#039;);&lt;br /&gt;
z = tom(&#039;z&#039;);&lt;br /&gt;
&lt;br /&gt;
toms 2x3 Q 3x3 -integer R -symmetric S&lt;br /&gt;
is  equivalent to&lt;br /&gt;
Q  = tom(&#039;Q&#039;, 2,  3);&lt;br /&gt;
R  = tom(&#039;R&#039;, 3,  3,  &#039;integer&#039;);&lt;br /&gt;
S  = tom(&#039;S&#039;, 3,  3,  &#039;integer&#039;,  &#039;symmetric&#039;)&lt;br /&gt;
&lt;br /&gt;
toms 3x1!  v&lt;br /&gt;
is  equivalent to &lt;br /&gt;
v1 = tom(&#039;v1&#039;); &lt;br /&gt;
v2 = tom(&#039;v2&#039;); &lt;br /&gt;
v3 = tom(&#039;v3&#039;); &lt;br /&gt;
v = \[v1;v2;v3\];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the last example, with  the exclamation point, the result is a vector containing scalar symbols. This works differently from the matrix symbols used in the previous examples. Mathematically this v is equivalent to &amp;quot;toms 3x1 v&amp;quot;,  but the auto-generated  code will be different.  Expressions such as &amp;lt;code&amp;gt;v(1)+sin(v(2))*v(3)&amp;lt;/code&amp;gt; will be more efficient, while expressions  such as &amp;lt;code&amp;gt;A*v&amp;lt;/code&amp;gt; will be less efficient.&lt;br /&gt;
&lt;br /&gt;
Note: While the &amp;quot;toms&amp;quot;  shorthand is very convenient to use prototyping code, it is recommended to only use the longhand &amp;quot;tom&amp;quot; notation for production code. The reason is that Matlab&#039;s internal compiler tries to guess whether a statement like &amp;lt;code&amp;gt;&amp;quot;x(1)&amp;quot;&amp;lt;/code&amp;gt; is an index into a vector or a call to a function. Since it does not realize that the call to &amp;quot;toms&amp;quot;  creates new variables is will make the wrong guess if that function (named &amp;quot;x&amp;quot; in this example) is on the Matlab path when the script is loaded into memory. This will cause strange and unexpected results. &lt;br /&gt;
&lt;br /&gt;
See also: tom, tomSym, setSymmetric&lt;br /&gt;
&lt;br /&gt;
===tomSym/tomSym - Class constructor===&lt;br /&gt;
&lt;br /&gt;
NOTE: Use toms or tom to create tomSym symbols.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
p = tomSym(a,m,n,arguments...) creates a tomSym  using  the  operator a. &lt;br /&gt;
p = tomSym(const)  creates a tomSym  constant with  the  value  const.&lt;br /&gt;
p = tomSym(struct) converts a struct into a tomSym, if the  struct has the required fields.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also: toms, tom, tomSym/funcs, tomSym/tomSym&lt;br /&gt;
&lt;br /&gt;
===ezsolve - Solve a tomSym  optimization problem===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[solution, result] = ezsolve(f,c)&amp;lt;/code&amp;gt; returns the solution to the minimization problem that is defined by the objective  function f and the  constraints c.  The result structure  from tomRun is provided  in a second output argument.&lt;br /&gt;
&lt;br /&gt;
Ezsolve can also be used to find least-square solutions to equations. If options.norm is set to &#039;L2&#039;, then f can be a set of equations. (If there are equations both in f and c, then the ones in c are considered as strict, and will be solved to tolerances, while the ones in f are solved in a least-square  sense. If f is a vector, then the L2 norm of f is minimized.&lt;br /&gt;
&lt;br /&gt;
Ezsolve is meant to be as simple to use as possible. It automatically determines the problem type and finds a suitable solver.&lt;br /&gt;
&lt;br /&gt;
The returned solution is a struct, where the fields represent the unknown variables. This struct can be used by subs to convert a tomSym to a numeric value.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s = ezsolve(f,c,x0)&amp;lt;/code&amp;gt; uses the initial guess x0. The input argument x0 can be a struct containing fields names as the unknown symbols, for example a previously returned solution. Alternatively,  x0 can be a cell array of simple tomSym equation that can be converted to a struct using tom2struct.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s = ezsolve(f,c,x0,name)&amp;lt;/code&amp;gt; sets the problem name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s = ezsolve(f,c,x0,OPTIONS)&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;OPTIONS&amp;lt;/code&amp;gt; is a structure sets solver options.  The options structure can have the following fields.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
OPTIONS.name - The name  of  the  problem&lt;br /&gt;
OPTIONS.type - The problem  type, e.g. &#039;lp&#039;, &#039;qp&#039;, &#039;con&#039;, ... &lt;br /&gt;
OPTIONS.solver	- The solver to  use,  e.g. &#039;snopt&#039;, &#039;knitro&#039;,  ... &lt;br /&gt;
OPTIONS.prilev 	- The ezsolve  and tomRun  print  level (default 1) &lt;br /&gt;
OPTIONS.use_d2c  - (boolean) true = compute symbolic  d2c &lt;br /&gt;
OPTIONS.use_H	- (boolean) true = compute symbolic  H&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See also: tomDiagnose, sym2prob, tomRun&lt;br /&gt;
&lt;br /&gt;
===sym2prob - Compile  symbolic function/constraints into a Prob  struct===&lt;br /&gt;
&lt;br /&gt;
Prob = sym2prob(type,f,c) creates a Prob structure, suitable for tomRun, with the objective of minimizing f, subject to c, with respect to all symbols that they contain.&lt;br /&gt;
&lt;br /&gt;
The problem type can be (among others):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;lp&#039; 	- Linear   programming&lt;br /&gt;
&#039;qp&#039;	- Quadratic programming&lt;br /&gt;
&#039;con&#039;	- Nonlinear programming&lt;br /&gt;
&#039;qpcon&#039; - Quadratic problem  with  nonlinear constraints&lt;br /&gt;
&#039;minlp&#039; - Mixed integer nonlinear programming&lt;br /&gt;
&#039;sdp&#039;	- Linear   semidefinite programming&lt;br /&gt;
&#039;bmi&#039;	- Bilinear semidefinite programming&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;codeProb = sym2prob(f,c)&amp;lt;/code&amp;gt; calls tomDiagnose to attempt to guess the problem type, and prints a warning. &lt;br /&gt;
&lt;br /&gt;
The objective f must be a tomSym symbolic object, while the constraints list c should be a cell array.&lt;br /&gt;
&lt;br /&gt;
If the objective f is a vector or matrix, then a least-square problem is solved, minimizing 0.5*sum(vec(f)) (Half the sum-of-squares of the elements of f ). If f is an equality on the form lhs == rhs, then the sum-of-squares of the difference (rhs-lhs) is minimized.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sym2prob(type,f,c,x0)&amp;lt;/code&amp;gt; supplies an initial guess for one or more of the unknowns. The guess x0 should be a struct, where each field is named as a symbol and contains a numeric array of the correct size.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sym2prob(type,f,c,x0,OPTIONS)&amp;lt;/code&amp;gt; where OPTIONS is a structure sets options. The options structure can have the following fields.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
OPTIONS.name	- The name  of  the  problem &lt;br /&gt;
OPTIONS.use_d2c  - (boolean) true = compute symbolic  d2c &lt;br /&gt;
OPTIONS.use_H	- (boolean) true = compute symbolic  H&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Linear and box constraints will  be  automatically  detected, if  they are formulated using simple addition  and multiplication.  For example,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-3*(x+2) &amp;lt;= 4+x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is automatically converted to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
x &amp;gt;= -2.5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For nonlinear problems, sym2prob will generate temporary m-files representing the nonlinear functions and their derivatives (These files are usually small and harmless, and many modern operating systems automatically clean up old temporary files). In order to remove these files when they are no longer needed, it is recommended to run tomCleanup(Prob) after the problem has been solved.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Overloaded  methods:&lt;br /&gt;
    tomSym/sym2prob&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===getSolution - Extract variables from a solution retuned  by tomRun===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;s = getSolution(solution)&amp;lt;/code&amp;gt; returns a struct where each field corresponds to one of the symbols used in the tomSym problem formulation.&lt;br /&gt;
&lt;br /&gt;
===tomDiagnose - Determine the type for of tomSym  optimization problem===&lt;br /&gt;
&lt;br /&gt;
type  = tomDiagnose(f,c) returns a text string, defining the problem type that is represented by the objective function f and the constraints c.&lt;br /&gt;
&lt;br /&gt;
Some possible return values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&#039;lp&#039; 	- Linear   programming&lt;br /&gt;
&#039;qp&#039;	- Quadratic programming&lt;br /&gt;
&#039;cls&#039;	- Least  squares  with  linear constraints&lt;br /&gt;
&#039;nls&#039;	- Nonlinear least  squares&lt;br /&gt;
&#039;con&#039;	- Nonlinear programming&lt;br /&gt;
&#039;qpcon&#039; - Quadratic problem  with  nonlinear constraints&lt;br /&gt;
&#039;minlp&#039; - Mixed integer nonlinear programming&lt;br /&gt;
&#039;sdp&#039;	- Linear   semidefinite programming&lt;br /&gt;
&#039;bmi&#039;	- Bilinear semidefinite programming&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The objective f must be a tomSym symbolic object, while the constraints list c should be a cell array of tomSym objects.&lt;br /&gt;
&lt;br /&gt;
===tomCleanup  - Remove any temporary  files created for a tomSym  problem.===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;tomCleanup(Prob)&amp;lt;/code&amp;gt; removes any temporary files (created by sym2prob) that are referenced in the problem structure Prob.  This should be done after a problem has been solved, to avoid leaving garbage in the system&#039;s &amp;quot;temp&amp;quot; directory (although most modern operating system will clean up these files eventually anyway.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;WARNING: IF THE AUTOGENERATED FILES HAVE BEEN EDITED, THEN RUNNING&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TOMCLEANUP WILL CAUSE ALL CHANGES TO BE LOST.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;tomCleanup(&#039;all&#039;)&amp;lt;/code&amp;gt; will remove all files and directories that are judged to be tomSym  files from the system&#039;s &amp;quot;temp&amp;quot;  directory. All files that contain a certain &amp;quot;marker&amp;quot;  in the filename will be removed. This might be useful if a large number of temporary files were created accidentally, such as when running sym2prob inside a for-loop without calling &amp;lt;code&amp;gt;tomCleanup(Prob)&amp;lt;/code&amp;gt; at the end of the loop.&lt;br /&gt;
&lt;br /&gt;
Note: Under normal circumstances there is never a need to run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tomCleanup(&#039;all&#039;). The operating system should remove old temporary&lt;br /&gt;
files as required.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After running tomCleanup, all Prob structures that reference the deleted files will be useless. See also: sym2prob&lt;br /&gt;
&lt;br /&gt;
==Using MAD==&lt;br /&gt;
&lt;br /&gt;
Some models require  the use of alternative  method for partial  derivatives.   If  TomSym cannot be used, one alternative is to use MAD.&lt;br /&gt;
&lt;br /&gt;
===madWrap - Compute  a Jacobian using MAD.===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;J = madWrap(FUN,N,...)&amp;lt;/code&amp;gt; uses MAD to call &amp;lt;code&amp;gt;FUN(...)&amp;lt;/code&amp;gt; and returns the Jacobian matrix with respect to the N:th input argument.&lt;br /&gt;
&lt;br /&gt;
FUN must be the name of an existing function. N must be an integer between one and &amp;lt;code&amp;gt;nargin(FUN)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;J = madWrap(M,FUN,N,...)&amp;lt;/code&amp;gt; computes the Jacobian matrix of the Mth output argument, instead of the first one. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;J&amp;lt;/code&amp;gt; will be a Jacobian matrix on the form that is used by tomSym.&lt;br /&gt;
&lt;br /&gt;
==Sub function details==&lt;br /&gt;
&lt;br /&gt;
Advanced users may need to understand how and what some sub functions execute in TomSym.  This section describes how to add functionality to TomSym and some more details &amp;quot;under the hood&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===ifThenElse  - Smoothened if/then/else.===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;y = ifThenElse(cmp1, op,  cmp2, yTrue,  yFalse, s)&amp;lt;/code&amp;gt; replicates the behavior of the C-language construction &amp;lt;code&amp;gt;y = ( condition ?  yTrue :  yFalse )&amp;lt;/code&amp;gt; but with  a smoothing sigmoid function, scaled by s.  (Setting s&#039;&#039;=&#039;&#039;0 gives discontinuous &amp;quot;standard&amp;quot;  if-then-else.)&lt;br /&gt;
&lt;br /&gt;
The operand string op must be the name of one of the comparison operators (&#039;eq&#039;, &#039;lt&#039;,  &#039;le&#039;, etc.) &lt;br /&gt;
&lt;br /&gt;
Example: The absolute value of x is &amp;lt;code&amp;gt;ifThenElse(x,&#039;gt&#039;,0,x,-x)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Overloaded  methods:&lt;br /&gt;
   tomSym/ifThenElse&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===tomSym/derivative===&lt;br /&gt;
&lt;br /&gt;
The symbolic derivative of a tomSym object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;df_dx = derivative(f,x)&amp;lt;/code&amp;gt; computes the derivative of a tomSym object f with respect to a symbol x.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;d2f_dxdy  = derivative(f,x,y,..)&amp;lt;/code&amp;gt; computes the second (third,  ...) derivative of f with respect to the symbols x, y, ...&lt;br /&gt;
&lt;br /&gt;
Both f and x can be matrices.&lt;br /&gt;
&lt;br /&gt;
The symbol x can either be a tomSym symbol, or a concatenation of tomSym symbols.&lt;br /&gt;
&lt;br /&gt;
There exist several conventions for how the elements are arranged in the derivative of a matrix.  This function uses the convention that &amp;lt;code&amp;gt;vec(df) = df_dx*vec(dx)&amp;lt;/code&amp;gt;.  This means that if &amp;lt;code&amp;gt;size(f) = [m n]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;size(x) = [p q]&amp;lt;code&amp;gt; then &amp;lt;code&amp;gt;size(df_dx) = [m*n, p*q]&amp;lt;/code&amp;gt;. Thus, the derivative of a matrix or vector with respect to a scalar is a column vector, the derivative of a scalar is a row vector, and the derivative of any matrix  with  respect to itself is an identity matrix.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
*If f and x are vectors, then &amp;lt;code&amp;gt;J = derivative(f,x)&amp;lt;/code&amp;gt; computes the Jacobian matrix.&lt;br /&gt;
&lt;br /&gt;
*If f is scalar and x is a vector, then &amp;lt;code&amp;gt;H  = derivative(f,x,x)&amp;lt;/code&amp;gt; computes the Hessian matrix.&lt;br /&gt;
&lt;br /&gt;
For functions that tomSym/derivative is unfamiliar with, it assumes that there also exists a derivative function for each argument. For example, when computing the derivative  of a function &amp;quot;userfun&amp;quot;,  it is assumed that &amp;quot;userfunJ1&amp;quot; gives the derivative of userfun with respect to its first input argument. Reference: Brookes, M., &amp;quot;The Matrix  Reference Manual&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[http://www.ee.ic.ac.uk/hp/staff/dmb/matrix/intro.html http://www.ee.ic.ac.uk/hp/staff/dmb/matrix/intro.html] &lt;br /&gt;
&lt;br /&gt;
===ppderivative - The  derivative  of a piecewise polynomial.===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;dpp = ppderivative(pp)&amp;lt;/code&amp;gt; returns a piecewise polynomial which is the derivative of pp, except at points where pp is discontinuous.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;dpp = ppderivative(pp,n)&amp;lt;/code&amp;gt; returns the nth derivative.  A negative n results in the antiderivative (integral) of pp.&lt;br /&gt;
&lt;br /&gt;
===tomSym/mcode===&lt;br /&gt;
&lt;br /&gt;
Generate m-code from a tomSym object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[code, data, header]  = mcode(f)&amp;lt;/code&amp;gt;  generates m-code, representing an object f.&lt;br /&gt;
&lt;br /&gt;
All constants are moved to a data object, which needs to be supplied in the function call. &lt;br /&gt;
&lt;br /&gt;
The returned function header lists all symbols alphabetically, and the data input last.&lt;/div&gt;</summary>
		<author><name>213.114.77.5</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=TOMLAB_Appendix_A&amp;diff=109</id>
		<title>TOMLAB Appendix A</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=TOMLAB_Appendix_A&amp;diff=109"/>
		<updated>2011-06-28T08:24:36Z</updated>

		<summary type="html">&lt;p&gt;213.114.77.5: Created page with &amp;quot;=A &amp;#039;&amp;#039;Prob&amp;#039;&amp;#039; - the Input Problem  Structure=  The Input Problem Structure, here referred to as &amp;#039;&amp;#039;Prob&amp;#039;&amp;#039;, is one of the most central aspects of working with TOMLAB. It contains num...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=A &#039;&#039;Prob&#039;&#039; - the Input Problem  Structure=&lt;br /&gt;
&lt;br /&gt;
The Input Problem Structure, here referred to as &#039;&#039;Prob&#039;&#039;, is one of the most central aspects of working with TOMLAB. It contains numerous fields and substructures that influence the behavior and performance of the solvers.&lt;br /&gt;
&lt;br /&gt;
There are default values for everything that is possible to set defaults for, and all routines are written  in a way that makes it possible for the user to just set an input argument empty (\[ \]) and get the default.&lt;br /&gt;
&lt;br /&gt;
TOMLAB  is using the structure variable &#039;&#039;optParam&#039;&#039;, see Table 141, for the optimization parameters controlling the execution of the optimization solvers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Subproblems&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Many algorithms need sub-problems solved as part  of the main algorithm.   For example, in SQP algorithms for general nonlinear programs, QP problems are solved as sub-problems in each iteration.   As QP solver any solver, even a general NLP solver, may be used. To send parameter information to the QP subsolver, the fields &#039;&#039;Prob.optParam&#039;&#039;, &#039;&#039;Prob.Solver &#039;&#039;and &#039;&#039;Prob.SOL &#039;&#039;could be put as subfields to the &#039;&#039;Prob.QP &#039;&#039;field (see Table 136), i.e. as fields &#039;&#039;Prob.QP.optParam&#039;&#039;, &#039;&#039;Prob.QP.Solver&#039;&#039;. The field &#039;&#039;Prob.QP.optParam &#039;&#039;need not have all subfields, the missing ones are filled with default values for the particular QP solver.&lt;br /&gt;
&lt;br /&gt;
The same &#039;&#039;Prob.QP &#039;&#039;subfield is used for the other types of subproblems recognized, i.e. Phase 1 feasibility problems, LP and dual LP problems. Note that the fields &#039;&#039;Prob.SolverQP&#039;&#039;, &#039;&#039;Prob.SolverFP Prob.SolverLP &#039;&#039;and &#039;&#039;Prob.SolverDLP &#039;&#039;are set to the name of the solver that should solve the subproblem. If the field is left empty, a suitable default solver is used, dependent on the license for TOMLAB.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+Table 134: Information stored in the problem structure &#039;&#039;Prob&#039;&#039;. Fields defining sub-structures are defined in Table 135&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;&amp;lt;hr /&amp;gt;||&#039;&#039;&#039;Description&#039;&#039;&#039;&amp;lt;hr /&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Tomlab&#039;&#039;||TOMLAB  Version number.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||Matrix  with linear constraints, one constraint per row (dense or sparse).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ADObj&#039;&#039;||Automatic differentiation flag.  If 1, -1 MAD  is used to obtain gradient and Hessian, respectively.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ADCons&#039;&#039;||Automatic differentiation flag. If 1, -1 MAD is used to obtain the constraint Jacobian and nonlinear constraint Hessian, respectively.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on the linear constraints.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on the linear constraints.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on the general constraints.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on the general constraints.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CHECK&#039;&#039;||If true, no more check is done by ProbCheck. Set to true (=1)  after first call to ProbCheck.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CheckNaN&#039;&#039;||If &#039;&#039;Prob.CheckNaN  &#039;&#039;= 0, &#039;&#039;nlp d2c&#039;&#039;, &#039;&#039;nlp H&#039;&#039;, &#039;&#039;nlp d2r &#039;&#039;checks for NaN elements and estimates the corresponding derivatives numerically.  If &#039;&#039;Prob.CheckNaN &amp;gt; &#039;&#039;0, the same applies for &#039;&#039;nlp dc&#039;&#039;, &#039;&#039;nlp g&#039;&#039;, &#039;&#039;nlp J&#039;&#039;. Off-diagonal elements in symmetric Hessians should both be set as NaN. fdng, fdng2, fdng3, only estimate NaN elements in gradient, if gradient vector is input.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;cName&#039;&#039;||Name of each general constraint.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;cols&#039;&#039;||The columns in the user computed matrix that will be accessed, and needs to be set.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ConIx&#039;&#039;||A vector with the sequence of calls required to compute the numerical con- straint Jacobian efficiently. See &#039;&#039;findpatt &#039;&#039;for more information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ConsDiff&#039;&#039;||Numerical approximation of the constraint derivatives. If set to 1, the classical approach with forward or backward differences together with automatic step selection will  be used. If set to 2, 3 or 4 the spline routines &#039;&#039;csapi&#039;&#039;, &#039;&#039;csaps &#039;&#039;or &#039;&#039;spaps &#039;&#039;in the SPLINE Toolbox will  be used. If set to 5, derivatives  will  be estimated by use of complex variables. For the SOL solvers, the value 6 gives the internal derivative approximation.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ConsIdx&#039;&#039;||Internally used to speed up the SOL solver computations. Used to send linear index from multiple subscripts for nonzero pattern in constraint Jacobian.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ConsPattern&#039;&#039;||Matrix  with non-zero pattern in the constraint gradient matrix.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;d2LPattern&#039;&#039;||Sparsity pattern of the Hessian of the Lagrangian function.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;f Low&#039;&#039;||Lower bound on optimal function value.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;f opt&#039;&#039;||Objective function value &#039;&#039;f &#039;&#039;(&#039;&#039;x*&#039;&#039;) corresponding to the points given in &#039;&#039;x opt&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;GradTolg&#039;&#039;||Size of step length to estimate first order derivatives in the gradient vector. If this field is empty, &#039;&#039;optParam.DiffInt  &#039;&#039;is used instead.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;GradTolH&#039;&#039;||Size of step length to estimate the Hessian matrix.   If this field is empty , &#039;&#039;optParam.DiffInt&#039;&#039; is used instead.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;GradTolJ&#039;&#039;||Size of step length to estimate the Jacobian matrix or the constraint gradient matrix.  If this field is empty, &#039;&#039;optParam.DiffInt  &#039;&#039;is used instead.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;HessIx&#039;&#039;||A vector with the sequence of calls required to compute the numerical Jacobian efficiently. See &#039;&#039;findpatt &#039;&#039;for more information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;HessPattern&#039;&#039;||Matrix  with non-zero pattern in the Hessian matrix.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;JacIx&#039;&#039;||A vector with the sequence of calls required to compute the numerical Jacobian efficiently. See &#039;&#039;findpatt &#039;&#039;for more information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;JacPattern&#039;&#039;||Matrix  with non-zero pattern in the Jacobian matrix.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LargeScale&#039;&#039;||Flag if the problem is large scale. If this flag is set no collection of search steps are made. Also, for some solvers, &#039;&#039;LargeScale &#039;&#039;chooses between dense (=0)  or sparse (=1) versions of the solver. This flag also controls several other features in TOMLAB  such as estimation of patterns.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxCPU&#039;&#039;||Maximum execution time in seconds for the solver. The feature is available for a limited number of solvers.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MENU&#039;&#039;||Flag used to tell if a menu, the GUI or a driver is calling, to avoid unnecessary checks of the fields in &#039;&#039;Prob &#039;&#039;(0).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Mode&#039;&#039;||Indicates whether the user should return function values and/or derivatives. Is best used when the user computes both function values and derivatives at the same time to save CPU time.  0 = Assign function values. 1 = Assign known derivatives, unknown derivative values set as -11111 (=missing value).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||2 = Assign function and known derivatives, unknown derivatives set as -11111.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;nState&#039;&#039;||Indicates the first and last calls to the user routines to compute function and derivatives.  Used by the SOL solvers.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||1	First call.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||0	Other calls before the last call.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||2 + &#039;&#039;I nf orm 	&#039;&#039;Last call, see the Inform parameter for the solver used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;N&#039;&#039;||Problem dimension (number of variables).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;mLin&#039;&#039;||Number of linear constraints. &#039;&#039;mNonlin 	&#039;&#039;Number of nonlinear constraints. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Name&#039;&#039;||Problem name.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;NumDiff&#039;&#039;||Numerical approximation of the derivatives of the objective function.  If set to 1, the classical approach with  forward or backward differences together with  automatic step selection will  be used.  If  set  to 2, 3 or 4 either the standard Matlab spline function or the spline routines &#039;&#039;csapi&#039;&#039;, &#039;&#039;csaps &#039;&#039;or &#039;&#039;spaps &#039;&#039;in the SPLINE Toolbox will be used. If set to 5, derivatives will be estimated by use of complex variables. For the some solvers, the value 6 gives the internal derivative approximation.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;P&#039;&#039;||Problem number (1).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;plotLine&#039;&#039;||Flag if to do a plot of the line search problem.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in the driver routines (0).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;-&lt;br /&gt;
|&#039;&#039;PriLevOpt&#039;&#039;||Print level in the TOM solver and the Matlab part of the solver interface ( 0).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PrintLM&#039;&#039;||Flag: controls whether or not &#039;&#039;PrintResult &#039;&#039;should calculate Lagrange multiplirs and reduced (projected) gradient after a solver has been run. Since |&#039;&#039;PrintResult &#039;&#039;operates on a &#039;&#039;Result &#039;&#039;structure, and not on &#039;&#039;Prob&#039;&#039;, this flag is accessed as &#039;&#039;Result.Prob.PrintLM&#039;&#039;,  but of course it is possible to set it before solving the problem.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;probFile&#039;&#039;||Name of m-file in which the problems are defined.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;probType&#039;&#039;||TOMLAB  problem type, see Table 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rows&#039;&#039;||The rows in the user computed vector/matrix that will be accessed, and needs to be set.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;simType&#039;&#039;||A flag indicating when the TOMLAB  simulation format is used. The objective and constraints are calculated at the same function. The gradient and Jacobian are also calculated in the same function.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;smallA&#039;&#039;||If 1 then small elements in the linear constraints are removed. The elements have to be smaller than &#039;&#039;eps * max&#039;&#039;(&#039;&#039;max&#039;&#039;(&#039;&#039;abs&#039;&#039;(&#039;&#039;P rob.A&#039;&#039;))).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverDLP&#039;&#039;||Name of the solver that should solve dual LP sub-problems.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the Solver that should solve LP sub-problems.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverFP&#039;&#039;||Name of the solver that should solve a phase one LP sub-problem, i.e. finding a feasible point to a convex set.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverQP&#039;&#039;||Name of the solver that should solve QP sub problems.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;uP&#039;&#039;||User supplied parameters for the problem (Init  File Format). Use &#039;&#039;Prob.user&#039;&#039; for extra parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;uPName&#039;&#039;||Problem name (&#039;&#039;Prob.Name&#039;&#039;) connected to the user supplied parameters in &#039;&#039;(&#039;&#039;uP).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;user&#039;&#039;||User supplied parameters for the problem. Should be stored in subfields, for example &#039;&#039;Prob.user.aParam&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;WarmStart&#039;&#039;||For solver with  support for warmstarts, &#039;&#039;WarmStart &amp;gt; &#039;&#039;0 indicates that  the solver should do a warm start.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;x_0&#039;&#039;||Starting point.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on the variables &#039;&#039;x&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;x_U &#039;&#039;||Upper bounds on the variables &#039;&#039;x&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;x_min&#039;&#039;||Lower bounds on plot region.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;x_max&#039;&#039;||Upper bounds on plot region.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;x_opt&#039;&#039;||Stationary points &#039;&#039;x*&#039;&#039;, one per row (if known). It is possible to define an extra column, in which a zero (0) indicates a minimum point, a one (1) a saddle point, and a two (2) a maximum. As default, minimum points are assumed. The corresponding function values for each row in &#039;&#039;x opt &#039;&#039;should be given in &#039;&#039;Prob.f opt&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xName&#039;&#039;||Name of each decision variable in &#039;&#039;x&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Warning&#039;&#039;||If 1 (default), some warnings may be issued.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+Table 135: The fields defining sub-structures in the problem structure &#039;&#039;Prob&#039;&#039;.  Default values are in all tables given in parenthesis at the end of each item.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;&amp;lt;hr /&amp;gt;||Description&#039;&#039;&#039;&amp;lt;hr /&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;QP&#039;&#039;||Structure with special fields for linear and quadratic problems,  see Table 136.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LS&#039;&#039;||Structure with special fields for least squares problems,  see Table 137.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure with special fields for mixed-integer programming, see Table 138.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;GO&#039;&#039;||Structure with special fields for global optimization.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CGO&#039;&#039;||Structure with special fields for costly global optimization.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ExpFit&#039;&#039;||Structure with special fields for exponential fitting  problems,  see Table 139.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;NTS&#039;&#039;||Structure with special fields for nonlinear time series.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LineParam&#039;&#039;||Structure with special fields for line search optimization parameters, see Table 140.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with special fields for optimization parameters,  see Table 141. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PartSep&#039;&#039;||Structure with special fields for partially separable functions, see Table 142. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SOL&#039;&#039;||Structure with  special fields for  SOL (Stanford Optimization  Laboratory) solvers,  see Table 143.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Solver&#039;&#039;||Structure with fields &#039;&#039;Name&#039;&#039;, &#039;&#039;Alg &#039;&#039;and &#039;&#039;Method&#039;&#039;. &#039;&#039;Name &#039;&#039;is the name of the solver.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Alg&#039;&#039;||is the solver algorithm to be used. &#039;&#039;Method &#039;&#039;is the solver sub-method tech- nique. See the solver descriptions Section 11.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;FUNCS&#039;&#039;||Structure with  user defined names of the m-files computing the objective, gradient, Hessian etc.  See  Table 144.  These routines are called from the corresponding gateway routine&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DUNDEE&#039;&#039;||Structure with special fields for the MINLP  solvers (University of Dundee).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PENOPT&#039;&#039;||Structure with special fields for the PENOPT solvers.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+Table 136: Information stored in the structure &#039;&#039;Prob.QP&#039;&#039;.  The three last sub-fields, always part of the &#039;&#039;Prob &#039;&#039;subfields, could optionally be put here to give information to a subproblem QP, LP, dual LP or feasible point (Phase 1) solver.&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;&amp;lt;hr /&amp;gt;||&#039;&#039;&#039;Description&#039;&#039;&#039;&amp;lt;hr /&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;F&#039;&#039;||Constant matrix &#039;&#039;F &#039;&#039;in 1 &#039;&#039;x1F x &#039;&#039;+ &#039;&#039;c1x&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;c&#039;&#039;||Cost vector &#039;&#039;c &#039;&#039;in 1 &#039;&#039;x1F x &#039;&#039;+ &#039;&#039;c1x&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;B&#039;&#039;||Logical vector of the same length as the number of variables. A zero corresponds to a variable in the basis.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;y&#039;&#039;||Dual parameters &#039;&#039;y&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Q&#039;&#039;||Orthogonal matrix &#039;&#039;Q &#039;&#039;in QR-decomposition.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;R&#039;&#039;||Upper triangular matrix &#039;&#039;R &#039;&#039;in QR-decomposition.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;E&#039;&#039;||Pivoting matrix &#039;&#039;E &#039;&#039;in QR-decomposition. Stored sparse. &#039;&#039;Ascale	&#039;&#039;Flag if to scale the &#039;&#039;A &#039;&#039;matrix, the linear constraints. &#039;&#039;DualLimit 	&#039;&#039;Stop limit  on the dual objective.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;UseHot&#039;&#039;||True if to use a crash basis (hot start).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;HotFile&#039;&#039;||If nonempty and UseCrash true, read basis from this file.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;HotFreq&#039;&#039;||How often to save a crash basis.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;HotN&#039;&#039;||The number of crash basis files.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with special fields for optimization parameters,  see Table 141.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SOL&#039;&#039;||Structure with special fields for SOL (Stanford Optimization Labo- ratory) solvers,  see Table 143.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Solver&#039;&#039;||Structure with fields &#039;&#039;Name&#039;&#039;, &#039;&#039;Alg &#039;&#039;and &#039;&#039;Method&#039;&#039;. &#039;&#039;Name &#039;&#039;is the name of the solver.  &#039;&#039;Alg &#039;&#039;is the solver algorithm to be used. &#039;&#039;Method &#039;&#039;is the solver sub-method technique. See the solver descriptions Section 11.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+Table 137: Information stored in the structure &#039;&#039;Prob.LS&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;&amp;lt;hr /&amp;gt;||colspan=&amp;quot;2&amp;quot;|&#039;&#039;&#039;Description&#039;&#039;&#039;&amp;lt;hr /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;weightType&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Weighting type:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;0&#039;&#039;||No weighting.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;1&#039;&#039;||Weight with data in &#039;&#039;y&#039;&#039;. If &#039;&#039;y&#039;&#039;(&#039;&#039;t&#039;&#039;) = 0, the weighting is 0, i.e. deleting this residual element.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;2&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Weight with weight vector or matrix in &#039;&#039;weightY&#039;&#039;. If &#039;&#039;weightY &#039;&#039;is a vector then weighting by &#039;&#039;weigthY.*r &#039;&#039;(element wise multipli- cation). If &#039;&#039;weightY &#039;&#039;is a matrix then weighting by &#039;&#039;weigthY * r&#039;&#039; (matrix multiplication).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;3&#039;&#039;||colspan=&amp;quot;2&amp;quot;|&#039;&#039;nlp_r&#039;&#039; calls the routine &#039;&#039;weightY &#039;&#039;(must be a string with  the routine name) to compute the residuals.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;weightY&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Either empty, a vector, a matrix or a string, see &#039;&#039;weightType&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;t&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Time vector &#039;&#039;t&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;y&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Vector or matrix with observations &#039;&#039;y&#039;&#039;(&#039;&#039;t&#039;&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;E&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Fixed matrix, in linear least squares problem &#039;&#039;E * x - y&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;yUse&#039;&#039;||colspan=&amp;quot;2&amp;quot;|If &#039;&#039;yU se&#039;&#039;= 0 compute residual as &#039;&#039;f &#039;&#039;(&#039;&#039;x, t&#039;&#039;) &#039;&#039;- y&#039;&#039;(&#039;&#039;t&#039;&#039;) (default),  otherwise &#039;&#039;y&#039;&#039;(&#039;&#039;t&#039;&#039;) should be treated separately by the solver and the residual routines just return &#039;&#039;f &#039;&#039;(&#039;&#039;x, t&#039;&#039;).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SepAlg&#039;&#039;||colspan=&amp;quot;2&amp;quot;|If &#039;&#039;SepAlg&#039;&#039; = 1, use separable non linear least squares formulation (default 0).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+Table 138: Information stored in the structure &#039;&#039;Prob.MIP&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;&amp;lt;hr /&amp;gt;||Description&#039;&#039;&#039;&amp;lt;hr /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;IntVars&#039;&#039;||Which variables are integer valued&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;VarWeight&#039;&#039;||Priority  vector for each variable.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Function value for point defined in &#039;&#039;xIP&#039;&#039;.  Gives an upper bound on the IP value wanted.  Makes it possible to cut branches and avoid node computations&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The point &#039;&#039;x &#039;&#039;giving the function value &#039;&#039;fIP&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;PI&#039;&#039;||See the Tomlab /Xpress User&#039;s Guide. &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SC&#039;&#039;||See the Tomlab /Xpress User&#039;s Guide. &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SI&#039;&#039;||See the Tomlab /Xpress User&#039;s Guide. &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;sos1&#039;&#039;||See the Tomlab /Xpress User&#039;s Guide. &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;sos2&#039;&#039;||See the Tomlab /Xpress User&#039;s Guide. &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;xpcontrol&#039;&#039;||See the Tomlab/  Xpress User&#039;s Guide. &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;callback&#039;&#039;||See the Tomlab /Xpress User&#039;s Guide. &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;KNAPSACK&#039;&#039;||See the Tomlab /Xpress User&#039;s Guide.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+Table 139: Information stored in the structure &#039;&#039;Prob.ExpFit&#039;&#039;. Default values in parenthesis.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;&amp;lt;hr /&amp;gt;||&#039;&#039;&#039;Description&#039;&#039;&#039;&amp;lt;hr /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;p&#039;&#039;||Number of exponential terms (2).&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;wType&#039;&#039;||Weighting type (1).&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;eType&#039;&#039;||Type of exponential terms (1).&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;infCR&#039;&#039;||Information criteria for selection of best number of terms (0).&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;dType&#039;&#039;||Differentiation formula (0).&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;geoType&#039;&#039;||Type of equation (0).&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;qType&#039;&#039;||Length &#039;&#039;q &#039;&#039;of partial sums (0).&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;sigType&#039;&#039;||Sign to use in (&#039;&#039;P ± vQ&#039;&#039;)&#039;&#039;/D &#039;&#039;in &#039;&#039;exp geo &#039;&#039;for &#039;&#039;p &#039;&#039;= 3&#039;&#039;, &#039;&#039;4 (0).&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;lambda&#039;&#039;||Vector of dimension &#039;&#039;p&#039;&#039;, intensities.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;alpha&#039;&#039;||Vector of dimension &#039;&#039;p&#039;&#039;, weights.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;beta&#039;&#039;||Vector of dimension &#039;&#039;p&#039;&#039;, weights in generalized exponential models.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x0Type&#039;&#039;||Type of starting value algorithm.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;sumType&#039;&#039;||Type of exponential sum.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+Table 140: Information stored in the structure &#039;&#039;Prob.LineParam&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;&amp;lt;hr /&amp;gt;||Description&#039;&#039;&#039;&amp;lt;hr /&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LineAlg&#039;&#039;||Line search algorithm. 0 = quadratic interpolation, 1 = cubic inter- polation, 2 = curvilinear quadratic interpolation (not robust), 3 = curvilinear cubic interpolation (not robust) ( &#039;&#039;LineAlg  &#039;&#039;= 1).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;sigma&#039;&#039;||Line search accuracy; 0 &#039;&#039;&amp;lt; sigma &amp;lt; &#039;&#039;1. &#039;&#039;sigma &#039;&#039;= 0&#039;&#039;.&#039;&#039;9 inaccurate line search. &#039;&#039;sigma &#039;&#039;= 0&#039;&#039;.&#039;&#039;1 accurate line search (0&#039;&#039;.&#039;&#039;9).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;InitStepLength&#039;&#039;||Initial length of step (1&#039;&#039;.&#039;&#039;0).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIter&#039;&#039;||Maximum number of line search iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fLowBnd&#039;&#039;||Lower bound on optimal function value. Used in the line search by Fletcher, m-file &#039;&#039;LineSearch &#039;&#039;(= &#039;&#039;-realmax&#039;&#039;).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rho&#039;&#039;||Determines the &#039;&#039;? &#039;&#039;line (0&#039;&#039;.&#039;&#039;01).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;tau1&#039;&#039;||Determines how fast step grows in phase 1 (9).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;tau2&#039;&#039;||How near end point of \[&#039;&#039;a, b&#039;&#039;\] (0&#039;&#039;.&#039;&#039;1).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;tau3&#039;&#039;||Choice in \[&#039;&#039;a, b&#039;&#039;\] phase 2 (0&#039;&#039;.&#039;&#039;5).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps1&#039;&#039;||Minimal length for interval \[&#039;&#039;a, b&#039;&#039;\] (10&#039;&#039;-&#039;&#039;7 ).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps2&#039;&#039;||Minimal reduction (100 &#039;&#039;× E&#039;&#039;).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+Table 141: Information stored in the structure &#039;&#039;Prob.optParam&#039;&#039;. Default values in parenthesis. The values are selectively used in Base Module solvers. Refer to individual  solver documentation for more information.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;&amp;lt;hr /&amp;gt;||&#039;&#039;&#039;Description&#039;&#039;&#039;&amp;lt;hr /&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Solver major print level in file output. &#039;&#039;PriFreq	&#039;&#039;Print frequency in optimization solver. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SummFreq&#039;&#039;||Summary frequency in optimization solver.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MinorPriLev&#039;&#039;||Minor print level in file output in sub-problem solver.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Flag for one-row-per-iteration printout  during optimization (0).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;wait&#039;&#039;||Flag, if true use pause statements  after output in each iteration (0).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxFunc&#039;&#039;||Maximal number of function evaluations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIter&#039;&#039;||Maximum number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MajorIter&#039;&#039;||Maximum number of iterations in major problem.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MinorIter&#039;&#039;||Maximum number of iterations in minor problem.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_f&#039;&#039;||Relative convergence tolerance in &#039;&#039;f &#039;&#039;(10&#039;&#039;-&#039;&#039;8 ).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_absf&#039;&#039;||Absolute convergence tolerance for the function value ( &#039;&#039;-realmax&#039;&#039;).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_x&#039;&#039;||Relative convergence tolerance in parameter solution &#039;&#039;x&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_dirg&#039;&#039;||Convergence tolerance for the directed derivative (10&#039;&#039;-&#039;&#039;8 ).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_c&#039;&#039;||Feasibility tolerance for nonlinear constraints.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_g&#039;&#039;||Gradient (or reduced gradient) convergence tolerance (10&#039;&#039;-&#039;&#039;7 ).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_Rank&#039;&#039;||Rank test tolerance.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;EpsGlob&#039;&#039;||Global/local weight parameter in global optimization (10&#039;&#039;-&#039;&#039;4 ).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fTol&#039;&#039;||Relative accuracy in the computation of the function value.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xTol&#039;&#039;||If &#039;&#039;x ? &#039;&#039;\[&#039;&#039;x L, x L &#039;&#039;+ &#039;&#039;bT ol&#039;&#039;\] or \[&#039;&#039;x U - bT ol, x U &#039;&#039;\], fix &#039;&#039;x &#039;&#039;on bound (100 &#039;&#039;* E  &#039;&#039;=2&#039;&#039;.&#039;&#039;2204 &#039;&#039;· &#039;&#039;10&#039;&#039;-&#039;&#039;13 ).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;bTol&#039;&#039;||Feasibility tolerance for linear constraints.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;cTol&#039;&#039;||Feasibility tolerance for nonlinear constraints.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MinorTolX&#039;&#039;||Relative convergence tolerance in parameters &#039;&#039;x &#039;&#039;in sub-problem.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;size_x&#039;&#039;||Size at optimum for the variables  &#039;&#039;x&#039;&#039;, used in the convergence tests ( 1). Only changed if scale very different, &#039;&#039;x &amp;gt;&amp;gt; &#039;&#039;1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;size_f&#039;&#039;||Size at optimum for the function &#039;&#039;f &#039;&#039;, used in the convergence tests ( 1). Only changed if scale very different, &#039;&#039;f &amp;gt;&amp;gt; &#039;&#039;1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;size_c&#039;&#039;||Size at optimum for the constraints &#039;&#039;c&#039;&#039;, used in the convergence tests ( 1). Only changed if scale very different, &#039;&#039;c &amp;gt;&amp;gt; &#039;&#039;1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PreSolve&#039;&#039;||Flag if presolve analysis is to be applied on linear constraints (0).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+Table 141: Information stored in the structure &#039;&#039;Prob.optParam&#039;&#039;, continued.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;&amp;lt;hr /&amp;gt;||&#039;&#039;&#039;Description&#039;&#039;&#039;&amp;lt;hr /&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DerLevel&#039;&#039;||Derivative Level, knowledge about nonlinear derivatives: 0 = Some compo- nents of the objective gradient are unknown and some components  of the constraint gradient are unknown, 1 = The objective gradient is known but some or all components of the constraint gradient are unknown, 2 = All constraint gradients are known but some or all components of the objec- tive gradient are unknown, 3 = All objective and constraint gradients are known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;GradCheck&#039;&#039;||&#039;&#039;0&#039;&#039;, &#039;&#039;1&#039;&#039;, &#039;&#039;2&#039;&#039;, &#039;&#039;3 gives increasing level of user-supplied gradient checks.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DiffInt&#039;&#039;||Difference interval in derivative estimates.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CentralDiff&#039;&#039;||Central difference interval in derivative estimates.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;QN InitMatrix&#039;&#039;||Initial   matrix   for  Quasi-Newton,  may  be  set  by  the  user.	When&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;QN InitMatrix&#039;&#039;||is empty, the identity matrix is used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;splineSmooth&#039;&#039;||Smoothness parameter sent to the SPLINE Toolbox routine &#039;&#039;csaps.m &#039;&#039;when computing numerical approximations of the derivatives  (&#039;&#039;-&#039;&#039;1 default).   0 means least squares straight line fit.  1 means natural (variational)  cubic spline interpolant. The transition range in \[0,1\] is small, suggested tries are 0.2 or 0.4. &#039;&#039;&amp;lt; &#039;&#039;0 lets the routine csaps make the choice (default)&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;splineTol&#039;&#039;||Tolerance parameter sent  to the SPLINE Toolbox routine &#039;&#039;spaps.m &#039;&#039;when computing numerical approximations of the derivatives (10&#039;&#039;-&#039;&#039;3 ). Should be set in the order of the noise level.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BigStep&#039;&#039;||Unbounded step size. Used to detect unbounded nonlinear problems. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BigObj&#039;&#039;||Unbounded objective value. Used to detect unbounded nonlinear problems. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CHECK&#039;&#039;||If true, no more check is done on the structure. Set to true (=1) after first call to &#039;&#039;optParamSet&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+Table 142: Information stored in the structure &#039;&#039;Prob.PartSep&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;&amp;lt;hr /&amp;gt;||&#039;&#039;&#039;Description&#039;&#039;&#039;&amp;lt;hr /&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;pSepFunc&#039;&#039;||Number of partially separable functions.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;index&#039;&#039;||Index for the partially separable function to compute, i.e. if &#039;&#039;i &#039;&#039;= &#039;&#039;index&#039;&#039;, compute &#039;&#039;fi &#039;&#039;(&#039;&#039;x&#039;&#039;).  If &#039;&#039;index &#039;&#039;= 0, compute the sum of all, i.e. &#039;&#039;f &#039;&#039;(&#039;&#039;x&#039;&#039;) = ? &#039;&#039;fi &#039;&#039;(&#039;&#039;x&#039;&#039;). i&#039;&#039;=1 	&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+Table 143: Information stored in the structure &#039;&#039;Prob.SOL&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SpecsFile&#039;&#039;||If nonempty gives the name of a file which is written  in the SOL SPECS file format.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PrintFile&#039;&#039;||If nonempty gives the name of a file which the SOL solver should print information on. The amount printed is dependent on the print level in &#039;&#039;Prob.SOL.optPar(1)&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SummFile&#039;&#039;||If nonempty gives the name of a file which the  SOL solver prints summary information on.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xs&#039;&#039;||Vector with solution &#039;&#039;x &#039;&#039;and slack variables &#039;&#039;s&#039;&#039;. Used for warm starts.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;hs&#039;&#039;||Vector with basis information in the SOL sparse solver format. Used for warm starts.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;nS&#039;&#039;||Number of superbasics. Used for warm starts.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;hElastic&#039;&#039;||Elastic variable information in &#039;&#039;SQOPT&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;iState&#039;&#039;||Vector with basis information in the SOL dense solver format. Used for warm starts.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;cLamda&#039;&#039;||Vector with Lagrange multiplier information in the SOL dense solver format. Used for warm starts.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;H&#039;&#039;||Cholesky factor of Hessian Approximation.  Either in natural order (&#039;&#039;Hessian Yes&#039;&#039;) or reordered (&#039;&#039;Hessian No&#039;&#039;). Used for warm starts using natural order with &#039;&#039;NPSOL &#039;&#039;and &#039;&#039;NLSSOL&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;callback&#039;&#039;||For large dense or nearly dense quadratic problems (&#039;&#039;probType &#039;&#039;==&#039;&#039;&#039;qp&#039;&#039;&#039;) it is more efficient  to use a callback function from the MEX routine to compute the matrix-vector product &#039;&#039;F ·x&#039;&#039;. Then &#039;&#039;Prob.QP.F&#039;&#039; is never copied into the MEX solver. This option applies to &#039;&#039;SQOPT&#039;&#039; only.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;optPar&#039;&#039;||Vector with &#039;&#039;optParN &#039;&#039;elements with parameter information for SOL solvers. Initialized  to missing value, &#039;&#039;-&#039;&#039;999. The elements  used aredescribed in the help for each solver. If running TOMLAB  format, also see the help of the TOMLAB  solver interface routine whos name always has the letters TL added, e.g. &#039;&#039;minosTL&#039;&#039;. &#039;&#039;optParN	&#039;&#039;Number of elements in &#039;&#039;optPar&#039;&#039;, defined  as 62.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+Table 144: Information stored in the structure &#039;&#039;Prob.FUNCS&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;&amp;lt;hr /&amp;gt;||&#039;&#039;&#039;Description&#039;&#039;&#039;&amp;lt;hr /&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;f&#039;&#039;||Name of m-file computing the objective function &#039;&#039;f &#039;&#039;(&#039;&#039;x&#039;&#039;).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;g&#039;&#039;||Name of m-file computing the gradient vector &#039;&#039;g&#039;&#039;(&#039;&#039;x&#039;&#039;). If &#039;&#039;Prob.FUNCS.g&#039;&#039; is empty then numerical derivatives will be used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;H&#039;&#039;||Name of m-file computing the Hessian matrix &#039;&#039;H &#039;&#039;(&#039;&#039;x&#039;&#039;).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;c&#039;&#039;||Name of m-file computing the vector of constraint functions &#039;&#039;c&#039;&#039;(&#039;&#039;x&#039;&#039;).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;dc&#039;&#039;||Name of m-file computing the matrix of constraint normals &#039;&#039;?c&#039;&#039;(&#039;&#039;x&#039;&#039;)&#039;&#039;/dx&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;d2c&#039;&#039;||Name of m-file computing the 2nd part of 2nd derivative matrix of the Lagrangian function, ?&#039;&#039;i ?i ?&#039;&#039;2 &#039;&#039;c&#039;&#039;(&#039;&#039;x&#039;&#039;)&#039;&#039;/dx&#039;&#039;2 .&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;r&#039;&#039;||Name of m-file computing the residual vector &#039;&#039;r&#039;&#039;(&#039;&#039;x&#039;&#039;).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;J&#039;&#039;||Name of m-file computing the Jacobian matrix &#039;&#039;J &#039;&#039;(&#039;&#039;x&#039;&#039;).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;d2r&#039;&#039;||Name of m-file computing the 2nd part of the Hessian for nonlinear least squares problem, i.e. ? &#039;&#039;ri &#039;&#039;(&#039;&#039;x&#039;&#039;) &#039;&#039;?  ri &#039;&#039;(&#039;&#039;x&#039;&#039;) .&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+Table 145: Information stored in the structure &#039;&#039;Prob.DUNDEE&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;&amp;lt;hr /&amp;gt;||Description&#039;&#039;&#039;&amp;lt;hr /&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;callback&#039;&#039;||If 1, use a callback to Matlab to compute &#039;&#039;QP.F · x &#039;&#039;in &#039;&#039;BQPD  &#039;&#039;and &#039;&#039;miqpBB&#039;&#039; Faster when F is large and nearly dense. Avoids copying the matrix to the MEX solvers.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;kmax&#039;&#039;||Maximum dimension of the reduced space (&#039;&#039;k&#039;&#039;), default equal to dimension of problem. Set to 0 if solving an LP problem.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;mlp&#039;&#039;||Maximum number of levels of recursion.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;mode&#039;&#039;||Mode of operation, default set as 2 &#039;&#039;* P rob.W armStart&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;x&#039;&#039;||Solution (warmstart).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;k&#039;&#039;||Dimension of reduced space (warmstart).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;e&#039;&#039;||Steepest-edge  normalization coefficient (warmstart).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ls&#039;&#039;||Indices of active constraints, first &#039;&#039;n - k&#039;&#039;. (warmstart).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;lp&#039;&#039;||List of pointers to recursion information in &#039;&#039;ls &#039;&#039;(warmstart).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;peq&#039;&#039;||Pointer to end of equality constraint indices in &#039;&#039;ls &#039;&#039;(warmstart).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PrintFile&#039;&#039;||Name of print file. Amount/print type is determined by &#039;&#039;Prob.DUNDEE.optPar(1)&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;optPar&#039;&#039;||Vector with optimization parameters. Described in Table 146.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+Table 146: &#039;&#039;Prob.DUNDEE.optPar &#039;&#039;values used by TOMLAB  /MINLP solvers . &#039;&#039;-&#039;&#039;999 in any element gives default value. 	&lt;br /&gt;
|-&lt;br /&gt;
|||||||||colspan=&amp;quot;4&amp;quot;|&#039;&#039;&#039;Used by:&#039;&#039;&#039;||&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Index&#039;&#039;&#039;&amp;lt;hr /&amp;gt;||&#039;&#039;&#039;Name&#039;&#039;&#039;&amp;lt;hr /&amp;gt;||&#039;&#039;&#039;Default&#039;&#039;&#039;&amp;lt;hr /&amp;gt;||&#039;&#039;&#039;Description&#039;&#039;&#039;&amp;lt;hr /&amp;gt;||BQPD||miqpBB&amp;lt;hr /&amp;gt;||filterSQP&amp;lt;hr /&amp;gt;||minlpBB&amp;lt;hr /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|1||iprint||0||Print level in DUNDEE solvers.||O||O||O||O&lt;br /&gt;
|-&lt;br /&gt;
|2||tol||10&#039;&#039;-&#039;&#039;10||Relative accuracy in BQPD solution.||O||O||O||O&lt;br /&gt;
|-&lt;br /&gt;
|3||emin||1||1/0:  Use/do not use constraint scaling in BQPD||O||O||O||O&lt;br /&gt;
|-&lt;br /&gt;
|4||sgnf||5 &#039;&#039;· &#039;&#039;10&#039;&#039;-&#039;&#039;4||Maximum relative error in two numbers equal in exact arithmetic.||O||O||O||O&lt;br /&gt;
|-&lt;br /&gt;
|5||nrep||2||Maximum number of refinement steps.||O||O||O||O&lt;br /&gt;
|-&lt;br /&gt;
|6||npiv||3||No repeat of more than &#039;&#039;npiv &#039;&#039;steps were taken.||O||O||O||O&lt;br /&gt;
|-&lt;br /&gt;
|7||nres||2||Maximum number of restarts if unsuccessful.||O||O||O||O||&lt;br /&gt;
|-&lt;br /&gt;
|8||nfreq||500||Maximum interval  between refactorizations.||O||O||O||O||&lt;br /&gt;
|-&lt;br /&gt;
|9||ubd||100||Constraint violation  parameter I||-||-||O||O&lt;br /&gt;
|-&lt;br /&gt;
|10||tt||0.125||Constraint violation parameter II||-||-||O||O&lt;br /&gt;
|-&lt;br /&gt;
|11||NLP_eps||10&#039;&#039;-&#039;&#039;6||Relative tolerance for NLP  solutions||-||-||O||O&lt;br /&gt;
|-&lt;br /&gt;
|12||epsilon||10&#039;&#039;-&#039;&#039;6||Accuracy for &#039;&#039;x &#039;&#039;tests||O||O||O||O&lt;br /&gt;
|-&lt;br /&gt;
|13||MIopttol||10&#039;&#039;-&#039;&#039;4||Accuracy for &#039;&#039;f &#039;&#039;tests||-||O||-||O||&lt;br /&gt;
|-&lt;br /&gt;
|14||fIP||1020||Upper bound on the IP value wanted.||-||O||-||O&lt;br /&gt;
|-&lt;br /&gt;
|15||timing||0||1/0:  Use/do not use timing||-||O||-||-&lt;br /&gt;
|-&lt;br /&gt;
|16||max time||4000||Maximum time (sec&#039;s) allowed for the run||-||O||-||-&lt;br /&gt;
|-&lt;br /&gt;
|17||branchtype||1||Branching strategy (1&#039;&#039;, &#039;&#039;2&#039;&#039;, &#039;&#039;3)||-||O||-||-&lt;br /&gt;
|-&lt;br /&gt;
|18||ifsFirst||0||Exit when first IP solution is found||-||O||-||-&lt;br /&gt;
|-&lt;br /&gt;
|19||infty||1020||Large value used to represent infinity||O||O||O||O&lt;br /&gt;
|-&lt;br /&gt;
|20||Nonlin||0||Treat all constraints as nonlinear if 1||-||-||O||O&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>213.114.77.5</name></author>
	</entry>
</feed>