<?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=Bjorn</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=Bjorn"/>
	<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=Special:Contributions/Bjorn"/>
	<updated>2026-11-01T21:23:30Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_stoaMINLP&amp;diff=3121</id>
		<title>MIPNLP stoaMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_stoaMINLP&amp;diff=3121"/>
		<updated>2015-03-09T14:34:29Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Prob structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
stoaMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;stoaMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Recommended is to first set IterPrint, to get information each iteration&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.optParam.IterPrint = 1;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = stoaMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
To make a restart (warm start), just set the warm start flag, and call stoaMINLP once again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.WarmStart = 1;&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
stoaMINLP will read warm start information from the stoaMINLPSave.mat file. Another warm start (with same MaxFunc) is made by just calling tomRun again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result  = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a restart from the warm start information in the Result structure, make a call to WarmDefGLOBAL before calling stoaMINLP. WarmDefGLOBAL moves information from the Result structure to the Prob structure and sets the warm start flag, &amp;lt;code&amp;gt;Prob.WarmStart = 1;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = WarmDefGLOBAL(&#039;stoaMINLP&#039;, Prob,  Result);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where Result is the result structure returned by the previous run. A warm start (with same MaxIter)  is done by just calling tomRun again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result  = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make another warm start with new MaxIter 100, say, redefine MaxIter as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.optParam.MaxIter = 100;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then repeat the two lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = WarmDefGLOBAL(&#039;stoaMINLP&#039;, Prob,  Result); &lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in &#039;&#039;Prob&#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;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&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;Convex&#039;&#039;||If  Convex==1,  assume NLP  problems are convex,  and only one local NLP solver call is used at each node. &amp;lt;br&amp;gt;If Convex==0 (Default), [[multiMin]]  is used to do many calls to a local solver to determine the global minima at each node. The global minimum with most components integer valued is chosen.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by stoaMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in stoaMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOpt&#039;&#039;||Print level in sub-solvers ([[SOL_SNOPT|SNOPT]] and other NLP solvers):&amp;lt;br&amp;gt;=0 No output; &#039;&#039;&amp;gt;&#039;&#039;0 Convergence results.&amp;lt;br&amp;gt;&#039;&#039;&amp;gt;&#039;&#039;1 Output every iteration, &amp;lt;br&amp;gt;&#039;&#039;&amp;gt;&#039;&#039;2 Output each step in the NLP alg&amp;lt;br&amp;gt;For other NLP solvers,  see the documentation for the solver&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;WarmStart&#039;&#039;||If   true, &#039;&#039;&amp;gt;&#039;&#039;0, stoaMINLP  reads the output  from the last run   from Prob.stoaMINLP, if it exists. If it doesn&#039;t exist, stoaMINLP attempts to open and read warm start data from mat-file stoaMINLPSave.mat. stoaMINLP uses the warm start information to continue from the last run. The mat-file minlp- SolveSave.mat is saved every Prob.MIP.SaveFreq iteration.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverNLP&#039;&#039;||Name of the solver used for NLP subproblems.  If empty, the default solver is found calling GetSolver(&#039;con&#039;,1); &amp;lt;br&amp;gt;If TOMLAB  /SOL installed, [[SOL_SNOPT|SNOPT]] is the default solver.&amp;lt;br&amp;gt;If SolverNLP is a SOL solver ([[SOL_SNOPT|SNOPT]], [[SOL_MINOS|MINOS]] or [[SOL_NPSOL|NPSOL]]), the SOL.optPar and SOL.PrintFile is used:&amp;lt;br&amp;gt;See help minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverNLP0&#039;&#039;||Name of the solver used for the initial NLP-problem. If empty, SolverNLP is used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems. If empty, the default solver is found calling GetSolver(&#039;lp&#039;,1). If TOMLAB /[[SOL]] or /[[SOL_SNOPT|SNOPT]] or /[[SOL_NPSOL|NPSOL]] installed, [[SOL_MINOS|MINOS]] is the default solver. If SolverLP is a [[SOL]] solver ([[SOL_MINOS|MINOS]], [[SOL_SNOPT|SNOPT]] or [[SOL_NPSOL|NPSOL]]), the SOL.optPar and SOL.PrintFile is used: See the wiki-manuals or the in-MATLAB help of minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;RandState&#039;&#039;||See help rngset for how to initialize the random generator. &amp;lt;br&amp;gt;Default is RandState = -1&amp;lt;br&amp;gt;If Convex == 0 and globalSolver == &#039;multiMin&#039;, RandState is sent to [[multiMin]] to initizalize the random generator.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xInit&#039;&#039;||Parameter sent to the solver [[multiMin]] which is used to solve relaxed sub-problems for nonconvex problems (with Prob.Convex set to false). xInit determines the way initial points are generated and is set as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Either&amp;lt;br&amp;gt;&lt;br /&gt;
1x1 number - &amp;lt;br&amp;gt;&lt;br /&gt;
If &amp;gt; 0, the number of random initial points, default min(3000,30*n);&amp;lt;br&amp;gt;&lt;br /&gt;
If &amp;lt; 0, generate |xInit| points with Latin Hypercube design&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
d x m matrix - Every column is an initial point (of length d = Prob.N)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Default value for xInit is min(3000,max(60,N*6)) at all nodes except the root node&amp;lt;br&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xInit0&#039;&#039;||Parameter sent to the solver [[multiMin]] when solving the initial relaxed NLP problem at the root node.&amp;lt;br&amp;gt;&lt;br /&gt;
Default value for xInit0 is min(3000,max(100,N*10))&amp;lt;br&amp;gt;&lt;br /&gt;
See xInit for more information.&amp;lt;br&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure defining integer optimization parameters. See the table below for a description of each field used in &#039;&#039;Prob.MIP&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;STOAMINLP&#039;&#039;||Structure with solver-specific options. See the table below with descriptions of the fields used in &#039;&#039;Prob.STOAMINLP&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below with descriptions of the fields used in &#039;&#039;Prob.optParam&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in &#039;&#039;&#039;Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;VarWeight&#039;&#039;||Weight for each variable in the variable selection phase. &amp;lt;br&amp;gt; A lower value gives higher priority. Setting Prob.MIP.VarWeight might improve convergence.&amp;lt;br&amp;gt;&lt;br /&gt;
VarWeight must be of length N, but the values corresponding to noninteger variables will be ignored.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||&#039;&#039;stoaMINLP &#039;&#039;stops if the duality gap is less than DualGap. DualGap = 1, stop at first integer solution e.g. DualGap = 0.01, stop if solution &#039;&#039;&amp;lt; &#039;&#039;1% from optimal solution. &amp;lt;br&amp;gt;Note that a finite lower bound will only be set by the solver and thus generating a gap when Prob.Convex is set to true.&amp;lt;br&amp;gt;If Prob.Convex is set to false, the lower bound will be -Inf.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;NodeSel&#039;&#039;||Node selection method: &amp;lt;br&amp;gt;= 1 Depth First. Priority on nodes with more integer components. Default &amp;lt;br&amp;gt;= 2 Breadth First. Priority on nodes with more integer components. &amp;lt;br&amp;gt;= 3 Pure LIFO (Last in, first out) Depth First. &amp;lt;br&amp;gt;= 4 Pure FIFO (First in, first out) Breadth First. &amp;lt;br&amp;gt;= 5 Maximize integer components. &amp;lt;br&amp;gt;= 6 Best bound.&amp;lt;br&amp;gt;= 7 Best estimate using pseudo-costs. &amp;lt;br&amp;gt;= 8 Best projection.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Backtrack&#039;&#039;||Switch node selection method during branch and bound.&amp;lt;br&amp;gt;&lt;br /&gt;
When set to any of the NodeSel methods, node selection method is changed to the Backtrack value when the backtracking criterion (see parameter BackCrit below) is fulfilled.&amp;lt;br&amp;gt;For available choices, see NodeSel above. Default is 2, Breadth First.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BackCrit&#039;&#039;||Backtracking criterion, used when Backtrack &amp;gt; 0.&amp;lt;br&amp;gt;&lt;br /&gt;
= 0. Integer solution found. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
= 1. Current node worse than best estimate of active nodes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;VarSel&#039;&#039;||Variable selection method in branch and bound. &amp;lt;br&amp;gt;= 1 Use variable with most fractional value. &amp;lt;br&amp;gt;= 2 Use gradient and distance to nearest integer value. &amp;lt;br&amp;gt;= 3 Pseudo-cost-based branching.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;KNAPSACK&#039;&#039;||If = 1, use a knapsack heuristic. Default 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If = 1, use a rounding heuristic. Default 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SaveFreq&#039;&#039;||Warm start info saved on stoaMINLPSave.mat every SaveFreq iteration (default -1, i.e. no warm start info is saved)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===STOAMINLP structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with solver-specific options&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.STOAMINLP&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;USE_CUTS&#039;&#039;||Flag to use cutting plane algorithm described in [[StoaMINLP#Algorithm]]. Using cuts is not recommended for nonconvex problems. &amp;lt;br&amp;gt;Set nonzero to enable, zero to disable. By default, STOAMINLP.USE_CUTS is set to Prob.Convex.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LoL_ecp&#039;&#039;||Parameter regulating likelihood of linearization using extended cutting plane. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;TOD_ecp&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for  extended cutting plane linearizations. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BCB_ecp&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using extended cutting plane. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LoL_ff&#039;&#039;||Parameter regulating likelihood of linearization using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;TOD_ff&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for  linearizations using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BCB_ff&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LoL_nlpr&#039;&#039;||Parameter regulating likelihood of linearization using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;TOD_nlpr&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for linearizations using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BCB_nlpr&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rTYPE&#039;&#039;||= 0  r is fixed to the value in rVALUE.&amp;lt;br&amp;gt;= 1  r is a uniformly distributed random number in the interval [0,1]. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rVALUE&#039;&#039;||Defines the value of r when rTYPE is set to zero. Default is 0.5.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTPOOL&#039;&#039;||= 0 All linearizations constraints are kept in the master problem. &amp;lt;br&amp;gt;= 1 Manage a pool with inactive linearization constraints. If an inactive constraint gets violated, it is brought back from the pool. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CutDelBnd&#039;&#039;||The number of consecutive times a linearization can be inactive before it gets removed and put into the inactive pool. Default is 15 times.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LIM_DEL_CUT&#039;&#039;||= 0  No extra deletion of cuts. Default when Prob.Convex == 1.&amp;lt;br&amp;gt;= 1  Delete any cuts limiting the true feasible region whenever detected. Such cuts will appear if the problem has nonlinear constraints. Default when Prob.Convex == 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PsCoItLim&#039;&#039;||Limit on time spent per node calculating initial pseudo costs when MIP.VarSel == 3. Default is 120 (s).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PrintLin&#039;&#039;||Set nonzero to print short information about the type of linearization added. Default 0. Enabled when IterPrint &amp;gt; 3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PRINTPOOL&#039;&#039;||Set nonzero to print Set nonzero to print the decisions taken in the cutpool management.Default 0. Enabled when IterPrint &amp;gt; 4.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam:&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;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 1 also enables IterPrint, setting it to 1. &amp;lt;br&amp;gt;&lt;br /&gt;
The information printed for different levels is as follows: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;0 Two lines at each node with an improved integer solution: &amp;lt;br&amp;gt;&lt;br /&gt;
Iteration number: &amp;lt;br&amp;gt;&lt;br /&gt;
* Depth in tree (symbol L[] - empty list, symbol Gap - Dual Gap convergence)&amp;lt;br&amp;gt;&lt;br /&gt;
* fNLP (Optimal  f(x)  current node)&amp;lt;br&amp;gt;&lt;br /&gt;
* fIPMin  (Best integer feasible f(x) found)&amp;lt;br&amp;gt;&lt;br /&gt;
* LowBnd (Lower bound on optimal integer feasible f(x))&amp;lt;br&amp;gt;&lt;br /&gt;
* Dual Gap in absolut value and percent&amp;lt;br&amp;gt;&lt;br /&gt;
* The length of the node list L, -L-&amp;lt;br&amp;gt;&lt;br /&gt;
* The Inform and ExitFlag the solver returned at the current node&amp;lt;br&amp;gt;&lt;br /&gt;
* FuEv (Number of function evaluations  used by solver at current node)&amp;lt;br&amp;gt;&lt;br /&gt;
* Date and time stamp.&amp;lt;br&amp;gt;&lt;br /&gt;
* Outer approximation linearizations, number of cuts in active/inactive pool (|C| #A #I). &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt; 1 Two lines at each evaluated node with the information described above.&amp;lt;br&amp;gt;&lt;br /&gt;
Moreover, with IterPrint enabled a notice is printed whenever the algorithm switches node selection methods. &amp;lt;br&amp;gt;&lt;br /&gt;
Setting a higher value of IterPrint gives more detailed information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;2 Depth, number of integer components and lower bound on objective for each node in L.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;3 Sets LINPRINT = 1, print info about linearizations added (if used).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;4 Sets POOLPRINT = 1, print info about cut-pool management (if used).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;bTol&#039;&#039;||Linear constraint violation convergence tolerance. Default 1.0e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;cTol&#039;&#039;||Constraint violation convergence tolerance. Default 1.0e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fTol&#039;&#039;||Optimality tolerance. Default 3.0e-13&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xTol&#039;&#039;||Variable convergence tolerance. Default 2.2204e-13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &amp;lt;br&amp;gt;0: Global optimal solution found, or integer solution with duality gap less than user tolerance. &amp;lt;br&amp;gt;1: Maximal number of iterations reached. &amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found. &amp;lt;br&amp;gt;4: No feasible point found running NLP relaxation.&amp;lt;br&amp;gt;5: Illegal x_0 found in NLP relaxation. &amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &#039;&#039;&amp;gt; &#039;&#039;Prob.MaxCPU).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Code telling type of convergence, returned from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, max(0,fIPMin-fLB)/-fIPMin-, if fIPMin =0; max(0,fIPMin-fLB) if fIPMin == 0. If fIPMin   =0:  Scale with 100, 100*Dual- Gap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;v_k&#039;&#039;||Lagrange multipliers.  Bounds, Linear and Nonlinear Constraints, size n + mLin + mNonLin.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_0&#039;&#039;||Function value at start.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;stoaMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;stoaMINLP&#039;&#039;||A structure with  warm start information.  Use with  WarmDefGLOBAL,  see example [[StoaMINLP#Warm_Start|here]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3120</id>
		<title>MIPNLP ecpMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3120"/>
		<updated>2015-03-09T14:25:38Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* ECPMINLP structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
ecpMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;ecpMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers but can be either continuously differentiable or not. An initalization routine will detect strict integer variables in the problem.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = ecpMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
Warm start is currently not supported, but might be included in a future release.&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in the problem description structure Prob&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;f_Low&#039;&#039;||Lower bound on solution.&lt;br /&gt;
|-&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;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by ecpMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in ecpMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||output&lt;br /&gt;
|-&lt;br /&gt;
|=0||Silent.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;0||Initial information and convergence results.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;1||Output a line whenever the solution has improved, containing:&lt;br /&gt;
nIterations, nCuts, nCuts with criteria fulfilled, nLinearizations, nSpecialCuts, best solution.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;2||Output a line every iteration with the following information:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!label||description&lt;br /&gt;
|-&lt;br /&gt;
|It         ||Iterations&lt;br /&gt;
|-&lt;br /&gt;
|nECP       ||Number of extended cutting planes (ECP)&lt;br /&gt;
|-&lt;br /&gt;
|nAlpha&amp;gt;=lim||Number of ECP with criteria fulfilled&lt;br /&gt;
|-&lt;br /&gt;
|nL         ||Number of linearizations&lt;br /&gt;
|-&lt;br /&gt;
|nSECP      ||Number of special case ECP&amp;lt;br&amp;gt;(created from constraint on bound)&lt;br /&gt;
|-&lt;br /&gt;
|fIPMin     ||Objective of best solution at current iteration&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;3||Output a description of each step in the MINLP algorithm&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;4||Output additional numerical information in some algorithm steps&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;5||Output information in substeps (preprocessing, line search)&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptMIP&#039;&#039;||Print level in MIP sub-solvers,  (CPLEX and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptNLP&#039;&#039;||Print level in NLP sub-solvers,  (SNOPT and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverMIP&#039;&#039;||Name of the solver used for MIP subproblems. If TOMLAB /gurobi is installed, gurobi is the default solver. If TOMLAB /CPLEX is installed, CPLEX is second choice as default. Otherwise the default solver is found calling GetSolver(&#039;mip&#039;,1); Supported as subsolvers are gurobi, CPLEX, mipSolve, milpSolve and cutplane.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverNLP&#039;&#039;||&lt;br /&gt;
Name of the solver used for NLP subproblems. If packages /SOL or /SNOTP is installed, snopt is the default solver. Otherwise the default solver is found calling GetSolver(&#039;con&#039;,1); &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems when SolverMIP == mipSolve&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure with parameters specific to mixed integer optimization. See the table below describing the fields used in the MIP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ECPMINLP&#039;&#039;||Structure with parameters specific to the ecpMINLP solver. See the table below describing the fields used in the ECPMINLP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below describing the fields used in the optParam structure.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|&#039;&#039;&#039;fields used in Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||ecpMINLP stops if the duality gap is less than DualGap&lt;br /&gt;
DualGap = 1, stop at first integer solution, e.g. DualGap = 0.01,stop if solution &amp;lt; 1% from optimal solution.&lt;br /&gt;
&amp;lt;br&amp;gt;The lower bound Prob.f_Low is used, (default -1.0e300), which can also be set by the user. If f_Low has not been changed from default the lower bound is obtained from the initial solution of a relaxed problem, but only when ECPMINLP.INIT_BND is 1 or 2 (default).&lt;br /&gt;
&amp;lt;br&amp;gt;Default DualGap is -1, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PPP&#039;&#039;||Pre-processing and probing, default is 0.&amp;lt;br&amp;gt;&lt;br /&gt;
0  Not used. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
1  Apply initially on MINLP problem.&amp;lt;br&amp;gt;&lt;br /&gt;
2  Apply each iteration before solving MILP sub-problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If nonzero, a rounding heuristics will be used on the initial NLP solution in order to obtain an initial integer solution. Requires ECPMINLP.InitBndType enabled. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ECPMINLP structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with solver-specific options.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.ECPMINLP&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;beta&#039;&#039;||Multiplier when increasing alpha after an infeasible MILP solution. &lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for beta is 1.3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;gamma&#039;&#039;||Multiplier when increasing alpha when MILP solution does not violate any nonlinear contraints, but still does not decrease the upper bound of the objective.&lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for gamma is 2.0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PREALLOC&#039;&#039;||Flag enabling preallocation of memory for cutting planes and linearizations.&lt;br /&gt;
&amp;lt;br&amp;gt;0  No preallocation, dynamic growth of arrays. Current default.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Preallocate arrays.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;InitBndType&#039;&#039;||Selects method for setting lower bound when f_Low not changed from default.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||method&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|0 ||No extra initial lower bound.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|1 ||Use default TOMLAB NLP solver on problem with relaxed integer constraints. Add a linearization if a feasible MINLP solution was found.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|2 ||Add an initial linearization as long as a feasible NLP solution was found. The linearization is a simple lower bound on the MILP objective. Default.&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SET_TOL&#039;&#039;||Flag enabling changing tolerances, described below under optParam.eps_x, optParam.eps_x and optParam.eps_f.&lt;br /&gt;
&amp;lt;br&amp;gt;0  Default. Using the recommended solver default values, 1.0e-3.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Tolerances can be changed, taken from Prob.optParam.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IntSolLimIncr&#039;&#039;||Integer option when using [[CPLEX]] as MIP subsolver.&lt;br /&gt;
&amp;lt;br&amp;gt;Define how much the [[CPLEX]] parameter IntSolLimIncr increases when a feasible solution is not optimal and all alpha values have met their criteria.&lt;br /&gt;
&amp;lt;br&amp;gt;When set to zero, the optimal strategy will instead be used immediately, without any gradual increase of INTSOLLIM.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USE_CUTPOOL&#039;&#039;||Set nonzero to use a pool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&amp;lt;br&amp;gt;Cuts not active in the MILP-solution for CutDelBound iterations in a row will be inactivated (removed from the MILP-problem) until they are violated in a new solution.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 0, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CutDelBound&#039;&#039;||The number of consecutive times an extended cutting plane can be inactive before it gets removed and put into the inactive pool, if the option USE_CUTPOOL is set nonzero.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 15 times.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIterWoImpr&#039;&#039;||Limit on the number of successive iterations allowed without any improvements at all to neither objective nor solution point before the solver terminates&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 2.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USE_NLP&#039;&#039;||=1 User and NLP sub-solver on the initial integer-relaxed original problem, as well as the NLP problem with fixed integer values during the main iteration.&amp;lt;br&amp;gt;&lt;br /&gt;
=2 Use a global sub-solver on the initial integer-relaxed problem, as well as the NLP problem with fixed integer values during the main iterations. Setting UseNLP =  can increase the likelihood of finding a global optimal solution for nonconvex problems.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|If UseNLP is set to 2, the following parameters in the Prob-struct are used:&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;Prob.RandState&#039;&#039;||See help rngset for how to initialize the random generator.&amp;lt;br&amp;gt;&lt;br /&gt;
Default randState = -1&amp;lt;br&amp;gt;&lt;br /&gt;
If Convex == 0 and globalSolver == &#039;multiMin&#039;, RandState is sent to [[multiMin]] to initialize the random generator.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Prob.xInit&#039;&#039;||Parameter sent to the solver [[multiMin]] which is used to solve relaxed sub-problems for nonconvex problems (with Prob.Convex set to false).&amp;lt;br&amp;gt;&lt;br /&gt;
xInit determines the way initial points are generated and is set as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Either&amp;lt;br&amp;gt;&lt;br /&gt;
1x1 number&amp;lt;br&amp;gt;&lt;br /&gt;
If &amp;gt; 0, the number of random initial points, default min(3000,30*n);&amp;lt;br&amp;gt;&lt;br /&gt;
If &amp;lt; 0, generate |xInit| points with Latin Hypercube design&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
d x m matrix - Every column is an initial point (of length d = Prob.N)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Default value for xInit is min(3000,max(60,N*6)) except for the initial problem.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Prob.xInit0&#039;&#039;||Parameter sent to the solver [[multiMin]] when solving the initial relaxed NLP problem. Default value for xInit0 is min(3000,max(100,N*10)).&amp;lt;br&amp;gt;&lt;br /&gt;
See xInit for more information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Prob.globalSolver&#039;&#039;||Used to solve the NLP subproblem for nonconvex problems (when Prob.Convex set to false). Default is [[multiMin]].&amp;lt;br&amp;gt;&lt;br /&gt;
[[multiMin]] is using SolverNLP and SolverNLP0 as the NLP sub-solver.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;RESELECT_CUTS&#039;&#039;||Set nonzero to enable cut reselection heuristics. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SCALE_CUTS&#039;&#039;||Set nonzero to scale cuts before they are added to the MILP problem. Scaling is done by dividing the cut with its norm. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam Structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 2 also enables IterPrint, setting it to 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_x&#039;&#039;||Linear constraint violation convergence tolerance. Default is 2.0e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_g&#039;&#039;||Constraint violation convergence tolerance. Default is 1.0e-7&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_f&#039;&#039;||Optimality tolerance. Default is 1.0e-8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE:&#039;&#039; For the solver to use these tolerances, the flag &#039;&#039;ECPMINLP.SET_TOL&#039;&#039; must be set to nonzero.&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are used:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &lt;br /&gt;
&amp;lt;br&amp;gt;0: Solution found, or integer solution with duality gap less than user tolerance.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Maximal number of iterations reached.&lt;br /&gt;
&amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;3: Problem in subsolver, see Inform value.&lt;br /&gt;
&amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &amp;gt; Prob.maxCPU&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Inform for ExitFlag != 3&lt;br /&gt;
&amp;lt;br&amp;gt;0: Global solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Local solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;2: No solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;gt;2: Inform value from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, set as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Condition fulfilled&#039;&#039;||DualGap value set&lt;br /&gt;
|-&lt;br /&gt;
||fIPMin ~= 0||max(0,fIPMin-fLB)/|fIPMin|&lt;br /&gt;
|-&lt;br /&gt;
||fIPMin == 0||max(0,fIPMin-fLB)&lt;br /&gt;
|}&lt;br /&gt;
To get the percentage duality gap, scale with 100.&amp;lt;br&amp;gt;&lt;br /&gt;
PercentageGap = 100*Dual- Gap.&amp;lt;br&amp;gt;&lt;br /&gt;
To get the absolute value duality gap, scale with fIPMin.&amp;lt;br&amp;gt;&lt;br /&gt;
AbsoluteGap = fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x&#039;&#039;||Vector of solution points, sorted on ascending order based on the correcsponding objective values returned in f. x(:,1) is always equal to x_k.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f&#039;&#039;||The objective vales at all encountered solution points in x. Sorted in ascending order.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;ecpMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Algorithm==&lt;br /&gt;
ecpMINLP Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to MIP subproblem which is then solved by a subsolver in each iteration.&lt;br /&gt;
&lt;br /&gt;
The solver algorithm is mainly based on the paper &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, published in Optimization and Engineering 3, 253-280, 2002, with some modifications.&lt;br /&gt;
&lt;br /&gt;
Most prominent features in addition to the ones described in the main reference above are&lt;br /&gt;
* Solving the relaxed NLP problem initially to obtain a lower bound on the solution.&lt;br /&gt;
* A rounding heuristics performed on the initial NLP solution in order to obtain an initial upper bound on the initial solutions.&lt;br /&gt;
* Optional use of a cutpool for the alpha-regulated extended cutting planes.&lt;br /&gt;
* Special treatment of problems with integer variables which are not continuously differentiable.&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=TOMLAB_Problem_Types_and_Solver_Routines&amp;diff=3119</id>
		<title>TOMLAB Problem Types and Solver Routines</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=TOMLAB_Problem_Types_and_Solver_Routines&amp;diff=3119"/>
		<updated>2015-03-09T14:20:57Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Table: The optimization solvers in TOMLAB Base Module. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Manuals]]&lt;br /&gt;
{{Part Of Manual|title=the TOMLAB Manual|link=[[TOMLAB|TOMLAB Manual]]}}&lt;br /&gt;
Section [[#Problem Types Defined in TOMLAB|Problem Types Defined in TOMLAB]] defines all problem types in TOMLAB. Each problem definition is accompanied by brief suggestions on suitable solvers. This is followed in [[#Solver Routines in TOMLAB|Solver Routines in TOMLAB]] by a complete list of the available solver routines in TOMLAB and the various available extensions,  such as /SOL and /CGO.&lt;br /&gt;
&lt;br /&gt;
==Problem Types Defined in TOMLAB==&lt;br /&gt;
&lt;br /&gt;
===Unconstrained Optimization Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;unconstrained optimization &#039;&#039;&#039;(&#039;&#039;&#039;uc&#039;&#039;&#039;) problem is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\&lt;br /&gt;
&amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{lcccl}&lt;br /&gt;
x_{L} &amp;amp; \leq  &amp;amp; x &amp;amp; \leq &amp;amp; x_{U}, \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;f(x) \in \mathbb{R}&amp;lt;/math&amp;gt; . For unbounded variables, the corresponding elements of &amp;lt;math&amp;gt;x_L,x_U&amp;lt;/math&amp;gt; may be set to &amp;lt;math&amp;gt;\pm \infty&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /KNITRO and TOMLAB /SNOPT&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The TOMLAB  Base Module routine &#039;&#039;ucSolve &#039;&#039;includes several of the most popular search step methods for unconstrained optimization. The search step methods for unconstrained optimization included in &#039;&#039;ucSolve &#039;&#039;are: the Newton method, the quasi-Newton BFGS and DFP method, the Fletcher-Reeves and Polak-Ribiere conjugate-gradient method, and the Fletcher conjugate descent method. The quasi-Newton methods may either update the inverse Hessian (standard) or the Hessian itself. The Newton method and the quasi-Newton methods updating the Hessian use a subspace minimization technique to handle rank problems. The quasi-Newton algorithms also use safe guarding techniques to avoid rank problem in the updated matrix.&lt;br /&gt;
&lt;br /&gt;
Another TOMLAB Base Module solver suitable for unconstrained problems is the structural trust region algorithm &#039;&#039;sTrustr&#039;&#039;, combined with an initial  trust region radius algorithm.  It treats partially separable functions. Safeguarded BFGS or DFP are used for the quasi-Newton update, if the analytical Hessian is not used. The set of constrained nonlinear solvers could also be used for unconstrained problems.&lt;br /&gt;
&lt;br /&gt;
===Quadratic Programming Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;quadratic  programming  &#039;&#039;&#039;(&#039;&#039;&#039;qp&#039;&#039;&#039;) problem is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) = \frac{1}{2} x^T F x + c^T x \\&lt;br /&gt;
&amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{lcccl}&lt;br /&gt;
x_{L} &amp;amp; \leq  &amp;amp; x    &amp;amp; \leq &amp;amp; x_{U}, \\&lt;br /&gt;
b_{L} &amp;amp; \leq  &amp;amp; A x  &amp;amp; \leq &amp;amp; b_{U} \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;c, x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;F \in \mathbb{R}^{n \times n}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;A \in \mathbb{R}^{m_1 \times n}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;b_L,b_U \in \mathbb{R}^{m_1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /KNITRO,  TOMLAB /SNOPT and TOMLAB /MINLP&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
A positive semidefinite &#039;&#039;F &#039;&#039;-matrix gives a convex QP, otherwise the problem is nonconvex. Nonconvex quadratic programs are solved with a standard active-set method, implemented in the TOM routine &#039;&#039;qpSolve&#039;&#039;. &#039;&#039;qpSolve &#039;&#039;explicitly  treats both inequality and equality constraints, as well as lower and upper bounds on the variables (simple bounds). It converges to a local minimum for indefinite quadratic programs.&lt;br /&gt;
&lt;br /&gt;
In TOMLAB &#039;&#039;MINOS &#039;&#039;in the general or the QP-version (&#039;&#039;QP-MINOS&#039;&#039;),  or the dense QP solver &#039;&#039;QPOPT &#039;&#039;may be used. In the TOMLAB  /SOL extension the &#039;&#039;SQOPT &#039;&#039;solver is suitable for both dense and large, sparse convex QP and &#039;&#039;SNOPT &#039;&#039;works fine for dense or sparse nonconvex QP.&lt;br /&gt;
&lt;br /&gt;
For very large-scale problems, an interior point solver is recommended,  such as TOMLAB  /KNITRO or TOMLAB /BARNLP.&lt;br /&gt;
&lt;br /&gt;
TOMLAB  /CPLEX, TOMLAB  /Xpress and TOMLAB  /XA should always be considered  for large-scale QP problems.&lt;br /&gt;
&lt;br /&gt;
===Constrained Nonlinear Optimization Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;constrained nonlinear optimization &#039;&#039;&#039;problem (&#039;&#039;&#039;con&#039;&#039;&#039;) is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\&lt;br /&gt;
&amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{lcccl}&lt;br /&gt;
x_{L} &amp;amp; \leq  &amp;amp; x    &amp;amp; \leq &amp;amp; x_{U}, \\&lt;br /&gt;
b_{L} &amp;amp; \leq  &amp;amp; A x  &amp;amp; \leq &amp;amp; b_{U} \\&lt;br /&gt;
c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;f(x) \in \mathbb{R}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;A&lt;br /&gt;
\in \mathbb{R}^{m_1 \times n}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;b_L,b_U \in \mathbb{R}^{m_1}&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;c_L,c(x),c_U \in \mathbb{R}^{m_2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /SNOPT, TOMLAB /NPSOL and TOMLAB /KNITRO&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For general constrained nonlinear optimization a sequential quadratic programming (SQP) method by Schittkowski is implemented in the TOMLAB  Base Module solver &#039;&#039;conSolve&#039;&#039;.  &#039;&#039;conSolve &#039;&#039;also includes an implementation of the Han-Powell SQP method. There are also a TOMLAB  Base Module routine &#039;&#039;nlpSolve &#039;&#039;implementing the Filter SQP by Fletcher and Leyffer.&lt;br /&gt;
&lt;br /&gt;
Another constrained solver in TOMLAB  is the structural trust region algorithm &#039;&#039;sTrustr&#039;&#039;, described above. Currently, &#039;&#039;sTrustr &#039;&#039;only solves problems where the feasible region, defined by the constraints, is convex. TOMLAB /MINOS  solves constrained nonlinear programs. The TOMLAB  /SOL extension gives an additional set of general solvers for dense or sparse problems.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;sTrustr&#039;&#039;, &#039;&#039;pdco &#039;&#039;and &#039;&#039;pdsco &#039;&#039;in TOMLAB  Base Module handle nonlinear problems with &#039;&#039;linear  &#039;&#039;constraints only.&lt;br /&gt;
&lt;br /&gt;
There are many other options for large-scale nonlinear optimization to consider in TOMLAB. TOMLAB /CONOPT, TOMLAB /BARNLP, TOMLAB  /MINLP, TOMLAB  /NLPQL and TOMLAB  /SPRNLP.&lt;br /&gt;
&lt;br /&gt;
===Box-bounded Global Optimization Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;box-bounded global optimization &#039;&#039;&#039;(&#039;&#039;&#039;glb&#039;&#039;&#039;) problem is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\&lt;br /&gt;
&amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{llcccll}&lt;br /&gt;
-\infty &amp;lt; &amp;amp;x_{L} &amp;amp; \leq  &amp;amp; x &amp;amp; \leq &amp;amp; x_{U}&amp;amp; &amp;lt; \infty , \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;f(x) \in \mathbb{R}&amp;lt;/math&amp;gt;, i.e. problems that have finite simple bounds on all variables.&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /LGO and TOMLAB /CGO with  TOMLAB /SOL&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The TOM solver &#039;&#039;glbSolve &#039;&#039;implements the DIRECT algorithm, which is a modification of the standard Lipschitzian approach that eliminates the need to specify a Lipschitz constant. In &#039;&#039;glbSolve &#039;&#039;no derivative information is used. For global optimization problems with expensive function evaluations the TOMLAB  /CGO  routine &#039;&#039;ego &#039;&#039;implements the Efficient Global Optimization (EGO) algorithm. The idea of the EGO algorithm is to first fit a response surface to data collected by evaluating the objective function at a few points.  Then, EGO balances between finding the minimum of the surface and improving the approximation by sampling where the prediction error may be high.&lt;br /&gt;
&lt;br /&gt;
===Global Mixed-integer Nonlinear Programming Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;global mixed-integer nonlinear programming  &#039;&#039;&#039;(&#039;&#039;&#039;glc&#039;&#039;&#039;) problem is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\&lt;br /&gt;
&amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{llcccll}&lt;br /&gt;
-\infty &amp;lt; &amp;amp;x_{L} &amp;amp; \leq  &amp;amp; x &amp;amp; \leq &amp;amp; x_{U}&amp;amp; &amp;lt; \infty  \\&lt;br /&gt;
&amp;amp;b_{L} &amp;amp; \leq  &amp;amp; A x  &amp;amp; \leq &amp;amp; b_{U}&amp;amp; \\&lt;br /&gt;
&amp;amp;c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U},&amp;amp; x_{j} \in \mathbb{N}\ ~~\forall j \in I&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;f(x) \in \mathbb{R}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;A \in \mathbb{R}^{m_1 \times n}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;b_L,b_U \in \mathbb{R}^{m_1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;c_L,c(x),c_U \in \mathbb{R}^{m_2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt;, the index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt;, are restricted to be integers.&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /OQNLP&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The TOMLAB  Base Module solver &#039;&#039;glcSolve &#039;&#039;implements an extended version of the DIRECT algorithm, that handles problems with both nonlinear and integer constraints.&lt;br /&gt;
&lt;br /&gt;
===Linear Programming Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;linear programming  &#039;&#039;&#039;(&#039;&#039;&#039;lp&#039;&#039;&#039;) problem is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) = c^T x \\&lt;br /&gt;
&amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{lcccl}&lt;br /&gt;
x_{L} &amp;amp; \leq  &amp;amp; x    &amp;amp; \leq &amp;amp; x_{U}, \\&lt;br /&gt;
b_{L} &amp;amp; \leq  &amp;amp; A x  &amp;amp; \leq &amp;amp; b_{U} \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;c, x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;,&lt;br /&gt;
&amp;lt;math&amp;gt;A \in \mathbb{R}^{m_1 \times n}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;b_L,b_U \in \mathbb{R}^{m_1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /CPLEX, TOMLAB /Xpress  and TOMLAB /XA&#039;&#039;&#039;. &lt;br /&gt;
The TOMLAB  Base Module solver &#039;&#039;lpSimplex &#039;&#039;implements a simplex algorithm for &#039;&#039;&#039;lp &#039;&#039;&#039;problems.&lt;br /&gt;
&lt;br /&gt;
When a dual feasible point is known in (6) it is efficient to use the dual simplex algorithm implemented in the TOMLAB  Base Module solver &#039;&#039;DualSolve&#039;&#039;. In TOMLAB  /MINOS  the LP interface to &#039;&#039;MINOS&#039;&#039;, called &#039;&#039;LP-MINOS &#039;&#039;is efficient for solving large, sparse LP problems. Dense problems are solved by &#039;&#039;LPOPT&#039;&#039;.  The TOMLAB  /SOL extension gives the additional possibility of using &#039;&#039;SQOPT &#039;&#039;to solve large, sparse LP.&lt;br /&gt;
&lt;br /&gt;
The recommended solvers normally outperforms all other solvers.&lt;br /&gt;
&lt;br /&gt;
===Mixed-integer Programming Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;mixed-integer  programming  problem &#039;&#039;&#039;(&#039;&#039;&#039;mip&#039;&#039;&#039;)  is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) = c^T x \\&lt;br /&gt;
&amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{lcccl}&lt;br /&gt;
x_{L} &amp;amp; \leq  &amp;amp; x    &amp;amp; \leq &amp;amp; x_{U}, \\&lt;br /&gt;
b_{L} &amp;amp; \leq  &amp;amp; A x  &amp;amp; \leq &amp;amp; b_{U}, ~x_{j} \in \mathbb{N}\ ~~\forall j \in I  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;c, x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;A \in \mathbb{R}^{m_1&lt;br /&gt;
\times n}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;b_L,b_U \in \mathbb{R}^{m_1}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x&lt;br /&gt;
\in I&amp;lt;/math&amp;gt;, the index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be&lt;br /&gt;
integers. Equality constraints are defined by setting the lower&lt;br /&gt;
bound equal to the upper bound, i.e. for constraint &amp;lt;math&amp;gt;i: b_{L}(i)&lt;br /&gt;
=  b_{U}(i)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /CPLEX, TOMLAB /Xpress  and TOMLAB /XA&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Mixed-integer programs can be solved using the TOMLAB  Base Module routine &#039;&#039;mipSolve &#039;&#039;that  implements a standard branch-and-bound algorithm.  When dual feasible solutions are available, mipSolve  is using the TOMLAB  dual simplex solver DualSolve  to solve subproblems, which is significantly faster than using an ordinary linear programming solver, like the TOMLAB  lpSimplex. &#039;&#039;mipSolve &#039;&#039;also implements user defined priorities for variable selection, and different tree search strategies. For 0/1 - knapsack problems a round-down primal heuristic is included. Another TOMLAB  Base Module solver is the cutting plane routine &#039;&#039;cutplane&#039;&#039;, using Gomory cuts.  It is recommended to use &#039;&#039;mipSolve &#039;&#039;with the LP version of &#039;&#039;MINOS &#039;&#039;with warm starts for the subproblems, giving great speed improvement. The TOMLAB  /Xpress extension  gives access to the state-of-the-art LP, QP, MILP  and MIQP solver Xpress-MP. For many MIP problems, it is necessary to use such a powerful solver, if the solution should be obtained in any reasonable time frame. TOMLAB /CPLEX is equally powerful as TOMLAB  /Xpress and also includes a network solver.&lt;br /&gt;
&lt;br /&gt;
===Linear Least Squares Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;linear least squares &#039;&#039;&#039;(&#039;&#039;&#039;lls&#039;&#039;&#039;) problem is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) = \frac{1}{2} || C x - d || \\&lt;br /&gt;
&amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{lcccl}&lt;br /&gt;
x_{L} &amp;amp; \leq  &amp;amp; x   &amp;amp; \leq &amp;amp; x_{U}, \\&lt;br /&gt;
b_{L} &amp;amp; \leq  &amp;amp; A x  &amp;amp; \leq &amp;amp; b_{U} \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;d \in \mathbb{R}^M&amp;lt;/math&amp;gt;,&lt;br /&gt;
&amp;lt;math&amp;gt;C \in \mathbb{R}^{M \times n}&amp;lt;/math&amp;gt;,&lt;br /&gt;
&amp;lt;math&amp;gt;A \in \mathbb{R}^{m_1 \times n}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;b_L,b_U \in \mathbb{R}^{m_1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;c_L,c(x),c_U \in \mathbb{R}^{m_2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /LSSOL&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tlsqr &#039;&#039;solves unconstrained  sparse &#039;&#039;&#039;lls &#039;&#039;&#039;problems. &#039;&#039;lsei &#039;&#039;solves the general dense problems. &#039;&#039;Tnnls &#039;&#039;is &lt;br /&gt;
&lt;br /&gt;
a fast and robust replacement for the Matlab nnls. The general least squares solver &#039;&#039;clsSolve &#039;&#039;may also be used. &lt;br /&gt;
&lt;br /&gt;
In the TOMLAB&lt;br /&gt;
&lt;br /&gt;
/NPSOL or TOMLAB  /SOL extension the &#039;&#039;LSSOL &#039;&#039;solver is suitable for dense linear least squares problems.&lt;br /&gt;
&lt;br /&gt;
===Constrained Nonlinear Least Squares Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;constrained nonlinear least squares &#039;&#039;&#039;(&#039;&#039;&#039;cls&#039;&#039;&#039;) problem is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) = \frac{1}{2} r(x)^T r(x) \\&lt;br /&gt;
&amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{lcccl}&lt;br /&gt;
x_{L} &amp;amp; \leq  &amp;amp; x   &amp;amp; \leq &amp;amp; x_{U}, \\&lt;br /&gt;
b_{L} &amp;amp; \leq  &amp;amp; A x  &amp;amp; \leq &amp;amp; b_{U} \\&lt;br /&gt;
c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;r(x) \in \mathbb{R}^M&amp;lt;/math&amp;gt;,&lt;br /&gt;
&amp;lt;math&amp;gt;A \in \mathbb{R}^{m_1 \times n}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;b_L,b_U \in \mathbb{R}^{m_1}&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;c_L,c(x),c_U \in \mathbb{R}^{m_2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /NLSSOL&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The TOMLAB  Base Module nonlinear least squares solver &#039;&#039;clsSolve &#039;&#039;treats problems with bound constraints in a similar way as the routine &#039;&#039;ucSolve&#039;&#039;. This strategy is combined with an active-set strategy to handle linear equality and inequality constraints.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;clsSolve &#039;&#039;includes seven optimization methods for nonlinear  least squares problems, among them: the Gauss-Newton method, the Al-Baali-Fletcher and the Fletcher-Xu hybrid method, and the Huschens TSSM method. If rank problems occur, the solver uses subspace minimization.  The line search algorithm used is the same as for unconstrained problems.&lt;br /&gt;
&lt;br /&gt;
Another fast and robust solver is &#039;&#039;NLSSOL&#039;&#039;, available in the TOMLAB  /NPSOL or the TOMLAB  /SOL extension toolbox.&lt;br /&gt;
&lt;br /&gt;
One important utility routine is the TOMLAB  Base Module line search algorithm &#039;&#039;LineSearch&#039;&#039;,  used by the solvers &#039;&#039;conSolve&#039;&#039;, &#039;&#039;clsSolve &#039;&#039;and &#039;&#039;ucSolve&#039;&#039;. It implements a modified version of an algorithm by Fletcher. The line search algorithm uses quadratic and cubic interpolation. Another TOMLAB  Base Module routine, &#039;&#039;preSolve&#039;&#039;, is running a presolve analysis on a system of linear qualities, linear inequalities and simple bounds.   An algorithm by Gondzio, somewhat modified, is implemented in &#039;&#039;preSolve&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Linear Semi-definite Programming Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;linear semi-definite programming  problem with  linear matrix inequalities &#039;&#039;&#039;(&#039;&#039;&#039;sdp&#039;&#039;&#039;) is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{rccccl}&lt;br /&gt;
\min\limits_{x} &amp;amp; {f(x) = {c^T}x} \\&lt;br /&gt;
&amp;amp; \\s/t &amp;amp; x_{L}   &amp;amp; \leq &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U}\\&lt;br /&gt;
&amp;amp; b_{L}   &amp;amp; \leq &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&lt;br /&gt;
&amp;amp; {r}{Q^{i}_0 + Q^{i}_{k}x_{k} \sum{k=1}^{n} \preccurlyeq 0,\qquad i=1,\ldots,m.} \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;c, x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;A \in \mathbb{R}^{m_l\times n}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;b_L,b_U \in \mathbb{R}^{m_l}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Q^{i}_{k}&amp;lt;/math&amp;gt; are symmetric matrices of similar dimensions in each constraint &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;. If there are several LMI constraints, each may have it&#039;s own dimension.&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /PENSDP and TOMLAB /PENBMI&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;linear semi-definite programming  problem with  bilinear  matrix  inequalities &#039;&#039;&#039;(&#039;&#039;&#039;bmi&#039;&#039;&#039;)  is defined similarly to but with the matrix inequality&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
Q^{i}_0 + \sum_{k=1}^{n} Q^{i}_{k} x_{k} + \sum_{k=1}^{n} \sum_{l=1}^{n} x_{k}x_{l} K^{i}_{kl} \preccurlyeq 0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The MEX  solvers &#039;&#039;pensdp &#039;&#039;and &#039;&#039;penbmi &#039;&#039;treat  &#039;&#039;&#039;sdp &#039;&#039;&#039;and &#039;&#039;&#039;bmi  &#039;&#039;&#039;problems, respectively.  These are available in the TOMLAB  /PENSDP and TOMLAB  /PENBMI toolboxes.&lt;br /&gt;
&lt;br /&gt;
The MEX-file solver &#039;&#039;pensdp &#039;&#039;available in the TOMLAB  /PENSDP toolbox implements a penalty method aimed at large-scale dense and sparse &#039;&#039;&#039;sdp &#039;&#039;&#039;problems. The interface to the solver allows for data input in the sparse SDPA input format as well as a TOMLAB  specific format corresponding to.&lt;br /&gt;
&lt;br /&gt;
The MEX-file solver &#039;&#039;penbmi &#039;&#039;available in the TOMLAB  /PENBMI toolbox is similar to &#039;&#039;pensdp&#039;&#039;, with added support for the bilinear matrix inequalities.&lt;br /&gt;
&lt;br /&gt;
==Solver Routines in TOMLAB==&lt;br /&gt;
&lt;br /&gt;
===TOMLAB Base Module===&lt;br /&gt;
&lt;br /&gt;
TOMLAB  includes a large set of optimization solvers. Most of them were originally developed by the Applied Optimization and Modeling group (TOM). Since then they have been improved e.g. to handle Matlab sparse arrays and been further  developed. [[#Table: The optimization solvers in TOMLAB Base Module.]]. lists the main set of TOM optimization solvers in all versions of TOMLAB.&lt;br /&gt;
&lt;br /&gt;
====Table: The optimization solvers in TOMLAB Base Module.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[clsSolve]]||Constrained nonlinear least squares. Handles simple bounds and linear equality and inequality constraints using an active-set strategy.  Implements Gauss-Newton, and hybrid quasi-Newton and Gauss-Newton methods.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[conSolve]]||Constrained nonlinear minimization solver using two different sequential quadratic programming methods.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[cutPlane]]||Mixed-integer programming using a cutting plane algorithm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[DualSolve]]||Solves a linear program with a dual feasible starting point.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[glbSolve]]||Box-bounded global optimization, using only function values.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[glcCluster]]||Hybrid algorithm for constrained mixed-integer global optimization. Uses a combination of &#039;&#039;glcFast &#039;&#039;(DIRECT) and a clustering algorithm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[glcSolve]]||Global mixed-integer nonlinear programming, using no derivatives.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[infSolve]]||Constrained minimax optimization. Reformulates problem and calls any suitable nonlinear solver.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[lpSimplex]]||Linear programming using a simplex algorithm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[MilpSolve]]||Mixed-integer programming using branch and bound.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[multiMin]]||General constrained mixed-integer global optimization problems.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[multiMINLP]]||General constrained mixed-integer global optimization problems where the number of integer combinations nMax is huge and relaxation of the integer constraint is possible.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[L1Solve]]||Constrained L1 optimization. Reformulates problem and calls any suitable nonlinear solver.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[mipSolve]]||Mixed-integer programming using a branch-and-bound algorithm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[nlpSolve]]||Constrained nonlinear minimization solver using a filter SQP algorithm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[pdcoTL]]||Linearly constrained nonlinear minimization solver using a primal- dual barrier algorithm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[pdscoTL]]||Linearly constrained nonlinear minimization solver using a primal- dual barrier algorithm, for separable functions.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[qpSolve]]||Non-convex quadratic programming.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[slsSolve]]||Sparse constrained nonlinear least squares. Reformulates problem and calls any suitable sparse nonlinear solver.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[sTrustr]]||Constrained convex optimization of partially separable functions, using a structural trust region algorithm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[ucSolve]]||Unconstrained optimization with simple bounds on the parameters. Implements Newton, quasi-Newton and conjugate-gradient methods.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Additional  Fortran solvers in TOMLAB  are listed in [[#Table: Additional solvers in TOMLAB.]]. They are called using a set of MEX-file interfaces developed in TOMLAB.&lt;br /&gt;
&lt;br /&gt;
====Table: Additional solvers in TOMLAB.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;goalSolve&#039;&#039;||Solves sparse multi-objective goal attainment problems&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;lsei&#039;&#039;||Dense constrained  linear least squares&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;qld&#039;&#039;||Convex quadratic programming&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;Tfzero&#039;&#039;||Finding a zero to f(x) in an interval, &#039;&#039;x &#039;&#039; is one-dimensional.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;Tlsqr&#039;&#039;|| Sparse linear least squares.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;Tnnls&#039;&#039;||Nonnegative constrained linear least squares&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /BARNLP===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB /BARNLP solves large-scale nonlinear programming problems using a sparse primal-dual interior point algorithm, in conjunction with a filter for globalization. The solver package was developed in co-operation with Boeing Phantom Works. The TOMLAB  /BARNLP package is described in a separate manual available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /CGO===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB /CGO solves costly global optimization problems. The solvers are listed in [[#Table: Additional solvers in TOMLAB /CGO.]]. They are written in a combination of Matlab and Fortran code, where the Fortran code is called using a set of &lt;br /&gt;
MEX-file interfaces developed in TOMLAB.&lt;br /&gt;
&lt;br /&gt;
====Table: Additional solvers in TOMLAB /CGO.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;rbfSolve||&#039;&#039;Costly constrained box-bounded optimization using a RBF algorithm.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ego&#039;&#039;||Costly constrained box-bounded optimization using the Efficient Global Optimization (EGO) algorithm.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /CONOPT===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB /CONOPT  solves large-scale nonlinear programming problems with a feasible path GRG method .  The solver package was developed in co-operation with Arki  Consulting and Development A/S. The TOMLAB  /CONOPT  is described in a separate manual available at [http://tomopt.com/ http://tomopt.com]. There is also m-file help available.&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /CPLEX===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /CPLEX solves large-scale mixed-integer linear and quadratic programming prob- lems. The solver package was developed in co-operation with ILOG S.A. The TOMLAB  /CPLEX solver package and interface are described in a manual available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /KNITRO===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /KNITRO solves large-scale nonlinear programming problems with interior (barrier) point trust-region methods. The solver package was developed in co-operation with Ziena Optimization Inc. The TOMLAB  /KNITRO manual is available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /LGO===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /LGO  solves global nonlinear programming problems. The LGO solver package is developed by Pint´er Consulting Services, Inc. The TOMLAB  /LGO  manual is available at [http://tomopt.com/ http://tomopt.com/].&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /MINLP===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /MINLP provides solvers for continuous and mixed-integer quadratic programming&lt;br /&gt;
&lt;br /&gt;
(&#039;&#039;&#039;qp&#039;&#039;&#039;,&#039;&#039;&#039;miqp&#039;&#039;&#039;)  and continuous and mixed-integer nonlinear constrained optimization (&#039;&#039;&#039;con&#039;&#039;&#039;, &#039;&#039;&#039;minlp&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
All  four solvers, written  by Roger Fletcher and Sven Leyffer, University of Dundee, Scotland, are available in sparse and dense versions.  The solvers are listed in [[#Table: Solver routines in TOMLAB /MINLP.]].&lt;br /&gt;
&lt;br /&gt;
The TOMLAB  /MINLP manual is available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
====Table: Solver routines in TOMLAB /MINLP.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;bqpd&#039;&#039;||Quadratic programming using a null-space method.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;miqpBB&#039;&#039;||Mixed-integer quadratic programming using &#039;&#039;bqpd &#039;&#039;as subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;filterSQP&#039;&#039;||Constrained nonlinear minimization using a Filtered Sequential QP method.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;minlpBB&#039;&#039;||Constrained, mixed-integer nonlinear minimization using a branch- and-bound search scheme. &#039;&#039;filterSQP &#039;&#039;is used as NLP solver.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /MINOS===&lt;br /&gt;
&lt;br /&gt;
Another set of Fortran solvers were developed by the Stanford Optimization Laboratory (SOL). [[#Table: The SOL optimization solvers in TOMLAB /MINOS.]] lists the solvers included in TOMLAB  /MINOS.  The solvers are called using a set of MEX-file interfaces  developed as part of TOMLAB.  All  functionality of the SOL solvers are available and changeable in the TOMLAB  framework in Matlab.&lt;br /&gt;
&lt;br /&gt;
====Table: The SOL optimization solvers in TOMLAB /MINOS.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;MINOS 5.51||&#039;&#039;Sparse linear and nonlinear programming with linear and nonlin- ear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;LP-MINOS||&#039;&#039;A special version of the &#039;&#039;MINOS 5.5 &#039;&#039;MEX-file interface for sparse linear programming.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;QP-MINOS&#039;&#039;||A special version of the &#039;&#039;MINOS 5.5 &#039;&#039;MEX-file interface for sparse quadratic programming.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;LPOPT 1.0-10&#039;&#039;||Dense linear programming.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;QPOPT 1.0-10	&#039;&#039;||Non-convex quadratic programming with dense constraint matrix and sparse or dense quadratic matrix.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /OQNLP===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /OQNLP  uses a multistart  heuristic algorithm to find global optima of smooth constrained nonlinear programs (NLPs) and mixed-integer nonlinear programs (MINLPs). The solver package was developed in co-operation with Optimal Methods Inc. The TOMLAB  /OQNLP  manual is available at [http://tomopt.com/ http://tomopt.com/] &lt;br /&gt;
&lt;br /&gt;
===TOMLAB /NLPQL===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /NLPQL solves dense nonlinear programming problems, multi  criteria optimiza- tion  problems and nonlinear fitting  problems.  The solver package  was developed in co-operation with  Klaus Schittkowski. The TOMLAB  /NLPQL manual is available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /NPSOL===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /NPSOL is a sub package of TOMLAB  /SOL. The package includes the MINOS solvers as well as NPSOL, LSSOL and NLSSOL. The TOMLAB  /NPSOL manual is available at [http://tomopt.com/ http://tomopt].&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /PENBMI===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /PENBMI solves linear semi-definite programming problems with linear and bilinear matrix inequalities. The solvers are listed in [[#Additional solvers in TOMLAB /PENBMI.]]. They are written in a combination of Matlab and C code. The TOMLAB  /PENBMI manual is available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
====Additional solvers in TOMLAB /PENBMI.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;penbmi&#039;&#039;||Sparse and dense linear semi-definite programming using a penalty algorithm.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;penfeas bmi&#039;&#039;||Feasibility check of systems of linear matrix inequalities, using &#039;&#039;penbmi&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /PENSDP===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB /PENSDP solves linear semi-definite programming problems with linear matrix inequalities. The solvers are listed in [[#Table: Additional solvers in TOMLAB /PENSDP.]]. They are written  in a combination of Matlab and C code. The TOMLAB  /PENSDP manual is available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
====Table: Additional solvers in TOMLAB /PENSDP.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;pensdp&#039;&#039;||Sparse and dense linear semi-definite programming using a penalty algorithm.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;penfeas_sdp&#039;&#039;||Feasibility check of systems of linear matrix inequalities, using &#039;&#039;pensdp&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /SNOPT===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB /SNOPT is a sub package of TOMLAB /SOL. The package includes the MINOS solvers as well as SNOPT and SQOPT. The TOMLAB /SNOPT manual is available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /SOL===&lt;br /&gt;
&lt;br /&gt;
The extension toolbox TOMLAB /SOL gives access to the complete set of Fortran solvers developed by the Stanford Systems Optimization Laboratory (SOL). These solvers are listed in [[#Table: The SOL optimization solvers in TOMLAB /MINOS.]] and [[#Table: The optimization solvers in the TOMLAB /SOL toolbox.]].&lt;br /&gt;
&lt;br /&gt;
====Table: The optimization solvers in the TOMLAB /SOL toolbox.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;NPSOL 5.02&#039;&#039;||Dense linear and nonlinear programming with linear and nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SNOPT 6.2-2&#039;&#039;||Large, sparse linear and nonlinear programming with linear and nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SQOPT 6.2-2&#039;&#039;||Sparse convex quadratic programming.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;NLSSOL 5.0-2&#039;&#039;||Constrained nonlinear  least squares. NLSSOL  is  based on NPSOL. No reference except for general NPSOL reference.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;LSSOL 1.05-4&#039;&#039;||Dense linear and quadratic programs (convex), and constrained linear least squares problems.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /SPRNLP===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /SPRNLP solves large-scale nonlinear programming problems. SPRNLP is a state- of-the-art sequential quadratic programming (SQP) method, using an augmented Lagrangian merit function and safeguarded line search.  The solver package was developed in co-operation with Boeing Phantom Works.  The TOMLAB  /SPRNLP package is described in a separate manual available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /XA===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /XA solves large-scale linear, binary, integer and semi-continuous linear program- ming problems, as well as quadratic programming problems. The solver package was developed in co-operation with  Sunset Software  Technology.  The TOMLAB  /XA package is described in a separate manual available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /Xpress===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /Xpress solves large-scale mixed-integer linear and quadratic programming prob- lems. The solver package was developed in co-operation with Dash Optimization  Ltd.  The TOMLAB  /Xpress solver package and interface are described in the html manual that comes with the installation package. There is also a TOMLAB  /Xpress manual available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
===Finding  Available  Solvers===&lt;br /&gt;
&lt;br /&gt;
To get a list of all available solvers, including Fortran, C and Matlab Optimization Toolbox solvers, for a certain &#039;&#039;solvType&#039;&#039;, call the routine &#039;&#039;SolverList &#039;&#039;with &#039;&#039;solvType  &#039;&#039;as argument. &#039;&#039;solvType &#039;&#039;should either be a string (&#039;uc&#039;, &#039;con&#039; etc.) or the corresponding &#039;&#039;solvType &#039;&#039;number as given in following [[#Table: solvProbType]]. For example, if wanting a list of all available solvers of &#039;&#039;solvType &#039;&#039;&#039;&#039;&#039;con&#039;&#039;&#039;, then&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
SolverList(&#039;con&#039;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gives the output&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; SolverList(&#039;con&#039;);&lt;br /&gt;
&lt;br /&gt;
Tomlab recommended choice for Constrained Nonlinear Programming (NLP)&lt;br /&gt;
&lt;br /&gt;
npsol&lt;br /&gt;
&lt;br /&gt;
Other solvers for NLP &lt;br /&gt;
&lt;br /&gt;
    Licensed:&lt;br /&gt;
&lt;br /&gt;
    nlpSolve&lt;br /&gt;
    conSolve&lt;br /&gt;
    sTrustr&lt;br /&gt;
    constr&lt;br /&gt;
    minos&lt;br /&gt;
    PDCO&lt;br /&gt;
    snopt&lt;br /&gt;
    fmincon&lt;br /&gt;
    filterSQP&lt;br /&gt;
    PDSCO&lt;br /&gt;
    knitro&lt;br /&gt;
    conopt&lt;br /&gt;
    nlpqlp&lt;br /&gt;
&lt;br /&gt;
    Non-licensed:&lt;br /&gt;
&lt;br /&gt;
    NONE&lt;br /&gt;
&lt;br /&gt;
Solvers also handling NLP &lt;br /&gt;
&lt;br /&gt;
    Licensed:&lt;br /&gt;
    &lt;br /&gt;
    glcSolve&lt;br /&gt;
    glcFast&lt;br /&gt;
    glcCluster&lt;br /&gt;
    lgo&lt;br /&gt;
    minlpBB&lt;br /&gt;
    ego&lt;br /&gt;
    rbfSolve&lt;br /&gt;
    arbfmip&lt;br /&gt;
&lt;br /&gt;
    Non-licensed:&lt;br /&gt;
&lt;br /&gt;
    NONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;SolverList &#039;&#039;also returns two  output  arguments: all available solvers as a string matrix  and a vector with  the corresponding &#039;&#039;solvType &#039;&#039;for each solver.&lt;br /&gt;
&lt;br /&gt;
Note that solvers for a more general problem type may be used to solve the problem. In [[#Table: solvProbType]] an attempt has been made to classify these relations.&lt;br /&gt;
&lt;br /&gt;
====Table: solvProbType====&lt;br /&gt;
&lt;br /&gt;
The problem classes (&#039;&#039;probType&#039;&#039;) possible to solve with each type of solver (&#039;&#039;solvType&#039;&#039;) is marked with an &#039;&#039;x&#039;&#039;.  When the solver is in theory possible to use, but from a practical point of view is probably not suitable, parenthesis are added (&#039;&#039;x&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!|| colspan=&amp;quot;10&amp;quot; align=&amp;quot;center&amp;quot; border=&amp;quot;2&amp;quot; | solvType&lt;br /&gt;
|-&lt;br /&gt;
!probType||uc||qp||con||ls||lls||cls||mip||lp||glb||glc&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;uc&#039;&#039;&#039;||x||||x||||||||||||x||(x)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;qp&#039;&#039;&#039;||||x||x||||||||||||||(x)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;con&#039;&#039;&#039;||||||x||||||||||||||(x)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;ls&#039;&#039;&#039;||||||x||x||||x||||||||(x)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lls&#039;&#039;&#039;||||x||x||x||x||x||||||||(x)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;cls&#039;&#039;&#039;||||||x||||||x||||||||(x)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;mip&#039;&#039;&#039;||||||||||||||x||||||(x)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lp&#039;&#039;&#039;||||x||x||||||||x||x||||(x)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;glb&#039;&#039;&#039;||||||(x)||||||||||||x||x&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;glc&#039;&#039;&#039;||||||(x)||||||||||||||x&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;exp&#039;&#039;&#039;||x||||x||(x)||||x||||||||(x)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MultiMINLP&amp;diff=3118</id>
		<title>MultiMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MultiMINLP&amp;diff=3118"/>
		<updated>2015-03-09T14:16:29Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Solvers]]&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
multiMINLP solves general constrained  mixed-integer global nonlinear optimization problems.&lt;br /&gt;
&lt;br /&gt;
It is aimed for problems where the number of integer combinations nMax is huge and relaxation of the integer constraint is possible.&lt;br /&gt;
&lt;br /&gt;
If no integer variables, multiMINLP calls multiMin. If nMax &#039;&#039;&amp;lt;&#039;&#039;= min(Prob.optParam.MaxFunc,5000), glcDirect is used. Otherwise, multiMINLP first finds a set M of local minima calling multiMin  with no integer restriction on any variable. The best local minimum is selected.  glcDirect is called to find the best integer feasible solution fIP in a small area (&#039;&#039;&amp;lt; &#039;&#039;+- 2 units) around the best local minimum found.&lt;br /&gt;
&lt;br /&gt;
The other local minima are pruned, if fOpt(i) &#039;&#039;&amp;gt; &#039;&#039;fIP, no integer feasible solution could be found close to this local minimum i.&lt;br /&gt;
&lt;br /&gt;
The area close to the remaining candidate local minima are searched one by one by calling glcDirect to find any fIPi &#039;&#039;&amp;lt; &#039;&#039;fIP.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;multiMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\&lt;br /&gt;
s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&lt;br /&gt;
&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&lt;br /&gt;
&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&lt;br /&gt;
&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt; . The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt;, the index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers.&lt;br /&gt;
&lt;br /&gt;
==Calling Syntax==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;multiMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Prob&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Problem description structure. The following fields are used:&lt;br /&gt;
|-&lt;br /&gt;
Prob is a structure, defined  as to solve a standard MINLP  problem. The Prob structure is fed to the localSolver. See e.g. minlpAssign.&lt;br /&gt;
&lt;br /&gt;
See multiMin  and glcDirect for input to the subsolvers e.g. Prob.xInit is used in multiMin (and fCut, RandState, xEQTol).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;x_L&#039;&#039;||Lower bounds for each element in x. If generating random points, -inf elements of x_L are set to min(-L,xMin,x  U-L) xMin is the minimum of the finite x_L values.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;x_U&#039;&#039;||Upper bounds for each element in x. If generating random points, inf elements of x_U are set to max(L,xMax,x L+L) xMax is the maximum of the finite x_U values.&lt;br /&gt;
&lt;br /&gt;
L is 100 for nonlinear least squares, otherwise 1000.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints. &lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;PriLev&#039;&#039;||Print Level:&lt;br /&gt;
&lt;br /&gt;
0 = Silent&lt;br /&gt;
&lt;br /&gt;
1 = Display 2 summary rows&lt;br /&gt;
&lt;br /&gt;
2 = Display some extra summary rows&lt;br /&gt;
&lt;br /&gt;
5 = Print level 1 in tomRun call&lt;br /&gt;
&lt;br /&gt;
6 = Print level 2 in tomRun call&lt;br /&gt;
&lt;br /&gt;
7 = Print level 3 in tomRun call&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xInit&#039;&#039;||Used in multiMin. See help for multiMin.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;GO.localSolver &#039;&#039;||The local solver used to run all local optimizations. Default is the license dependent output of GetSolver(&#039;con&#039;,1,0).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;optParam&#039;&#039;||Structure in Prob, Prob.optParam. Defines optimization parameters. Fields used:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MaxFunc&#039;&#039;||Max number of function evaluations in each subproblem&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;fGoal&#039;&#039;||Goal for function value f(x), if empty not used. If fGoal is reached, no further local optimizations are done&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;eps_f&#039;&#039;||Relative accuracy for function value, fTol == eps_f.  Stop if abs(f-fGoal) &#039;&#039;&amp;lt;&#039;&#039;= abs(fGoal) * fTol , if fGoal = 0. Stop if abs(f-fGoal) &#039;&#039;&amp;lt;&#039;&#039;= fTol , if fGoal ==0. Default 1e-8.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bTol&#039;&#039;||Linear constraint feasibility tolerance. Default 1e-6&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cTol&#039;&#039;||Nonlinear constraint feasibility tolerance. Default 1e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;MIP&#039;&#039;||Structure in Prob, Prob.MIP. Defines integer optimization parameters. Fields used:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. If islogical(IntVars) (=all  el- ements are 0/1),  then 1 = integer variable, 0 = continuous variable. If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;nMax&#039;&#039;||Number of integer combinations possible, if  empty multiMINLP computes nMax.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Rfac&#039;&#039;||Reduction factor for real variables in MINLP  subproblem  close to local multiMINLP minimum. Bounds set to x_L = max(x_L,x-Rfac*(x_U-x_L)) and x_U= min(x_U,x+Rfac*(x_U-x_L)). Default 0.25.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization. The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||||Result structure from the last good optimization step giving the best f(x) value, the possible global MINLP  minimum.&lt;br /&gt;
&lt;br /&gt;
The following fields in Result are changed by multiMINLP before return:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag&#039;&#039;||= 0 normal output, of if fGoal set and found.&lt;br /&gt;
&lt;br /&gt;
= 1 A solution reaching the user defined fGoal was not found.&lt;br /&gt;
&lt;br /&gt;
= 2 Unbounded problem.&lt;br /&gt;
&lt;br /&gt;
=4 Infeasible problem.&lt;br /&gt;
&lt;br /&gt;
The Solver, SolverAlgorithm and ExitText fields are also reset. &lt;br /&gt;
&lt;br /&gt;
A special field in Result is also returned, Result.multiMINLP:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xOpt&#039;&#039;||Prob.N x k matrix with k distinct  local optima, the test being norm(x k- xOpt(:,i)) &#039;&#039;&amp;lt;&#039;&#039;= xEqTol*max(1,norm(x k)) that if fulfilled assumes x_k to be to close to xOpt(:,i).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;fOpt&#039;&#039;||The k function values in the local optima xOpt(:,i),i=1,...,k.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||The Inform value returned by the local solver when finding each of the local optima xOpt(:,i);  i=1,...,k.  The Inform value can be used to judge the validity of the local minimum reported.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;localTry&#039;&#039;||Total number of local searches.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter&#039;&#039;||Total number of iterations.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;FuncEv&#039;&#039;||Total number of function evaluations. &lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;GradEv&#039;&#039;||Total number of gradient evaluations. &lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;HessEv&#039;&#039;||Total number of Hessian evaluations.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ConstrEv&#039;&#039;||Total number of constraint function evaluations.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving Inform information.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MultiMin&amp;diff=3117</id>
		<title>MultiMin</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MultiMin&amp;diff=3117"/>
		<updated>2015-03-09T14:16:06Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Solvers]]&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
multiMin  solves general constrained  mixed-integer global optimization problems. It tries to find all local minima by a multi-start  method using a suitable nonlinear programming subsolver.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;multiMin  &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) &amp;amp;  &amp;amp;  &amp;amp;  &amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x    &amp;amp; \leq  &amp;amp; x_{U} \\&lt;br /&gt;
&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax   &amp;amp; \leq  &amp;amp; b_{U} \\&lt;br /&gt;
&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq  &amp;amp; c_{U} \\&lt;br /&gt;
&amp;amp;       &amp;amp;       &amp;amp; {x_i \in \mathbb{N} \; \forall i \in I} \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in \mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers.&lt;br /&gt;
&lt;br /&gt;
The integer components of every x_0 is rounded to the nearest integer value inside simple bounds, and these components are fixed during the nonlinear local search.&lt;br /&gt;
&lt;br /&gt;
If generating random points and there are linear constraints, multiMin  checks feasibility with respect to the linear constraints, and for each initial  point tries 100 times to get linear feasibility before accepting the initial  point.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = multiMin(Prob, xInit)&lt;br /&gt;
Result = tomRun(&#039;multiMin&#039;, Prob, PriLev) (driver call)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Prob&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Problem description structure. The following fields are used:&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;xInit&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Either, 1x1 number - The number of random initial  points, default 10*Prob.N dxm matrix - Every column is an initial  point (of length d=Prob.N). May also be set as Prob.xInit.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;fCut&#039;&#039;||If initial  f(x_0) &#039;&#039;&amp;gt; &#039;&#039;fCut, no local optimization is done.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;WarmStart&#039;&#039;||If true, &#039;&#039;&amp;gt; &#039;&#039;0, multiMin assumes the field multiMin  defined with the output from a previous run on the same problem. See the Output fields of Result.multiMin. Use WarmDefGLOBAL  to set the correct fields in the Prob structure.  Nec- essary fields are fOpt and xOpt. If any of the other fields are missing, the corresponding variables are initialized to 0. These other fields are: localTry, Iter, FuncEv, GradEv, HessEv, ConstrEv Inform (is set to zeros(length(fOpt,1) if not defined).&lt;br /&gt;
&lt;br /&gt;
In WarmDefGLOBAL the Result structure for the optimal run will be fed back to multiMin  as Prob.multiMin.ResOpt In case this field is not defined, and no better point is found during the runs, a special call to the localSolver is used to generate a proper Result structure.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;RandState&#039;&#039;||If &#039;&#039;WarmStart &#039;&#039;and isscalar(xInit), RandState is used as follows: If  &#039;&#039;&amp;gt; &#039;&#039;0, rand(&#039;state&#039;,RandState) is set to initialize the pseudo-random generator if &#039;&#039;&amp;lt; &#039;&#039;0, rand(&#039;state&#039;,sum(100*clock)) is set to give a new set of random values each run if RandState == 0, rand(&#039;state&#039;,) is not called Default RandState = -1&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;xEqTol&#039;&#039;||Tolerance to test if new point  x_k already defined as optimum: &#039;&#039;norm(xk - xOpt(:, i))&#039;&#039; &amp;lt;= &#039;&#039;xEqTol * max(1, norm(xk))&#039;&#039; If test fulfilled x_k is assumed to be too close to xOpt(:,i) Default xEqTol = 1E-5&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_L&#039;&#039;||Lower bounds for each element in x. If generating random points, -inf elements of x L are set to -10000.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;x_U&#039;&#039;||Upper bounds for each element in x. If generating random points, inf elements of x U are set to 10000.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;A&#039;&#039;||Constraint matrix for linear constraints. &lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;b_L&#039;&#039;||Lower bounds on the linear constraints. &lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;b_U&#039;&#039;||Upper bounds on the linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_L&#039;&#039;||Lower bounds on the general constraints.&lt;br /&gt;
|-&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;PriLevOpt&#039;&#039;||0 = silent.&lt;br /&gt;
&lt;br /&gt;
1 = Display one row for each unique local minima found. The minima are sorted, lowest value first (possibly the global minima)&lt;br /&gt;
&lt;br /&gt;
The following 4 information values are displayed:&lt;br /&gt;
# Order #&lt;br /&gt;
# Function value f(x) at local minima&lt;br /&gt;
# Point x at local minima. Only up to 10 values are displayed&lt;br /&gt;
# Inform value returned from local Solver (normally 0)&lt;br /&gt;
&lt;br /&gt;
2 = One row of output from each multiMin  local optimization trial&lt;br /&gt;
&lt;br /&gt;
The following 6 information values are displayed:&lt;br /&gt;
&lt;br /&gt;
# Step #&lt;br /&gt;
# Text Old (previously found local minima), FAIL (solver failed to verify local minima) or blank (solver success, new local minima found)&lt;br /&gt;
# Inform value from local solver&lt;br /&gt;
# f(x_0) - function value f(x_0) for initial  x_0&lt;br /&gt;
# f(x) - best f(x) value found in this local search&lt;br /&gt;
# x - point for which best f(x) value was found in this local search. Only up to 10 values are displayed.&lt;br /&gt;
&lt;br /&gt;
3 = tomRun (PrintResult)  output from every optimization, print level 1.&lt;br /&gt;
&lt;br /&gt;
4 = tomRun (PrintResult)  output from every optimization, print level 2. For constrained problems output  of sum(-constr-) and information if optimal point was accepted w.r.t.  feasibility.&lt;br /&gt;
&lt;br /&gt;
5 = tomRun (PrintResult)  output from every optimization, print level 3.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;GO&#039;&#039;||Structure in &#039;&#039;Prob&#039;&#039;, &#039;&#039;Prob.GO&#039;&#039;. Fields used:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;localSolver&#039;&#039;||The local solver used to run all local optimizations. Default is the license dependent output of GetSolver(&#039;con&#039;,1,0).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;optParam&#039;&#039;||Defines optimization parameters. Fields used:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;fGoal&#039;&#039;||Goal for function value f(x), if empty not used. If fGoal is reached, no further local optimizations are done.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;eps_f&#039;&#039;||Relative accuracy for function value, fTol == eps_f. Stop if abs(f-fGoal) &#039;&#039;&amp;lt;&#039;&#039;= abs(fGoal) * fTol , if fGoal  = 0. Stop if abs(f-fGoal) &#039;&#039;&amp;lt;&#039;&#039;= fTol , if fGoal ==0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;bTol&#039;&#039;||The local solver used to run all local optimizations. Default is the license dependent output of GetSolver(&#039;con&#039;,1,0).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;MIP.IntVars&#039;&#039;||Structure in Prob, Prob.MIP. If empty, all variables are assumed non-integer (LP problem). If &#039;&#039;length&#039;&#039;(&#039;&#039;I ntV ars&#039;&#039;) &#039;&#039;&amp;gt; &#039;&#039;1 ==&#039;&#039;&amp;gt; length&#039;&#039;(&#039;&#039;I ntV ars&#039;&#039;) == &#039;&#039;length&#039;&#039;(&#039;&#039;c&#039;&#039;) should hold.   Then &#039;&#039;I ntV ars&#039;&#039;(&#039;&#039;i&#039;&#039;)  == 1 ==&#039;&#039;&amp;gt; x&#039;&#039;(&#039;&#039;i&#039;&#039;)  integer. &#039;&#039;I ntV ars&#039;&#039;(&#039;&#039;i&#039;&#039;)  == 0 ==&#039;&#039;&amp;gt; x&#039;&#039;(&#039;&#039;i&#039;&#039;)  real.  If  &#039;&#039;length&#039;&#039;(&#039;&#039;I ntV ars&#039;&#039;)  &#039;&#039;&amp;lt; n&#039;&#039;, IntVars  is assumed to be a set of indices.  It is advised to number the integer values as the first variables, before the continuous. The tree search will then be done more efficiently.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;varargin&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Other parameters directly sent to low level routines.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization. The following fields are changed: &lt;br /&gt;
|-&lt;br /&gt;
|||colspan=&amp;quot;2&amp;quot;|The following fields in Result are changed by multiMin  before return:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag&#039;&#039;||= 0 normal output, of if fGoal set and found.&lt;br /&gt;
&lt;br /&gt;
= 1 A solution reaching the user defined fGoal was not found&lt;br /&gt;
|-&lt;br /&gt;
|||colspan=&amp;quot;2&amp;quot;|The Solver, SolverAlgorithm and ExitText  fields are also reset. &lt;br /&gt;
|-&lt;br /&gt;
|||colspan=&amp;quot;2&amp;quot;|A special field in Result is also returned, Result.multiMin:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;xOpt&#039;&#039;||Prob.N x k matrix with k distinct local optima, the test being &#039;&#039;norm&#039;&#039;(&#039;&#039;xk -xOpt&#039;&#039;(:&#039;&#039;, i&#039;&#039;)) &#039;&#039;&amp;lt;&#039;&#039;= &#039;&#039;xEqTol * max&#039;&#039;(1&#039;&#039;, norm&#039;&#039;(&#039;&#039;xk &#039;&#039;)) that if fulfilled assumes x_k to be to closeto xOpt(:,i)&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;fOpt&#039;&#039;||The k function values in the local optima xOpt(:,i),i=1,...,k.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||The Inform value returned by the local solver when finding each of the local optima xOpt(:,i);  i=1,...,k. The Inform value can be used to judge the validity of the local minimum reported.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;localTry&#039;&#039;||Total number of local searches.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter&#039;&#039;||Total number of iterations.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;FuncEv&#039;&#039;||Total number of function evaluations. &lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;GradEv&#039;&#039;||Total number of gradient evaluations. &lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;HessEv&#039;&#039;||Total number of Hessian evaluations.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ConstrEv&#039;&#039;||Total number of constraint function evaluations.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving ExitFlag and Inform information.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP&amp;diff=3116</id>
		<title>MIPNLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP&amp;diff=3116"/>
		<updated>2015-03-09T13:59:56Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* TOMLAB /MIPNLP Solver References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
Welcome to the TOMLAB /MIPNLP User&#039;s Guide. TOMLAB /MIPNLP includes four solvers for mixed integer programming problems. The solvers take advantage of the wide array of subsolvers for LP, NLP and MILP in TOMLAB.&lt;br /&gt;
&lt;br /&gt;
The solver package includes the following solvers:&lt;br /&gt;
&lt;br /&gt;
[[MIPNLP_ecpMINLP|ecpMINLP]] - Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to a MIP subproblem solved by a subsolver in each iteration. The solver algorithm is an implementation based on the publication &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, Optimization and Engineering 3, 253-280, 2002, but with modifications.&lt;br /&gt;
&lt;br /&gt;
[[MIPNLP_ecpMINLP|stoaMINLP]] - Single-search Tree Outer Approximation Solver for Mixed-Integer NonLinear Programming (MINLP). Is best suited for solving convex problems. The solver is mainly based on &#039;FilMINT: An Outer-Approximation-Based Solver for Nonlinear Mixed Integer Programs&#039; by Kumar Abhishek, Sven Leyffer, and Jeffrey T. Linderoth at the Mathematics and Computer Science Division, Preprint ANL/MCS-P1374-0906, March 28, 2008, but with some differences.&lt;br /&gt;
&lt;br /&gt;
==TOMLAB /MIPNLP Solver References==&lt;br /&gt;
&lt;br /&gt;
* [[MIPNLP_ecpMINLP|ecpMINLP]]&lt;br /&gt;
* [[MIPNLP_stoaMINLP|stoaMINLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP&amp;diff=3115</id>
		<title>MIPNLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP&amp;diff=3115"/>
		<updated>2015-03-09T13:59:42Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
Welcome to the TOMLAB /MIPNLP User&#039;s Guide. TOMLAB /MIPNLP includes four solvers for mixed integer programming problems. The solvers take advantage of the wide array of subsolvers for LP, NLP and MILP in TOMLAB.&lt;br /&gt;
&lt;br /&gt;
The solver package includes the following solvers:&lt;br /&gt;
&lt;br /&gt;
[[MIPNLP_ecpMINLP|ecpMINLP]] - Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to a MIP subproblem solved by a subsolver in each iteration. The solver algorithm is an implementation based on the publication &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, Optimization and Engineering 3, 253-280, 2002, but with modifications.&lt;br /&gt;
&lt;br /&gt;
[[MIPNLP_ecpMINLP|stoaMINLP]] - Single-search Tree Outer Approximation Solver for Mixed-Integer NonLinear Programming (MINLP). Is best suited for solving convex problems. The solver is mainly based on &#039;FilMINT: An Outer-Approximation-Based Solver for Nonlinear Mixed Integer Programs&#039; by Kumar Abhishek, Sven Leyffer, and Jeffrey T. Linderoth at the Mathematics and Computer Science Division, Preprint ANL/MCS-P1374-0906, March 28, 2008, but with some differences.&lt;br /&gt;
&lt;br /&gt;
==TOMLAB /MIPNLP Solver References==&lt;br /&gt;
&lt;br /&gt;
* [[multiMin]]&lt;br /&gt;
* [[MIPNLP_ecpMINLP|ecpMINLP]]&lt;br /&gt;
* [[MIPNLP_stoaMINLP|stoaMINLP]]&lt;br /&gt;
* [[MultiMINLP|multiMINLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3112</id>
		<title>MIPNLP ecpMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3112"/>
		<updated>2015-02-13T13:42:47Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Outputs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
ecpMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;ecpMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers but can be either continuously differentiable or not. An initalization routine will detect strict integer variables in the problem.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = ecpMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
Warm start is currently not supported, but might be included in a future release.&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in the problem description structure Prob&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;f_Low&#039;&#039;||Lower bound on solution.&lt;br /&gt;
|-&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;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by ecpMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in ecpMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||output&lt;br /&gt;
|-&lt;br /&gt;
|=0||Silent.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;0||Initial information and convergence results.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;1||Output a line whenever the solution has improved, containing:&lt;br /&gt;
nIterations, nCuts, nCuts with criteria fulfilled, nLinearizations, nSpecialCuts, best solution.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;2||Output a line every iteration with the following information:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!label||description&lt;br /&gt;
|-&lt;br /&gt;
|It         ||Iterations&lt;br /&gt;
|-&lt;br /&gt;
|nECP       ||Number of extended cutting planes (ECP)&lt;br /&gt;
|-&lt;br /&gt;
|nAlpha&amp;gt;=lim||Number of ECP with criteria fulfilled&lt;br /&gt;
|-&lt;br /&gt;
|nL         ||Number of linearizations&lt;br /&gt;
|-&lt;br /&gt;
|nSECP      ||Number of special case ECP&amp;lt;br&amp;gt;(created from constraint on bound)&lt;br /&gt;
|-&lt;br /&gt;
|fIPMin     ||Objective of best solution at current iteration&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;3||Output a description of each step in the MINLP algorithm&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;4||Output additional numerical information in some algorithm steps&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;5||Output information in substeps (preprocessing, line search)&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptMIP&#039;&#039;||Print level in MIP sub-solvers,  (CPLEX and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptNLP&#039;&#039;||Print level in NLP sub-solvers,  (SNOPT and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverMIP&#039;&#039;||Name of the solver used for MIP subproblems. If TOMLAB /gurobi is installed, gurobi is the default solver. If TOMLAB /CPLEX is installed, CPLEX is second choice as default. Otherwise the default solver is found calling GetSolver(&#039;mip&#039;,1); Supported as subsolvers are gurobi, CPLEX, mipSolve, milpSolve and cutplane.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverNLP&#039;&#039;||&lt;br /&gt;
Name of the solver used for NLP subproblems. If packages /SOL or /SNOTP is installed, snopt is the default solver. Otherwise the default solver is found calling GetSolver(&#039;con&#039;,1); &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems when SolverMIP == mipSolve&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure with parameters specific to mixed integer optimization. See the table below describing the fields used in the MIP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ECPMINLP&#039;&#039;||Structure with parameters specific to the ecpMINLP solver. See the table below describing the fields used in the ECPMINLP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below describing the fields used in the optParam structure.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|&#039;&#039;&#039;fields used in Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||ecpMINLP stops if the duality gap is less than DualGap&lt;br /&gt;
DualGap = 1, stop at first integer solution, e.g. DualGap = 0.01,stop if solution &amp;lt; 1% from optimal solution.&lt;br /&gt;
&amp;lt;br&amp;gt;The lower bound Prob.f_Low is used, (default -1.0e300), which can also be set by the user. If f_Low has not been changed from default the lower bound is obtained from the initial solution of a relaxed problem, but only when ECPMINLP.INIT_BND is 1 or 2 (default).&lt;br /&gt;
&amp;lt;br&amp;gt;Default DualGap is -1, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PPP&#039;&#039;||Pre-processing and probing, default is 0.&amp;lt;br&amp;gt;&lt;br /&gt;
0  Not used. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
1  Apply initially on MINLP problem.&amp;lt;br&amp;gt;&lt;br /&gt;
2  Apply each iteration before solving MILP sub-problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If nonzero, a rounding heuristics will be used on the initial NLP solution in order to obtain an initial integer solution. Requires ECPMINLP.InitBndType enabled. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ECPMINLP structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with solver-specific options.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.ECPMINLP&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;beta&#039;&#039;||Multiplier when increasing alpha after an infeasible MILP solution. &lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for beta is 1.3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;gamma&#039;&#039;||Multiplier when increasing alpha when MILP solution does not violate any nonlinear contraints, but still does not decrease the upper bound of the objective.&lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for gamma is 2.0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PREALLOC&#039;&#039;||Flag enabling preallocation of memory for cutting planes and linearizations.&lt;br /&gt;
&amp;lt;br&amp;gt;0  No preallocation, dynamic growth of arrays. Current default.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Preallocate arrays.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;InitBndType&#039;&#039;||Selects method for setting lower bound when f_Low not changed from default.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||method&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|0 ||No extra initial lower bound.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|1 ||Use default TOMLAB NLP solver on problem with relaxed integer constraints. Add a linearization if a feasible MINLP solution was found.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|2 ||Add an initial linearization as long as a feasible NLP solution was found. The linearization is a simple lower bound on the MILP objective. Default.&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SET_TOL&#039;&#039;||Flag enabling changing tolerances, described below under optParam.eps_x, optParam.eps_x and optParam.eps_f.&lt;br /&gt;
&amp;lt;br&amp;gt;0  Default. Using the recommended solver default values, 1.0e-3.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Tolerances can be changed, taken from Prob.optParam.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IntSolLimIncr&#039;&#039;||Integer option when using CPLEX as MIP subsolver.&lt;br /&gt;
&amp;lt;br&amp;gt;Define how much the CPLEX parameter IntSolLimIncr increases when a feasible solution is not optimal and all alpha values have met their criteria.&lt;br /&gt;
&amp;lt;br&amp;gt;When set to zero, the optimal strategy will instead be used immediately, without any gradual increase of INTSOLLIM.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USE_CUTPOOL&#039;&#039;||Set nonzero to use a pool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&amp;lt;br&amp;gt;Cuts not active in the MILP-solution for CutDelBound iterations in a row will be inactivated (removed from the MILP-problem) until they are violated in a new solution.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 0, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CutDelBound&#039;&#039;||The number of consecutive times an extended cutting plane can be inactive before it gets removed and put into the inactive pool, if the option USE_CUTPOOL is set nonzero.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 15 times.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIterWoImpr&#039;&#039;||Limit on the number of successive iterations allowed without any improvements at all to neither objective nor solution point before the solver terminates&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 2.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USE_NLP&#039;&#039;||Set nonzero to use an NLP sub-solver on the original problem with the integer variables fixed at values from the latest MILP solution. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;RESELECT_CUTS&#039;&#039;||Set nonzero to enable cut reselection heuristics. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SCALE_CUTS&#039;&#039;||Set nonzero to scale cuts before they are added to the MILP problem. Scaling is done by dividing the cut with its norm. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam Structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 2 also enables IterPrint, setting it to 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_x&#039;&#039;||Linear constraint violation convergence tolerance. Default is 2.0e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_g&#039;&#039;||Constraint violation convergence tolerance. Default is 1.0e-7&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_f&#039;&#039;||Optimality tolerance. Default is 1.0e-8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE:&#039;&#039; For the solver to use these tolerances, the flag &#039;&#039;ECPMINLP.SET_TOL&#039;&#039; must be set to nonzero.&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are used:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &lt;br /&gt;
&amp;lt;br&amp;gt;0: Solution found, or integer solution with duality gap less than user tolerance.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Maximal number of iterations reached.&lt;br /&gt;
&amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;3: Problem in subsolver, see Inform value.&lt;br /&gt;
&amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &amp;gt; Prob.maxCPU&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Inform for ExitFlag != 3&lt;br /&gt;
&amp;lt;br&amp;gt;0: Global solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Local solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;2: No solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;gt;2: Inform value from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, set as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Condition fulfilled&#039;&#039;||DualGap value set&lt;br /&gt;
|-&lt;br /&gt;
||fIPMin ~= 0||max(0,fIPMin-fLB)/|fIPMin|&lt;br /&gt;
|-&lt;br /&gt;
||fIPMin == 0||max(0,fIPMin-fLB)&lt;br /&gt;
|}&lt;br /&gt;
To get the percentage duality gap, scale with 100.&amp;lt;br&amp;gt;&lt;br /&gt;
PercentageGap = 100*Dual- Gap.&amp;lt;br&amp;gt;&lt;br /&gt;
To get the absolute value duality gap, scale with fIPMin.&amp;lt;br&amp;gt;&lt;br /&gt;
AbsoluteGap = fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x&#039;&#039;||Vector of solution points, sorted on ascending order based on the correcsponding objective values returned in f. x(:,1) is always equal to x_k.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f&#039;&#039;||The objective vales at all encountered solution points in x. Sorted in ascending order.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;ecpMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Algorithm==&lt;br /&gt;
ecpMINLP Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to MIP subproblem which is then solved by a subsolver in each iteration.&lt;br /&gt;
&lt;br /&gt;
The solver algorithm is mainly based on the paper &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, published in Optimization and Engineering 3, 253-280, 2002, with some modifications.&lt;br /&gt;
&lt;br /&gt;
Most prominent features in addition to the ones described in the main reference above are&lt;br /&gt;
* Solving the relaxed NLP problem initially to obtain a lower bound on the solution.&lt;br /&gt;
* A rounding heuristics performed on the initial NLP solution in order to obtain an initial upper bound on the initial solutions.&lt;br /&gt;
* Optional use of a cutpool for the alpha-regulated extended cutting planes.&lt;br /&gt;
* Special treatment of problems with integer variables which are not continuously differentiable.&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3111</id>
		<title>MIPNLP ecpMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3111"/>
		<updated>2015-02-13T13:39:35Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
ecpMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;ecpMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers but can be either continuously differentiable or not. An initalization routine will detect strict integer variables in the problem.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = ecpMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
Warm start is currently not supported, but might be included in a future release.&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in the problem description structure Prob&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;f_Low&#039;&#039;||Lower bound on solution.&lt;br /&gt;
|-&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;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by ecpMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in ecpMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||output&lt;br /&gt;
|-&lt;br /&gt;
|=0||Silent.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;0||Initial information and convergence results.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;1||Output a line whenever the solution has improved, containing:&lt;br /&gt;
nIterations, nCuts, nCuts with criteria fulfilled, nLinearizations, nSpecialCuts, best solution.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;2||Output a line every iteration with the following information:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!label||description&lt;br /&gt;
|-&lt;br /&gt;
|It         ||Iterations&lt;br /&gt;
|-&lt;br /&gt;
|nECP       ||Number of extended cutting planes (ECP)&lt;br /&gt;
|-&lt;br /&gt;
|nAlpha&amp;gt;=lim||Number of ECP with criteria fulfilled&lt;br /&gt;
|-&lt;br /&gt;
|nL         ||Number of linearizations&lt;br /&gt;
|-&lt;br /&gt;
|nSECP      ||Number of special case ECP&amp;lt;br&amp;gt;(created from constraint on bound)&lt;br /&gt;
|-&lt;br /&gt;
|fIPMin     ||Objective of best solution at current iteration&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;3||Output a description of each step in the MINLP algorithm&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;4||Output additional numerical information in some algorithm steps&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;5||Output information in substeps (preprocessing, line search)&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptMIP&#039;&#039;||Print level in MIP sub-solvers,  (CPLEX and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptNLP&#039;&#039;||Print level in NLP sub-solvers,  (SNOPT and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverMIP&#039;&#039;||Name of the solver used for MIP subproblems. If TOMLAB /gurobi is installed, gurobi is the default solver. If TOMLAB /CPLEX is installed, CPLEX is second choice as default. Otherwise the default solver is found calling GetSolver(&#039;mip&#039;,1); Supported as subsolvers are gurobi, CPLEX, mipSolve, milpSolve and cutplane.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverNLP&#039;&#039;||&lt;br /&gt;
Name of the solver used for NLP subproblems. If packages /SOL or /SNOTP is installed, snopt is the default solver. Otherwise the default solver is found calling GetSolver(&#039;con&#039;,1); &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems when SolverMIP == mipSolve&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure with parameters specific to mixed integer optimization. See the table below describing the fields used in the MIP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ECPMINLP&#039;&#039;||Structure with parameters specific to the ecpMINLP solver. See the table below describing the fields used in the ECPMINLP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below describing the fields used in the optParam structure.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|&#039;&#039;&#039;fields used in Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||ecpMINLP stops if the duality gap is less than DualGap&lt;br /&gt;
DualGap = 1, stop at first integer solution, e.g. DualGap = 0.01,stop if solution &amp;lt; 1% from optimal solution.&lt;br /&gt;
&amp;lt;br&amp;gt;The lower bound Prob.f_Low is used, (default -1.0e300), which can also be set by the user. If f_Low has not been changed from default the lower bound is obtained from the initial solution of a relaxed problem, but only when ECPMINLP.INIT_BND is 1 or 2 (default).&lt;br /&gt;
&amp;lt;br&amp;gt;Default DualGap is -1, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PPP&#039;&#039;||Pre-processing and probing, default is 0.&amp;lt;br&amp;gt;&lt;br /&gt;
0  Not used. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
1  Apply initially on MINLP problem.&amp;lt;br&amp;gt;&lt;br /&gt;
2  Apply each iteration before solving MILP sub-problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If nonzero, a rounding heuristics will be used on the initial NLP solution in order to obtain an initial integer solution. Requires ECPMINLP.InitBndType enabled. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ECPMINLP structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with solver-specific options.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.ECPMINLP&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;beta&#039;&#039;||Multiplier when increasing alpha after an infeasible MILP solution. &lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for beta is 1.3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;gamma&#039;&#039;||Multiplier when increasing alpha when MILP solution does not violate any nonlinear contraints, but still does not decrease the upper bound of the objective.&lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for gamma is 2.0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PREALLOC&#039;&#039;||Flag enabling preallocation of memory for cutting planes and linearizations.&lt;br /&gt;
&amp;lt;br&amp;gt;0  No preallocation, dynamic growth of arrays. Current default.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Preallocate arrays.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;InitBndType&#039;&#039;||Selects method for setting lower bound when f_Low not changed from default.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||method&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|0 ||No extra initial lower bound.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|1 ||Use default TOMLAB NLP solver on problem with relaxed integer constraints. Add a linearization if a feasible MINLP solution was found.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|2 ||Add an initial linearization as long as a feasible NLP solution was found. The linearization is a simple lower bound on the MILP objective. Default.&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SET_TOL&#039;&#039;||Flag enabling changing tolerances, described below under optParam.eps_x, optParam.eps_x and optParam.eps_f.&lt;br /&gt;
&amp;lt;br&amp;gt;0  Default. Using the recommended solver default values, 1.0e-3.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Tolerances can be changed, taken from Prob.optParam.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IntSolLimIncr&#039;&#039;||Integer option when using CPLEX as MIP subsolver.&lt;br /&gt;
&amp;lt;br&amp;gt;Define how much the CPLEX parameter IntSolLimIncr increases when a feasible solution is not optimal and all alpha values have met their criteria.&lt;br /&gt;
&amp;lt;br&amp;gt;When set to zero, the optimal strategy will instead be used immediately, without any gradual increase of INTSOLLIM.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USE_CUTPOOL&#039;&#039;||Set nonzero to use a pool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&amp;lt;br&amp;gt;Cuts not active in the MILP-solution for CutDelBound iterations in a row will be inactivated (removed from the MILP-problem) until they are violated in a new solution.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 0, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CutDelBound&#039;&#039;||The number of consecutive times an extended cutting plane can be inactive before it gets removed and put into the inactive pool, if the option USE_CUTPOOL is set nonzero.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 15 times.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIterWoImpr&#039;&#039;||Limit on the number of successive iterations allowed without any improvements at all to neither objective nor solution point before the solver terminates&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 2.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USE_NLP&#039;&#039;||Set nonzero to use an NLP sub-solver on the original problem with the integer variables fixed at values from the latest MILP solution. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;RESELECT_CUTS&#039;&#039;||Set nonzero to enable cut reselection heuristics. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SCALE_CUTS&#039;&#039;||Set nonzero to scale cuts before they are added to the MILP problem. Scaling is done by dividing the cut with its norm. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam Structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 2 also enables IterPrint, setting it to 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_x&#039;&#039;||Linear constraint violation convergence tolerance. Default is 2.0e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_g&#039;&#039;||Constraint violation convergence tolerance. Default is 1.0e-7&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_f&#039;&#039;||Optimality tolerance. Default is 1.0e-8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE:&#039;&#039; For the solver to use these tolerances, the flag &#039;&#039;ECPMINLP.SET_TOL&#039;&#039; must be set to nonzero.&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &lt;br /&gt;
&amp;lt;br&amp;gt;0: Solution found, or integer solution with duality gap less than user tolerance.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Maximal number of iterations reached.&lt;br /&gt;
&amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;3: Problem in subsolver, see Inform value.&lt;br /&gt;
&amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &amp;gt; Prob.maxCPU&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Inform for ExitFlag != 3&lt;br /&gt;
&amp;lt;br&amp;gt;0: Global solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Local solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;2: No solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;gt;2: Inform value from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, set as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Condition fulfilled&#039;&#039;||DualGap value set&lt;br /&gt;
|-&lt;br /&gt;
||fIPMin ~= 0||max(0,fIPMin-fLB)/|fIPMin|&lt;br /&gt;
|-&lt;br /&gt;
||fIPMin == 0||max(0,fIPMin-fLB)&lt;br /&gt;
|}&lt;br /&gt;
To get the percentage duality gap, scale with 100.&amp;lt;br&amp;gt;&lt;br /&gt;
PercentageGap = 100*Dual- Gap.&amp;lt;br&amp;gt;&lt;br /&gt;
To get the absolute value duality gap, scale with fIPMin.&amp;lt;br&amp;gt;&lt;br /&gt;
AbsoluteGap = fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x&#039;&#039;||Vector of solution points, sorted on ascending order based on the correcsponding objective values returned in f. x(:,1) is always equal to x_k.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f&#039;&#039;||The objective vales at all encountered solution points in x. Sorted in ascending order.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;ecpMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Algorithm==&lt;br /&gt;
ecpMINLP Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to MIP subproblem which is then solved by a subsolver in each iteration.&lt;br /&gt;
&lt;br /&gt;
The solver algorithm is mainly based on the paper &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, published in Optimization and Engineering 3, 253-280, 2002, with some modifications.&lt;br /&gt;
&lt;br /&gt;
Most prominent features in addition to the ones described in the main reference above are&lt;br /&gt;
* Solving the relaxed NLP problem initially to obtain a lower bound on the solution.&lt;br /&gt;
* A rounding heuristics performed on the initial NLP solution in order to obtain an initial upper bound on the initial solutions.&lt;br /&gt;
* Optional use of a cutpool for the alpha-regulated extended cutting planes.&lt;br /&gt;
* Special treatment of problems with integer variables which are not continuously differentiable.&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3110</id>
		<title>MIPNLP ecpMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3110"/>
		<updated>2015-02-13T13:38:34Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Outputs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
ecpMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;ecpMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers but can be either continuously differentiable or not. An initalization routine will detect strict integer variables in the problem.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = ecpMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
Warm start is currently not supported, but might be included in a future release.&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in the problem description structure Prob&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;f_Low&#039;&#039;||Lower bound on solution.&lt;br /&gt;
|-&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;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by ecpMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in ecpMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||output&lt;br /&gt;
|-&lt;br /&gt;
|=0||Silent.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;0||Initial information and convergence results.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;1||Output a line whenever the solution has improved, containing:&lt;br /&gt;
nIterations, nCuts, nCuts with criteria fulfilled, nLinearizations, nSpecialCuts, best solution.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;2||Output a line every iteration with the following information:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!label||description&lt;br /&gt;
|-&lt;br /&gt;
|It         ||Iterations&lt;br /&gt;
|-&lt;br /&gt;
|nECP       ||Number of extended cutting planes (ECP)&lt;br /&gt;
|-&lt;br /&gt;
|nAlpha&amp;gt;=lim||Number of ECP with criteria fulfilled&lt;br /&gt;
|-&lt;br /&gt;
|nL         ||Number of linearizations&lt;br /&gt;
|-&lt;br /&gt;
|nSECP      ||Number of special case ECP&amp;lt;br&amp;gt;(created from constraint on bound)&lt;br /&gt;
|-&lt;br /&gt;
|fIPMin     ||Objective of best solution at current iteration&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;3||Output a description of each step in the MINLP algorithm&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;4||Output additional numerical information in some algorithm steps&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;5||Output information in substeps (preprocessing, line search)&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptMIP&#039;&#039;||Print level in MIP sub-solvers,  (CPLEX and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptNLP&#039;&#039;||Print level in NLP sub-solvers,  (SNOPT and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverMIP&#039;&#039;||Name of the solver used for MIP subproblems. If TOMLAB /gurobi is installed, gurobi is the default solver. If TOMLAB /CPLEX is installed, CPLEX is second choice as default. Otherwise the default solver is found calling GetSolver(&#039;mip&#039;,1); Supported as subsolvers are gurobi, CPLEX, mipSolve, milpSolve and cutplane.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverNLP&#039;&#039;||&lt;br /&gt;
Name of the solver used for NLP subproblems. If packages /SOL or /SNOTP is installed, snopt is the default solver. Otherwise the default solver is found calling GetSolver(&#039;con&#039;,1); &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems when SolverMIP == mipSolve&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure with parameters specific to mixed integer optimization. See the table below describing the fields used in the MIP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ECPMINLP&#039;&#039;||Structure with parameters specific to the ecpMINLP solver. See the table below describing the fields used in the ECPMINLP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below describing the fields used in the optParam structure.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|&#039;&#039;&#039;fields used in Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||ecpMINLP stops if the duality gap is less than DualGap&lt;br /&gt;
DualGap = 1, stop at first integer solution, e.g. DualGap = 0.01,stop if solution &amp;lt; 1% from optimal solution.&lt;br /&gt;
&amp;lt;br&amp;gt;The lower bound Prob.f_Low is used, (default -1.0e300), which can also be set by the user. If f_Low has not been changed from default the lower bound is obtained from the initial solution of a relaxed problem, but only when ECPMINLP.INIT_BND is 1 or 2 (default).&lt;br /&gt;
&amp;lt;br&amp;gt;Default DualGap is -1, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PPP&#039;&#039;||Pre-processing and probing, default is 0.&amp;lt;br&amp;gt;&lt;br /&gt;
0  Not used. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
1  Apply initially on MINLP problem.&amp;lt;br&amp;gt;&lt;br /&gt;
2  Apply each iteration before solving MILP sub-problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If nonzero, a rounding heuristics will be used on the initial NLP solution in order to obtain an initial integer solution. Requires ECPMINLP.InitBndType enabled. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ECPMINLP structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with solver-specific options.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.ECPMINLP&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;beta&#039;&#039;||Multiplier when increasing alpha after an infeasible MILP solution. &lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for beta is 1.3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;gamma&#039;&#039;||Multiplier when increasing alpha when MILP solution does not violate any nonlinear contraints, but still does not decrease the upper bound of the objective.&lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for gamma is 2.0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PREALLOC&#039;&#039;||Flag enabling preallocation of memory for cutting planes and linearizations.&lt;br /&gt;
&amp;lt;br&amp;gt;0  No preallocation, dynamic growth of arrays. Current default.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Preallocate arrays.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;InitBndType&#039;&#039;||Selects method for setting lower bound when f_Low not changed from default.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||method&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|0 ||No extra initial lower bound.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|1 ||Use default TOMLAB NLP solver on problem with relaxed integer constraints. Add a linearization if a feasible MINLP solution was found.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|2 ||Add an initial linearization as long as a feasible NLP solution was found. The linearization is a simple lower bound on the MILP objective. Default.&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SET_TOL&#039;&#039;||Flag enabling changing tolerances, described below under optParam.eps_x, optParam.eps_x and optParam.eps_f.&lt;br /&gt;
&amp;lt;br&amp;gt;0  Default. Using the recommended solver default values, 1.0e-3.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Tolerances can be changed, taken from Prob.optParam.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IntSolLimIncr&#039;&#039;||Integer option when using CPLEX as MIP subsolver.&lt;br /&gt;
&amp;lt;br&amp;gt;Define how much the CPLEX parameter IntSolLimIncr increases when a feasible solution is not optimal and all alpha values have met their criteria.&lt;br /&gt;
&amp;lt;br&amp;gt;When set to zero, the optimal strategy will instead be used immediately, without any gradual increase of INTSOLLIM.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USE_CUTPOOL&#039;&#039;||Set nonzero to use a pool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&amp;lt;br&amp;gt;Cuts not active in the MILP-solution for CutDelBound iterations in a row will be inactivated (removed from the MILP-problem) until they are violated in a new solution.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 0, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CutDelBound&#039;&#039;||The number of consecutive times an extended cutting plane can be inactive before it gets removed and put into the inactive pool, if the option USE_CUTPOOL is set nonzero.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 15 times.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIterWoImpr&#039;&#039;||Limit on the number of successive iterations allowed without any improvements at all to neither objective nor solution point before the solver terminates&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 2.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USE_NLP&#039;&#039;||Set nonzero to use an NLP sub-solver on the original problem with the integer variables fixed at values from the latest MILP solution. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;RESELECT_CUTS&#039;&#039;||Set nonzero to enable cut reselection heuristics. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SCALE_CUTS&#039;&#039;||Set nonzero to scale cuts before they are added to the MILP problem. Scaling is done by dividing the cut with its norm. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam Structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 2 also enables IterPrint, setting it to 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_x&#039;&#039;||Linear constraint violation convergence tolerance. Default is 2.0e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_g&#039;&#039;||Constraint violation convergence tolerance. Default is 1.0e-7&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_f&#039;&#039;||Optimality tolerance. Default is 1.0e-8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE:&#039;&#039; For the solver to use these tolerances, the flag &#039;&#039;ECPMINLP.SET_TOL&#039;&#039; must be set to nonzero.&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &lt;br /&gt;
&amp;lt;br&amp;gt;0: Solution found, or integer solution with duality gap less than user tolerance.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Maximal number of iterations reached.&lt;br /&gt;
&amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;3: Problem in subsolver, see Inform value.&lt;br /&gt;
&amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &amp;gt; Prob.maxCPU&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Inform for ExitFlag != 3&lt;br /&gt;
&amp;lt;br&amp;gt;0: Global solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Local solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;2: No solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;gt;2: Inform value from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, set as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Condition fulfilled&#039;&#039;||DualGap value set&lt;br /&gt;
|-&lt;br /&gt;
||fIPMin ~= 0||max(0,fIPMin-fLB)/|fIPMin|&lt;br /&gt;
|-&lt;br /&gt;
||fIPMin == 0||max(0,fIPMin-fLB)&lt;br /&gt;
|}&lt;br /&gt;
To get the percentage duality gap, scale with 100.&amp;lt;br&amp;gt;&lt;br /&gt;
PercentageGap = 100*Dual- Gap.&amp;lt;br&amp;gt;&lt;br /&gt;
To get the absolute value duality gap, scale with fIPMin.&amp;lt;br&amp;gt;&lt;br /&gt;
AbsoluteGap = fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x&#039;&#039;||Vector of solution points, sorted on ascending order based on the correcsponding objective values returned in f. x(:,1) is always equal to x_k.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f&#039;&#039;||The objective vales at all encountered solution points in x. Sorted in ascending order.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;ecpMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Algorithm==&lt;br /&gt;
ecpMINLP Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to MIP subproblem which is then solved by a subsolver in each iteration.&lt;br /&gt;
&lt;br /&gt;
The solver algorithm is mainly based on the paper &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, published in Optimization and Engineering 3, 253-280, 2002, with some modifications.&lt;br /&gt;
&lt;br /&gt;
Most prominent features in addition to the ones described in the main reference above are&lt;br /&gt;
* Solving the relaxed NLP problem initially to obtain a lower bound on the solution.&lt;br /&gt;
* A rounding heuristics performed on the initial NLP solution in order to obtain an initial upper bound on the initial solutions.&lt;br /&gt;
* Optional use of a cutpool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3109</id>
		<title>MIPNLP ecpMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3109"/>
		<updated>2015-02-13T13:22:20Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* optParam Structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
ecpMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;ecpMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers but can be either continuously differentiable or not. An initalization routine will detect strict integer variables in the problem.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = ecpMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
Warm start is currently not supported, but might be included in a future release.&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in the problem description structure Prob&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;f_Low&#039;&#039;||Lower bound on solution.&lt;br /&gt;
|-&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;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by ecpMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in ecpMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||output&lt;br /&gt;
|-&lt;br /&gt;
|=0||Silent.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;0||Initial information and convergence results.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;1||Output a line whenever the solution has improved, containing:&lt;br /&gt;
nIterations, nCuts, nCuts with criteria fulfilled, nLinearizations, nSpecialCuts, best solution.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;2||Output a line every iteration with the following information:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!label||description&lt;br /&gt;
|-&lt;br /&gt;
|It         ||Iterations&lt;br /&gt;
|-&lt;br /&gt;
|nECP       ||Number of extended cutting planes (ECP)&lt;br /&gt;
|-&lt;br /&gt;
|nAlpha&amp;gt;=lim||Number of ECP with criteria fulfilled&lt;br /&gt;
|-&lt;br /&gt;
|nL         ||Number of linearizations&lt;br /&gt;
|-&lt;br /&gt;
|nSECP      ||Number of special case ECP&amp;lt;br&amp;gt;(created from constraint on bound)&lt;br /&gt;
|-&lt;br /&gt;
|fIPMin     ||Objective of best solution at current iteration&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;3||Output a description of each step in the MINLP algorithm&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;4||Output additional numerical information in some algorithm steps&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;5||Output information in substeps (preprocessing, line search)&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptMIP&#039;&#039;||Print level in MIP sub-solvers,  (CPLEX and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptNLP&#039;&#039;||Print level in NLP sub-solvers,  (SNOPT and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverMIP&#039;&#039;||Name of the solver used for MIP subproblems. If TOMLAB /gurobi is installed, gurobi is the default solver. If TOMLAB /CPLEX is installed, CPLEX is second choice as default. Otherwise the default solver is found calling GetSolver(&#039;mip&#039;,1); Supported as subsolvers are gurobi, CPLEX, mipSolve, milpSolve and cutplane.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverNLP&#039;&#039;||&lt;br /&gt;
Name of the solver used for NLP subproblems. If packages /SOL or /SNOTP is installed, snopt is the default solver. Otherwise the default solver is found calling GetSolver(&#039;con&#039;,1); &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems when SolverMIP == mipSolve&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure with parameters specific to mixed integer optimization. See the table below describing the fields used in the MIP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ECPMINLP&#039;&#039;||Structure with parameters specific to the ecpMINLP solver. See the table below describing the fields used in the ECPMINLP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below describing the fields used in the optParam structure.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|&#039;&#039;&#039;fields used in Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||ecpMINLP stops if the duality gap is less than DualGap&lt;br /&gt;
DualGap = 1, stop at first integer solution, e.g. DualGap = 0.01,stop if solution &amp;lt; 1% from optimal solution.&lt;br /&gt;
&amp;lt;br&amp;gt;The lower bound Prob.f_Low is used, (default -1.0e300), which can also be set by the user. If f_Low has not been changed from default the lower bound is obtained from the initial solution of a relaxed problem, but only when ECPMINLP.INIT_BND is 1 or 2 (default).&lt;br /&gt;
&amp;lt;br&amp;gt;Default DualGap is -1, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PPP&#039;&#039;||Pre-processing and probing, default is 0.&amp;lt;br&amp;gt;&lt;br /&gt;
0  Not used. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
1  Apply initially on MINLP problem.&amp;lt;br&amp;gt;&lt;br /&gt;
2  Apply each iteration before solving MILP sub-problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If nonzero, a rounding heuristics will be used on the initial NLP solution in order to obtain an initial integer solution. Requires ECPMINLP.InitBndType enabled. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ECPMINLP structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with solver-specific options.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.ECPMINLP&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;beta&#039;&#039;||Multiplier when increasing alpha after an infeasible MILP solution. &lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for beta is 1.3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;gamma&#039;&#039;||Multiplier when increasing alpha when MILP solution does not violate any nonlinear contraints, but still does not decrease the upper bound of the objective.&lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for gamma is 2.0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PREALLOC&#039;&#039;||Flag enabling preallocation of memory for cutting planes and linearizations.&lt;br /&gt;
&amp;lt;br&amp;gt;0  No preallocation, dynamic growth of arrays. Current default.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Preallocate arrays.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;InitBndType&#039;&#039;||Selects method for setting lower bound when f_Low not changed from default.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||method&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|0 ||No extra initial lower bound.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|1 ||Use default TOMLAB NLP solver on problem with relaxed integer constraints. Add a linearization if a feasible MINLP solution was found.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|2 ||Add an initial linearization as long as a feasible NLP solution was found. The linearization is a simple lower bound on the MILP objective. Default.&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SET_TOL&#039;&#039;||Flag enabling changing tolerances, described below under optParam.eps_x, optParam.eps_x and optParam.eps_f.&lt;br /&gt;
&amp;lt;br&amp;gt;0  Default. Using the recommended solver default values, 1.0e-3.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Tolerances can be changed, taken from Prob.optParam.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IntSolLimIncr&#039;&#039;||Integer option when using CPLEX as MIP subsolver.&lt;br /&gt;
&amp;lt;br&amp;gt;Define how much the CPLEX parameter IntSolLimIncr increases when a feasible solution is not optimal and all alpha values have met their criteria.&lt;br /&gt;
&amp;lt;br&amp;gt;When set to zero, the optimal strategy will instead be used immediately, without any gradual increase of INTSOLLIM.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USE_CUTPOOL&#039;&#039;||Set nonzero to use a pool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&amp;lt;br&amp;gt;Cuts not active in the MILP-solution for CutDelBound iterations in a row will be inactivated (removed from the MILP-problem) until they are violated in a new solution.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 0, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CutDelBound&#039;&#039;||The number of consecutive times an extended cutting plane can be inactive before it gets removed and put into the inactive pool, if the option USE_CUTPOOL is set nonzero.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 15 times.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIterWoImpr&#039;&#039;||Limit on the number of successive iterations allowed without any improvements at all to neither objective nor solution point before the solver terminates&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 2.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USE_NLP&#039;&#039;||Set nonzero to use an NLP sub-solver on the original problem with the integer variables fixed at values from the latest MILP solution. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;RESELECT_CUTS&#039;&#039;||Set nonzero to enable cut reselection heuristics. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SCALE_CUTS&#039;&#039;||Set nonzero to scale cuts before they are added to the MILP problem. Scaling is done by dividing the cut with its norm. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam Structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 2 also enables IterPrint, setting it to 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_x&#039;&#039;||Linear constraint violation convergence tolerance. Default is 2.0e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_g&#039;&#039;||Constraint violation convergence tolerance. Default is 1.0e-7&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_f&#039;&#039;||Optimality tolerance. Default is 1.0e-8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE:&#039;&#039; For the solver to use these tolerances, the flag &#039;&#039;ECPMINLP.SET_TOL&#039;&#039; must be set to nonzero.&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &lt;br /&gt;
&amp;lt;br&amp;gt;0: Solution found, or integer solution with duality gap less than user tolerance.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Maximal number of iterations reached.&lt;br /&gt;
&amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;3: Problem in subsolver, see Inform value.&lt;br /&gt;
&amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &amp;gt; Prob.maxCPU&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Inform for ExitFlag != 3&lt;br /&gt;
&amp;lt;br&amp;gt;0: Global solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Local solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;2: No solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;gt;2: Inform value from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, max(0,fIPMin-fLB)/-fIPMin-, if fIPMin =0; max(0,fIPMin-fLB) if fIPMin == 0. If fIPMin   =0:  Scale with 100, 100*Dual- Gap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;ecpMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Algorithm==&lt;br /&gt;
ecpMINLP Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to MIP subproblem which is then solved by a subsolver in each iteration.&lt;br /&gt;
&lt;br /&gt;
The solver algorithm is mainly based on the paper &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, published in Optimization and Engineering 3, 253-280, 2002, with some modifications.&lt;br /&gt;
&lt;br /&gt;
Most prominent features in addition to the ones described in the main reference above are&lt;br /&gt;
* Solving the relaxed NLP problem initially to obtain a lower bound on the solution.&lt;br /&gt;
* A rounding heuristics performed on the initial NLP solution in order to obtain an initial upper bound on the initial solutions.&lt;br /&gt;
* Optional use of a cutpool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3108</id>
		<title>MIPNLP ecpMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3108"/>
		<updated>2015-02-13T13:21:02Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* ECPMINLP structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
ecpMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;ecpMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers but can be either continuously differentiable or not. An initalization routine will detect strict integer variables in the problem.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = ecpMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
Warm start is currently not supported, but might be included in a future release.&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in the problem description structure Prob&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;f_Low&#039;&#039;||Lower bound on solution.&lt;br /&gt;
|-&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;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by ecpMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in ecpMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||output&lt;br /&gt;
|-&lt;br /&gt;
|=0||Silent.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;0||Initial information and convergence results.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;1||Output a line whenever the solution has improved, containing:&lt;br /&gt;
nIterations, nCuts, nCuts with criteria fulfilled, nLinearizations, nSpecialCuts, best solution.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;2||Output a line every iteration with the following information:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!label||description&lt;br /&gt;
|-&lt;br /&gt;
|It         ||Iterations&lt;br /&gt;
|-&lt;br /&gt;
|nECP       ||Number of extended cutting planes (ECP)&lt;br /&gt;
|-&lt;br /&gt;
|nAlpha&amp;gt;=lim||Number of ECP with criteria fulfilled&lt;br /&gt;
|-&lt;br /&gt;
|nL         ||Number of linearizations&lt;br /&gt;
|-&lt;br /&gt;
|nSECP      ||Number of special case ECP&amp;lt;br&amp;gt;(created from constraint on bound)&lt;br /&gt;
|-&lt;br /&gt;
|fIPMin     ||Objective of best solution at current iteration&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;3||Output a description of each step in the MINLP algorithm&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;4||Output additional numerical information in some algorithm steps&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;5||Output information in substeps (preprocessing, line search)&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptMIP&#039;&#039;||Print level in MIP sub-solvers,  (CPLEX and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptNLP&#039;&#039;||Print level in NLP sub-solvers,  (SNOPT and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverMIP&#039;&#039;||Name of the solver used for MIP subproblems. If TOMLAB /gurobi is installed, gurobi is the default solver. If TOMLAB /CPLEX is installed, CPLEX is second choice as default. Otherwise the default solver is found calling GetSolver(&#039;mip&#039;,1); Supported as subsolvers are gurobi, CPLEX, mipSolve, milpSolve and cutplane.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverNLP&#039;&#039;||&lt;br /&gt;
Name of the solver used for NLP subproblems. If packages /SOL or /SNOTP is installed, snopt is the default solver. Otherwise the default solver is found calling GetSolver(&#039;con&#039;,1); &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems when SolverMIP == mipSolve&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure with parameters specific to mixed integer optimization. See the table below describing the fields used in the MIP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ECPMINLP&#039;&#039;||Structure with parameters specific to the ecpMINLP solver. See the table below describing the fields used in the ECPMINLP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below describing the fields used in the optParam structure.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|&#039;&#039;&#039;fields used in Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||ecpMINLP stops if the duality gap is less than DualGap&lt;br /&gt;
DualGap = 1, stop at first integer solution, e.g. DualGap = 0.01,stop if solution &amp;lt; 1% from optimal solution.&lt;br /&gt;
&amp;lt;br&amp;gt;The lower bound Prob.f_Low is used, (default -1.0e300), which can also be set by the user. If f_Low has not been changed from default the lower bound is obtained from the initial solution of a relaxed problem, but only when ECPMINLP.INIT_BND is 1 or 2 (default).&lt;br /&gt;
&amp;lt;br&amp;gt;Default DualGap is -1, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PPP&#039;&#039;||Pre-processing and probing, default is 0.&amp;lt;br&amp;gt;&lt;br /&gt;
0  Not used. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
1  Apply initially on MINLP problem.&amp;lt;br&amp;gt;&lt;br /&gt;
2  Apply each iteration before solving MILP sub-problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If nonzero, a rounding heuristics will be used on the initial NLP solution in order to obtain an initial integer solution. Requires ECPMINLP.InitBndType enabled. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ECPMINLP structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with solver-specific options.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.ECPMINLP&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;beta&#039;&#039;||Multiplier when increasing alpha after an infeasible MILP solution. &lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for beta is 1.3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;gamma&#039;&#039;||Multiplier when increasing alpha when MILP solution does not violate any nonlinear contraints, but still does not decrease the upper bound of the objective.&lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for gamma is 2.0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PREALLOC&#039;&#039;||Flag enabling preallocation of memory for cutting planes and linearizations.&lt;br /&gt;
&amp;lt;br&amp;gt;0  No preallocation, dynamic growth of arrays. Current default.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Preallocate arrays.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;InitBndType&#039;&#039;||Selects method for setting lower bound when f_Low not changed from default.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||method&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|0 ||No extra initial lower bound.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|1 ||Use default TOMLAB NLP solver on problem with relaxed integer constraints. Add a linearization if a feasible MINLP solution was found.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|2 ||Add an initial linearization as long as a feasible NLP solution was found. The linearization is a simple lower bound on the MILP objective. Default.&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SET_TOL&#039;&#039;||Flag enabling changing tolerances, described below under optParam.eps_x, optParam.eps_x and optParam.eps_f.&lt;br /&gt;
&amp;lt;br&amp;gt;0  Default. Using the recommended solver default values, 1.0e-3.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Tolerances can be changed, taken from Prob.optParam.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IntSolLimIncr&#039;&#039;||Integer option when using CPLEX as MIP subsolver.&lt;br /&gt;
&amp;lt;br&amp;gt;Define how much the CPLEX parameter IntSolLimIncr increases when a feasible solution is not optimal and all alpha values have met their criteria.&lt;br /&gt;
&amp;lt;br&amp;gt;When set to zero, the optimal strategy will instead be used immediately, without any gradual increase of INTSOLLIM.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USE_CUTPOOL&#039;&#039;||Set nonzero to use a pool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&amp;lt;br&amp;gt;Cuts not active in the MILP-solution for CutDelBound iterations in a row will be inactivated (removed from the MILP-problem) until they are violated in a new solution.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 0, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CutDelBound&#039;&#039;||The number of consecutive times an extended cutting plane can be inactive before it gets removed and put into the inactive pool, if the option USE_CUTPOOL is set nonzero.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 15 times.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIterWoImpr&#039;&#039;||Limit on the number of successive iterations allowed without any improvements at all to neither objective nor solution point before the solver terminates&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 2.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USE_NLP&#039;&#039;||Set nonzero to use an NLP sub-solver on the original problem with the integer variables fixed at values from the latest MILP solution. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;RESELECT_CUTS&#039;&#039;||Set nonzero to enable cut reselection heuristics. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SCALE_CUTS&#039;&#039;||Set nonzero to scale cuts before they are added to the MILP problem. Scaling is done by dividing the cut with its norm. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam Structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 1 also enables IterPrint, setting it to 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_x&#039;&#039;||Linear constraint violation convergence tolerance. Default is 2.0e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_g&#039;&#039;||Constraint violation convergence tolerance. Default is 1.0e-7&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_f&#039;&#039;||Optimality tolerance. Default is 1.0e-8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE:&#039;&#039; For the solver to use these tolerances, the flag &#039;&#039;ECPMINLP.SETTOL&#039;&#039; must be set to nonzero.&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &lt;br /&gt;
&amp;lt;br&amp;gt;0: Solution found, or integer solution with duality gap less than user tolerance.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Maximal number of iterations reached.&lt;br /&gt;
&amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;3: Problem in subsolver, see Inform value.&lt;br /&gt;
&amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &amp;gt; Prob.maxCPU&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Inform for ExitFlag != 3&lt;br /&gt;
&amp;lt;br&amp;gt;0: Global solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Local solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;2: No solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;gt;2: Inform value from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, max(0,fIPMin-fLB)/-fIPMin-, if fIPMin =0; max(0,fIPMin-fLB) if fIPMin == 0. If fIPMin   =0:  Scale with 100, 100*Dual- Gap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;ecpMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Algorithm==&lt;br /&gt;
ecpMINLP Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to MIP subproblem which is then solved by a subsolver in each iteration.&lt;br /&gt;
&lt;br /&gt;
The solver algorithm is mainly based on the paper &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, published in Optimization and Engineering 3, 253-280, 2002, with some modifications.&lt;br /&gt;
&lt;br /&gt;
Most prominent features in addition to the ones described in the main reference above are&lt;br /&gt;
* Solving the relaxed NLP problem initially to obtain a lower bound on the solution.&lt;br /&gt;
* A rounding heuristics performed on the initial NLP solution in order to obtain an initial upper bound on the initial solutions.&lt;br /&gt;
* Optional use of a cutpool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3107</id>
		<title>MIPNLP ecpMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3107"/>
		<updated>2015-02-13T13:20:17Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* ECPMINLP structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
ecpMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;ecpMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers but can be either continuously differentiable or not. An initalization routine will detect strict integer variables in the problem.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = ecpMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
Warm start is currently not supported, but might be included in a future release.&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in the problem description structure Prob&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;f_Low&#039;&#039;||Lower bound on solution.&lt;br /&gt;
|-&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;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by ecpMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in ecpMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||output&lt;br /&gt;
|-&lt;br /&gt;
|=0||Silent.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;0||Initial information and convergence results.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;1||Output a line whenever the solution has improved, containing:&lt;br /&gt;
nIterations, nCuts, nCuts with criteria fulfilled, nLinearizations, nSpecialCuts, best solution.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;2||Output a line every iteration with the following information:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!label||description&lt;br /&gt;
|-&lt;br /&gt;
|It         ||Iterations&lt;br /&gt;
|-&lt;br /&gt;
|nECP       ||Number of extended cutting planes (ECP)&lt;br /&gt;
|-&lt;br /&gt;
|nAlpha&amp;gt;=lim||Number of ECP with criteria fulfilled&lt;br /&gt;
|-&lt;br /&gt;
|nL         ||Number of linearizations&lt;br /&gt;
|-&lt;br /&gt;
|nSECP      ||Number of special case ECP&amp;lt;br&amp;gt;(created from constraint on bound)&lt;br /&gt;
|-&lt;br /&gt;
|fIPMin     ||Objective of best solution at current iteration&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;3||Output a description of each step in the MINLP algorithm&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;4||Output additional numerical information in some algorithm steps&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;5||Output information in substeps (preprocessing, line search)&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptMIP&#039;&#039;||Print level in MIP sub-solvers,  (CPLEX and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptNLP&#039;&#039;||Print level in NLP sub-solvers,  (SNOPT and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverMIP&#039;&#039;||Name of the solver used for MIP subproblems. If TOMLAB /gurobi is installed, gurobi is the default solver. If TOMLAB /CPLEX is installed, CPLEX is second choice as default. Otherwise the default solver is found calling GetSolver(&#039;mip&#039;,1); Supported as subsolvers are gurobi, CPLEX, mipSolve, milpSolve and cutplane.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverNLP&#039;&#039;||&lt;br /&gt;
Name of the solver used for NLP subproblems. If packages /SOL or /SNOTP is installed, snopt is the default solver. Otherwise the default solver is found calling GetSolver(&#039;con&#039;,1); &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems when SolverMIP == mipSolve&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure with parameters specific to mixed integer optimization. See the table below describing the fields used in the MIP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ECPMINLP&#039;&#039;||Structure with parameters specific to the ecpMINLP solver. See the table below describing the fields used in the ECPMINLP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below describing the fields used in the optParam structure.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|&#039;&#039;&#039;fields used in Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||ecpMINLP stops if the duality gap is less than DualGap&lt;br /&gt;
DualGap = 1, stop at first integer solution, e.g. DualGap = 0.01,stop if solution &amp;lt; 1% from optimal solution.&lt;br /&gt;
&amp;lt;br&amp;gt;The lower bound Prob.f_Low is used, (default -1.0e300), which can also be set by the user. If f_Low has not been changed from default the lower bound is obtained from the initial solution of a relaxed problem, but only when ECPMINLP.INIT_BND is 1 or 2 (default).&lt;br /&gt;
&amp;lt;br&amp;gt;Default DualGap is -1, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PPP&#039;&#039;||Pre-processing and probing, default is 0.&amp;lt;br&amp;gt;&lt;br /&gt;
0  Not used. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
1  Apply initially on MINLP problem.&amp;lt;br&amp;gt;&lt;br /&gt;
2  Apply each iteration before solving MILP sub-problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If nonzero, a rounding heuristics will be used on the initial NLP solution in order to obtain an initial integer solution. Requires ECPMINLP.InitBndType enabled. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ECPMINLP structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with solver-specific options.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.ECPMINLP&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;beta&#039;&#039;||Multiplier when increasing alpha after an infeasible MILP solution. &lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for beta is 1.3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;gamma&#039;&#039;||Multiplier when increasing alpha when MILP solution does not violate any nonlinear contraints, but still does not decrease the upper bound of the objective.&lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for gamma is 2.0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PREALLOC&#039;&#039;||Flag enabling preallocation of memory for cutting planes and linearizations.&lt;br /&gt;
&amp;lt;br&amp;gt;0  No preallocation, dynamic growth of arrays. Current default.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Preallocate arrays.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;InitBndType&#039;&#039;||Selects method for setting lower bound when f_Low not changed from default.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||method&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|0 ||No extra initial lower bound.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|1 ||Use default TOMLAB NLP solver on problem with relaxed integer constraints. Add a linearization if a feasible MINLP solution was found.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|2 ||Add an initial linearization as long as a feasible NLP solution was found. The linearization is a simple lower bound on the MILP objective. Default.&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SET_TOL&#039;&#039;||Flag enabling changing tolerances, described below under optParam.eps_x, optParam.eps_x and optParam.eps_f.&lt;br /&gt;
&amp;lt;br&amp;gt;0  Default. Using the recommended solver default values, 1.0e-3.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Tolerances can be changed, taken from Prob.optParam.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IntSolLimIncr&#039;&#039;||Integer option when using CPLEX as MIP subsolver.&lt;br /&gt;
&amp;lt;br&amp;gt;Define how much the CPLEX parameter INTSOLLIM increases when a feasible solution is not optimal and all alpha values have met their criteria.&lt;br /&gt;
&amp;lt;br&amp;gt;When set to zero, the optimal strategy will instead be used immediately, without any gradual increase of INTSOLLIM.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USE_CUTPOOL&#039;&#039;||Set nonzero to use a pool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&amp;lt;br&amp;gt;Cuts not active in the MILP-solution for CUTDELBND iterations in a row will be inactivated (removed from the MILP-problem) until they are violated in a new solution.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 0, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CutDelBound&#039;&#039;||The number of consecutive times an extended cutting plane can be inactive before it gets removed and put into the inactive pool, if the option USE_CUTPOOL is set nonzero.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 15 times.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIterWoImpr&#039;&#039;||Limit on the number of successive iterations allowed without any improvements at all to neither objective nor solution point before the solver terminates&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 2.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USE_NLP&#039;&#039;||Set nonzero to use an NLP sub-solver on the original problem with the integer variables fixed at values from the latest MILP solution. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;RESELECT_CUTS&#039;&#039;||Set nonzero to enable cut reselection heuristics. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SCALE_CUTS&#039;&#039;||Set nonzero to scale cuts before they are added to the MILP problem. Scaling is done by dividing the cut with its norm. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam Structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 1 also enables IterPrint, setting it to 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_x&#039;&#039;||Linear constraint violation convergence tolerance. Default is 2.0e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_g&#039;&#039;||Constraint violation convergence tolerance. Default is 1.0e-7&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_f&#039;&#039;||Optimality tolerance. Default is 1.0e-8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE:&#039;&#039; For the solver to use these tolerances, the flag &#039;&#039;ECPMINLP.SETTOL&#039;&#039; must be set to nonzero.&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &lt;br /&gt;
&amp;lt;br&amp;gt;0: Solution found, or integer solution with duality gap less than user tolerance.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Maximal number of iterations reached.&lt;br /&gt;
&amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;3: Problem in subsolver, see Inform value.&lt;br /&gt;
&amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &amp;gt; Prob.maxCPU&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Inform for ExitFlag != 3&lt;br /&gt;
&amp;lt;br&amp;gt;0: Global solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Local solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;2: No solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;gt;2: Inform value from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, max(0,fIPMin-fLB)/-fIPMin-, if fIPMin =0; max(0,fIPMin-fLB) if fIPMin == 0. If fIPMin   =0:  Scale with 100, 100*Dual- Gap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;ecpMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Algorithm==&lt;br /&gt;
ecpMINLP Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to MIP subproblem which is then solved by a subsolver in each iteration.&lt;br /&gt;
&lt;br /&gt;
The solver algorithm is mainly based on the paper &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, published in Optimization and Engineering 3, 253-280, 2002, with some modifications.&lt;br /&gt;
&lt;br /&gt;
Most prominent features in addition to the ones described in the main reference above are&lt;br /&gt;
* Solving the relaxed NLP problem initially to obtain a lower bound on the solution.&lt;br /&gt;
* A rounding heuristics performed on the initial NLP solution in order to obtain an initial upper bound on the initial solutions.&lt;br /&gt;
* Optional use of a cutpool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3106</id>
		<title>MIPNLP ecpMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3106"/>
		<updated>2015-02-13T13:10:07Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* MIP structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
ecpMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;ecpMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers but can be either continuously differentiable or not. An initalization routine will detect strict integer variables in the problem.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = ecpMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
Warm start is currently not supported, but might be included in a future release.&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in the problem description structure Prob&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;f_Low&#039;&#039;||Lower bound on solution.&lt;br /&gt;
|-&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;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by ecpMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in ecpMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||output&lt;br /&gt;
|-&lt;br /&gt;
|=0||Silent.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;0||Initial information and convergence results.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;1||Output a line whenever the solution has improved, containing:&lt;br /&gt;
nIterations, nCuts, nCuts with criteria fulfilled, nLinearizations, nSpecialCuts, best solution.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;2||Output a line every iteration with the following information:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!label||description&lt;br /&gt;
|-&lt;br /&gt;
|It         ||Iterations&lt;br /&gt;
|-&lt;br /&gt;
|nECP       ||Number of extended cutting planes (ECP)&lt;br /&gt;
|-&lt;br /&gt;
|nAlpha&amp;gt;=lim||Number of ECP with criteria fulfilled&lt;br /&gt;
|-&lt;br /&gt;
|nL         ||Number of linearizations&lt;br /&gt;
|-&lt;br /&gt;
|nSECP      ||Number of special case ECP&amp;lt;br&amp;gt;(created from constraint on bound)&lt;br /&gt;
|-&lt;br /&gt;
|fIPMin     ||Objective of best solution at current iteration&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;3||Output a description of each step in the MINLP algorithm&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;4||Output additional numerical information in some algorithm steps&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;5||Output information in substeps (preprocessing, line search)&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptMIP&#039;&#039;||Print level in MIP sub-solvers,  (CPLEX and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptNLP&#039;&#039;||Print level in NLP sub-solvers,  (SNOPT and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverMIP&#039;&#039;||Name of the solver used for MIP subproblems. If TOMLAB /gurobi is installed, gurobi is the default solver. If TOMLAB /CPLEX is installed, CPLEX is second choice as default. Otherwise the default solver is found calling GetSolver(&#039;mip&#039;,1); Supported as subsolvers are gurobi, CPLEX, mipSolve, milpSolve and cutplane.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverNLP&#039;&#039;||&lt;br /&gt;
Name of the solver used for NLP subproblems. If packages /SOL or /SNOTP is installed, snopt is the default solver. Otherwise the default solver is found calling GetSolver(&#039;con&#039;,1); &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems when SolverMIP == mipSolve&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure with parameters specific to mixed integer optimization. See the table below describing the fields used in the MIP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ECPMINLP&#039;&#039;||Structure with parameters specific to the ecpMINLP solver. See the table below describing the fields used in the ECPMINLP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below describing the fields used in the optParam structure.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|&#039;&#039;&#039;fields used in Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||ecpMINLP stops if the duality gap is less than DualGap&lt;br /&gt;
DualGap = 1, stop at first integer solution, e.g. DualGap = 0.01,stop if solution &amp;lt; 1% from optimal solution.&lt;br /&gt;
&amp;lt;br&amp;gt;The lower bound Prob.f_Low is used, (default -1.0e300), which can also be set by the user. If f_Low has not been changed from default the lower bound is obtained from the initial solution of a relaxed problem, but only when ECPMINLP.INIT_BND is 1 or 2 (default).&lt;br /&gt;
&amp;lt;br&amp;gt;Default DualGap is -1, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PPP&#039;&#039;||Pre-processing and probing, default is 0.&amp;lt;br&amp;gt;&lt;br /&gt;
0  Not used. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
1  Apply initially on MINLP problem.&amp;lt;br&amp;gt;&lt;br /&gt;
2  Apply each iteration before solving MILP sub-problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If nonzero, a rounding heuristics will be used on the initial NLP solution in order to obtain an initial integer solution. Requires ECPMINLP.InitBndType enabled. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ECPMINLP structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with solver-specific options.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.ECPMINLP&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;beta&#039;&#039;||Multiplier when increasing alpha after an infeasible MILP solution. &lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for beta is 1.3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;gamma&#039;&#039;||Multiplier when increasing alpha when MILP solution does not violate any nonlinear contraints, but still does not decrease the upper bound of the objective.&lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for gamma is 2.0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PREALLOC&#039;&#039;||Flag enabling preallocation of memory for cutting planes and linearizations.&lt;br /&gt;
&amp;lt;br&amp;gt;0  No preallocation, dynamic growth of arrays. Current default.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Preallocate arrays.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;INIT_BND&#039;&#039;||Selects method for setting lower bound when f_Low not changed from default.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||method&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|0 ||No extra initial lower bound.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|1 ||Use default TOMLAB NLP solver on problem with relaxed integer constraints. Add a linearization if a feasible MINLP solution was found.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|2 ||Add an initial linearization as long as a feasdbile NLP solution was found. The linearization is a simple lower bound on the MILP objective. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|3 ||Same as 2, but also use the gradient in the linearization. This might improve the solution process for some problems where no solution can be found otherwise. But for many problems, using this initial linearization cuts off a feasbiel region and slows down or even hinders the solver completely. Recommended to only use as a last resort.&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SETTOL&#039;&#039;||Flag enabling changing tolerances, described below under optParam.eps_x, optParam.eps_x and optParam.eps_f.&lt;br /&gt;
&amp;lt;br&amp;gt;0  Default. Using the recommended solver default values, 1.0e-3.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Tolerances can be changed, taken from Prob.optParam.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;INTSOLLIM_INCR&#039;&#039;||Integer option when using CPLEX as MIP subsolver.&lt;br /&gt;
&amp;lt;br&amp;gt;Define how much the CPLEX parameter INTSOLLIM increases when a feasible solution is not optimal and all alpha values have met their criteria.&lt;br /&gt;
&amp;lt;br&amp;gt;If set to zero, optimal strategy will be used immediately instead, without any gradual increase of INTSOLLIM.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USECUTPOOL&#039;&#039;||Set nonzero to use a pool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&amp;lt;br&amp;gt;Cuts not active in the MILP-solution for CUTDELBND iterations in a row will be inactivated (removed from the MILP-problem) until they are violated in a new solution.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 0, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTDELBND&#039;&#039;||The number of consecutive times an extended cutting plane can be inactive before it gets removed and put into the inactive pool, if the option USECUTPOOL is set nonzero.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 15 times.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MAXITNOIMP&#039;&#039;||Limit on the number of successive iterations allowed without any improvements at all to neither objective nor solution point before the solver terminates&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 2.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USENLP&#039;&#039;||Set nonzero to use an NLP sub-solver on the original problem with the integer variables fixed at values from the latest MILP solution. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USERESELECT&#039;&#039;||Set nonzero to enable cut reselection heuristics. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SCALECUTS&#039;&#039;||Set nonzero to scale cuts before they are added to the MILP problem. Scaling is done by dividing the cut with its norm. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam Structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 1 also enables IterPrint, setting it to 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_x&#039;&#039;||Linear constraint violation convergence tolerance. Default is 2.0e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_g&#039;&#039;||Constraint violation convergence tolerance. Default is 1.0e-7&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_f&#039;&#039;||Optimality tolerance. Default is 1.0e-8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE:&#039;&#039; For the solver to use these tolerances, the flag &#039;&#039;ECPMINLP.SETTOL&#039;&#039; must be set to nonzero.&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &lt;br /&gt;
&amp;lt;br&amp;gt;0: Solution found, or integer solution with duality gap less than user tolerance.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Maximal number of iterations reached.&lt;br /&gt;
&amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;3: Problem in subsolver, see Inform value.&lt;br /&gt;
&amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &amp;gt; Prob.maxCPU&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Inform for ExitFlag != 3&lt;br /&gt;
&amp;lt;br&amp;gt;0: Global solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Local solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;2: No solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;gt;2: Inform value from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, max(0,fIPMin-fLB)/-fIPMin-, if fIPMin =0; max(0,fIPMin-fLB) if fIPMin == 0. If fIPMin   =0:  Scale with 100, 100*Dual- Gap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;ecpMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Algorithm==&lt;br /&gt;
ecpMINLP Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to MIP subproblem which is then solved by a subsolver in each iteration.&lt;br /&gt;
&lt;br /&gt;
The solver algorithm is mainly based on the paper &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, published in Optimization and Engineering 3, 253-280, 2002, with some modifications.&lt;br /&gt;
&lt;br /&gt;
Most prominent features in addition to the ones described in the main reference above are&lt;br /&gt;
* Solving the relaxed NLP problem initially to obtain a lower bound on the solution.&lt;br /&gt;
* A rounding heuristics performed on the initial NLP solution in order to obtain an initial upper bound on the initial solutions.&lt;br /&gt;
* Optional use of a cutpool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3105</id>
		<title>MIPNLP ecpMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3105"/>
		<updated>2015-02-13T13:09:43Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* MIP structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
ecpMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;ecpMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers but can be either continuously differentiable or not. An initalization routine will detect strict integer variables in the problem.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = ecpMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
Warm start is currently not supported, but might be included in a future release.&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in the problem description structure Prob&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;f_Low&#039;&#039;||Lower bound on solution.&lt;br /&gt;
|-&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;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by ecpMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in ecpMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||output&lt;br /&gt;
|-&lt;br /&gt;
|=0||Silent.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;0||Initial information and convergence results.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;1||Output a line whenever the solution has improved, containing:&lt;br /&gt;
nIterations, nCuts, nCuts with criteria fulfilled, nLinearizations, nSpecialCuts, best solution.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;2||Output a line every iteration with the following information:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!label||description&lt;br /&gt;
|-&lt;br /&gt;
|It         ||Iterations&lt;br /&gt;
|-&lt;br /&gt;
|nECP       ||Number of extended cutting planes (ECP)&lt;br /&gt;
|-&lt;br /&gt;
|nAlpha&amp;gt;=lim||Number of ECP with criteria fulfilled&lt;br /&gt;
|-&lt;br /&gt;
|nL         ||Number of linearizations&lt;br /&gt;
|-&lt;br /&gt;
|nSECP      ||Number of special case ECP&amp;lt;br&amp;gt;(created from constraint on bound)&lt;br /&gt;
|-&lt;br /&gt;
|fIPMin     ||Objective of best solution at current iteration&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;3||Output a description of each step in the MINLP algorithm&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;4||Output additional numerical information in some algorithm steps&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;5||Output information in substeps (preprocessing, line search)&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptMIP&#039;&#039;||Print level in MIP sub-solvers,  (CPLEX and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptNLP&#039;&#039;||Print level in NLP sub-solvers,  (SNOPT and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverMIP&#039;&#039;||Name of the solver used for MIP subproblems. If TOMLAB /gurobi is installed, gurobi is the default solver. If TOMLAB /CPLEX is installed, CPLEX is second choice as default. Otherwise the default solver is found calling GetSolver(&#039;mip&#039;,1); Supported as subsolvers are gurobi, CPLEX, mipSolve, milpSolve and cutplane.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverNLP&#039;&#039;||&lt;br /&gt;
Name of the solver used for NLP subproblems. If packages /SOL or /SNOTP is installed, snopt is the default solver. Otherwise the default solver is found calling GetSolver(&#039;con&#039;,1); &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems when SolverMIP == mipSolve&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure with parameters specific to mixed integer optimization. See the table below describing the fields used in the MIP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ECPMINLP&#039;&#039;||Structure with parameters specific to the ecpMINLP solver. See the table below describing the fields used in the ECPMINLP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below describing the fields used in the optParam structure.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|&#039;&#039;&#039;fields used in Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||ecpMINLP stops if the duality gap is less than DualGap&lt;br /&gt;
DualGap = 1, stop at first integer solution, e.g. DualGap = 0.01,stop if solution &amp;lt; 1% from optimal solution.&lt;br /&gt;
&amp;lt;br&amp;gt;The lower bound Prob.f_Low is used, (default -1.0e300), which can also be set by the user. If f_Low has not been changed from default the lower bound is obtained from the initial solution of a relaxed problem, but only when ECPMINLP.INIT_BND is 1 or 2 (default).&lt;br /&gt;
&amp;lt;br&amp;gt;Default DualGap is -1, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PPP&#039;&#039;||Pre-processing and probing, default is 0.&amp;lt;br&amp;gt;&lt;br /&gt;
0  Not used. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
1  Apply initially on MINLP problem.&amp;lt;br&amp;gt;&lt;br /&gt;
2  Apply each iteration before solving MILP sub-problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If nonzero, a rounding heuristics will be used on the initial NLP solution in order to obtain an initial integer solution. Requires ECPMINLP.INIT_BND enabled. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ECPMINLP structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with solver-specific options.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.ECPMINLP&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;beta&#039;&#039;||Multiplier when increasing alpha after an infeasible MILP solution. &lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for beta is 1.3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;gamma&#039;&#039;||Multiplier when increasing alpha when MILP solution does not violate any nonlinear contraints, but still does not decrease the upper bound of the objective.&lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for gamma is 2.0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PREALLOC&#039;&#039;||Flag enabling preallocation of memory for cutting planes and linearizations.&lt;br /&gt;
&amp;lt;br&amp;gt;0  No preallocation, dynamic growth of arrays. Current default.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Preallocate arrays.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;INIT_BND&#039;&#039;||Selects method for setting lower bound when f_Low not changed from default.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||method&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|0 ||No extra initial lower bound.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|1 ||Use default TOMLAB NLP solver on problem with relaxed integer constraints. Add a linearization if a feasible MINLP solution was found.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|2 ||Add an initial linearization as long as a feasdbile NLP solution was found. The linearization is a simple lower bound on the MILP objective. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|3 ||Same as 2, but also use the gradient in the linearization. This might improve the solution process for some problems where no solution can be found otherwise. But for many problems, using this initial linearization cuts off a feasbiel region and slows down or even hinders the solver completely. Recommended to only use as a last resort.&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SETTOL&#039;&#039;||Flag enabling changing tolerances, described below under optParam.eps_x, optParam.eps_x and optParam.eps_f.&lt;br /&gt;
&amp;lt;br&amp;gt;0  Default. Using the recommended solver default values, 1.0e-3.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Tolerances can be changed, taken from Prob.optParam.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;INTSOLLIM_INCR&#039;&#039;||Integer option when using CPLEX as MIP subsolver.&lt;br /&gt;
&amp;lt;br&amp;gt;Define how much the CPLEX parameter INTSOLLIM increases when a feasible solution is not optimal and all alpha values have met their criteria.&lt;br /&gt;
&amp;lt;br&amp;gt;If set to zero, optimal strategy will be used immediately instead, without any gradual increase of INTSOLLIM.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USECUTPOOL&#039;&#039;||Set nonzero to use a pool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&amp;lt;br&amp;gt;Cuts not active in the MILP-solution for CUTDELBND iterations in a row will be inactivated (removed from the MILP-problem) until they are violated in a new solution.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 0, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTDELBND&#039;&#039;||The number of consecutive times an extended cutting plane can be inactive before it gets removed and put into the inactive pool, if the option USECUTPOOL is set nonzero.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 15 times.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MAXITNOIMP&#039;&#039;||Limit on the number of successive iterations allowed without any improvements at all to neither objective nor solution point before the solver terminates&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 2.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USENLP&#039;&#039;||Set nonzero to use an NLP sub-solver on the original problem with the integer variables fixed at values from the latest MILP solution. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USERESELECT&#039;&#039;||Set nonzero to enable cut reselection heuristics. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SCALECUTS&#039;&#039;||Set nonzero to scale cuts before they are added to the MILP problem. Scaling is done by dividing the cut with its norm. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam Structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 1 also enables IterPrint, setting it to 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_x&#039;&#039;||Linear constraint violation convergence tolerance. Default is 2.0e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_g&#039;&#039;||Constraint violation convergence tolerance. Default is 1.0e-7&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_f&#039;&#039;||Optimality tolerance. Default is 1.0e-8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE:&#039;&#039; For the solver to use these tolerances, the flag &#039;&#039;ECPMINLP.SETTOL&#039;&#039; must be set to nonzero.&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &lt;br /&gt;
&amp;lt;br&amp;gt;0: Solution found, or integer solution with duality gap less than user tolerance.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Maximal number of iterations reached.&lt;br /&gt;
&amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;3: Problem in subsolver, see Inform value.&lt;br /&gt;
&amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &amp;gt; Prob.maxCPU&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Inform for ExitFlag != 3&lt;br /&gt;
&amp;lt;br&amp;gt;0: Global solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Local solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;2: No solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;gt;2: Inform value from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, max(0,fIPMin-fLB)/-fIPMin-, if fIPMin =0; max(0,fIPMin-fLB) if fIPMin == 0. If fIPMin   =0:  Scale with 100, 100*Dual- Gap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;ecpMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Algorithm==&lt;br /&gt;
ecpMINLP Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to MIP subproblem which is then solved by a subsolver in each iteration.&lt;br /&gt;
&lt;br /&gt;
The solver algorithm is mainly based on the paper &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, published in Optimization and Engineering 3, 253-280, 2002, with some modifications.&lt;br /&gt;
&lt;br /&gt;
Most prominent features in addition to the ones described in the main reference above are&lt;br /&gt;
* Solving the relaxed NLP problem initially to obtain a lower bound on the solution.&lt;br /&gt;
* A rounding heuristics performed on the initial NLP solution in order to obtain an initial upper bound on the initial solutions.&lt;br /&gt;
* Optional use of a cutpool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3104</id>
		<title>MIPNLP ecpMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3104"/>
		<updated>2015-02-13T13:08:51Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Prob structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
ecpMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;ecpMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers but can be either continuously differentiable or not. An initalization routine will detect strict integer variables in the problem.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = ecpMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
Warm start is currently not supported, but might be included in a future release.&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in the problem description structure Prob&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;f_Low&#039;&#039;||Lower bound on solution.&lt;br /&gt;
|-&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;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by ecpMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in ecpMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||output&lt;br /&gt;
|-&lt;br /&gt;
|=0||Silent.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;0||Initial information and convergence results.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;1||Output a line whenever the solution has improved, containing:&lt;br /&gt;
nIterations, nCuts, nCuts with criteria fulfilled, nLinearizations, nSpecialCuts, best solution.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;2||Output a line every iteration with the following information:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!label||description&lt;br /&gt;
|-&lt;br /&gt;
|It         ||Iterations&lt;br /&gt;
|-&lt;br /&gt;
|nECP       ||Number of extended cutting planes (ECP)&lt;br /&gt;
|-&lt;br /&gt;
|nAlpha&amp;gt;=lim||Number of ECP with criteria fulfilled&lt;br /&gt;
|-&lt;br /&gt;
|nL         ||Number of linearizations&lt;br /&gt;
|-&lt;br /&gt;
|nSECP      ||Number of special case ECP&amp;lt;br&amp;gt;(created from constraint on bound)&lt;br /&gt;
|-&lt;br /&gt;
|fIPMin     ||Objective of best solution at current iteration&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;3||Output a description of each step in the MINLP algorithm&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;4||Output additional numerical information in some algorithm steps&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;5||Output information in substeps (preprocessing, line search)&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptMIP&#039;&#039;||Print level in MIP sub-solvers,  (CPLEX and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOptNLP&#039;&#039;||Print level in NLP sub-solvers,  (SNOPT and others, see the documentation for the solver used).&amp;lt;br&amp;gt;&lt;br /&gt;
Usually:&amp;lt;br&amp;gt;&lt;br /&gt;
=0 No output&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;0 Convergence results&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;1 Output every iteration&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;2 Output each step in the algorithm&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverMIP&#039;&#039;||Name of the solver used for MIP subproblems. If TOMLAB /gurobi is installed, gurobi is the default solver. If TOMLAB /CPLEX is installed, CPLEX is second choice as default. Otherwise the default solver is found calling GetSolver(&#039;mip&#039;,1); Supported as subsolvers are gurobi, CPLEX, mipSolve, milpSolve and cutplane.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverNLP&#039;&#039;||&lt;br /&gt;
Name of the solver used for NLP subproblems. If packages /SOL or /SNOTP is installed, snopt is the default solver. Otherwise the default solver is found calling GetSolver(&#039;con&#039;,1); &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems when SolverMIP == mipSolve&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure with parameters specific to mixed integer optimization. See the table below describing the fields used in the MIP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ECPMINLP&#039;&#039;||Structure with parameters specific to the ecpMINLP solver. See the table below describing the fields used in the ECPMINLP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below describing the fields used in the optParam structure.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|&#039;&#039;&#039;fields used in Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||ecpMINLP stops if the duality gap is less than DualGap&lt;br /&gt;
DualGap = 1, stop at first integer solution, e.g. DualGap = 0.01,stop if solution &amp;lt; 1% from optimal solution.&lt;br /&gt;
&amp;lt;br&amp;gt;The lower bound Prob.f_Low is used, (default -1.0e300), which can also be set by the user. If f_Low has not been changed from default the lower bound is obtained from the initial solution of a relaxed problem, but only when ECPMINLP.INIT_BND is 1 or 2 (default).&lt;br /&gt;
&amp;lt;br&amp;gt;Default DualGap is -1, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PPP&#039;&#039;||Pre-processing and probing, default is 0.&amp;lt;br&amp;gt;&lt;br /&gt;
0  Not used. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
1  Apply initially on MINLP problem.&amp;lt;br&amp;gt;&lt;br /&gt;
2  Apply each iteration before solving MILP subproblem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If nonzero, a rounding heuristics will be used on the initial NLP solution in order to obtain an initial integer solution. Requires ECPMINLP.INIT_BND enabled. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ECPMINLP structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with solver-specific options.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.ECPMINLP&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;beta&#039;&#039;||Multiplier when increasing alpha after an infeasible MILP solution. &lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for beta is 1.3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;gamma&#039;&#039;||Multiplier when increasing alpha when MILP solution does not violate any nonlinear contraints, but still does not decrease the upper bound of the objective.&lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for gamma is 2.0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PREALLOC&#039;&#039;||Flag enabling preallocation of memory for cutting planes and linearizations.&lt;br /&gt;
&amp;lt;br&amp;gt;0  No preallocation, dynamic growth of arrays. Current default.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Preallocate arrays.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;INIT_BND&#039;&#039;||Selects method for setting lower bound when f_Low not changed from default.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||method&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|0 ||No extra initial lower bound.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|1 ||Use default TOMLAB NLP solver on problem with relaxed integer constraints. Add a linearization if a feasible MINLP solution was found.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|2 ||Add an initial linearization as long as a feasdbile NLP solution was found. The linearization is a simple lower bound on the MILP objective. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|3 ||Same as 2, but also use the gradient in the linearization. This might improve the solution process for some problems where no solution can be found otherwise. But for many problems, using this initial linearization cuts off a feasbiel region and slows down or even hinders the solver completely. Recommended to only use as a last resort.&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SETTOL&#039;&#039;||Flag enabling changing tolerances, described below under optParam.eps_x, optParam.eps_x and optParam.eps_f.&lt;br /&gt;
&amp;lt;br&amp;gt;0  Default. Using the recommended solver default values, 1.0e-3.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Tolerances can be changed, taken from Prob.optParam.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;INTSOLLIM_INCR&#039;&#039;||Integer option when using CPLEX as MIP subsolver.&lt;br /&gt;
&amp;lt;br&amp;gt;Define how much the CPLEX parameter INTSOLLIM increases when a feasible solution is not optimal and all alpha values have met their criteria.&lt;br /&gt;
&amp;lt;br&amp;gt;If set to zero, optimal strategy will be used immediately instead, without any gradual increase of INTSOLLIM.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USECUTPOOL&#039;&#039;||Set nonzero to use a pool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&amp;lt;br&amp;gt;Cuts not active in the MILP-solution for CUTDELBND iterations in a row will be inactivated (removed from the MILP-problem) until they are violated in a new solution.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 0, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTDELBND&#039;&#039;||The number of consecutive times an extended cutting plane can be inactive before it gets removed and put into the inactive pool, if the option USECUTPOOL is set nonzero.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 15 times.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MAXITNOIMP&#039;&#039;||Limit on the number of successive iterations allowed without any improvements at all to neither objective nor solution point before the solver terminates&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 2.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USENLP&#039;&#039;||Set nonzero to use an NLP sub-solver on the original problem with the integer variables fixed at values from the latest MILP solution. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USERESELECT&#039;&#039;||Set nonzero to enable cut reselection heuristics. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SCALECUTS&#039;&#039;||Set nonzero to scale cuts before they are added to the MILP problem. Scaling is done by dividing the cut with its norm. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam Structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 1 also enables IterPrint, setting it to 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_x&#039;&#039;||Linear constraint violation convergence tolerance. Default is 2.0e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_g&#039;&#039;||Constraint violation convergence tolerance. Default is 1.0e-7&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_f&#039;&#039;||Optimality tolerance. Default is 1.0e-8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE:&#039;&#039; For the solver to use these tolerances, the flag &#039;&#039;ECPMINLP.SETTOL&#039;&#039; must be set to nonzero.&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &lt;br /&gt;
&amp;lt;br&amp;gt;0: Solution found, or integer solution with duality gap less than user tolerance.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Maximal number of iterations reached.&lt;br /&gt;
&amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;3: Problem in subsolver, see Inform value.&lt;br /&gt;
&amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &amp;gt; Prob.maxCPU&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Inform for ExitFlag != 3&lt;br /&gt;
&amp;lt;br&amp;gt;0: Global solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Local solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;2: No solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;gt;2: Inform value from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, max(0,fIPMin-fLB)/-fIPMin-, if fIPMin =0; max(0,fIPMin-fLB) if fIPMin == 0. If fIPMin   =0:  Scale with 100, 100*Dual- Gap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;ecpMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Algorithm==&lt;br /&gt;
ecpMINLP Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to MIP subproblem which is then solved by a subsolver in each iteration.&lt;br /&gt;
&lt;br /&gt;
The solver algorithm is mainly based on the paper &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, published in Optimization and Engineering 3, 253-280, 2002, with some modifications.&lt;br /&gt;
&lt;br /&gt;
Most prominent features in addition to the ones described in the main reference above are&lt;br /&gt;
* Solving the relaxed NLP problem initially to obtain a lower bound on the solution.&lt;br /&gt;
* A rounding heuristics performed on the initial NLP solution in order to obtain an initial upper bound on the initial solutions.&lt;br /&gt;
* Optional use of a cutpool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_stoaMINLP&amp;diff=3103</id>
		<title>MIPNLP stoaMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_stoaMINLP&amp;diff=3103"/>
		<updated>2015-02-13T12:30:33Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* optParam structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
stoaMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;stoaMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Recommended is to first set IterPrint, to get information each iteration&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.optParam.IterPrint = 1;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = stoaMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
To make a restart (warm start), just set the warm start flag, and call stoaMINLP once again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.WarmStart = 1;&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
stoaMINLP will read warm start information from the stoaMINLPSave.mat file. Another warm start (with same MaxFunc) is made by just calling tomRun again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result  = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a restart from the warm start information in the Result structure, make a call to WarmDefGLOBAL before calling stoaMINLP. WarmDefGLOBAL moves information from the Result structure to the Prob structure and sets the warm start flag, &amp;lt;code&amp;gt;Prob.WarmStart = 1;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = WarmDefGLOBAL(&#039;stoaMINLP&#039;, Prob,  Result);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where Result is the result structure returned by the previous run. A warm start (with same MaxIter)  is done by just calling tomRun again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result  = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make another warm start with new MaxIter 100, say, redefine MaxIter as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.optParam.MaxIter = 100;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then repeat the two lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = WarmDefGLOBAL(&#039;stoaMINLP&#039;, Prob,  Result); &lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in &#039;&#039;Prob&#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;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&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;Convex&#039;&#039;||If  Convex==1,  assume NLP  problems are convex,  and only one local NLP solver call is used at each node. &amp;lt;br&amp;gt;If Convex==0 (Default), multiMin  is used to do many calls to a local solver to determine the global minima at each node. The global minimum with most components integer valued is chosen.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by stoaMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in stoaMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOpt&#039;&#039;||Print level in sub-solvers (SNOPT and other NLP solvers):&amp;lt;br&amp;gt;=0 No output; &#039;&#039;&amp;gt;&#039;&#039;0 Convergence results.&amp;lt;br&amp;gt;&#039;&#039;&amp;gt;&#039;&#039;1 Output every iteration, &amp;lt;br&amp;gt;&#039;&#039;&amp;gt;&#039;&#039;2 Output each step in the NLP alg&amp;lt;br&amp;gt;For other NLP solvers,  see the documentation for the solver&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;WarmStart&#039;&#039;||If   true, &#039;&#039;&amp;gt;&#039;&#039;0, stoaMINLP  reads the output  from the last run   from Prob.stoaMINLP, if it exists. If it doesn&#039;t exist, stoaMINLP attempts to open and read warm start data from mat-file stoaMINLPSave.mat. stoaMINLP uses the warm start information to continue from the last run. The mat-file minlp- SolveSave.mat is saved every Prob.MIP.SaveFreq iteration.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverNLP&#039;&#039;||Name of the solver used for NLP subproblems.  If empty, the default solver is found calling GetSolver(&#039;con&#039;,1); &amp;lt;br&amp;gt;If TOMLAB  /SOL installed, SNOPT is the default solver.&amp;lt;br&amp;gt;If SolverNLP is a SOL solver (SNOPT, MINOS or NPSOL), the SOL.optPar and SOL.PrintFile is used:&amp;lt;br&amp;gt;See help minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverNLP0&#039;&#039;||Name of the solver used for the initial NLP-problem. If empty, SolverNLP is used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems. If empty, the default solver is found calling GetSolver(&#039;lp&#039;,1). If TOMLAB /SOL or /SNOPT or /NPSOL installed, MINOS is the default solver. If SolverLP is a SOL solver (MINOS, SNOPT or NPSOL), the SOL.optPar and SOL.PrintFile is used: See help minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;RandState&#039;&#039;||See help rngset for how to initialize the random generator. &amp;lt;br&amp;gt;Default is RandState = -1&amp;lt;br&amp;gt;If Convex == 0 and globalSolver == &#039;multiMin&#039;, RandState is sent to multiMin to initizalize the random generator.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xInit&#039;&#039;||Parameter sent to the solver multiMin which is used to solve relaxed sub-problems for nonconvex problems (with Prob.Convex set to false). xInit determines the way initial points are generated and is set as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Either&amp;lt;br&amp;gt;&lt;br /&gt;
1x1 number - &amp;lt;br&amp;gt;&lt;br /&gt;
If &amp;gt; 0, the number of random initial points, default min(3000,30*n);&amp;lt;br&amp;gt;&lt;br /&gt;
If &amp;lt; 0, generate |xInit| points with Latin Hypercube design&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
d x m matrix - Every column is an initial point (of length d = Prob.N)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Default value for xInit is min(3000,max(60,N*6)) at all nodes except the root node&amp;lt;br&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xInit0&#039;&#039;||Parameter sent to the solver multiMin when solving the initial relaxed NLP problem at the root node.&amp;lt;br&amp;gt;&lt;br /&gt;
Default value for xInit0 is min(3000,max(100,N*10))&amp;lt;br&amp;gt;&lt;br /&gt;
See xInit for more information.&amp;lt;br&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure defining integer optimization parameters. See the table below for a description of each field used in &#039;&#039;Prob.MIP&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;STOAMINLP&#039;&#039;||Structure with solver-specific options. See the table below with descriptions of the fields used in &#039;&#039;Prob.STOAMINLP&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below with descriptions of the fields used in &#039;&#039;Prob.optParam&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in &#039;&#039;&#039;Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;VarWeight&#039;&#039;||Weight for each variable in the variable selection phase. &amp;lt;br&amp;gt; A lower value gives higher priority. Setting Prob.MIP.VarWeight might improve convergence.&amp;lt;br&amp;gt;&lt;br /&gt;
VarWeight must be of length N, but the values corresponding to noninteger variables will be ignored.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||&#039;&#039;stoaMINLP &#039;&#039;stops if the duality gap is less than DualGap. DualGap = 1, stop at first integer solution e.g. DualGap = 0.01, stop if solution &#039;&#039;&amp;lt; &#039;&#039;1% from optimal solution. &amp;lt;br&amp;gt;Note that a finite lower bound will only be set by the solver and thus generating a gap when Prob.Convex is set to true.&amp;lt;br&amp;gt;If Prob.Convex is set to false, the lower bound will be -Inf.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;NodeSel&#039;&#039;||Node selection method: &amp;lt;br&amp;gt;= 1 Depth First. Priority on nodes with more integer components. Default &amp;lt;br&amp;gt;= 2 Breadth First. Priority on nodes with more integer components. &amp;lt;br&amp;gt;= 3 Pure LIFO (Last in, first out) Depth First. &amp;lt;br&amp;gt;= 4 Pure FIFO (First in, first out) Breadth First. &amp;lt;br&amp;gt;= 5 Maximize integer components. &amp;lt;br&amp;gt;= 6 Best bound.&amp;lt;br&amp;gt;= 7 Best estimate using pseudo-costs. &amp;lt;br&amp;gt;= 8 Best projection.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Backtrack&#039;&#039;||Switch node selection method during branch and bound.&amp;lt;br&amp;gt;&lt;br /&gt;
When set to any of the NodeSel methods, node selection method is changed to the Backtrack value when the backtracking criterion (see parameter BackCrit below) is fulfilled.&amp;lt;br&amp;gt;For available choices, see NodeSel above. Default is 2, Breadth First.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BackCrit&#039;&#039;||Backtracking criterion, used when Backtrack &amp;gt; 0.&amp;lt;br&amp;gt;&lt;br /&gt;
= 0. Integer solution found. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
= 1. Current node worse than best estimate of active nodes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;VarSel&#039;&#039;||Variable selection method in branch and bound. &amp;lt;br&amp;gt;= 1 Use variable with most fractional value. &amp;lt;br&amp;gt;= 2 Use gradient and distance to nearest integer value. &amp;lt;br&amp;gt;= 3 Pseudo-cost-based branching.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;KNAPSACK&#039;&#039;||If = 1, use a knapsack heuristic. Default 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If = 1, use a rounding heuristic. Default 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SaveFreq&#039;&#039;||Warm start info saved on stoaMINLPSave.mat every SaveFreq iteration (default -1, i.e. no warm start info is saved)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===STOAMINLP structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with solver-specific options&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.STOAMINLP&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;USE_CUTS&#039;&#039;||Flag to use cutting plane algorithm described in [[StoaMINLP#Algorithm]]. Using cuts is not recommended for nonconvex problems. &amp;lt;br&amp;gt;Set nonzero to enable, zero to disable. By default, STOAMINLP.USE_CUTS is set to Prob.Convex.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LoL_ecp&#039;&#039;||Parameter regulating likelihood of linearization using extended cutting plane. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;TOD_ecp&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for  extended cutting plane linearizations. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BCB_ecp&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using extended cutting plane. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LoL_ff&#039;&#039;||Parameter regulating likelihood of linearization using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;TOD_ff&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for  linearizations using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BCB_ff&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LoL_nlpr&#039;&#039;||Parameter regulating likelihood of linearization using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;TOD_nlpr&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for linearizations using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BCB_nlpr&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rTYPE&#039;&#039;||= 0  r is fixed to the value in rVALUE.&amp;lt;br&amp;gt;= 1  r is a uniformly distributed random number in the interval [0,1]. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rVALUE&#039;&#039;||Defines the value of r when rTYPE is set to zero. Default is 0.5.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTPOOL&#039;&#039;||= 0 All linearizations constraints are kept in the master problem. &amp;lt;br&amp;gt;= 1 Manage a pool with inactive linearization constraints. If an inactive constraint gets violated, it is brought back from the pool. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CutDelBnd&#039;&#039;||The number of consecutive times a linearization can be inactive before it gets removed and put into the inactive pool. Default is 15 times.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LIM_DEL_CUT&#039;&#039;||= 0  No extra deletion of cuts. Default when Prob.Convex == 1.&amp;lt;br&amp;gt;= 1  Delete any cuts limiting the true feasible region whenever detected. Such cuts will appear if the problem has nonlinear constraints. Default when Prob.Convex == 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PsCoItLim&#039;&#039;||Limit on time spent per node calculating initial pseudo costs when MIP.VarSel == 3. Default is 120 (s).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PrintLin&#039;&#039;||Set nonzero to print short information about the type of linearization added. Default 0. Enabled when IterPrint &amp;gt; 3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PRINTPOOL&#039;&#039;||Set nonzero to print Set nonzero to print the decisions taken in the cutpool management.Default 0. Enabled when IterPrint &amp;gt; 4.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam:&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;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 1 also enables IterPrint, setting it to 1. &amp;lt;br&amp;gt;&lt;br /&gt;
The information printed for different levels is as follows: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;0 Two lines at each node with an improved integer solution: &amp;lt;br&amp;gt;&lt;br /&gt;
Iteration number: &amp;lt;br&amp;gt;&lt;br /&gt;
* Depth in tree (symbol L[] - empty list, symbol Gap - Dual Gap convergence)&amp;lt;br&amp;gt;&lt;br /&gt;
* fNLP (Optimal  f(x)  current node)&amp;lt;br&amp;gt;&lt;br /&gt;
* fIPMin  (Best integer feasible f(x) found)&amp;lt;br&amp;gt;&lt;br /&gt;
* LowBnd (Lower bound on optimal integer feasible f(x))&amp;lt;br&amp;gt;&lt;br /&gt;
* Dual Gap in absolut value and percent&amp;lt;br&amp;gt;&lt;br /&gt;
* The length of the node list L, -L-&amp;lt;br&amp;gt;&lt;br /&gt;
* The Inform and ExitFlag the solver returned at the current node&amp;lt;br&amp;gt;&lt;br /&gt;
* FuEv (Number of function evaluations  used by solver at current node)&amp;lt;br&amp;gt;&lt;br /&gt;
* Date and time stamp.&amp;lt;br&amp;gt;&lt;br /&gt;
* Outer approximation linearizations, number of cuts in active/inactive pool (|C| #A #I). &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt; 1 Two lines at each evaluated node with the information described above.&amp;lt;br&amp;gt;&lt;br /&gt;
Moreover, with IterPrint enabled a notice is printed whenever the algorithm switches node selection methods. &amp;lt;br&amp;gt;&lt;br /&gt;
Setting a higher value of IterPrint gives more detailed information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;2 Depth, number of integer components and lower bound on objective for each node in L.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;3 Sets LINPRINT = 1, print info about linearizations added (if used).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;4 Sets POOLPRINT = 1, print info about cut-pool management (if used).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;bTol&#039;&#039;||Linear constraint violation convergence tolerance. Default 1.0e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;cTol&#039;&#039;||Constraint violation convergence tolerance. Default 1.0e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fTol&#039;&#039;||Optimality tolerance. Default 3.0e-13&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xTol&#039;&#039;||Variable convergence tolerance. Default 2.2204e-13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &amp;lt;br&amp;gt;0: Global optimal solution found, or integer solution with duality gap less than user tolerance. &amp;lt;br&amp;gt;1: Maximal number of iterations reached. &amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found. &amp;lt;br&amp;gt;4: No feasible point found running NLP relaxation.&amp;lt;br&amp;gt;5: Illegal x_0 found in NLP relaxation. &amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &#039;&#039;&amp;gt; &#039;&#039;Prob.MaxCPU).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Code telling type of convergence, returned from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, max(0,fIPMin-fLB)/-fIPMin-, if fIPMin =0; max(0,fIPMin-fLB) if fIPMin == 0. If fIPMin   =0:  Scale with 100, 100*Dual- Gap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;v_k&#039;&#039;||Lagrange multipliers.  Bounds, Linear and Nonlinear Constraints, size n + mLin + mNonLin.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_0&#039;&#039;||Function value at start.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;stoaMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;stoaMINLP&#039;&#039;||A structure with  warm start information.  Use with  WarmDefGLOBAL,  see example [[StoaMINLP#Warm_Start|here]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_stoaMINLP&amp;diff=3102</id>
		<title>MIPNLP stoaMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_stoaMINLP&amp;diff=3102"/>
		<updated>2015-02-13T12:24:17Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* STOAMINLP structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
stoaMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;stoaMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Recommended is to first set IterPrint, to get information each iteration&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.optParam.IterPrint = 1;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = stoaMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
To make a restart (warm start), just set the warm start flag, and call stoaMINLP once again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.WarmStart = 1;&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
stoaMINLP will read warm start information from the stoaMINLPSave.mat file. Another warm start (with same MaxFunc) is made by just calling tomRun again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result  = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a restart from the warm start information in the Result structure, make a call to WarmDefGLOBAL before calling stoaMINLP. WarmDefGLOBAL moves information from the Result structure to the Prob structure and sets the warm start flag, &amp;lt;code&amp;gt;Prob.WarmStart = 1;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = WarmDefGLOBAL(&#039;stoaMINLP&#039;, Prob,  Result);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where Result is the result structure returned by the previous run. A warm start (with same MaxIter)  is done by just calling tomRun again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result  = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make another warm start with new MaxIter 100, say, redefine MaxIter as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.optParam.MaxIter = 100;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then repeat the two lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = WarmDefGLOBAL(&#039;stoaMINLP&#039;, Prob,  Result); &lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in &#039;&#039;Prob&#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;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&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;Convex&#039;&#039;||If  Convex==1,  assume NLP  problems are convex,  and only one local NLP solver call is used at each node. &amp;lt;br&amp;gt;If Convex==0 (Default), multiMin  is used to do many calls to a local solver to determine the global minima at each node. The global minimum with most components integer valued is chosen.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by stoaMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in stoaMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOpt&#039;&#039;||Print level in sub-solvers (SNOPT and other NLP solvers):&amp;lt;br&amp;gt;=0 No output; &#039;&#039;&amp;gt;&#039;&#039;0 Convergence results.&amp;lt;br&amp;gt;&#039;&#039;&amp;gt;&#039;&#039;1 Output every iteration, &amp;lt;br&amp;gt;&#039;&#039;&amp;gt;&#039;&#039;2 Output each step in the NLP alg&amp;lt;br&amp;gt;For other NLP solvers,  see the documentation for the solver&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;WarmStart&#039;&#039;||If   true, &#039;&#039;&amp;gt;&#039;&#039;0, stoaMINLP  reads the output  from the last run   from Prob.stoaMINLP, if it exists. If it doesn&#039;t exist, stoaMINLP attempts to open and read warm start data from mat-file stoaMINLPSave.mat. stoaMINLP uses the warm start information to continue from the last run. The mat-file minlp- SolveSave.mat is saved every Prob.MIP.SaveFreq iteration.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverNLP&#039;&#039;||Name of the solver used for NLP subproblems.  If empty, the default solver is found calling GetSolver(&#039;con&#039;,1); &amp;lt;br&amp;gt;If TOMLAB  /SOL installed, SNOPT is the default solver.&amp;lt;br&amp;gt;If SolverNLP is a SOL solver (SNOPT, MINOS or NPSOL), the SOL.optPar and SOL.PrintFile is used:&amp;lt;br&amp;gt;See help minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverNLP0&#039;&#039;||Name of the solver used for the initial NLP-problem. If empty, SolverNLP is used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems. If empty, the default solver is found calling GetSolver(&#039;lp&#039;,1). If TOMLAB /SOL or /SNOPT or /NPSOL installed, MINOS is the default solver. If SolverLP is a SOL solver (MINOS, SNOPT or NPSOL), the SOL.optPar and SOL.PrintFile is used: See help minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;RandState&#039;&#039;||See help rngset for how to initialize the random generator. &amp;lt;br&amp;gt;Default is RandState = -1&amp;lt;br&amp;gt;If Convex == 0 and globalSolver == &#039;multiMin&#039;, RandState is sent to multiMin to initizalize the random generator.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xInit&#039;&#039;||Parameter sent to the solver multiMin which is used to solve relaxed sub-problems for nonconvex problems (with Prob.Convex set to false). xInit determines the way initial points are generated and is set as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Either&amp;lt;br&amp;gt;&lt;br /&gt;
1x1 number - &amp;lt;br&amp;gt;&lt;br /&gt;
If &amp;gt; 0, the number of random initial points, default min(3000,30*n);&amp;lt;br&amp;gt;&lt;br /&gt;
If &amp;lt; 0, generate |xInit| points with Latin Hypercube design&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
d x m matrix - Every column is an initial point (of length d = Prob.N)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Default value for xInit is min(3000,max(60,N*6)) at all nodes except the root node&amp;lt;br&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xInit0&#039;&#039;||Parameter sent to the solver multiMin when solving the initial relaxed NLP problem at the root node.&amp;lt;br&amp;gt;&lt;br /&gt;
Default value for xInit0 is min(3000,max(100,N*10))&amp;lt;br&amp;gt;&lt;br /&gt;
See xInit for more information.&amp;lt;br&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure defining integer optimization parameters. See the table below for a description of each field used in &#039;&#039;Prob.MIP&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;STOAMINLP&#039;&#039;||Structure with solver-specific options. See the table below with descriptions of the fields used in &#039;&#039;Prob.STOAMINLP&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below with descriptions of the fields used in &#039;&#039;Prob.optParam&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in &#039;&#039;&#039;Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;VarWeight&#039;&#039;||Weight for each variable in the variable selection phase. &amp;lt;br&amp;gt; A lower value gives higher priority. Setting Prob.MIP.VarWeight might improve convergence.&amp;lt;br&amp;gt;&lt;br /&gt;
VarWeight must be of length N, but the values corresponding to noninteger variables will be ignored.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||&#039;&#039;stoaMINLP &#039;&#039;stops if the duality gap is less than DualGap. DualGap = 1, stop at first integer solution e.g. DualGap = 0.01, stop if solution &#039;&#039;&amp;lt; &#039;&#039;1% from optimal solution. &amp;lt;br&amp;gt;Note that a finite lower bound will only be set by the solver and thus generating a gap when Prob.Convex is set to true.&amp;lt;br&amp;gt;If Prob.Convex is set to false, the lower bound will be -Inf.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;NodeSel&#039;&#039;||Node selection method: &amp;lt;br&amp;gt;= 1 Depth First. Priority on nodes with more integer components. Default &amp;lt;br&amp;gt;= 2 Breadth First. Priority on nodes with more integer components. &amp;lt;br&amp;gt;= 3 Pure LIFO (Last in, first out) Depth First. &amp;lt;br&amp;gt;= 4 Pure FIFO (First in, first out) Breadth First. &amp;lt;br&amp;gt;= 5 Maximize integer components. &amp;lt;br&amp;gt;= 6 Best bound.&amp;lt;br&amp;gt;= 7 Best estimate using pseudo-costs. &amp;lt;br&amp;gt;= 8 Best projection.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Backtrack&#039;&#039;||Switch node selection method during branch and bound.&amp;lt;br&amp;gt;&lt;br /&gt;
When set to any of the NodeSel methods, node selection method is changed to the Backtrack value when the backtracking criterion (see parameter BackCrit below) is fulfilled.&amp;lt;br&amp;gt;For available choices, see NodeSel above. Default is 2, Breadth First.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BackCrit&#039;&#039;||Backtracking criterion, used when Backtrack &amp;gt; 0.&amp;lt;br&amp;gt;&lt;br /&gt;
= 0. Integer solution found. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
= 1. Current node worse than best estimate of active nodes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;VarSel&#039;&#039;||Variable selection method in branch and bound. &amp;lt;br&amp;gt;= 1 Use variable with most fractional value. &amp;lt;br&amp;gt;= 2 Use gradient and distance to nearest integer value. &amp;lt;br&amp;gt;= 3 Pseudo-cost-based branching.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;KNAPSACK&#039;&#039;||If = 1, use a knapsack heuristic. Default 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If = 1, use a rounding heuristic. Default 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SaveFreq&#039;&#039;||Warm start info saved on stoaMINLPSave.mat every SaveFreq iteration (default -1, i.e. no warm start info is saved)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===STOAMINLP structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with solver-specific options&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.STOAMINLP&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;USE_CUTS&#039;&#039;||Flag to use cutting plane algorithm described in [[StoaMINLP#Algorithm]]. Using cuts is not recommended for nonconvex problems. &amp;lt;br&amp;gt;Set nonzero to enable, zero to disable. By default, STOAMINLP.USE_CUTS is set to Prob.Convex.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LoL_ecp&#039;&#039;||Parameter regulating likelihood of linearization using extended cutting plane. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;TOD_ecp&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for  extended cutting plane linearizations. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BCB_ecp&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using extended cutting plane. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LoL_ff&#039;&#039;||Parameter regulating likelihood of linearization using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;TOD_ff&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for  linearizations using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BCB_ff&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LoL_nlpr&#039;&#039;||Parameter regulating likelihood of linearization using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;TOD_nlpr&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for linearizations using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BCB_nlpr&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rTYPE&#039;&#039;||= 0  r is fixed to the value in rVALUE.&amp;lt;br&amp;gt;= 1  r is a uniformly distributed random number in the interval [0,1]. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rVALUE&#039;&#039;||Defines the value of r when rTYPE is set to zero. Default is 0.5.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTPOOL&#039;&#039;||= 0 All linearizations constraints are kept in the master problem. &amp;lt;br&amp;gt;= 1 Manage a pool with inactive linearization constraints. If an inactive constraint gets violated, it is brought back from the pool. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CutDelBnd&#039;&#039;||The number of consecutive times a linearization can be inactive before it gets removed and put into the inactive pool. Default is 15 times.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LIM_DEL_CUT&#039;&#039;||= 0  No extra deletion of cuts. Default when Prob.Convex == 1.&amp;lt;br&amp;gt;= 1  Delete any cuts limiting the true feasible region whenever detected. Such cuts will appear if the problem has nonlinear constraints. Default when Prob.Convex == 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PsCoItLim&#039;&#039;||Limit on time spent per node calculating initial pseudo costs when MIP.VarSel == 3. Default is 120 (s).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PrintLin&#039;&#039;||Set nonzero to print short information about the type of linearization added. Default 0. Enabled when IterPrint &amp;gt; 3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PRINTPOOL&#039;&#039;||Set nonzero to print Set nonzero to print the decisions taken in the cutpool management.Default 0. Enabled when IterPrint &amp;gt; 4.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam:&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;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 1 also enables IterPrint, setting it to 1. &amp;lt;br&amp;gt;&lt;br /&gt;
The information printed for different levels is as follows: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;0 A line at each evaluated node with the following: &amp;lt;br&amp;gt;&lt;br /&gt;
Iteration number: &amp;lt;br&amp;gt;&lt;br /&gt;
Depth in tree (symbol L[] - empty list, symbol Gap - Dual Gap convergence), &amp;lt;br&amp;gt;fNLP (Optimal  f(x)  current node), &amp;lt;br&amp;gt;fIPMin  (Best integer feasible f(x) found), &amp;lt;br&amp;gt;LowBnd (Lower bound on optimal integer feasible f(x)), &amp;lt;br&amp;gt;Dual Gap in absolut value and percent, &amp;lt;br&amp;gt;The length of the node list L, -L-, &amp;lt;br&amp;gt;The Inform and ExitFlag the solver returned at the current node, &amp;lt;br&amp;gt;FuEv (Number of function evaluations  used by solver at current node), &amp;lt;br&amp;gt;date/time stamp. &amp;lt;br&amp;gt;Outer approximation linearizations, number of cuts in active/inactive pool (|C| #A #I). &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt; 1 A line at each evaluated node with the information described above.&amp;lt;br&amp;gt;&lt;br /&gt;
Moreover, with IterPrint enabled a notice is printed whenever the algorithm switches node selection methods. &amp;lt;br&amp;gt;&lt;br /&gt;
Setting a higher value of IterPrint gives more detailed information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;2 Depth, number of integer components and lower bound on objective for each node in L.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;3 Sets LINPRINT = 1, print info about linearizations added (if used).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;4 Sets POOLPRINT = 1, print info about cut-pool management (if used).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;bTol&#039;&#039;||Linear constraint violation convergence tolerance.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;cTol&#039;&#039;||Constraint violation convergence tolerance.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fTol&#039;&#039;||Optimality tolerance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &amp;lt;br&amp;gt;0: Global optimal solution found, or integer solution with duality gap less than user tolerance. &amp;lt;br&amp;gt;1: Maximal number of iterations reached. &amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found. &amp;lt;br&amp;gt;4: No feasible point found running NLP relaxation.&amp;lt;br&amp;gt;5: Illegal x_0 found in NLP relaxation. &amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &#039;&#039;&amp;gt; &#039;&#039;Prob.MaxCPU).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Code telling type of convergence, returned from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, max(0,fIPMin-fLB)/-fIPMin-, if fIPMin =0; max(0,fIPMin-fLB) if fIPMin == 0. If fIPMin   =0:  Scale with 100, 100*Dual- Gap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;v_k&#039;&#039;||Lagrange multipliers.  Bounds, Linear and Nonlinear Constraints, size n + mLin + mNonLin.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_0&#039;&#039;||Function value at start.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;stoaMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;stoaMINLP&#039;&#039;||A structure with  warm start information.  Use with  WarmDefGLOBAL,  see example [[StoaMINLP#Warm_Start|here]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_stoaMINLP&amp;diff=3101</id>
		<title>MIPNLP stoaMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_stoaMINLP&amp;diff=3101"/>
		<updated>2015-02-13T12:22:34Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* STOAMINLP structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
stoaMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;stoaMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Recommended is to first set IterPrint, to get information each iteration&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.optParam.IterPrint = 1;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = stoaMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
To make a restart (warm start), just set the warm start flag, and call stoaMINLP once again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.WarmStart = 1;&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
stoaMINLP will read warm start information from the stoaMINLPSave.mat file. Another warm start (with same MaxFunc) is made by just calling tomRun again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result  = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a restart from the warm start information in the Result structure, make a call to WarmDefGLOBAL before calling stoaMINLP. WarmDefGLOBAL moves information from the Result structure to the Prob structure and sets the warm start flag, &amp;lt;code&amp;gt;Prob.WarmStart = 1;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = WarmDefGLOBAL(&#039;stoaMINLP&#039;, Prob,  Result);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where Result is the result structure returned by the previous run. A warm start (with same MaxIter)  is done by just calling tomRun again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result  = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make another warm start with new MaxIter 100, say, redefine MaxIter as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.optParam.MaxIter = 100;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then repeat the two lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = WarmDefGLOBAL(&#039;stoaMINLP&#039;, Prob,  Result); &lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in &#039;&#039;Prob&#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;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&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;Convex&#039;&#039;||If  Convex==1,  assume NLP  problems are convex,  and only one local NLP solver call is used at each node. &amp;lt;br&amp;gt;If Convex==0 (Default), multiMin  is used to do many calls to a local solver to determine the global minima at each node. The global minimum with most components integer valued is chosen.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by stoaMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in stoaMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOpt&#039;&#039;||Print level in sub-solvers (SNOPT and other NLP solvers):&amp;lt;br&amp;gt;=0 No output; &#039;&#039;&amp;gt;&#039;&#039;0 Convergence results.&amp;lt;br&amp;gt;&#039;&#039;&amp;gt;&#039;&#039;1 Output every iteration, &amp;lt;br&amp;gt;&#039;&#039;&amp;gt;&#039;&#039;2 Output each step in the NLP alg&amp;lt;br&amp;gt;For other NLP solvers,  see the documentation for the solver&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;WarmStart&#039;&#039;||If   true, &#039;&#039;&amp;gt;&#039;&#039;0, stoaMINLP  reads the output  from the last run   from Prob.stoaMINLP, if it exists. If it doesn&#039;t exist, stoaMINLP attempts to open and read warm start data from mat-file stoaMINLPSave.mat. stoaMINLP uses the warm start information to continue from the last run. The mat-file minlp- SolveSave.mat is saved every Prob.MIP.SaveFreq iteration.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverNLP&#039;&#039;||Name of the solver used for NLP subproblems.  If empty, the default solver is found calling GetSolver(&#039;con&#039;,1); &amp;lt;br&amp;gt;If TOMLAB  /SOL installed, SNOPT is the default solver.&amp;lt;br&amp;gt;If SolverNLP is a SOL solver (SNOPT, MINOS or NPSOL), the SOL.optPar and SOL.PrintFile is used:&amp;lt;br&amp;gt;See help minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverNLP0&#039;&#039;||Name of the solver used for the initial NLP-problem. If empty, SolverNLP is used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems. If empty, the default solver is found calling GetSolver(&#039;lp&#039;,1). If TOMLAB /SOL or /SNOPT or /NPSOL installed, MINOS is the default solver. If SolverLP is a SOL solver (MINOS, SNOPT or NPSOL), the SOL.optPar and SOL.PrintFile is used: See help minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;RandState&#039;&#039;||See help rngset for how to initialize the random generator. &amp;lt;br&amp;gt;Default is RandState = -1&amp;lt;br&amp;gt;If Convex == 0 and globalSolver == &#039;multiMin&#039;, RandState is sent to multiMin to initizalize the random generator.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xInit&#039;&#039;||Parameter sent to the solver multiMin which is used to solve relaxed sub-problems for nonconvex problems (with Prob.Convex set to false). xInit determines the way initial points are generated and is set as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Either&amp;lt;br&amp;gt;&lt;br /&gt;
1x1 number - &amp;lt;br&amp;gt;&lt;br /&gt;
If &amp;gt; 0, the number of random initial points, default min(3000,30*n);&amp;lt;br&amp;gt;&lt;br /&gt;
If &amp;lt; 0, generate |xInit| points with Latin Hypercube design&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
d x m matrix - Every column is an initial point (of length d = Prob.N)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Default value for xInit is min(3000,max(60,N*6)) at all nodes except the root node&amp;lt;br&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xInit0&#039;&#039;||Parameter sent to the solver multiMin when solving the initial relaxed NLP problem at the root node.&amp;lt;br&amp;gt;&lt;br /&gt;
Default value for xInit0 is min(3000,max(100,N*10))&amp;lt;br&amp;gt;&lt;br /&gt;
See xInit for more information.&amp;lt;br&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure defining integer optimization parameters. See the table below for a description of each field used in &#039;&#039;Prob.MIP&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;STOAMINLP&#039;&#039;||Structure with solver-specific options. See the table below with descriptions of the fields used in &#039;&#039;Prob.STOAMINLP&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below with descriptions of the fields used in &#039;&#039;Prob.optParam&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in &#039;&#039;&#039;Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;VarWeight&#039;&#039;||Weight for each variable in the variable selection phase. &amp;lt;br&amp;gt; A lower value gives higher priority. Setting Prob.MIP.VarWeight might improve convergence.&amp;lt;br&amp;gt;&lt;br /&gt;
VarWeight must be of length N, but the values corresponding to noninteger variables will be ignored.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||&#039;&#039;stoaMINLP &#039;&#039;stops if the duality gap is less than DualGap. DualGap = 1, stop at first integer solution e.g. DualGap = 0.01, stop if solution &#039;&#039;&amp;lt; &#039;&#039;1% from optimal solution. &amp;lt;br&amp;gt;Note that a finite lower bound will only be set by the solver and thus generating a gap when Prob.Convex is set to true.&amp;lt;br&amp;gt;If Prob.Convex is set to false, the lower bound will be -Inf.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;NodeSel&#039;&#039;||Node selection method: &amp;lt;br&amp;gt;= 1 Depth First. Priority on nodes with more integer components. Default &amp;lt;br&amp;gt;= 2 Breadth First. Priority on nodes with more integer components. &amp;lt;br&amp;gt;= 3 Pure LIFO (Last in, first out) Depth First. &amp;lt;br&amp;gt;= 4 Pure FIFO (First in, first out) Breadth First. &amp;lt;br&amp;gt;= 5 Maximize integer components. &amp;lt;br&amp;gt;= 6 Best bound.&amp;lt;br&amp;gt;= 7 Best estimate using pseudo-costs. &amp;lt;br&amp;gt;= 8 Best projection.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Backtrack&#039;&#039;||Switch node selection method during branch and bound.&amp;lt;br&amp;gt;&lt;br /&gt;
When set to any of the NodeSel methods, node selection method is changed to the Backtrack value when the backtracking criterion (see parameter BackCrit below) is fulfilled.&amp;lt;br&amp;gt;For available choices, see NodeSel above. Default is 2, Breadth First.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BackCrit&#039;&#039;||Backtracking criterion, used when Backtrack &amp;gt; 0.&amp;lt;br&amp;gt;&lt;br /&gt;
= 0. Integer solution found. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
= 1. Current node worse than best estimate of active nodes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;VarSel&#039;&#039;||Variable selection method in branch and bound. &amp;lt;br&amp;gt;= 1 Use variable with most fractional value. &amp;lt;br&amp;gt;= 2 Use gradient and distance to nearest integer value. &amp;lt;br&amp;gt;= 3 Pseudo-cost-based branching.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;KNAPSACK&#039;&#039;||If = 1, use a knapsack heuristic. Default 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If = 1, use a rounding heuristic. Default 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SaveFreq&#039;&#039;||Warm start info saved on stoaMINLPSave.mat every SaveFreq iteration (default -1, i.e. no warm start info is saved)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===STOAMINLP structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with solver-specific options&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.STOAMINLP&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;USE_CUTS&#039;&#039;||Flag to use cutting plane algorithm described in [[StoaMINLP#Algorithm]]. Using cuts is not recommended for nonconvex problems. &amp;lt;br&amp;gt;Set nonzero to enable, zero to disable. By default, STOAMINLP.USE_CUTS is set to Prob.Convex.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LoL_ecp&#039;&#039;||Parameter regulating likelihood of linearization using extended cutting plane. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;TOD_ecp&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for  extended cutting plane linearizations. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BCB_ecp&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using extended cutting plane. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LoL_ff&#039;&#039;||Parameter regulating likelihood of linearization using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;TOD_ff&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for  linearizations using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BCB_ff&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LoL_nlpr&#039;&#039;||Parameter regulating likelihood of linearization using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;TOD_nlpr&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for linearizations using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BCB_nlpr&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rTYPE&#039;&#039;||= 0  r is fixed to the value in rVALUE.&amp;lt;br&amp;gt;= 1  r is a uniformly distributed random number in the interval [0,1]. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rVALUE&#039;&#039;||Defines the value of r when rTYPE is set to zero. Default is 0.5.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTPOOL&#039;&#039;||= 0 All linearizations constraints are kept in the master problem. &amp;lt;br&amp;gt;= 1 Manage a pool with inactive linearization constraints. If an inactive constraint gets violated, it is brought back from the pool. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CutDelBnd&#039;&#039;||The number of consecutive times a linearization can be inactive before it gets removed and put into the inactive pool. Default is 15 times.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LIM_DEL_CUT&#039;&#039;||= 0  No extra deletion of cuts. Default when Prob.Convex == 1.&amp;lt;br&amp;gt;= 1  Delete any cuts limiting the true feasible region whenever detected. Such cuts will appear if the problem has nonlinear constraints. Default when Prob.Convex == 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PsCoItLim&#039;&#039;||Limit on time spent per node calculating initial pseudo costs when MIP.VarSel == 3. Default is 120 (s).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PrintLin&#039;&#039;||Set nonzero to print short information about the type of linearization added. Default 0. Enabled when IterPrint &amp;gt; 3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PRINTPOOL&#039;&#039;||Set nonzero to print information about the cutpool management. Default 0. Enabled when IterPrint &amp;gt; 4.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam:&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;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 1 also enables IterPrint, setting it to 1. &amp;lt;br&amp;gt;&lt;br /&gt;
The information printed for different levels is as follows: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;0 A line at each evaluated node with the following: &amp;lt;br&amp;gt;&lt;br /&gt;
Iteration number: &amp;lt;br&amp;gt;&lt;br /&gt;
Depth in tree (symbol L[] - empty list, symbol Gap - Dual Gap convergence), &amp;lt;br&amp;gt;fNLP (Optimal  f(x)  current node), &amp;lt;br&amp;gt;fIPMin  (Best integer feasible f(x) found), &amp;lt;br&amp;gt;LowBnd (Lower bound on optimal integer feasible f(x)), &amp;lt;br&amp;gt;Dual Gap in absolut value and percent, &amp;lt;br&amp;gt;The length of the node list L, -L-, &amp;lt;br&amp;gt;The Inform and ExitFlag the solver returned at the current node, &amp;lt;br&amp;gt;FuEv (Number of function evaluations  used by solver at current node), &amp;lt;br&amp;gt;date/time stamp. &amp;lt;br&amp;gt;Outer approximation linearizations, number of cuts in active/inactive pool (|C| #A #I). &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt; 1 A line at each evaluated node with the information described above.&amp;lt;br&amp;gt;&lt;br /&gt;
Moreover, with IterPrint enabled a notice is printed whenever the algorithm switches node selection methods. &amp;lt;br&amp;gt;&lt;br /&gt;
Setting a higher value of IterPrint gives more detailed information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;2 Depth, number of integer components and lower bound on objective for each node in L.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;3 Sets LINPRINT = 1, print info about linearizations added (if used).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;4 Sets POOLPRINT = 1, print info about cut-pool management (if used).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;bTol&#039;&#039;||Linear constraint violation convergence tolerance.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;cTol&#039;&#039;||Constraint violation convergence tolerance.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fTol&#039;&#039;||Optimality tolerance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &amp;lt;br&amp;gt;0: Global optimal solution found, or integer solution with duality gap less than user tolerance. &amp;lt;br&amp;gt;1: Maximal number of iterations reached. &amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found. &amp;lt;br&amp;gt;4: No feasible point found running NLP relaxation.&amp;lt;br&amp;gt;5: Illegal x_0 found in NLP relaxation. &amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &#039;&#039;&amp;gt; &#039;&#039;Prob.MaxCPU).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Code telling type of convergence, returned from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, max(0,fIPMin-fLB)/-fIPMin-, if fIPMin =0; max(0,fIPMin-fLB) if fIPMin == 0. If fIPMin   =0:  Scale with 100, 100*Dual- Gap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;v_k&#039;&#039;||Lagrange multipliers.  Bounds, Linear and Nonlinear Constraints, size n + mLin + mNonLin.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_0&#039;&#039;||Function value at start.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;stoaMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;stoaMINLP&#039;&#039;||A structure with  warm start information.  Use with  WarmDefGLOBAL,  see example [[StoaMINLP#Warm_Start|here]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_stoaMINLP&amp;diff=3100</id>
		<title>MIPNLP stoaMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_stoaMINLP&amp;diff=3100"/>
		<updated>2015-02-13T12:16:17Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Prob structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
stoaMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;stoaMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Recommended is to first set IterPrint, to get information each iteration&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.optParam.IterPrint = 1;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = stoaMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
To make a restart (warm start), just set the warm start flag, and call stoaMINLP once again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.WarmStart = 1;&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
stoaMINLP will read warm start information from the stoaMINLPSave.mat file. Another warm start (with same MaxFunc) is made by just calling tomRun again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result  = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a restart from the warm start information in the Result structure, make a call to WarmDefGLOBAL before calling stoaMINLP. WarmDefGLOBAL moves information from the Result structure to the Prob structure and sets the warm start flag, &amp;lt;code&amp;gt;Prob.WarmStart = 1;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = WarmDefGLOBAL(&#039;stoaMINLP&#039;, Prob,  Result);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where Result is the result structure returned by the previous run. A warm start (with same MaxIter)  is done by just calling tomRun again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result  = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make another warm start with new MaxIter 100, say, redefine MaxIter as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.optParam.MaxIter = 100;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then repeat the two lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = WarmDefGLOBAL(&#039;stoaMINLP&#039;, Prob,  Result); &lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in &#039;&#039;Prob&#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;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&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;Convex&#039;&#039;||If  Convex==1,  assume NLP  problems are convex,  and only one local NLP solver call is used at each node. &amp;lt;br&amp;gt;If Convex==0 (Default), multiMin  is used to do many calls to a local solver to determine the global minima at each node. The global minimum with most components integer valued is chosen.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by stoaMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in stoaMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOpt&#039;&#039;||Print level in sub-solvers (SNOPT and other NLP solvers):&amp;lt;br&amp;gt;=0 No output; &#039;&#039;&amp;gt;&#039;&#039;0 Convergence results.&amp;lt;br&amp;gt;&#039;&#039;&amp;gt;&#039;&#039;1 Output every iteration, &amp;lt;br&amp;gt;&#039;&#039;&amp;gt;&#039;&#039;2 Output each step in the NLP alg&amp;lt;br&amp;gt;For other NLP solvers,  see the documentation for the solver&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;WarmStart&#039;&#039;||If   true, &#039;&#039;&amp;gt;&#039;&#039;0, stoaMINLP  reads the output  from the last run   from Prob.stoaMINLP, if it exists. If it doesn&#039;t exist, stoaMINLP attempts to open and read warm start data from mat-file stoaMINLPSave.mat. stoaMINLP uses the warm start information to continue from the last run. The mat-file minlp- SolveSave.mat is saved every Prob.MIP.SaveFreq iteration.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverNLP&#039;&#039;||Name of the solver used for NLP subproblems.  If empty, the default solver is found calling GetSolver(&#039;con&#039;,1); &amp;lt;br&amp;gt;If TOMLAB  /SOL installed, SNOPT is the default solver.&amp;lt;br&amp;gt;If SolverNLP is a SOL solver (SNOPT, MINOS or NPSOL), the SOL.optPar and SOL.PrintFile is used:&amp;lt;br&amp;gt;See help minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverNLP0&#039;&#039;||Name of the solver used for the initial NLP-problem. If empty, SolverNLP is used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems. If empty, the default solver is found calling GetSolver(&#039;lp&#039;,1). If TOMLAB /SOL or /SNOPT or /NPSOL installed, MINOS is the default solver. If SolverLP is a SOL solver (MINOS, SNOPT or NPSOL), the SOL.optPar and SOL.PrintFile is used: See help minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;RandState&#039;&#039;||See help rngset for how to initialize the random generator. &amp;lt;br&amp;gt;Default is RandState = -1&amp;lt;br&amp;gt;If Convex == 0 and globalSolver == &#039;multiMin&#039;, RandState is sent to multiMin to initizalize the random generator.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xInit&#039;&#039;||Parameter sent to the solver multiMin which is used to solve relaxed sub-problems for nonconvex problems (with Prob.Convex set to false). xInit determines the way initial points are generated and is set as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Either&amp;lt;br&amp;gt;&lt;br /&gt;
1x1 number - &amp;lt;br&amp;gt;&lt;br /&gt;
If &amp;gt; 0, the number of random initial points, default min(3000,30*n);&amp;lt;br&amp;gt;&lt;br /&gt;
If &amp;lt; 0, generate |xInit| points with Latin Hypercube design&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
d x m matrix - Every column is an initial point (of length d = Prob.N)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Default value for xInit is min(3000,max(60,N*6)) at all nodes except the root node&amp;lt;br&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xInit0&#039;&#039;||Parameter sent to the solver multiMin when solving the initial relaxed NLP problem at the root node.&amp;lt;br&amp;gt;&lt;br /&gt;
Default value for xInit0 is min(3000,max(100,N*10))&amp;lt;br&amp;gt;&lt;br /&gt;
See xInit for more information.&amp;lt;br&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure defining integer optimization parameters. See the table below for a description of each field used in &#039;&#039;Prob.MIP&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;STOAMINLP&#039;&#039;||Structure with solver-specific options. See the table below with descriptions of the fields used in &#039;&#039;Prob.STOAMINLP&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below with descriptions of the fields used in &#039;&#039;Prob.optParam&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in &#039;&#039;&#039;Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;VarWeight&#039;&#039;||Weight for each variable in the variable selection phase. &amp;lt;br&amp;gt; A lower value gives higher priority. Setting Prob.MIP.VarWeight might improve convergence.&amp;lt;br&amp;gt;&lt;br /&gt;
VarWeight must be of length N, but the values corresponding to noninteger variables will be ignored.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||&#039;&#039;stoaMINLP &#039;&#039;stops if the duality gap is less than DualGap. DualGap = 1, stop at first integer solution e.g. DualGap = 0.01, stop if solution &#039;&#039;&amp;lt; &#039;&#039;1% from optimal solution. &amp;lt;br&amp;gt;Note that a finite lower bound will only be set by the solver and thus generating a gap when Prob.Convex is set to true.&amp;lt;br&amp;gt;If Prob.Convex is set to false, the lower bound will be -Inf.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;NodeSel&#039;&#039;||Node selection method: &amp;lt;br&amp;gt;= 1 Depth First. Priority on nodes with more integer components. Default &amp;lt;br&amp;gt;= 2 Breadth First. Priority on nodes with more integer components. &amp;lt;br&amp;gt;= 3 Pure LIFO (Last in, first out) Depth First. &amp;lt;br&amp;gt;= 4 Pure FIFO (First in, first out) Breadth First. &amp;lt;br&amp;gt;= 5 Maximize integer components. &amp;lt;br&amp;gt;= 6 Best bound.&amp;lt;br&amp;gt;= 7 Best estimate using pseudo-costs. &amp;lt;br&amp;gt;= 8 Best projection.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Backtrack&#039;&#039;||Switch node selection method during branch and bound.&amp;lt;br&amp;gt;&lt;br /&gt;
When set to any of the NodeSel methods, node selection method is changed to the Backtrack value when the backtracking criterion (see parameter BackCrit below) is fulfilled.&amp;lt;br&amp;gt;For available choices, see NodeSel above. Default is 2, Breadth First.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BackCrit&#039;&#039;||Backtracking criterion, used when Backtrack &amp;gt; 0.&amp;lt;br&amp;gt;&lt;br /&gt;
= 0. Integer solution found. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
= 1. Current node worse than best estimate of active nodes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;VarSel&#039;&#039;||Variable selection method in branch and bound. &amp;lt;br&amp;gt;= 1 Use variable with most fractional value. &amp;lt;br&amp;gt;= 2 Use gradient and distance to nearest integer value. &amp;lt;br&amp;gt;= 3 Pseudo-cost-based branching.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;KNAPSACK&#039;&#039;||If = 1, use a knapsack heuristic. Default 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If = 1, use a rounding heuristic. Default 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SaveFreq&#039;&#039;||Warm start info saved on stoaMINLPSave.mat every SaveFreq iteration (default -1, i.e. no warm start info is saved)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===STOAMINLP structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with solver-specific options&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.STOAMINLP&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;USECUTS&#039;&#039;||Flag to use cutting plane algorithm described in [[StoaMINLP#Algorithm]]. Using cuts is not recommended for nonconvex problems. &amp;lt;br&amp;gt;Set nonzero to enable, zero to disable. By default, USECUTS = Prob.Convex.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;B_ecp&#039;&#039;||Parameter regulating likelihood of linearization using extended cutting plane. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;K_ecp&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for  extended cutting plane linearizations. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;M_ecp&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using extended cutting plane. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;B_ff&#039;&#039;||Parameter regulating likelihood of linearization using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;K_ff&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for  linearizations using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;M_ff&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;B_nlpr&#039;&#039;||Parameter regulating likelihood of linearization using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;K_nlpr&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for linearizations using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;M_nlpr&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rTYPE&#039;&#039;||= 0  r is fixed to the value in rVALUE.&amp;lt;br&amp;gt;= 1  r is a uniformly distributed random number in the interval [0,1]. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rVALUE&#039;&#039;||Defines the value of r when rTYPE is set to zero. Default is 0.5.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTPOOL&#039;&#039;||= 0 All linearizations constraints are kept in the master problem. &amp;lt;br&amp;gt;= 1 Manage a pool with inactive linearization constraints. If an inactive constraint gets violated, it is brought back from the pool. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTDELBND&#039;&#039;||The number of consecutive times a linearization can be inactive before it gets removed and put into the inactive pool. Default 15.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTLIMDEL&#039;&#039;||= 0  No extra deletion of cuts. Default when Prob.Convex == 1.&amp;lt;br&amp;gt;= 1  Delete any cuts limiting the true feasible region when detected. Such cuts will appear if the problem has nonlinear constraints. Default when Prob.Convex == 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PCITL&#039;&#039;||Limit on time spent per node calculating initial pseudo costs when VarSel == 3. Default is 120 (s).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LINPRINT&#039;&#039;||Set nonzero to print short information about the type of linearization added. Default 0. enabled when IterPrint &amp;gt; 3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;POOLPRINT&#039;&#039;||Set nonzero to print information about the cutpool management. Default 0. Enabled when IterPrint &amp;gt; 4.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam:&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;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 1 also enables IterPrint, setting it to 1. &amp;lt;br&amp;gt;&lt;br /&gt;
The information printed for different levels is as follows: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;0 A line at each evaluated node with the following: &amp;lt;br&amp;gt;&lt;br /&gt;
Iteration number: &amp;lt;br&amp;gt;&lt;br /&gt;
Depth in tree (symbol L[] - empty list, symbol Gap - Dual Gap convergence), &amp;lt;br&amp;gt;fNLP (Optimal  f(x)  current node), &amp;lt;br&amp;gt;fIPMin  (Best integer feasible f(x) found), &amp;lt;br&amp;gt;LowBnd (Lower bound on optimal integer feasible f(x)), &amp;lt;br&amp;gt;Dual Gap in absolut value and percent, &amp;lt;br&amp;gt;The length of the node list L, -L-, &amp;lt;br&amp;gt;The Inform and ExitFlag the solver returned at the current node, &amp;lt;br&amp;gt;FuEv (Number of function evaluations  used by solver at current node), &amp;lt;br&amp;gt;date/time stamp. &amp;lt;br&amp;gt;Outer approximation linearizations, number of cuts in active/inactive pool (|C| #A #I). &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt; 1 A line at each evaluated node with the information described above.&amp;lt;br&amp;gt;&lt;br /&gt;
Moreover, with IterPrint enabled a notice is printed whenever the algorithm switches node selection methods. &amp;lt;br&amp;gt;&lt;br /&gt;
Setting a higher value of IterPrint gives more detailed information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;2 Depth, number of integer components and lower bound on objective for each node in L.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;3 Sets LINPRINT = 1, print info about linearizations added (if used).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;4 Sets POOLPRINT = 1, print info about cut-pool management (if used).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;bTol&#039;&#039;||Linear constraint violation convergence tolerance.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;cTol&#039;&#039;||Constraint violation convergence tolerance.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fTol&#039;&#039;||Optimality tolerance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &amp;lt;br&amp;gt;0: Global optimal solution found, or integer solution with duality gap less than user tolerance. &amp;lt;br&amp;gt;1: Maximal number of iterations reached. &amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found. &amp;lt;br&amp;gt;4: No feasible point found running NLP relaxation.&amp;lt;br&amp;gt;5: Illegal x_0 found in NLP relaxation. &amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &#039;&#039;&amp;gt; &#039;&#039;Prob.MaxCPU).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Code telling type of convergence, returned from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, max(0,fIPMin-fLB)/-fIPMin-, if fIPMin =0; max(0,fIPMin-fLB) if fIPMin == 0. If fIPMin   =0:  Scale with 100, 100*Dual- Gap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;v_k&#039;&#039;||Lagrange multipliers.  Bounds, Linear and Nonlinear Constraints, size n + mLin + mNonLin.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_0&#039;&#039;||Function value at start.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;stoaMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;stoaMINLP&#039;&#039;||A structure with  warm start information.  Use with  WarmDefGLOBAL,  see example [[StoaMINLP#Warm_Start|here]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_stoaMINLP&amp;diff=3099</id>
		<title>MIPNLP stoaMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_stoaMINLP&amp;diff=3099"/>
		<updated>2015-02-11T15:38:53Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* MIP structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
stoaMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;stoaMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Recommended is to first set IterPrint, to get information each iteration&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.optParam.IterPrint = 1;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = stoaMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
To make a restart (warm start), just set the warm start flag, and call stoaMINLP once again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.WarmStart = 1;&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
stoaMINLP will read warm start information from the stoaMINLPSave.mat file. Another warm start (with same MaxFunc) is made by just calling tomRun again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result  = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a restart from the warm start information in the Result structure, make a call to WarmDefGLOBAL before calling stoaMINLP. WarmDefGLOBAL moves information from the Result structure to the Prob structure and sets the warm start flag, &amp;lt;code&amp;gt;Prob.WarmStart = 1;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = WarmDefGLOBAL(&#039;stoaMINLP&#039;, Prob,  Result);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where Result is the result structure returned by the previous run. A warm start (with same MaxIter)  is done by just calling tomRun again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result  = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make another warm start with new MaxIter 100, say, redefine MaxIter as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.optParam.MaxIter = 100;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then repeat the two lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = WarmDefGLOBAL(&#039;stoaMINLP&#039;, Prob,  Result); &lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in &#039;&#039;Prob&#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;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&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;Convex&#039;&#039;||If  Convex==1,  assume NLP  problems are convex,  and only one local NLP solver call is used at each node. &amp;lt;br&amp;gt;If Convex==0 (Default), multiMin  is used to do many calls to a local solver to determine the global minima at each node. The global minimum with most components integer valued is chosen.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by stoaMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in stoaMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOpt&#039;&#039;||Print level in sub-solvers (SNOPT and other NLP solvers):&amp;lt;br&amp;gt;=0 No output; &#039;&#039;&amp;gt;&#039;&#039;0 Convergence results.&amp;lt;br&amp;gt;&#039;&#039;&amp;gt;&#039;&#039;1 Output every iteration, &amp;lt;br&amp;gt;&#039;&#039;&amp;gt;&#039;&#039;2 Output each step in the NLP alg&amp;lt;br&amp;gt;For other NLP solvers,  see the documentation for the solver&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;WarmStart&#039;&#039;||If   true, &#039;&#039;&amp;gt;&#039;&#039;0, stoaMINLP  reads the output  from the last run   from Prob.stoaMINLP, if it exists. If it doesn&#039;t exist, stoaMINLP attempts to open and read warm start data from mat-file stoaMINLPSave.mat. stoaMINLP uses the warm start information to continue from the last run. The mat-file minlp- SolveSave.mat is saved every Prob.MIP.SaveFreq iteration.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverNLP&#039;&#039;||Name of the solver used for NLP subproblems.  If empty, the default solver is found calling GetSolver(&#039;con&#039;,1); &amp;lt;br&amp;gt;If TOMLAB  /SOL installed, SNOPT is the default solver.&amp;lt;br&amp;gt;If SolverNLP is a SOL solver (SNOPT, MINOS or NPSOL), the SOL.optPar and SOL.PrintFile is used:&amp;lt;br&amp;gt;See help minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverNLP0&#039;&#039;||Name of the solver used for the initial NLP-problem. If empty, SolverNLP is used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems. If empty, the default solver is found calling GetSolver(&#039;lp&#039;,1). If TOMLAB /SOL or /SNOPT or /NPSOL installed, MINOS is the default solver. If SolverLP is a SOL solver (MINOS, SNOPT or NPSOL), the SOL.optPar and SOL.PrintFile is used: See help minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;RandState&#039;&#039;||If Convex == 0, RandState is sent to multiMin  to initialize the random generator. RandState is used as follows: &amp;lt;br&amp;gt;If &#039;&#039;&amp;gt; &#039;&#039;0, rand(&#039;state&#039;,RandState) is set to initialize the pseudo-random generator.&amp;lt;br&amp;gt; If &#039;&#039;&amp;lt; &#039;&#039;0, rand(&#039;state&#039;,sum(100*clock)) is set to give a new set of random values each run. &amp;lt;br&amp;gt;If RandState == 0, rand(&#039;state&#039;,) is not called. &amp;lt;br&amp;gt;Default is RandState = -1&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xInit&#039;&#039;||Parameter sent to the solver multiMin which is used to solve relaxed sub-problems for nonconvex problems (with Prob.Convex set to false). xInit determines the way initial points are generated and is set as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Either&amp;lt;br&amp;gt;&lt;br /&gt;
1x1 number - &amp;lt;br&amp;gt;&lt;br /&gt;
If &amp;gt; 0, the number of random initial points, default min(3000,30*n);&amp;lt;br&amp;gt;&lt;br /&gt;
If &amp;lt; 0, generate |xInit| points with Latin Hypercube design&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
d x m matrix - Every column is an initial point (of length d = Prob.N)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Default value for xInit is min(3000,max(60,N*6)) at all nodes except the root node&amp;lt;br&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xInit0&#039;&#039;||Parameter sent to the solver multiMin when solving the initial relaxed NLP problem at the root node.&amp;lt;br&amp;gt;&lt;br /&gt;
Default value for xInit0 is min(3000,max(100,N*10))&amp;lt;br&amp;gt;&lt;br /&gt;
See xInit for more information.&amp;lt;br&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure defining integer optimization parameters. See the table below for a description of each field used in &#039;&#039;Prob.MIP&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;STOAMINLP&#039;&#039;||Structure with solver-specific options. See the table below with descriptions of the fields used in &#039;&#039;Prob.STOAMINLP&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below with descriptions of the fields used in &#039;&#039;Prob.optParam&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in &#039;&#039;&#039;Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;VarWeight&#039;&#039;||Weight for each variable in the variable selection phase. &amp;lt;br&amp;gt; A lower value gives higher priority. Setting Prob.MIP.VarWeight might improve convergence.&amp;lt;br&amp;gt;&lt;br /&gt;
VarWeight must be of length N, but the values corresponding to noninteger variables will be ignored.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||&#039;&#039;stoaMINLP &#039;&#039;stops if the duality gap is less than DualGap. DualGap = 1, stop at first integer solution e.g. DualGap = 0.01, stop if solution &#039;&#039;&amp;lt; &#039;&#039;1% from optimal solution. &amp;lt;br&amp;gt;Note that a finite lower bound will only be set by the solver and thus generating a gap when Prob.Convex is set to true.&amp;lt;br&amp;gt;If Prob.Convex is set to false, the lower bound will be -Inf.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;NodeSel&#039;&#039;||Node selection method: &amp;lt;br&amp;gt;= 1 Depth First. Priority on nodes with more integer components. Default &amp;lt;br&amp;gt;= 2 Breadth First. Priority on nodes with more integer components. &amp;lt;br&amp;gt;= 3 Pure LIFO (Last in, first out) Depth First. &amp;lt;br&amp;gt;= 4 Pure FIFO (First in, first out) Breadth First. &amp;lt;br&amp;gt;= 5 Maximize integer components. &amp;lt;br&amp;gt;= 6 Best bound.&amp;lt;br&amp;gt;= 7 Best estimate using pseudo-costs. &amp;lt;br&amp;gt;= 8 Best projection.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Backtrack&#039;&#039;||Switch node selection method during branch and bound.&amp;lt;br&amp;gt;&lt;br /&gt;
When set to any of the NodeSel methods, node selection method is changed to the Backtrack value when the backtracking criterion (see parameter BackCrit below) is fulfilled.&amp;lt;br&amp;gt;For available choices, see NodeSel above. Default is 2, Breadth First.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;BackCrit&#039;&#039;||Backtracking criterion, used when Backtrack &amp;gt; 0.&amp;lt;br&amp;gt;&lt;br /&gt;
= 0. Integer solution found. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
= 1. Current node worse than best estimate of active nodes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;VarSel&#039;&#039;||Variable selection method in branch and bound. &amp;lt;br&amp;gt;= 1 Use variable with most fractional value. &amp;lt;br&amp;gt;= 2 Use gradient and distance to nearest integer value. &amp;lt;br&amp;gt;= 3 Pseudo-cost-based branching.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;KNAPSACK&#039;&#039;||If = 1, use a knapsack heuristic. Default 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If = 1, use a rounding heuristic. Default 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SaveFreq&#039;&#039;||Warm start info saved on stoaMINLPSave.mat every SaveFreq iteration (default -1, i.e. no warm start info is saved)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===STOAMINLP structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with solver-specific options&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.STOAMINLP&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;USECUTS&#039;&#039;||Flag to use cutting plane algorithm described in [[StoaMINLP#Algorithm]]. Using cuts is not recommended for nonconvex problems. &amp;lt;br&amp;gt;Set nonzero to enable, zero to disable. By default, USECUTS = Prob.Convex.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;B_ecp&#039;&#039;||Parameter regulating likelihood of linearization using extended cutting plane. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;K_ecp&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for  extended cutting plane linearizations. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;M_ecp&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using extended cutting plane. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;B_ff&#039;&#039;||Parameter regulating likelihood of linearization using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;K_ff&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for  linearizations using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;M_ff&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;B_nlpr&#039;&#039;||Parameter regulating likelihood of linearization using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;K_nlpr&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for linearizations using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;M_nlpr&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rTYPE&#039;&#039;||= 0  r is fixed to the value in rVALUE.&amp;lt;br&amp;gt;= 1  r is a uniformly distributed random number in the interval [0,1]. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rVALUE&#039;&#039;||Defines the value of r when rTYPE is set to zero. Default is 0.5.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTPOOL&#039;&#039;||= 0 All linearizations constraints are kept in the master problem. &amp;lt;br&amp;gt;= 1 Manage a pool with inactive linearization constraints. If an inactive constraint gets violated, it is brought back from the pool. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTDELBND&#039;&#039;||The number of consecutive times a linearization can be inactive before it gets removed and put into the inactive pool. Default 15.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTLIMDEL&#039;&#039;||= 0  No extra deletion of cuts. Default when Prob.Convex == 1.&amp;lt;br&amp;gt;= 1  Delete any cuts limiting the true feasible region when detected. Such cuts will appear if the problem has nonlinear constraints. Default when Prob.Convex == 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PCITL&#039;&#039;||Limit on time spent per node calculating initial pseudo costs when VarSel == 3. Default is 120 (s).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LINPRINT&#039;&#039;||Set nonzero to print short information about the type of linearization added. Default 0. enabled when IterPrint &amp;gt; 3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;POOLPRINT&#039;&#039;||Set nonzero to print information about the cutpool management. Default 0. Enabled when IterPrint &amp;gt; 4.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam:&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;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 1 also enables IterPrint, setting it to 1. &amp;lt;br&amp;gt;&lt;br /&gt;
The information printed for different levels is as follows: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;0 A line at each evaluated node with the following: &amp;lt;br&amp;gt;&lt;br /&gt;
Iteration number: &amp;lt;br&amp;gt;&lt;br /&gt;
Depth in tree (symbol L[] - empty list, symbol Gap - Dual Gap convergence), &amp;lt;br&amp;gt;fNLP (Optimal  f(x)  current node), &amp;lt;br&amp;gt;fIPMin  (Best integer feasible f(x) found), &amp;lt;br&amp;gt;LowBnd (Lower bound on optimal integer feasible f(x)), &amp;lt;br&amp;gt;Dual Gap in absolut value and percent, &amp;lt;br&amp;gt;The length of the node list L, -L-, &amp;lt;br&amp;gt;The Inform and ExitFlag the solver returned at the current node, &amp;lt;br&amp;gt;FuEv (Number of function evaluations  used by solver at current node), &amp;lt;br&amp;gt;date/time stamp. &amp;lt;br&amp;gt;Outer approximation linearizations, number of cuts in active/inactive pool (|C| #A #I). &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt; 1 A line at each evaluated node with the information described above.&amp;lt;br&amp;gt;&lt;br /&gt;
Moreover, with IterPrint enabled a notice is printed whenever the algorithm switches node selection methods. &amp;lt;br&amp;gt;&lt;br /&gt;
Setting a higher value of IterPrint gives more detailed information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;2 Depth, number of integer components and lower bound on objective for each node in L.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;3 Sets LINPRINT = 1, print info about linearizations added (if used).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;4 Sets POOLPRINT = 1, print info about cut-pool management (if used).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;bTol&#039;&#039;||Linear constraint violation convergence tolerance.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;cTol&#039;&#039;||Constraint violation convergence tolerance.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fTol&#039;&#039;||Optimality tolerance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &amp;lt;br&amp;gt;0: Global optimal solution found, or integer solution with duality gap less than user tolerance. &amp;lt;br&amp;gt;1: Maximal number of iterations reached. &amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found. &amp;lt;br&amp;gt;4: No feasible point found running NLP relaxation.&amp;lt;br&amp;gt;5: Illegal x_0 found in NLP relaxation. &amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &#039;&#039;&amp;gt; &#039;&#039;Prob.MaxCPU).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Code telling type of convergence, returned from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, max(0,fIPMin-fLB)/-fIPMin-, if fIPMin =0; max(0,fIPMin-fLB) if fIPMin == 0. If fIPMin   =0:  Scale with 100, 100*Dual- Gap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;v_k&#039;&#039;||Lagrange multipliers.  Bounds, Linear and Nonlinear Constraints, size n + mLin + mNonLin.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_0&#039;&#039;||Function value at start.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;stoaMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;stoaMINLP&#039;&#039;||A structure with  warm start information.  Use with  WarmDefGLOBAL,  see example [[StoaMINLP#Warm_Start|here]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_stoaMINLP&amp;diff=3098</id>
		<title>MIPNLP stoaMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_stoaMINLP&amp;diff=3098"/>
		<updated>2015-02-11T15:31:00Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Prob structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
stoaMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;stoaMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Recommended is to first set IterPrint, to get information each iteration&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.optParam.IterPrint = 1;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = stoaMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
To make a restart (warm start), just set the warm start flag, and call stoaMINLP once again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.WarmStart = 1;&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
stoaMINLP will read warm start information from the stoaMINLPSave.mat file. Another warm start (with same MaxFunc) is made by just calling tomRun again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result  = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a restart from the warm start information in the Result structure, make a call to WarmDefGLOBAL before calling stoaMINLP. WarmDefGLOBAL moves information from the Result structure to the Prob structure and sets the warm start flag, &amp;lt;code&amp;gt;Prob.WarmStart = 1;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = WarmDefGLOBAL(&#039;stoaMINLP&#039;, Prob,  Result);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where Result is the result structure returned by the previous run. A warm start (with same MaxIter)  is done by just calling tomRun again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result  = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make another warm start with new MaxIter 100, say, redefine MaxIter as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.optParam.MaxIter = 100;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then repeat the two lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = WarmDefGLOBAL(&#039;stoaMINLP&#039;, Prob,  Result); &lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in &#039;&#039;Prob&#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;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&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;Convex&#039;&#039;||If  Convex==1,  assume NLP  problems are convex,  and only one local NLP solver call is used at each node. &amp;lt;br&amp;gt;If Convex==0 (Default), multiMin  is used to do many calls to a local solver to determine the global minima at each node. The global minimum with most components integer valued is chosen.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by stoaMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in stoaMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOpt&#039;&#039;||Print level in sub-solvers (SNOPT and other NLP solvers):&amp;lt;br&amp;gt;=0 No output; &#039;&#039;&amp;gt;&#039;&#039;0 Convergence results.&amp;lt;br&amp;gt;&#039;&#039;&amp;gt;&#039;&#039;1 Output every iteration, &amp;lt;br&amp;gt;&#039;&#039;&amp;gt;&#039;&#039;2 Output each step in the NLP alg&amp;lt;br&amp;gt;For other NLP solvers,  see the documentation for the solver&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;WarmStart&#039;&#039;||If   true, &#039;&#039;&amp;gt;&#039;&#039;0, stoaMINLP  reads the output  from the last run   from Prob.stoaMINLP, if it exists. If it doesn&#039;t exist, stoaMINLP attempts to open and read warm start data from mat-file stoaMINLPSave.mat. stoaMINLP uses the warm start information to continue from the last run. The mat-file minlp- SolveSave.mat is saved every Prob.MIP.SaveFreq iteration.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverNLP&#039;&#039;||Name of the solver used for NLP subproblems.  If empty, the default solver is found calling GetSolver(&#039;con&#039;,1); &amp;lt;br&amp;gt;If TOMLAB  /SOL installed, SNOPT is the default solver.&amp;lt;br&amp;gt;If SolverNLP is a SOL solver (SNOPT, MINOS or NPSOL), the SOL.optPar and SOL.PrintFile is used:&amp;lt;br&amp;gt;See help minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverNLP0&#039;&#039;||Name of the solver used for the initial NLP-problem. If empty, SolverNLP is used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems. If empty, the default solver is found calling GetSolver(&#039;lp&#039;,1). If TOMLAB /SOL or /SNOPT or /NPSOL installed, MINOS is the default solver. If SolverLP is a SOL solver (MINOS, SNOPT or NPSOL), the SOL.optPar and SOL.PrintFile is used: See help minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;RandState&#039;&#039;||If Convex == 0, RandState is sent to multiMin  to initialize the random generator. RandState is used as follows: &amp;lt;br&amp;gt;If &#039;&#039;&amp;gt; &#039;&#039;0, rand(&#039;state&#039;,RandState) is set to initialize the pseudo-random generator.&amp;lt;br&amp;gt; If &#039;&#039;&amp;lt; &#039;&#039;0, rand(&#039;state&#039;,sum(100*clock)) is set to give a new set of random values each run. &amp;lt;br&amp;gt;If RandState == 0, rand(&#039;state&#039;,) is not called. &amp;lt;br&amp;gt;Default is RandState = -1&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xInit&#039;&#039;||Parameter sent to the solver multiMin which is used to solve relaxed sub-problems for nonconvex problems (with Prob.Convex set to false). xInit determines the way initial points are generated and is set as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Either&amp;lt;br&amp;gt;&lt;br /&gt;
1x1 number - &amp;lt;br&amp;gt;&lt;br /&gt;
If &amp;gt; 0, the number of random initial points, default min(3000,30*n);&amp;lt;br&amp;gt;&lt;br /&gt;
If &amp;lt; 0, generate |xInit| points with Latin Hypercube design&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
d x m matrix - Every column is an initial point (of length d = Prob.N)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Default value for xInit is min(3000,max(60,N*6)) at all nodes except the root node&amp;lt;br&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xInit0&#039;&#039;||Parameter sent to the solver multiMin when solving the initial relaxed NLP problem at the root node.&amp;lt;br&amp;gt;&lt;br /&gt;
Default value for xInit0 is min(3000,max(100,N*10))&amp;lt;br&amp;gt;&lt;br /&gt;
See xInit for more information.&amp;lt;br&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure defining integer optimization parameters. See the table below for a description of each field used in &#039;&#039;Prob.MIP&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;STOAMINLP&#039;&#039;||Structure with solver-specific options. See the table below with descriptions of the fields used in &#039;&#039;Prob.STOAMINLP&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below with descriptions of the fields used in &#039;&#039;Prob.optParam&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in &#039;&#039;&#039;Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;VarWeight&#039;&#039;||Weight for each variable in the variable selection phase. &amp;lt;br&amp;gt; A lower value gives higher priority. Setting Prob.MIP.VarWeight might improve convergence.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||&#039;&#039;stoaMINLP &#039;&#039;stops if the duality gap is less than DualGap. DualGap = 1, stop at first integer solution e.g. DualGap = 0.01, stop if solution &#039;&#039;&amp;lt; &#039;&#039;1% from optimal solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;NodeSel&#039;&#039;||Node selection method: &amp;lt;br&amp;gt;= 1 Depth First. Priority on nodes with more integer components. Default &amp;lt;br&amp;gt;= 2 Breadth First. Priority on nodes with more integer components. &amp;lt;br&amp;gt;= 3 Pure LIFO (Last in, first out) Depth First. &amp;lt;br&amp;gt;= 4 Pure FIFO (First in, first out) Breadth First. &amp;lt;br&amp;gt;= 5 Maximize integer components. &amp;lt;br&amp;gt;= 6 Best bound.&amp;lt;br&amp;gt;= 7 Best estimate using pseudo-costs. &amp;lt;br&amp;gt;= 8 Best projection.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Backtrack&#039;&#039;||Node selection method to use after an integer solution has been found. &amp;lt;br&amp;gt;Available choices are the same as for NodeSel. Default is 2, Breadth First.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;VarSel&#039;&#039;||Variable selection method in branch and bound. &amp;lt;br&amp;gt;= 1 Use variable with most fractional value. &amp;lt;br&amp;gt;= 2 Use gradient and distance to nearest integer value. &amp;lt;br&amp;gt;= 3 Pseudo-cost-based branching.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;KNAPSACK&#039;&#039;||If = 1, use a knapsack heuristic. Default 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If = 1, use a rounding heuristic. Default 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SaveFreq&#039;&#039;||Warm start info saved on stoaMINLPSave.mat every SaveFreq iteration (default -1, i.e. no warm start info is saved)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===STOAMINLP structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with solver-specific options&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.STOAMINLP&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;USECUTS&#039;&#039;||Flag to use cutting plane algorithm described in [[StoaMINLP#Algorithm]]. Using cuts is not recommended for nonconvex problems. &amp;lt;br&amp;gt;Set nonzero to enable, zero to disable. By default, USECUTS = Prob.Convex.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;B_ecp&#039;&#039;||Parameter regulating likelihood of linearization using extended cutting plane. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;K_ecp&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for  extended cutting plane linearizations. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;M_ecp&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using extended cutting plane. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;B_ff&#039;&#039;||Parameter regulating likelihood of linearization using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;K_ff&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for  linearizations using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;M_ff&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;B_nlpr&#039;&#039;||Parameter regulating likelihood of linearization using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;K_nlpr&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for linearizations using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;M_nlpr&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rTYPE&#039;&#039;||= 0  r is fixed to the value in rVALUE.&amp;lt;br&amp;gt;= 1  r is a uniformly distributed random number in the interval [0,1]. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rVALUE&#039;&#039;||Defines the value of r when rTYPE is set to zero. Default is 0.5.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTPOOL&#039;&#039;||= 0 All linearizations constraints are kept in the master problem. &amp;lt;br&amp;gt;= 1 Manage a pool with inactive linearization constraints. If an inactive constraint gets violated, it is brought back from the pool. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTDELBND&#039;&#039;||The number of consecutive times a linearization can be inactive before it gets removed and put into the inactive pool. Default 15.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTLIMDEL&#039;&#039;||= 0  No extra deletion of cuts. Default when Prob.Convex == 1.&amp;lt;br&amp;gt;= 1  Delete any cuts limiting the true feasible region when detected. Such cuts will appear if the problem has nonlinear constraints. Default when Prob.Convex == 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PCITL&#039;&#039;||Limit on time spent per node calculating initial pseudo costs when VarSel == 3. Default is 120 (s).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LINPRINT&#039;&#039;||Set nonzero to print short information about the type of linearization added. Default 0. enabled when IterPrint &amp;gt; 3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;POOLPRINT&#039;&#039;||Set nonzero to print information about the cutpool management. Default 0. Enabled when IterPrint &amp;gt; 4.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam:&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;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 1 also enables IterPrint, setting it to 1. &amp;lt;br&amp;gt;&lt;br /&gt;
The information printed for different levels is as follows: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;0 A line at each evaluated node with the following: &amp;lt;br&amp;gt;&lt;br /&gt;
Iteration number: &amp;lt;br&amp;gt;&lt;br /&gt;
Depth in tree (symbol L[] - empty list, symbol Gap - Dual Gap convergence), &amp;lt;br&amp;gt;fNLP (Optimal  f(x)  current node), &amp;lt;br&amp;gt;fIPMin  (Best integer feasible f(x) found), &amp;lt;br&amp;gt;LowBnd (Lower bound on optimal integer feasible f(x)), &amp;lt;br&amp;gt;Dual Gap in absolut value and percent, &amp;lt;br&amp;gt;The length of the node list L, -L-, &amp;lt;br&amp;gt;The Inform and ExitFlag the solver returned at the current node, &amp;lt;br&amp;gt;FuEv (Number of function evaluations  used by solver at current node), &amp;lt;br&amp;gt;date/time stamp. &amp;lt;br&amp;gt;Outer approximation linearizations, number of cuts in active/inactive pool (|C| #A #I). &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt; 1 A line at each evaluated node with the information described above.&amp;lt;br&amp;gt;&lt;br /&gt;
Moreover, with IterPrint enabled a notice is printed whenever the algorithm switches node selection methods. &amp;lt;br&amp;gt;&lt;br /&gt;
Setting a higher value of IterPrint gives more detailed information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;2 Depth, number of integer components and lower bound on objective for each node in L.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;3 Sets LINPRINT = 1, print info about linearizations added (if used).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;4 Sets POOLPRINT = 1, print info about cut-pool management (if used).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;bTol&#039;&#039;||Linear constraint violation convergence tolerance.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;cTol&#039;&#039;||Constraint violation convergence tolerance.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fTol&#039;&#039;||Optimality tolerance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &amp;lt;br&amp;gt;0: Global optimal solution found, or integer solution with duality gap less than user tolerance. &amp;lt;br&amp;gt;1: Maximal number of iterations reached. &amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found. &amp;lt;br&amp;gt;4: No feasible point found running NLP relaxation.&amp;lt;br&amp;gt;5: Illegal x_0 found in NLP relaxation. &amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &#039;&#039;&amp;gt; &#039;&#039;Prob.MaxCPU).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Code telling type of convergence, returned from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, max(0,fIPMin-fLB)/-fIPMin-, if fIPMin =0; max(0,fIPMin-fLB) if fIPMin == 0. If fIPMin   =0:  Scale with 100, 100*Dual- Gap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;v_k&#039;&#039;||Lagrange multipliers.  Bounds, Linear and Nonlinear Constraints, size n + mLin + mNonLin.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_0&#039;&#039;||Function value at start.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;stoaMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;stoaMINLP&#039;&#039;||A structure with  warm start information.  Use with  WarmDefGLOBAL,  see example [[StoaMINLP#Warm_Start|here]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_stoaMINLP&amp;diff=3097</id>
		<title>MIPNLP stoaMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_stoaMINLP&amp;diff=3097"/>
		<updated>2015-02-11T15:30:03Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Prob structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
stoaMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;stoaMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Recommended is to first set IterPrint, to get information each iteration&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.optParam.IterPrint = 1;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = stoaMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
To make a restart (warm start), just set the warm start flag, and call stoaMINLP once again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.WarmStart = 1;&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
stoaMINLP will read warm start information from the stoaMINLPSave.mat file. Another warm start (with same MaxFunc) is made by just calling tomRun again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result  = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a restart from the warm start information in the Result structure, make a call to WarmDefGLOBAL before calling stoaMINLP. WarmDefGLOBAL moves information from the Result structure to the Prob structure and sets the warm start flag, &amp;lt;code&amp;gt;Prob.WarmStart = 1;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = WarmDefGLOBAL(&#039;stoaMINLP&#039;, Prob,  Result);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where Result is the result structure returned by the previous run. A warm start (with same MaxIter)  is done by just calling tomRun again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result  = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make another warm start with new MaxIter 100, say, redefine MaxIter as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.optParam.MaxIter = 100;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then repeat the two lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = WarmDefGLOBAL(&#039;stoaMINLP&#039;, Prob,  Result); &lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in &#039;&#039;Prob&#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;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&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;Convex&#039;&#039;||If  Convex==1,  assume NLP  problems are convex,  and only one local NLP solver call is used at each node. &amp;lt;br&amp;gt;If Convex==0 (Default), multiMin  is used to do many calls to a local solver to determine the global minima at each node. The global minimum with most components integer valued is chosen.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by stoaMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in stoaMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOpt&#039;&#039;||Print level in sub-solvers (SNOPT and other NLP solvers):&amp;lt;br&amp;gt;=0 No output; &#039;&#039;&amp;gt;&#039;&#039;0 Convergence results.&amp;lt;br&amp;gt;&#039;&#039;&amp;gt;&#039;&#039;1 Output every iteration, &amp;lt;br&amp;gt;&#039;&#039;&amp;gt;&#039;&#039;2 Output each step in the NLP alg&amp;lt;br&amp;gt;For other NLP solvers,  see the documentation for the solver&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;WarmStart&#039;&#039;||If   true, &#039;&#039;&amp;gt;&#039;&#039;0, stoaMINLP  reads the output  from the last run   from Prob.stoaMINLP, if it exists. If it doesn&#039;t exist, stoaMINLP attempts to open and read warm start data from mat-file stoaMINLPSave.mat. stoaMINLP uses the warm start information to continue from the last run. The mat-file minlp- SolveSave.mat is saved every Prob.MIP.SaveFreq iteration.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverNLP&#039;&#039;||Name of the solver used for NLP subproblems.  If empty, the default solver is found calling GetSolver(&#039;con&#039;,1); &amp;lt;br&amp;gt;If TOMLAB  /SOL installed, SNOPT is the default solver.&amp;lt;br&amp;gt;If SolverNLP is a SOL solver (SNOPT, MINOS or NPSOL), the SOL.optPar and SOL.PrintFile is used:&amp;lt;br&amp;gt;See help minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverNLP0&#039;&#039;||Name of the solver used for the initial NLP-problem. If empty, SolverNLP is used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems. If empty, the default solver is found calling GetSolver(&#039;lp&#039;,1). If TOMLAB /SOL or /SNOPT or /NPSOL installed, MINOS is the default solver. If SolverLP is a SOL solver (MINOS, SNOPT or NPSOL), the SOL.optPar and SOL.PrintFile is used: See help minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;RandState&#039;&#039;||If Convex == 0, RandState is sent to multiMin  to initialize the random generator. RandState is used as follows: &amp;lt;br&amp;gt;If &#039;&#039;&amp;gt; &#039;&#039;0, rand(&#039;state&#039;,RandState) is set to initialize the pseudo-random generator.&amp;lt;br&amp;gt; If &#039;&#039;&amp;lt; &#039;&#039;0, rand(&#039;state&#039;,sum(100*clock)) is set to give a new set of random values each run. &amp;lt;br&amp;gt;If RandState == 0, rand(&#039;state&#039;,) is not called. &amp;lt;br&amp;gt;Default is RandState = -1&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xInit&#039;&#039;||Parameter sent to the solver multiMin which is used to solve relaxed sub-problems for nonconvex problems (with Prob.Convex set to false). xInit determines the way initial points are generated and is set as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Either&amp;lt;br&amp;gt;&lt;br /&gt;
1x1 number - &amp;lt;br&amp;gt;&lt;br /&gt;
If &amp;gt; 0, the number of random initial points, default min(3000,30*n);&amp;lt;br&amp;gt;&lt;br /&gt;
If &amp;lt; 0, generate |xInit| points with Latin Hypercube design&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
dxm matrix - Every column is an initial point (of length d = Prob.N)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Default value for xInit is min(3000,max(60,N*6)) at all nodes except the root node&amp;lt;br&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xInit0&#039;&#039;||Parameter sent to the solver multiMin when solving the initial relaxed NLP problem at the root node.&amp;lt;br&amp;gt;&lt;br /&gt;
Default value for xInit0 is min(3000,max(100,N*10))&amp;lt;br&amp;gt;&lt;br /&gt;
See xInit for more information.&amp;lt;br&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure defining integer optimization parameters. See the table below for a description of each field used in &#039;&#039;Prob.MIP&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;STOAMINLP&#039;&#039;||Structure with solver-specific options. See the table below with descriptions of the fields used in &#039;&#039;Prob.STOAMINLP&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below with descriptions of the fields used in &#039;&#039;Prob.optParam&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in &#039;&#039;&#039;Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;VarWeight&#039;&#039;||Weight for each variable in the variable selection phase. &amp;lt;br&amp;gt; A lower value gives higher priority. Setting Prob.MIP.VarWeight might improve convergence.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||&#039;&#039;stoaMINLP &#039;&#039;stops if the duality gap is less than DualGap. DualGap = 1, stop at first integer solution e.g. DualGap = 0.01, stop if solution &#039;&#039;&amp;lt; &#039;&#039;1% from optimal solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;NodeSel&#039;&#039;||Node selection method: &amp;lt;br&amp;gt;= 1 Depth First. Priority on nodes with more integer components. Default &amp;lt;br&amp;gt;= 2 Breadth First. Priority on nodes with more integer components. &amp;lt;br&amp;gt;= 3 Pure LIFO (Last in, first out) Depth First. &amp;lt;br&amp;gt;= 4 Pure FIFO (First in, first out) Breadth First. &amp;lt;br&amp;gt;= 5 Maximize integer components. &amp;lt;br&amp;gt;= 6 Best bound.&amp;lt;br&amp;gt;= 7 Best estimate using pseudo-costs. &amp;lt;br&amp;gt;= 8 Best projection.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Backtrack&#039;&#039;||Node selection method to use after an integer solution has been found. &amp;lt;br&amp;gt;Available choices are the same as for NodeSel. Default is 2, Breadth First.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;VarSel&#039;&#039;||Variable selection method in branch and bound. &amp;lt;br&amp;gt;= 1 Use variable with most fractional value. &amp;lt;br&amp;gt;= 2 Use gradient and distance to nearest integer value. &amp;lt;br&amp;gt;= 3 Pseudo-cost-based branching.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;KNAPSACK&#039;&#039;||If = 1, use a knapsack heuristic. Default 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If = 1, use a rounding heuristic. Default 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SaveFreq&#039;&#039;||Warm start info saved on stoaMINLPSave.mat every SaveFreq iteration (default -1, i.e. no warm start info is saved)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===STOAMINLP structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with solver-specific options&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.STOAMINLP&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;USECUTS&#039;&#039;||Flag to use cutting plane algorithm described in [[StoaMINLP#Algorithm]]. Using cuts is not recommended for nonconvex problems. &amp;lt;br&amp;gt;Set nonzero to enable, zero to disable. By default, USECUTS = Prob.Convex.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;B_ecp&#039;&#039;||Parameter regulating likelihood of linearization using extended cutting plane. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;K_ecp&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for  extended cutting plane linearizations. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;M_ecp&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using extended cutting plane. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;B_ff&#039;&#039;||Parameter regulating likelihood of linearization using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;K_ff&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for  linearizations using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;M_ff&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;B_nlpr&#039;&#039;||Parameter regulating likelihood of linearization using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;K_nlpr&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for linearizations using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;M_nlpr&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rTYPE&#039;&#039;||= 0  r is fixed to the value in rVALUE.&amp;lt;br&amp;gt;= 1  r is a uniformly distributed random number in the interval [0,1]. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rVALUE&#039;&#039;||Defines the value of r when rTYPE is set to zero. Default is 0.5.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTPOOL&#039;&#039;||= 0 All linearizations constraints are kept in the master problem. &amp;lt;br&amp;gt;= 1 Manage a pool with inactive linearization constraints. If an inactive constraint gets violated, it is brought back from the pool. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTDELBND&#039;&#039;||The number of consecutive times a linearization can be inactive before it gets removed and put into the inactive pool. Default 15.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTLIMDEL&#039;&#039;||= 0  No extra deletion of cuts. Default when Prob.Convex == 1.&amp;lt;br&amp;gt;= 1  Delete any cuts limiting the true feasible region when detected. Such cuts will appear if the problem has nonlinear constraints. Default when Prob.Convex == 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PCITL&#039;&#039;||Limit on time spent per node calculating initial pseudo costs when VarSel == 3. Default is 120 (s).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LINPRINT&#039;&#039;||Set nonzero to print short information about the type of linearization added. Default 0. enabled when IterPrint &amp;gt; 3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;POOLPRINT&#039;&#039;||Set nonzero to print information about the cutpool management. Default 0. Enabled when IterPrint &amp;gt; 4.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam:&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;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 1 also enables IterPrint, setting it to 1. &amp;lt;br&amp;gt;&lt;br /&gt;
The information printed for different levels is as follows: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;0 A line at each evaluated node with the following: &amp;lt;br&amp;gt;&lt;br /&gt;
Iteration number: &amp;lt;br&amp;gt;&lt;br /&gt;
Depth in tree (symbol L[] - empty list, symbol Gap - Dual Gap convergence), &amp;lt;br&amp;gt;fNLP (Optimal  f(x)  current node), &amp;lt;br&amp;gt;fIPMin  (Best integer feasible f(x) found), &amp;lt;br&amp;gt;LowBnd (Lower bound on optimal integer feasible f(x)), &amp;lt;br&amp;gt;Dual Gap in absolut value and percent, &amp;lt;br&amp;gt;The length of the node list L, -L-, &amp;lt;br&amp;gt;The Inform and ExitFlag the solver returned at the current node, &amp;lt;br&amp;gt;FuEv (Number of function evaluations  used by solver at current node), &amp;lt;br&amp;gt;date/time stamp. &amp;lt;br&amp;gt;Outer approximation linearizations, number of cuts in active/inactive pool (|C| #A #I). &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt; 1 A line at each evaluated node with the information described above.&amp;lt;br&amp;gt;&lt;br /&gt;
Moreover, with IterPrint enabled a notice is printed whenever the algorithm switches node selection methods. &amp;lt;br&amp;gt;&lt;br /&gt;
Setting a higher value of IterPrint gives more detailed information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;2 Depth, number of integer components and lower bound on objective for each node in L.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;3 Sets LINPRINT = 1, print info about linearizations added (if used).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;4 Sets POOLPRINT = 1, print info about cut-pool management (if used).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;bTol&#039;&#039;||Linear constraint violation convergence tolerance.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;cTol&#039;&#039;||Constraint violation convergence tolerance.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fTol&#039;&#039;||Optimality tolerance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &amp;lt;br&amp;gt;0: Global optimal solution found, or integer solution with duality gap less than user tolerance. &amp;lt;br&amp;gt;1: Maximal number of iterations reached. &amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found. &amp;lt;br&amp;gt;4: No feasible point found running NLP relaxation.&amp;lt;br&amp;gt;5: Illegal x_0 found in NLP relaxation. &amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &#039;&#039;&amp;gt; &#039;&#039;Prob.MaxCPU).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Code telling type of convergence, returned from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, max(0,fIPMin-fLB)/-fIPMin-, if fIPMin =0; max(0,fIPMin-fLB) if fIPMin == 0. If fIPMin   =0:  Scale with 100, 100*Dual- Gap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;v_k&#039;&#039;||Lagrange multipliers.  Bounds, Linear and Nonlinear Constraints, size n + mLin + mNonLin.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_0&#039;&#039;||Function value at start.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;stoaMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;stoaMINLP&#039;&#039;||A structure with  warm start information.  Use with  WarmDefGLOBAL,  see example [[StoaMINLP#Warm_Start|here]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP&amp;diff=3096</id>
		<title>MIPNLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP&amp;diff=3096"/>
		<updated>2015-02-11T15:24:23Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* TOMLAB /MIPNLP Solver References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
Welcome to the TOMLAB /MIPNLP User&#039;s Guide. TOMLAB /MIPNLP includes four solvers for mixed integer programming problems. The solvers take advantage of the wide array of subsolvers for LP, NLP and MILP in TOMLAB.&lt;br /&gt;
&lt;br /&gt;
The solver package includes the following solvers:&lt;br /&gt;
&lt;br /&gt;
[[multiMin]] - Solves general constrained mixed-integer global optimization problems. It tries to find all local minima by a multi-start method using a suitable nonlinear programming subsolver. &lt;br /&gt;
&lt;br /&gt;
[[multiMINLP]] - Solves general constrained mixed-integer global nonlinear optimization problems. It is aimed for problems where the number of integer combinations nMax is huge and relaxation of the integer constraint is possible.&lt;br /&gt;
&lt;br /&gt;
[[MIPNLP_ecpMINLP|ecpMINLP]] - Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to a MIP subproblem solved by a subsolver in each iteration. The solver algorithm is an implementation based on the publication &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, Optimization and Engineering 3, 253-280, 2002, but with modifications.&lt;br /&gt;
&lt;br /&gt;
[[MIPNLP_ecpMINLP|stoaMINLP]] - Single-search Tree Outer Approximation Solver for Mixed-Integer NonLinear Programming (MINLP). Is best suited for solving convex problems. The solver is mainly based on &#039;FilMINT: An Outer-Approximation-Based Solver for Nonlinear Mixed Integer Programs&#039; by Kumar Abhishek, Sven Leyffer, and Jeffrey T. Linderoth at the Mathematics and Computer Science Division, Preprint ANL/MCS-P1374-0906, March 28, 2008, but with some differences.&lt;br /&gt;
&lt;br /&gt;
==TOMLAB /MIPNLP Solver References==&lt;br /&gt;
&lt;br /&gt;
* [[multiMin]]&lt;br /&gt;
* [[MIPNLP_ecpMINLP|ecpMINLP]]&lt;br /&gt;
* [[MIPNLP_stoaMINLP|stoaMINLP]]&lt;br /&gt;
* [[MultiMINLP|multiMINLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=Welcome&amp;diff=3088</id>
		<title>Welcome</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=Welcome&amp;diff=3088"/>
		<updated>2014-12-12T13:58:27Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Standalone */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The TOMLAB Environment is a modeling platform for solving applied optimization problems in [http://en.wikipedia.org/wiki/MATLAB MATLAB].&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
TOMLAB is a general purpose development and modeling environment in MATLAB for research, teaching and practical solution of optimization problems. It enables a wider range of problems to be solved in MATLAB and provides many additional solvers.&lt;br /&gt;
&lt;br /&gt;
==Optimization problems supported==&lt;br /&gt;
TOMLAB handles a wide range of problem types, among them:&lt;br /&gt;
* Linear programming&lt;br /&gt;
* Quadratic programming&lt;br /&gt;
* Nonlinear programming&lt;br /&gt;
* Mixed-integer programming&lt;br /&gt;
* Mixed-integer quadratic programming with or without convex quadratic constraints&lt;br /&gt;
* Mixed-integer nonlinear programming&lt;br /&gt;
* Linear and nonlinear least squares with L1, L2 and infinity norm&lt;br /&gt;
* Exponential data fitting&lt;br /&gt;
* Global optimization&lt;br /&gt;
* Semi-definite programming problem with bilinear matrix inequalities&lt;br /&gt;
* Constrained goal attainment&lt;br /&gt;
* Geometric programming&lt;br /&gt;
* Genetic programming&lt;br /&gt;
* Costly or expensive black-box global optimization&lt;br /&gt;
* Nonlinear complementarity problems&lt;br /&gt;
&lt;br /&gt;
==TOMLAB Manuals==&lt;br /&gt;
&lt;br /&gt;
===TOMLAB Manual===&lt;br /&gt;
Includes general TOMLAB information and solver reference for the TOMLAB Base Module.&lt;br /&gt;
* [[TOMLAB|TOMLAB Manual]]&lt;br /&gt;
&lt;br /&gt;
===Quickguide===&lt;br /&gt;
Basics associated with solving problems using the TOMLAB Optimization Environment.&lt;br /&gt;
* [[Quickguide]]&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
A short introduction to the TOMLAB Models.&lt;br /&gt;
* [[Models]]&lt;br /&gt;
&lt;br /&gt;
===SAL===&lt;br /&gt;
Standalone execution of TOMLAB. Compilation instructions.&lt;br /&gt;
* [[SAL]]&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
Guide for installation of demos and permanently licensed TOMLAB components.&lt;br /&gt;
* [[Installation]]&lt;br /&gt;
&lt;br /&gt;
==Product User&#039;s Guides==&lt;br /&gt;
&lt;br /&gt;
====Included in the [[SOL|TOMLAB /SOL manual]]====&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
*[[MINOS]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
*[[SOL_NPSOL|NPSOL]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[SNOPT]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Standalone====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[AMPL]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[CGO]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[CONOPT]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[CPLEX]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[GP]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[GENO]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[GUROBI]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[KNITRO]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[LGO]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[MAD]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[MINLP]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[MIPNLP]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[MISQP]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[NLPQL]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[OQNLP]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[PENOPT]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[PROPT]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[SOL]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[TomSym]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[Xpress]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PDF==&lt;br /&gt;
&lt;br /&gt;
*[[PDF|Manuals in PDF format]]&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&lt;br /&gt;
* http://tomopt.com/&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=Welcome&amp;diff=3087</id>
		<title>Welcome</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=Welcome&amp;diff=3087"/>
		<updated>2014-12-12T13:38:22Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: Reverted edits by Bjorn (talk) to last revision by Elias&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The TOMLAB Environment is a modeling platform for solving applied optimization problems in [http://en.wikipedia.org/wiki/MATLAB MATLAB].&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
TOMLAB is a general purpose development and modeling environment in MATLAB for research, teaching and practical solution of optimization problems. It enables a wider range of problems to be solved in MATLAB and provides many additional solvers.&lt;br /&gt;
&lt;br /&gt;
==Optimization problems supported==&lt;br /&gt;
TOMLAB handles a wide range of problem types, among them:&lt;br /&gt;
* Linear programming&lt;br /&gt;
* Quadratic programming&lt;br /&gt;
* Nonlinear programming&lt;br /&gt;
* Mixed-integer programming&lt;br /&gt;
* Mixed-integer quadratic programming with or without convex quadratic constraints&lt;br /&gt;
* Mixed-integer nonlinear programming&lt;br /&gt;
* Linear and nonlinear least squares with L1, L2 and infinity norm&lt;br /&gt;
* Exponential data fitting&lt;br /&gt;
* Global optimization&lt;br /&gt;
* Semi-definite programming problem with bilinear matrix inequalities&lt;br /&gt;
* Constrained goal attainment&lt;br /&gt;
* Geometric programming&lt;br /&gt;
* Genetic programming&lt;br /&gt;
* Costly or expensive black-box global optimization&lt;br /&gt;
* Nonlinear complementarity problems&lt;br /&gt;
&lt;br /&gt;
==TOMLAB Manuals==&lt;br /&gt;
&lt;br /&gt;
===TOMLAB Manual===&lt;br /&gt;
Includes general TOMLAB information and solver reference for the TOMLAB Base Module.&lt;br /&gt;
* [[TOMLAB|TOMLAB Manual]]&lt;br /&gt;
&lt;br /&gt;
===Quickguide===&lt;br /&gt;
Basics associated with solving problems using the TOMLAB Optimization Environment.&lt;br /&gt;
* [[Quickguide]]&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
A short introduction to the TOMLAB Models.&lt;br /&gt;
* [[Models]]&lt;br /&gt;
&lt;br /&gt;
===SAL===&lt;br /&gt;
Standalone execution of TOMLAB. Compilation instructions.&lt;br /&gt;
* [[SAL]]&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
Guide for installation of demos and permanently licensed TOMLAB components.&lt;br /&gt;
* [[Installation]]&lt;br /&gt;
&lt;br /&gt;
==Product User&#039;s Guides==&lt;br /&gt;
&lt;br /&gt;
====Included in the [[SOL|TOMLAB /SOL manual]]====&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
*[[MINOS]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
*[[SOL_NPSOL|NPSOL]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[SNOPT]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Standalone====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[SOL]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[CGO]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[Xpress]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[CPLEX]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[GUROBI]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[MINLP]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[PENOPT]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[KNITRO]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[OQNLP]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[CONOPT]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[NLPQL]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[LGO]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[GP]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[GENO]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[MAD]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[AMPL]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[PROPT]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[TomSym]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[MISQP]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PDF==&lt;br /&gt;
&lt;br /&gt;
*[[PDF|Manuals in PDF format]]&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&lt;br /&gt;
* http://tomopt.com/&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=Welcome&amp;diff=3086</id>
		<title>Welcome</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=Welcome&amp;diff=3086"/>
		<updated>2014-12-12T13:38:09Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Standalone */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The TOMLAB Environment is a modeling platform for solving applied optimization problems in [http://en.wikipedia.org/wiki/MATLAB MATLAB].&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
TOMLAB is a general purpose development and modeling environment in MATLAB for research, teaching and practical solution of optimization problems. It enables a wider range of problems to be solved in MATLAB and provides many additional solvers.&lt;br /&gt;
&lt;br /&gt;
==Optimization problems supported==&lt;br /&gt;
TOMLAB handles a wide range of problem types, among them:&lt;br /&gt;
* Linear programming&lt;br /&gt;
* Quadratic programming&lt;br /&gt;
* Nonlinear programming&lt;br /&gt;
* Mixed-integer programming&lt;br /&gt;
* Mixed-integer quadratic programming with or without convex quadratic constraints&lt;br /&gt;
* Mixed-integer nonlinear programming&lt;br /&gt;
* Linear and nonlinear least squares with L1, L2 and infinity norm&lt;br /&gt;
* Exponential data fitting&lt;br /&gt;
* Global optimization&lt;br /&gt;
* Semi-definite programming problem with bilinear matrix inequalities&lt;br /&gt;
* Constrained goal attainment&lt;br /&gt;
* Geometric programming&lt;br /&gt;
* Genetic programming&lt;br /&gt;
* Costly or expensive black-box global optimization&lt;br /&gt;
* Nonlinear complementarity problems&lt;br /&gt;
&lt;br /&gt;
==TOMLAB Manuals==&lt;br /&gt;
&lt;br /&gt;
===TOMLAB Manual===&lt;br /&gt;
Includes general TOMLAB information and solver reference for the TOMLAB Base Module.&lt;br /&gt;
* [[TOMLAB|TOMLAB Manual]]&lt;br /&gt;
&lt;br /&gt;
===Quickguide===&lt;br /&gt;
Basics associated with solving problems using the TOMLAB Optimization Environment.&lt;br /&gt;
* [[Quickguide]]&lt;br /&gt;
&lt;br /&gt;
===Models===&lt;br /&gt;
A short introduction to the TOMLAB Models.&lt;br /&gt;
* [[Models]]&lt;br /&gt;
&lt;br /&gt;
===SAL===&lt;br /&gt;
Standalone execution of TOMLAB. Compilation instructions.&lt;br /&gt;
* [[SAL]]&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
Guide for installation of demos and permanently licensed TOMLAB components.&lt;br /&gt;
* [[Installation]]&lt;br /&gt;
&lt;br /&gt;
==Product User&#039;s Guides==&lt;br /&gt;
&lt;br /&gt;
====Included in the [[SOL|TOMLAB /SOL manual]]====&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
*[[MINOS]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
*[[SOL_NPSOL|NPSOL]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[SNOPT]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Standalone====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[SOL]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[CGO]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[Xpress]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[CPLEX]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[GUROBI]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[MINLP]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[MIPNLP]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[PENOPT]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[KNITRO]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[OQNLP]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[CONOPT]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[NLPQL]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[LGO]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[GP]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[GENO]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[MAD]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[AMPL]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[PROPT]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[TomSym]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
* [[MISQP]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PDF==&lt;br /&gt;
&lt;br /&gt;
*[[PDF|Manuals in PDF format]]&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&lt;br /&gt;
* http://tomopt.com/&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3085</id>
		<title>MIPNLP ecpMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3085"/>
		<updated>2014-12-05T12:39:11Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Purpose */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
ecpMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;ecpMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers but can be either continuously differentiable or not. An initalization routine will detect strict integer variables in the problem.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = ecpMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
Warm start is currently not supported, but might be included in a future release.&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in the problem description structure Prob&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;f_Low&#039;&#039;||Lower bound on solution.&lt;br /&gt;
|-&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;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by ecpMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in ecpMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||output&lt;br /&gt;
|-&lt;br /&gt;
|=0||Silent.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;0||Initial information and convergence results.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;1||Output a line whenever the solution has improved, containing:&lt;br /&gt;
nIterations, nCuts, nCuts with criteria fulfilled, nLinearizations, nSpecialCuts, best solution.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;2||Output a line every iteration with the following information:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!label||description&lt;br /&gt;
|-&lt;br /&gt;
|It         ||Iterations&lt;br /&gt;
|-&lt;br /&gt;
|nECP       ||Number of extended cutting planes (ECP)&lt;br /&gt;
|-&lt;br /&gt;
|nAlpha&amp;gt;=lim||Number of ECP with criteria fulfilled&lt;br /&gt;
|-&lt;br /&gt;
|nL         ||Number of linearizations&lt;br /&gt;
|-&lt;br /&gt;
|nSECP      ||Number of special case ECP&amp;lt;br&amp;gt;(created from constraint on bound)&lt;br /&gt;
|-&lt;br /&gt;
|fIPMin     ||Objective of best solution at current iteration&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;3||Output a description of each step in the MINLP algorithm&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;4||Output additional numerical information in some algorithm steps&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;5||Output information in substeps (preprocessing, line search)&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOpt&#039;&#039;||Print level in sub-solvers,  see the documentation for the solver&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverMIP&#039;&#039;||Name of the solver used for MIP subproblems. If TOMLAB /gurobi is installed, gurobi is the default solver. If TOMLAB /CPLEX is installed, CPLEX is second choice as default. Otherwise the default solver is found calling GetSolver(&#039;mip&#039;,1); Supported as subsolvers are gurobi, CPLEX, mipSolve, milpSolve and cutplane.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems when SolverMIP == mipSolve&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure with parameters specific to mixed integer optimization. See the table below describing the fields used in the MIP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ECPMINLP&#039;&#039;||Structure with parameters specific to the ecpMINLP solver. See the table below describing the fields used in the ECPMINLP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below describing the fields used in the optParam structure.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|&#039;&#039;&#039;fields used in Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||ecpMINLP stops if the duality gap is less than DualGap&lt;br /&gt;
DualGap = 1, stop at first integer solution, e.g. DualGap = 0.01,stop if solution &amp;lt; 1% from optimal solution.&lt;br /&gt;
&amp;lt;br&amp;gt;The lower bound Prob.f_Low is used, (default -1.0e300), which can also be set by the user. If f_Low has not been changed from default the lower bound is obtained from the initial solution of a relaxed problem, but only when ECPMINLP.INIT_BND is 1 or 2 (default).&lt;br /&gt;
&amp;lt;br&amp;gt;Default DualGap is -1, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PPP&#039;&#039;||Pre-processing and probing, default is 0.&amp;lt;br&amp;gt;&lt;br /&gt;
0  Not used. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
1  Apply initially on MINLP problem.&amp;lt;br&amp;gt;&lt;br /&gt;
2  Apply each iteration before solving MILP subproblem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If nonzero, a rounding heuristics will be used on the initial NLP solution in order to obtain an initial integer solution. Requires ECPMINLP.INIT_BND enabled. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ECPMINLP structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with solver-specific options.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.ECPMINLP&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;beta&#039;&#039;||Multiplier when increasing alpha after an infeasible MILP solution. &lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for beta is 1.3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;gamma&#039;&#039;||Multiplier when increasing alpha when MILP solution does not violate any nonlinear contraints, but still does not decrease the upper bound of the objective.&lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for gamma is 2.0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PREALLOC&#039;&#039;||Flag enabling preallocation of memory for cutting planes and linearizations.&lt;br /&gt;
&amp;lt;br&amp;gt;0  No preallocation, dynamic growth of arrays. Current default.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Preallocate arrays.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;INIT_BND&#039;&#039;||Selects method for setting lower bound when f_Low not changed from default.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||method&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|0 ||No extra initial lower bound.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|1 ||Use default TOMLAB NLP solver on problem with relaxed integer constraints. Add a linearization if a feasible MINLP solution was found.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|2 ||Add an initial linearization as long as a feasdbile NLP solution was found. The linearization is a simple lower bound on the MILP objective. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|3 ||Same as 2, but also use the gradient in the linearization. This might improve the solution process for some problems where no solution can be found otherwise. But for many problems, using this initial linearization cuts off a feasbiel region and slows down or even hinders the solver completely. Recommended to only use as a last resort.&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SETTOL&#039;&#039;||Flag enabling changing tolerances, described below under optParam.eps_x, optParam.eps_x and optParam.eps_f.&lt;br /&gt;
&amp;lt;br&amp;gt;0  Default. Using the recommended solver default values, 1.0e-3.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Tolerances can be changed, taken from Prob.optParam.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;INTSOLLIM_INCR&#039;&#039;||Integer option when using CPLEX as MIP subsolver.&lt;br /&gt;
&amp;lt;br&amp;gt;Define how much the CPLEX parameter INTSOLLIM increases when a feasible solution is not optimal and all alpha values have met their criteria.&lt;br /&gt;
&amp;lt;br&amp;gt;If set to zero, optimal strategy will be used immediately instead, without any gradual increase of INTSOLLIM.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USECUTPOOL&#039;&#039;||Set nonzero to use a pool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&amp;lt;br&amp;gt;Cuts not active in the MILP-solution for CUTDELBND iterations in a row will be inactivated (removed from the MILP-problem) until they are violated in a new solution.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 0, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTDELBND&#039;&#039;||The number of consecutive times an extended cutting plane can be inactive before it gets removed and put into the inactive pool, if the option USECUTPOOL is set nonzero.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 15 times.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MAXITNOIMP&#039;&#039;||Limit on the number of successive iterations allowed without any improvements at all to neither objective nor solution point before the solver terminates&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 2.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USENLP&#039;&#039;||Set nonzero to use an NLP sub-solver on the original problem with the integer variables fixed at values from the latest MILP solution. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USERESELECT&#039;&#039;||Set nonzero to enable cut reselection heuristics. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SCALECUTS&#039;&#039;||Set nonzero to scale cuts before they are added to the MILP problem. Scaling is done by dividing the cut with its norm. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam Structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 1 also enables IterPrint, setting it to 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_x&#039;&#039;||Linear constraint violation convergence tolerance. Default is 2.0e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_g&#039;&#039;||Constraint violation convergence tolerance. Default is 1.0e-7&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_f&#039;&#039;||Optimality tolerance. Default is 1.0e-8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE:&#039;&#039; For the solver to use these tolerances, the flag &#039;&#039;ECPMINLP.SETTOL&#039;&#039; must be set to nonzero.&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &lt;br /&gt;
&amp;lt;br&amp;gt;0: Solution found, or integer solution with duality gap less than user tolerance.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Maximal number of iterations reached.&lt;br /&gt;
&amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;3: Problem in subsolver, see Inform value.&lt;br /&gt;
&amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &amp;gt; Prob.maxCPU&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Inform for ExitFlag != 3&lt;br /&gt;
&amp;lt;br&amp;gt;0: Global solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Local solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;2: No solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;gt;2: Inform value from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, max(0,fIPMin-fLB)/-fIPMin-, if fIPMin =0; max(0,fIPMin-fLB) if fIPMin == 0. If fIPMin   =0:  Scale with 100, 100*Dual- Gap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;ecpMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Algorithm==&lt;br /&gt;
ecpMINLP Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to MIP subproblem which is then solved by a subsolver in each iteration.&lt;br /&gt;
&lt;br /&gt;
The solver algorithm is mainly based on the paper &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, published in Optimization and Engineering 3, 253-280, 2002, with some modifications.&lt;br /&gt;
&lt;br /&gt;
Most prominent features in addition to the ones described in the main reference above are&lt;br /&gt;
* Solving the relaxed NLP problem initially to obtain a lower bound on the solution.&lt;br /&gt;
* A rounding heuristics performed on the initial NLP solution in order to obtain an initial upper bound on the initial solutions.&lt;br /&gt;
* Optional use of a cutpool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MultiMINLP&amp;diff=3084</id>
		<title>MultiMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MultiMINLP&amp;diff=3084"/>
		<updated>2014-10-09T14:39:19Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP]]}}&lt;br /&gt;
[[Category:Solvers]]&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
multiMINLP solves general constrained  mixed-integer global nonlinear optimization problems.&lt;br /&gt;
&lt;br /&gt;
It is aimed for problems where the number of integer combinations nMax is huge and relaxation of the integer constraint is possible.&lt;br /&gt;
&lt;br /&gt;
If no integer variables, multiMINLP calls multiMin. If nMax &#039;&#039;&amp;lt;&#039;&#039;= min(Prob.optParam.MaxFunc,5000), glcDirect is used. Otherwise, multiMINLP first finds a set M of local minima calling multiMin  with no integer restriction on any variable. The best local minimum is selected.  glcDirect is called to find the best integer feasible solution fIP in a small area (&#039;&#039;&amp;lt; &#039;&#039;+- 2 units) around the best local minimum found.&lt;br /&gt;
&lt;br /&gt;
The other local minima are pruned, if fOpt(i) &#039;&#039;&amp;gt; &#039;&#039;fIP, no integer feasible solution could be found close to this local minimum i.&lt;br /&gt;
&lt;br /&gt;
The area close to the remaining candidate local minima are searched one by one by calling glcDirect to find any fIPi &#039;&#039;&amp;lt; &#039;&#039;fIP.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;multiMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\&lt;br /&gt;
s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&lt;br /&gt;
&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&lt;br /&gt;
&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&lt;br /&gt;
&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt; . The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt;, the index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers.&lt;br /&gt;
&lt;br /&gt;
==Calling Syntax==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;multiMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Prob&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Problem description structure. The following fields are used:&lt;br /&gt;
|-&lt;br /&gt;
Prob is a structure, defined  as to solve a standard MINLP  problem. The Prob structure is fed to the localSolver. See e.g. minlpAssign.&lt;br /&gt;
&lt;br /&gt;
See multiMin  and glcDirect for input to the subsolvers e.g. Prob.xInit is used in multiMin (and fCut, RandState, xEQTol).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;x_L&#039;&#039;||Lower bounds for each element in x. If generating random points, -inf elements of x_L are set to min(-L,xMin,x  U-L) xMin is the minimum of the finite x_L values.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;x_U&#039;&#039;||Upper bounds for each element in x. If generating random points, inf elements of x_U are set to max(L,xMax,x L+L) xMax is the maximum of the finite x_U values.&lt;br /&gt;
&lt;br /&gt;
L is 100 for nonlinear least squares, otherwise 1000.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints. &lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;PriLev&#039;&#039;||Print Level:&lt;br /&gt;
&lt;br /&gt;
0 = Silent&lt;br /&gt;
&lt;br /&gt;
1 = Display 2 summary rows&lt;br /&gt;
&lt;br /&gt;
2 = Display some extra summary rows&lt;br /&gt;
&lt;br /&gt;
5 = Print level 1 in tomRun call&lt;br /&gt;
&lt;br /&gt;
6 = Print level 2 in tomRun call&lt;br /&gt;
&lt;br /&gt;
7 = Print level 3 in tomRun call&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xInit&#039;&#039;||Used in multiMin. See help for multiMin.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;GO.localSolver &#039;&#039;||The local solver used to run all local optimizations. Default is the license dependent output of GetSolver(&#039;con&#039;,1,0).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;optParam&#039;&#039;||Structure in Prob, Prob.optParam. Defines optimization parameters. Fields used:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MaxFunc&#039;&#039;||Max number of function evaluations in each subproblem&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;fGoal&#039;&#039;||Goal for function value f(x), if empty not used. If fGoal is reached, no further local optimizations are done&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;eps_f&#039;&#039;||Relative accuracy for function value, fTol == eps_f.  Stop if abs(f-fGoal) &#039;&#039;&amp;lt;&#039;&#039;= abs(fGoal) * fTol , if fGoal = 0. Stop if abs(f-fGoal) &#039;&#039;&amp;lt;&#039;&#039;= fTol , if fGoal ==0. Default 1e-8.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bTol&#039;&#039;||Linear constraint feasibility tolerance. Default 1e-6&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cTol&#039;&#039;||Nonlinear constraint feasibility tolerance. Default 1e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;MIP&#039;&#039;||Structure in Prob, Prob.MIP. Defines integer optimization parameters. Fields used:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. If islogical(IntVars) (=all  el- ements are 0/1),  then 1 = integer variable, 0 = continuous variable. If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;nMax&#039;&#039;||Number of integer combinations possible, if  empty multiMINLP computes nMax.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Rfac&#039;&#039;||Reduction factor for real variables in MINLP  subproblem  close to local multiMINLP minimum. Bounds set to x_L = max(x_L,x-Rfac*(x_U-x_L)) and x_U= min(x_U,x+Rfac*(x_U-x_L)). Default 0.25.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization. The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||||Result structure from the last good optimization step giving the best f(x) value, the possible global MINLP  minimum.&lt;br /&gt;
&lt;br /&gt;
The following fields in Result are changed by multiMINLP before return:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag&#039;&#039;||= 0 normal output, of if fGoal set and found.&lt;br /&gt;
&lt;br /&gt;
= 1 A solution reaching the user defined fGoal was not found.&lt;br /&gt;
&lt;br /&gt;
= 2 Unbounded problem.&lt;br /&gt;
&lt;br /&gt;
=4 Infeasible problem.&lt;br /&gt;
&lt;br /&gt;
The Solver, SolverAlgorithm and ExitText fields are also reset. &lt;br /&gt;
&lt;br /&gt;
A special field in Result is also returned, Result.multiMINLP:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xOpt&#039;&#039;||Prob.N x k matrix with k distinct  local optima, the test being norm(x k- xOpt(:,i)) &#039;&#039;&amp;lt;&#039;&#039;= xEqTol*max(1,norm(x k)) that if fulfilled assumes x_k to be to close to xOpt(:,i).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;fOpt&#039;&#039;||The k function values in the local optima xOpt(:,i),i=1,...,k.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||The Inform value returned by the local solver when finding each of the local optima xOpt(:,i);  i=1,...,k.  The Inform value can be used to judge the validity of the local minimum reported.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;localTry&#039;&#039;||Total number of local searches.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter&#039;&#039;||Total number of iterations.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;FuncEv&#039;&#039;||Total number of function evaluations. &lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;GradEv&#039;&#039;||Total number of gradient evaluations. &lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;HessEv&#039;&#039;||Total number of Hessian evaluations.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ConstrEv&#039;&#039;||Total number of constraint function evaluations.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving Inform information.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MultiMin&amp;diff=3083</id>
		<title>MultiMin</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MultiMin&amp;diff=3083"/>
		<updated>2014-10-09T14:39:05Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP]]}}&lt;br /&gt;
[[Category:Solvers]]&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
multiMin  solves general constrained  mixed-integer global optimization problems. It tries to find all local minima by a multi-start  method using a suitable nonlinear programming subsolver.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;multiMin  &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) &amp;amp;  &amp;amp;  &amp;amp;  &amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x    &amp;amp; \leq  &amp;amp; x_{U} \\&lt;br /&gt;
&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax   &amp;amp; \leq  &amp;amp; b_{U} \\&lt;br /&gt;
&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq  &amp;amp; c_{U} \\&lt;br /&gt;
&amp;amp;       &amp;amp;       &amp;amp; {x_i \in \mathbb{N} \; \forall i \in I} \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in \mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers.&lt;br /&gt;
&lt;br /&gt;
The integer components of every x_0 is rounded to the nearest integer value inside simple bounds, and these components are fixed during the nonlinear local search.&lt;br /&gt;
&lt;br /&gt;
If generating random points and there are linear constraints, multiMin  checks feasibility with respect to the linear constraints, and for each initial  point tries 100 times to get linear feasibility before accepting the initial  point.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = multiMin(Prob, xInit)&lt;br /&gt;
Result = tomRun(&#039;multiMin&#039;, Prob, PriLev) (driver call)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Prob&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Problem description structure. The following fields are used:&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;xInit&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Either, 1x1 number - The number of random initial  points, default 10*Prob.N dxm matrix - Every column is an initial  point (of length d=Prob.N). May also be set as Prob.xInit.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;fCut&#039;&#039;||If initial  f(x_0) &#039;&#039;&amp;gt; &#039;&#039;fCut, no local optimization is done.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;WarmStart&#039;&#039;||If true, &#039;&#039;&amp;gt; &#039;&#039;0, multiMin assumes the field multiMin  defined with the output from a previous run on the same problem. See the Output fields of Result.multiMin. Use WarmDefGLOBAL  to set the correct fields in the Prob structure.  Nec- essary fields are fOpt and xOpt. If any of the other fields are missing, the corresponding variables are initialized to 0. These other fields are: localTry, Iter, FuncEv, GradEv, HessEv, ConstrEv Inform (is set to zeros(length(fOpt,1) if not defined).&lt;br /&gt;
&lt;br /&gt;
In WarmDefGLOBAL the Result structure for the optimal run will be fed back to multiMin  as Prob.multiMin.ResOpt In case this field is not defined, and no better point is found during the runs, a special call to the localSolver is used to generate a proper Result structure.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;RandState&#039;&#039;||If &#039;&#039;WarmStart &#039;&#039;and isscalar(xInit), RandState is used as follows: If  &#039;&#039;&amp;gt; &#039;&#039;0, rand(&#039;state&#039;,RandState) is set to initialize the pseudo-random generator if &#039;&#039;&amp;lt; &#039;&#039;0, rand(&#039;state&#039;,sum(100*clock)) is set to give a new set of random values each run if RandState == 0, rand(&#039;state&#039;,) is not called Default RandState = -1&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;xEqTol&#039;&#039;||Tolerance to test if new point  x_k already defined as optimum: &#039;&#039;norm(xk - xOpt(:, i))&#039;&#039; &amp;lt;= &#039;&#039;xEqTol * max(1, norm(xk))&#039;&#039; If test fulfilled x_k is assumed to be too close to xOpt(:,i) Default xEqTol = 1E-5&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_L&#039;&#039;||Lower bounds for each element in x. If generating random points, -inf elements of x L are set to -10000.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;x_U&#039;&#039;||Upper bounds for each element in x. If generating random points, inf elements of x U are set to 10000.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;A&#039;&#039;||Constraint matrix for linear constraints. &lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;b_L&#039;&#039;||Lower bounds on the linear constraints. &lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;b_U&#039;&#039;||Upper bounds on the linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_L&#039;&#039;||Lower bounds on the general constraints.&lt;br /&gt;
|-&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;PriLevOpt&#039;&#039;||0 = silent.&lt;br /&gt;
&lt;br /&gt;
1 = Display one row for each unique local minima found. The minima are sorted, lowest value first (possibly the global minima)&lt;br /&gt;
&lt;br /&gt;
The following 4 information values are displayed:&lt;br /&gt;
# Order #&lt;br /&gt;
# Function value f(x) at local minima&lt;br /&gt;
# Point x at local minima. Only up to 10 values are displayed&lt;br /&gt;
# Inform value returned from local Solver (normally 0)&lt;br /&gt;
&lt;br /&gt;
2 = One row of output from each multiMin  local optimization trial&lt;br /&gt;
&lt;br /&gt;
The following 6 information values are displayed:&lt;br /&gt;
&lt;br /&gt;
# Step #&lt;br /&gt;
# Text Old (previously found local minima), FAIL (solver failed to verify local minima) or blank (solver success, new local minima found)&lt;br /&gt;
# Inform value from local solver&lt;br /&gt;
# f(x_0) - function value f(x_0) for initial  x_0&lt;br /&gt;
# f(x) - best f(x) value found in this local search&lt;br /&gt;
# x - point for which best f(x) value was found in this local search. Only up to 10 values are displayed.&lt;br /&gt;
&lt;br /&gt;
3 = tomRun (PrintResult)  output from every optimization, print level 1.&lt;br /&gt;
&lt;br /&gt;
4 = tomRun (PrintResult)  output from every optimization, print level 2. For constrained problems output  of sum(-constr-) and information if optimal point was accepted w.r.t.  feasibility.&lt;br /&gt;
&lt;br /&gt;
5 = tomRun (PrintResult)  output from every optimization, print level 3.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;GO&#039;&#039;||Structure in &#039;&#039;Prob&#039;&#039;, &#039;&#039;Prob.GO&#039;&#039;. Fields used:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;localSolver&#039;&#039;||The local solver used to run all local optimizations. Default is the license dependent output of GetSolver(&#039;con&#039;,1,0).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;optParam&#039;&#039;||Defines optimization parameters. Fields used:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;fGoal&#039;&#039;||Goal for function value f(x), if empty not used. If fGoal is reached, no further local optimizations are done.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;eps_f&#039;&#039;||Relative accuracy for function value, fTol == eps_f. Stop if abs(f-fGoal) &#039;&#039;&amp;lt;&#039;&#039;= abs(fGoal) * fTol , if fGoal  = 0. Stop if abs(f-fGoal) &#039;&#039;&amp;lt;&#039;&#039;= fTol , if fGoal ==0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;bTol&#039;&#039;||The local solver used to run all local optimizations. Default is the license dependent output of GetSolver(&#039;con&#039;,1,0).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;MIP.IntVars&#039;&#039;||Structure in Prob, Prob.MIP. If empty, all variables are assumed non-integer (LP problem). If &#039;&#039;length&#039;&#039;(&#039;&#039;I ntV ars&#039;&#039;) &#039;&#039;&amp;gt; &#039;&#039;1 ==&#039;&#039;&amp;gt; length&#039;&#039;(&#039;&#039;I ntV ars&#039;&#039;) == &#039;&#039;length&#039;&#039;(&#039;&#039;c&#039;&#039;) should hold.   Then &#039;&#039;I ntV ars&#039;&#039;(&#039;&#039;i&#039;&#039;)  == 1 ==&#039;&#039;&amp;gt; x&#039;&#039;(&#039;&#039;i&#039;&#039;)  integer. &#039;&#039;I ntV ars&#039;&#039;(&#039;&#039;i&#039;&#039;)  == 0 ==&#039;&#039;&amp;gt; x&#039;&#039;(&#039;&#039;i&#039;&#039;)  real.  If  &#039;&#039;length&#039;&#039;(&#039;&#039;I ntV ars&#039;&#039;)  &#039;&#039;&amp;lt; n&#039;&#039;, IntVars  is assumed to be a set of indices.  It is advised to number the integer values as the first variables, before the continuous. The tree search will then be done more efficiently.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;varargin&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Other parameters directly sent to low level routines.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization. The following fields are changed: &lt;br /&gt;
|-&lt;br /&gt;
|||colspan=&amp;quot;2&amp;quot;|The following fields in Result are changed by multiMin  before return:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag&#039;&#039;||= 0 normal output, of if fGoal set and found.&lt;br /&gt;
&lt;br /&gt;
= 1 A solution reaching the user defined fGoal was not found&lt;br /&gt;
|-&lt;br /&gt;
|||colspan=&amp;quot;2&amp;quot;|The Solver, SolverAlgorithm and ExitText  fields are also reset. &lt;br /&gt;
|-&lt;br /&gt;
|||colspan=&amp;quot;2&amp;quot;|A special field in Result is also returned, Result.multiMin:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;xOpt&#039;&#039;||Prob.N x k matrix with k distinct local optima, the test being &#039;&#039;norm&#039;&#039;(&#039;&#039;xk -xOpt&#039;&#039;(:&#039;&#039;, i&#039;&#039;)) &#039;&#039;&amp;lt;&#039;&#039;= &#039;&#039;xEqTol * max&#039;&#039;(1&#039;&#039;, norm&#039;&#039;(&#039;&#039;xk &#039;&#039;)) that if fulfilled assumes x_k to be to closeto xOpt(:,i)&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;fOpt&#039;&#039;||The k function values in the local optima xOpt(:,i),i=1,...,k.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||The Inform value returned by the local solver when finding each of the local optima xOpt(:,i);  i=1,...,k. The Inform value can be used to judge the validity of the local minimum reported.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;localTry&#039;&#039;||Total number of local searches.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter&#039;&#039;||Total number of iterations.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;FuncEv&#039;&#039;||Total number of function evaluations. &lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;GradEv&#039;&#039;||Total number of gradient evaluations. &lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;HessEv&#039;&#039;||Total number of Hessian evaluations.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ConstrEv&#039;&#039;||Total number of constraint function evaluations.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving ExitFlag and Inform information.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP&amp;diff=3082</id>
		<title>MIPNLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP&amp;diff=3082"/>
		<updated>2014-10-09T14:38:45Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
Welcome to the TOMLAB /MIPNLP User&#039;s Guide. TOMLAB /MIPNLP includes four solvers for mixed integer programming problems. The solvers take advantage of the wide array of subsolvers for LP, NLP and MILP in TOMLAB.&lt;br /&gt;
&lt;br /&gt;
The solver package includes the following solvers:&lt;br /&gt;
&lt;br /&gt;
[[multiMin]] - Solves general constrained mixed-integer global optimization problems. It tries to find all local minima by a multi-start method using a suitable nonlinear programming subsolver. &lt;br /&gt;
&lt;br /&gt;
[[multiMINLP]] - Solves general constrained mixed-integer global nonlinear optimization problems. It is aimed for problems where the number of integer combinations nMax is huge and relaxation of the integer constraint is possible.&lt;br /&gt;
&lt;br /&gt;
[[MIPNLP_ecpMINLP|ecpMINLP]] - Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to a MIP subproblem solved by a subsolver in each iteration. The solver algorithm is an implementation based on the publication &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, Optimization and Engineering 3, 253-280, 2002, but with modifications.&lt;br /&gt;
&lt;br /&gt;
[[MIPNLP_ecpMINLP|stoaMINLP]] - Single-search Tree Outer Approximation Solver for Mixed-Integer NonLinear Programming (MINLP). Is best suited for solving convex problems. The solver is mainly based on &#039;FilMINT: An Outer-Approximation-Based Solver for Nonlinear Mixed Integer Programs&#039; by Kumar Abhishek, Sven Leyffer, and Jeffrey T. Linderoth at the Mathematics and Computer Science Division, Preprint ANL/MCS-P1374-0906, March 28, 2008, but with some differences.&lt;br /&gt;
&lt;br /&gt;
==TOMLAB /MIPNLP Solver References==&lt;br /&gt;
&lt;br /&gt;
* [[multiMin]]&lt;br /&gt;
* [[MIPNLP_ecpMINLP|ecpMINLP]]&lt;br /&gt;
* [[MIPNLP_ecpMINLP|stoaMINLP]]&lt;br /&gt;
* [[MultiMINLP|multiMINLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP&amp;diff=3081</id>
		<title>MIPNLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP&amp;diff=3081"/>
		<updated>2014-10-09T14:36:49Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* TOMLAB /MIPNLP Solver References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP]]}}&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
Welcome to the TOMLAB /MIPNLP User&#039;s Guide. TOMLAB /MIPNLP includes four solvers for mixed integer programming problems. The solvers take advantage of the wide array of subsolvers for LP, NLP and MILP in TOMLAB.&lt;br /&gt;
&lt;br /&gt;
The solver package includes the following solvers:&lt;br /&gt;
&lt;br /&gt;
[[multiMin]] - Solves general constrained mixed-integer global optimization problems. It tries to find all local minima by a multi-start method using a suitable nonlinear programming subsolver. &lt;br /&gt;
&lt;br /&gt;
[[multiMINLP]] - Solves general constrained mixed-integer global nonlinear optimization problems. It is aimed for problems where the number of integer combinations nMax is huge and relaxation of the integer constraint is possible.&lt;br /&gt;
&lt;br /&gt;
[[MIPNLP_ecpMINLP|ecpMINLP]] - Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to a MIP subproblem solved by a subsolver in each iteration. The solver algorithm is an implementation based on the publication &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, Optimization and Engineering 3, 253-280, 2002, but with modifications.&lt;br /&gt;
&lt;br /&gt;
[[MIPNLP_ecpMINLP|stoaMINLP]] - Single-search Tree Outer Approximation Solver for Mixed-Integer NonLinear Programming (MINLP). Is best suited for solving convex problems. The solver is mainly based on &#039;FilMINT: An Outer-Approximation-Based Solver for Nonlinear Mixed Integer Programs&#039; by Kumar Abhishek, Sven Leyffer, and Jeffrey T. Linderoth at the Mathematics and Computer Science Division, Preprint ANL/MCS-P1374-0906, March 28, 2008, but with some differences.&lt;br /&gt;
&lt;br /&gt;
==TOMLAB /MIPNLP Solver References==&lt;br /&gt;
&lt;br /&gt;
* [[multiMin]]&lt;br /&gt;
* [[MIPNLP_ecpMINLP|ecpMINLP]]&lt;br /&gt;
* [[MIPNLP_ecpMINLP|stoaMINLP]]&lt;br /&gt;
* [[MultiMINLP|multiMINLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP&amp;diff=3080</id>
		<title>MIPNLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP&amp;diff=3080"/>
		<updated>2014-10-09T14:35:18Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: Created page with &amp;quot;{{Part Of Manual|title=the MIPNLP Manual|link=MIPNLP}} = Overview =  Welcome to the TOMLAB /MIPNLP User&amp;#039;s Guide. TOMLAB /MIPNLP includes four solvers for mixed integer...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP]]}}&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
Welcome to the TOMLAB /MIPNLP User&#039;s Guide. TOMLAB /MIPNLP includes four solvers for mixed integer programming problems. The solvers take advantage of the wide array of subsolvers for LP, NLP and MILP in TOMLAB.&lt;br /&gt;
&lt;br /&gt;
The solver package includes the following solvers:&lt;br /&gt;
&lt;br /&gt;
[[multiMin]] - Solves general constrained mixed-integer global optimization problems. It tries to find all local minima by a multi-start method using a suitable nonlinear programming subsolver. &lt;br /&gt;
&lt;br /&gt;
[[multiMINLP]] - Solves general constrained mixed-integer global nonlinear optimization problems. It is aimed for problems where the number of integer combinations nMax is huge and relaxation of the integer constraint is possible.&lt;br /&gt;
&lt;br /&gt;
[[MIPNLP_ecpMINLP|ecpMINLP]] - Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to a MIP subproblem solved by a subsolver in each iteration. The solver algorithm is an implementation based on the publication &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, Optimization and Engineering 3, 253-280, 2002, but with modifications.&lt;br /&gt;
&lt;br /&gt;
[[MIPNLP_ecpMINLP|stoaMINLP]] - Single-search Tree Outer Approximation Solver for Mixed-Integer NonLinear Programming (MINLP). Is best suited for solving convex problems. The solver is mainly based on &#039;FilMINT: An Outer-Approximation-Based Solver for Nonlinear Mixed Integer Programs&#039; by Kumar Abhishek, Sven Leyffer, and Jeffrey T. Linderoth at the Mathematics and Computer Science Division, Preprint ANL/MCS-P1374-0906, March 28, 2008, but with some differences.&lt;br /&gt;
&lt;br /&gt;
==TOMLAB /MIPNLP Solver References==&lt;br /&gt;
&lt;br /&gt;
* [[multiMin]]&lt;br /&gt;
* [[MIPNLP_ecpMINLP|ecpMINLP]]&lt;br /&gt;
* [[MIPNLP_ecpMINLP|stoaMINLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MINLP&amp;diff=3079</id>
		<title>MINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MINLP&amp;diff=3079"/>
		<updated>2014-10-09T14:25:32Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
Welcome to the TOMLAB /MINLP User&#039;s Guide.  TOMLAB /MINLP includes a suite of 4 solvers in dense and sparse version and interfaces between  The MathWorks&#039;  MATLAB and the MINLP  solver package. The  solver package includes the following solvers:&lt;br /&gt;
&lt;br /&gt;
bqpd - For sparse and dense linear and quadratic programming (nonconvex). &lt;br /&gt;
&lt;br /&gt;
filterSQP - For sparse and dense linear, quadratic and nonlinear programming.&lt;br /&gt;
&lt;br /&gt;
minlpBB - For sparse and dense mixed-integer linear, quadratic and nonlinear programming. &lt;br /&gt;
&lt;br /&gt;
miqpBB - For sparse and dense mixed-integer linear and quadratic.&lt;br /&gt;
&lt;br /&gt;
Please visit [http://tomopt.com/tomlab/products/minlp/ http://tomopt.com/tomlab/products/minlp/] for more information.&lt;br /&gt;
&lt;br /&gt;
The interface  between  TOMLAB /MINLP, Matlab and TOMLAB consists of two  layers.  The first  layer gives direct access from Matlab to MINLP,  via calling one Matlab function that calls a pre-compiled MEX file (DLL under Windows, shared library  in UNIX)  that defines and solves the problem in MINLP. The second layer is a Matlab function that takes the input in the TOMLAB format, and calls the first layer function.  On return the function creates the output in the TOMLAB format.&lt;br /&gt;
&lt;br /&gt;
===Contents of this Manual===&lt;br /&gt;
&lt;br /&gt;
*[[MINLP Using the Matlab Interface|Using the Matlab Interface]] gives the basic information needed to run the Matlab interface.&lt;br /&gt;
*[[MINLP Solver Reference|Solver Reference]] provides all the solver references for bqpd, filterSQP, minlpBB, and miqpBB.&lt;br /&gt;
*[[MINLP the DUNDEE structure|the DUNDEE structure]] presents the fields used in the special structure &#039;&#039;Prob.DUNDEE&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In this manual we assume that the user is familiar with MINLP,  TOMLAB and the Matlab language.&lt;br /&gt;
&lt;br /&gt;
==Using the Matlab Interface==&lt;br /&gt;
&lt;br /&gt;
*[[MINLP Using the Matlab Interface|Using the Matlab Interface]]&lt;br /&gt;
&lt;br /&gt;
==TOMLAB /MINLP Solver Reference==&lt;br /&gt;
&lt;br /&gt;
*[[MINLP Solver Reference|Solver Reference]]&lt;br /&gt;
&lt;br /&gt;
==the DUNDEE structure==&lt;br /&gt;
&lt;br /&gt;
*[[MINLP the DUNDEE structure|the DUNDEE structure]]&lt;br /&gt;
&lt;br /&gt;
==Algorithmic description==&lt;br /&gt;
&lt;br /&gt;
*[[MINLP Algorithmic description|Algorithmic description]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MISQP&amp;diff=3078</id>
		<title>MISQP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MISQP&amp;diff=3078"/>
		<updated>2014-10-09T13:54:31Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
===Overview===&lt;br /&gt;
&lt;br /&gt;
Welcome to the TOMLAB /MISQP User&#039;s Guide. TOMLAB /MISQP includes the MISQP and MIQL solvers from Klaus Schittkowski and an interface to The MathWorks&#039; MATLAB.&lt;br /&gt;
&lt;br /&gt;
MISQP solves mixed-integer nonlinear mathematical programming problems with equality and inequality constraints. It is assumed that integer variables have a &#039;&#039;smooth&#039;&#039; influence on the model functions, i.e., that function values do not change drastically when in- or decrementing an integer value.&lt;br /&gt;
&lt;br /&gt;
The internal algorithm uses a modified sequential quadratic approximation method, stabilized by a trust region method including Yuan&#039;s second order corrections. The Hessian of the Lagrangian function is approximated by BFGS updates subject to the continous and integer variables.&lt;br /&gt;
&lt;br /&gt;
MIQL solves strictly convex mixed-integer quadratic mathematical programming problems with linear equality and inequality constraints. The mixed-integer problem is solved by a branch-and-cut algorithm.&lt;br /&gt;
&lt;br /&gt;
===Contents of this Manual===&lt;br /&gt;
&lt;br /&gt;
*[[#Introduction]] provides a basic overview of the TOMLAB /MISQP solver package.&lt;br /&gt;
*[[#Using the Matlab Interface]] provides an overview of the Matlab interface to MISQP.&lt;br /&gt;
*[[#Setting MISQP Options]] describes how to set MISQP solver options from Matlab.&lt;br /&gt;
*[[#MISQP Solver Reference]] gives detailed information about the interface routine misqpTL.&lt;br /&gt;
*[[#MIQL Solver Reference]] gives detailed information about the interface routine miqlTL.&lt;br /&gt;
*[[#QL Solver Reference]] gives detailed information about the interface routine qlTL.&lt;br /&gt;
&lt;br /&gt;
===More information===&lt;br /&gt;
&lt;br /&gt;
Please visit the following links for more information:&lt;br /&gt;
* [http://tomopt.com/tomlab/products/misqp/ http://tomopt.com/tomlab/products/misqp/]&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In this manual we assume that the user is familiar with mixed-integer nonlinear programming, setting up problems in TOMLAB (in particular unconstrained and constrained mixed-integer  nonlinear programming (&#039;&#039;&#039;minlp&#039;&#039;&#039;) problems) and the Matlab language in general.&lt;br /&gt;
&lt;br /&gt;
==Using the Matlab Interface==&lt;br /&gt;
&lt;br /&gt;
The MISQP solver is accessed via the &#039;&#039;tomRun &#039;&#039;driver routine, which calls the &#039;&#039;misqpTL &#039;&#039;interface routine. The solver itself is located in the MEX file &#039;&#039;misqp&#039;&#039;. The same applies for the other two solvers.&lt;br /&gt;
&lt;br /&gt;
Observe that &#039;&#039;miqpAssign&#039;&#039; should be used when defining the problem for MIQL and &#039;&#039;qpAssign&#039;&#039; for QL.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function||Description&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;misqpTL&#039;&#039;||The interface routine called by the TOMLAB  driver routine &#039;&#039;tomRun&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This routine then calls the MEX file &#039;&#039;misqp&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;miqlTL&#039;&#039;||The interface routine called by the TOMLAB  driver routine &#039;&#039;tomRun&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This routine then calls the MEX file &#039;&#039;miql&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;qlTL&#039;&#039;||The interface routine called by the TOMLAB  driver routine &#039;&#039;tomRun&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This routine then calls the MEX file &#039;&#039;ql&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Setting MISQP Options==&lt;br /&gt;
&lt;br /&gt;
All MISQP control parameters are possible to set from Matlab.&lt;br /&gt;
&lt;br /&gt;
===Setting options using the Prob.MISQP structure===&lt;br /&gt;
&lt;br /&gt;
The parameters can be set as subfields in the &#039;&#039;Prob.MISQP &#039;&#039;structure. The following example shows how to set a limit on the maximum number of iterations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;font-size: 12px&amp;quot;&amp;gt;&lt;br /&gt;
Prob = minlpAssign(...)   %   Setup problem,  see help minlpAssign for more information&lt;br /&gt;
Prob.MISQP.maxit = 2000;  %   Setting maximum number of iterations&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The maximum number of iterations can also be done through the TOMLAB parameter &#039;&#039;MaxIter&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;font-size: 12px&amp;quot;&amp;gt;&lt;br /&gt;
Prob.optParam.MaxIter = 200;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
A complete description of the available MISQP parameters can be found in [[#misqpTL]].&lt;br /&gt;
&lt;br /&gt;
===Setting options using the Prob.MIQL structure===&lt;br /&gt;
&lt;br /&gt;
Options can be set for MIQL in the same way as for MISQP as described above in [[#Setting options using the Prob.MISQP structure]].&lt;br /&gt;
The only difference is in the name of the structure (MIQL instead of MISQP) and the assign-routine (miqpAssign instead of minlpAssign).&lt;br /&gt;
&lt;br /&gt;
===Setting options using the Prob.QL structure===&lt;br /&gt;
&lt;br /&gt;
Options can be set for QL in the same way as for MISQP as described above in [[#Setting options using the Prob.MISQP structure]].&lt;br /&gt;
The only difference is in the name of the structure (QL instead of MISQP) and the assign-routine (qpAssign instead of minlpAssign).&lt;br /&gt;
&lt;br /&gt;
==MISQP Solver References==&lt;br /&gt;
&lt;br /&gt;
====Table: Solver routines in TOMLAB /MISQP.====&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function||Description||Reference&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ql&#039;&#039;||Quadratic programming using a primal-dual method with cholesky decomposition.||&#039;&#039;qlTL.m&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;miql&#039;&#039;||Mixed-integer quadratic programming using a branch-and-cut method with &#039;&#039;ql&#039;&#039; as subsolver.||&#039;&#039;miqlTL.m&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;misqp&#039;&#039;||Constrained, mixed-integer nonlinear minimization using a sequential quadratic approximation method. &#039;&#039;miql&#039;&#039; is used as MIQP subsolver.||&#039;&#039;misqpTL.m&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A detailed description of the TOMLAB /MISQP solver interfaces is given below. Also see the M-file help for &#039;&#039;misqpTL.m&#039;&#039;, &#039;&#039;miqlTL.m&#039;&#039; and &#039;&#039;qlTL.m&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===misqpTL===&lt;br /&gt;
&lt;br /&gt;
====Purpose====&lt;br /&gt;
&lt;br /&gt;
Solves mixed-integer nonlinear optimization problems.&lt;br /&gt;
&lt;br /&gt;
MISQP solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\ &lt;br /&gt;
&amp;amp; \\&lt;br /&gt;
s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x    &amp;amp; \leq  &amp;amp; x_{U} \\ &lt;br /&gt;
&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax   &amp;amp; \leq  &amp;amp; b_{U} \\ &lt;br /&gt;
&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x)    &amp;amp; \leq  &amp;amp; c_{U}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{1}\times n}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in \mathbb{R} ^{m_{2}}&amp;lt;/math&amp;gt;, Furthermore, &amp;lt;math&amp;gt;x_i,\, i\in\mathbb{I}&amp;lt;/math&amp;gt; are restricted to integer values only.&lt;br /&gt;
&lt;br /&gt;
====Calling Syntax====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;font-size: 12px&amp;quot;&amp;gt;&lt;br /&gt;
Prob = minlpAssign( ... );&lt;br /&gt;
Result = tomRun(&#039;misqp&#039;,Prob,...);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Description of Inputs====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Prob	&#039;&#039;Problem description structure. The following fields are used:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Field||Description&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;x_L, x_U&#039;&#039;||Bounds on variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;b_L, b_U&#039;&#039;||Bounds on linear constraints.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||Linear constraint matrix.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOpt&#039;&#039;||Print Level in solver&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIP.IntVars&#039;&#039;||If empty, all variables are assumed non-integer&lt;br /&gt;
&lt;br /&gt;
If islogical(IntVars) (i.e. all elements are 0/1), then 1 = integer variable, 0 = continuous variable.&lt;br /&gt;
&lt;br /&gt;
If any element &amp;gt;1, IntVars is the indices for integer variables&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.PrintFile &#039;&#039;||Name of MISQP print file. Amount and type of printing determined by PriLevOpt. Default name &#039;&#039;misqp_printfile.txt&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.maxit&#039;&#039;||Maximum number of outer iterations, where one iteration corresponds to one formulation and solution of the quadratic programming subproblem, or, alternatively, one evaluation of gradients (default is to use optParam.MaxIter if set, otherwise set maxit to 1000).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.mnfs&#039;&#039;||Maximum number of feasible steps without improvements, where the relative change of objective function values is measured by acc and feasibility is measured by sqrt(acc), must be greater than 1 (default maxit).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.maxnde&#039;&#039;||Maximum number of branch-and-bound steps for solving MIQP. Default is (2*n+m+4)^2, where n is the number of variables and m is the number of constraints.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.nonmon&#039;&#039;||Maximum number of successive iterations, which are to be considered for the non-monotone trust region algorithm (default 2).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.acc&#039;&#039;||Desired final accuracy. The termination accuracy should not be smaller than the accuracy by which gradients are computed. If acc&amp;lt;=0, the machine precision is computed by MISQP and subsequently multiplied by 1.0e4 (default 1e-6).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.accqp&#039;&#039;||The tolerance is needed for the QP solver to perform several tests, for example whether optimality conditions are satisfied or whether a number is considered as zero or not. If accqp is less or equal to zero, then the machine precision is computed by MISQP and subsequently multiplied by 1.0E4 (default 1e-9).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.rpen&#039;&#039;||Factor for increasing a penalty parameter (sigma), must be greater than one (default 10).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.dltdec&#039;&#039;||Factor for decreasing the internal descent parameter DELTA. dltdec must be less than than one (default 0.1).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.sigma&#039;&#039;||Initial penalty parameter, greater than one (default 1000).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.delta&#039;&#039;||Initial scaling parameter (default 0.05).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.trustc&#039;&#039;||Initial trust region radius for continuous variables, must be greater than or equal to one (default 10.0).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.trusti&#039;&#039;||Initial trust region radius for integer variables (default 10.0).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.scbnd&#039;&#039;||Scaling bound in case of fscale=1, i.e., function values are scaled only if their absolute initial values are greater than the bound (default 1.0).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.mrs&#039;&#039;||Maximum number of internal restarts without improving solution. Setting might lead to better results, but increases the number of function evaluations. The value must be less than 15 (default 2).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.fscale&#039;&#039;||MISQP internally scales function values.&lt;br /&gt;
&lt;br /&gt;
0 - No scaling.&lt;br /&gt;
&lt;br /&gt;
1 - Subject to their absolute values, if greater than 1.0 or scbnd, respectively (default).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.scale&#039;&#039;||MISQP internally scales continuous variables.&lt;br /&gt;
&lt;br /&gt;
0 - No scaling.&lt;br /&gt;
&lt;br /&gt;
1 - Scaling enabled (default).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.bmod&#039;&#039;||MISQP modifies the Hessian approximation in order to get more accurate search directions. Calculation time is increased in case of integer variables. &lt;br /&gt;
&lt;br /&gt;
0 - No modification&lt;br /&gt;
&lt;br /&gt;
1 - (default 1).&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;||&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Options for the MIQP subsolver MIQL:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.iprqp&#039;&#039;||Print level of subsolver MIQL (default 0).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.ibr&#039;&#039;||Branching rule for MIQP subproblem&lt;br /&gt;
1 - Maximal fractional branching (default).&lt;br /&gt;
&lt;br /&gt;
2 - Minimal fractional branching.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.ins&#039;&#039;||Node selection rule for MIQP subproblem.&lt;br /&gt;
1 - Best of all.&lt;br /&gt;
&lt;br /&gt;
2 - Best of two.&lt;br /&gt;
&lt;br /&gt;
3 - Depth first (default). &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.wstart&#039;&#039;||Maximal number of successive warmstarts. Default 100.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.impb&#039;&#039;||Set nonzero to calculate improved bounds when Best-of-All node selection strategy is used (default 0).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.dfdir&#039;&#039;||Set nonzero to select direction for Depth-First according to value of Lagrange function (default 0).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.cholm&#039;&#039;||Cholesky decomposition mode.&lt;br /&gt;
&lt;br /&gt;
0 - Calculate Cholesky decomposition once and reuse it.&lt;br /&gt;
&lt;br /&gt;
1 - Calculate new Cholesky decomposition whenever warmstart is not active (default).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.cut&#039;&#039;||Control the cutting process.&lt;br /&gt;
0 - No cuts (default).&lt;br /&gt;
&lt;br /&gt;
1 - Use disjunctive cuts only.&lt;br /&gt;
&lt;br /&gt;
2 - Complemented mixed integer rounding (CMIR) cuts only.&lt;br /&gt;
&lt;br /&gt;
3 - Both disjunctive cuts and CMIR cuts.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.maxdc&#039;&#039;||Maximal number of rounds for disjunctive cuts. Default 5.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.maxcm&#039;&#039;||Maximal number of cuts for CMIR cuts. Default 5.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MISQP.phm&#039;&#039;||Primal heuristic mode.&lt;br /&gt;
&lt;br /&gt;
0 - No primal heuristics (default).&lt;br /&gt;
&lt;br /&gt;
1 - Nearest integer.&lt;br /&gt;
&lt;br /&gt;
2 - Feasibility pump.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Description of Outputs====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Result&#039;&#039; Structure with result from optimization. The following fields are set:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Output||Description&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Result&#039;&#039;||The structure with results (see ResultDef.m).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;x_k&#039;&#039;||Solution vector.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;x_0&#039;&#039;||Initial solution vector.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;g_k&#039;&#039;||Gradient of the objective function.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;c_k&#039;&#039;||Nonlinear constraint residuals.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;cJac&#039;&#039;||Nonlinear constraint gradients.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xState&#039;&#039;||State of variables. Free == 0; On lower == 1; On upper == 2; Fixed == 3;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;bState&#039;&#039;||State of linear constraints.  Free == 0; Lower == 1; Upper == 2; Equality == 3;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;cState&#039;&#039;||State of nonlinear constraints.  Free == 0; Lower == 1; Upper == 2; Equality == 3;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ExitFlag&#039;&#039;||Exit status from misqp.m (similar to TOMLAB).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ExitText&#039;&#039;||Exit text from solver.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Inform&#039;&#039;||MISQP information parameter.&lt;br /&gt;
&lt;br /&gt;
0 - The optimality conditions are satisfied.&lt;br /&gt;
&lt;br /&gt;
1 - Termination after maxit iterations.&lt;br /&gt;
&lt;br /&gt;
2 - Trust region radius lower than termination tolerance of the QP solver.&lt;br /&gt;
&lt;br /&gt;
3 - Penalty parameter sigma tends to infinity.&lt;br /&gt;
&lt;br /&gt;
4 - Termination at infeasible iterate.&lt;br /&gt;
&lt;br /&gt;
5 - Termination with zero trust region for integer variables.&lt;br /&gt;
&lt;br /&gt;
6 - Length of a working array is too short.&lt;br /&gt;
&lt;br /&gt;
7 - There are false dimensions.&lt;br /&gt;
&lt;br /&gt;
8 - Lower or upper bound of variable violates initial value.&lt;br /&gt;
&lt;br /&gt;
9 - Linear constraints are inconsistent.&lt;br /&gt;
&lt;br /&gt;
11 - QL could not solver the QP after 40*(n+m) iterations.&lt;br /&gt;
&lt;br /&gt;
12 - The termination accuracy is insufficient for QL.&lt;br /&gt;
&lt;br /&gt;
13 - QL terminated due to internal inconsistency, division by zero.&lt;br /&gt;
&lt;br /&gt;
14 - Numerical instabilities in QL.&lt;br /&gt;
&lt;br /&gt;
15 - More than mnfs steps without improvements of feasible function values.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; 90 - QP sub problem error.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;FuncEv&#039;&#039;||Number of function evaluations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;GradEv&#039;&#039;||Number of gradient evaluations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;ConstrEv&#039;&#039;||Number of constraint evaluations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;QP.B&#039;&#039;||Basis vector in TOMLAB QP standard.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Solver&#039;&#039;||Name of solver (misqp).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverAlgorithm&#039;&#039;||Description of the solver.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===miqlTL===&lt;br /&gt;
====Purpose====&lt;br /&gt;
&lt;br /&gt;
Solves strictly convex mixed-integer quadratic programming problems.&lt;br /&gt;
&lt;br /&gt;
MIQL solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) = \frac{1}{2} x^T F x + c^T x\\&lt;br /&gt;
&amp;amp; \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{lcccl}&lt;br /&gt;
x_{L} &amp;amp; \leq &amp;amp; x &amp;amp; \leq &amp;amp; x_{U} \\&lt;br /&gt;
b_{L} &amp;amp; \leq  &amp;amp; A x  &amp;amp; \leq &amp;amp; b_{U} \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;c, x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;F \in \mathbb{R}^{n \times n}&amp;lt;/math&amp;gt; and positive definite, &amp;lt;math&amp;gt;A \in \mathbb{R}^{m_1 \times n}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;b_L,b_U \in \mathbb{R}^{m_1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt;, the index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt;, are restricted to be integers.&lt;br /&gt;
&lt;br /&gt;
If F is empty, an LP or MILP  problem is solved.&lt;br /&gt;
&lt;br /&gt;
====Calling Syntax====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;font-size: 12px&amp;quot;&amp;gt;&lt;br /&gt;
Prob = miqpAssign( ... );&lt;br /&gt;
Result = tomRun(&#039;miql&#039;,Prob,...);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Description of Inputs====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Prob	&#039;&#039;Problem description structure. The following fields are used:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Field||Description&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;x_L, x_U&#039;&#039;||Bounds on variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;b_L, b_U&#039;&#039;||Bounds on linear constraints.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||Linear constraint matrix.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;QP.c &#039;&#039;||Linear coefficients in objective function.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;QP.F &#039;&#039;||Quadratic matrix of size n x n.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOpt&#039;&#039;||Print Level in solver (0-4)&lt;br /&gt;
0 - No output. Default&lt;br /&gt;
&lt;br /&gt;
1 - Root QP and final performance summary.&lt;br /&gt;
&lt;br /&gt;
2 - Additional branch and bound iterations counter.&lt;br /&gt;
&lt;br /&gt;
3 - Additional total output from all generated subproblems.&lt;br /&gt;
&lt;br /&gt;
4 - Additional formal details.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIP.IntVars&#039;&#039;||Vector of indices of the integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.PrintFile &#039;&#039;||Name of MIQL print file. Amount and type of printing determined by PriLevOpt. Default name &#039;&#039;miql.txt&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.eps&#039;&#039;||Desired final accuracy. The parameter value should not be smaller than the underlying machine precision.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.acc&#039;&#039;||The accuracy to identify integer values for integer variables. If acc is less than machine precision, e.g., acc = 0, then acc is set to the machine precision.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.ibr&#039;&#039;||Branching rule&lt;br /&gt;
1 - Maximal fractional branching (default).&lt;br /&gt;
&lt;br /&gt;
2 - Minimal fractional branching.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.ins&#039;&#039;||Node selection strategy&lt;br /&gt;
1 - Best of all (large search trees) (default).&lt;br /&gt;
&lt;br /&gt;
2 - Best of two (warmstarts, less memory for search tree.)&lt;br /&gt;
&lt;br /&gt;
3 - Depth first (good warmstarts, smallest memory, many QPs.) &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.maxnde&#039;&#039;||Maximal number of nodes, e.g., 100,000. &lt;br /&gt;
Default: (2*n + 2*m + 6)^2 for cut == 1,3), (2*n + m + 4)^2 otherwise.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.wstart&#039;&#039;||Maximal number of successive warmstarts to avoid numerical instabilities. Default 100.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.impb&#039;&#039;||1 - Calculate improved bounds when best-of-all node selection strategy (ins = 1) is used.&lt;br /&gt;
&lt;br /&gt;
0 - Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.dfdir&#039;&#039;||1    Select direction for depth-first node selection strategy (ins = 3) according to value of Lagrange function.&lt;br /&gt;
&lt;br /&gt;
0 - Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.cholm&#039;&#039;||Cholesky decomposition mode.&lt;br /&gt;
&lt;br /&gt;
0 - Calculate Cholesky decomposition once and reuse it.&lt;br /&gt;
&lt;br /&gt;
1 - Calculate new Cholesky decomposition whenever warmstart is not active. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.cut&#039;&#039;||Control the cutting process.&lt;br /&gt;
0 - No cuts. Default&lt;br /&gt;
&lt;br /&gt;
1 - Use disjunctive cuts only.&lt;br /&gt;
&lt;br /&gt;
2 - Complemented mixed integer rounding (CMIR) cuts only.&lt;br /&gt;
&lt;br /&gt;
3 - Both disjunctive cuts and CMIR cuts.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.maxdc&#039;&#039;||Maximal number of rounds for disjunctive cuts. Default 1, if disjunctive cuts should be generated.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.maxcm&#039;&#039;||Maximal number of cuts for CMIR cuts. Default 1, if CMIR cuts should be generated.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.phm&#039;&#039;||Primal heuristic mode.&lt;br /&gt;
&lt;br /&gt;
0 - No primal heuristics. Default&lt;br /&gt;
&lt;br /&gt;
1 - Nearest integer.&lt;br /&gt;
&lt;br /&gt;
2 - Feasibility pump.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Description of Outputs====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Result&#039;&#039; Structure with result from optimization. The following fields are set:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Output||Description&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Result&#039;&#039;||The structure with results (see ResultDef.m).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;x_k&#039;&#039;||Solution vector.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;x_0&#039;&#039;||Initial solution vector.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;g_k&#039;&#039;||Exact gradient computed at optimum.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xState&#039;&#039;||State of variables. Free == 0; On lower == 1; On upper == 2; Fixed == 3;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;bState&#039;&#039;||State of linear constraints.  Free == 0; Lower == 1; Upper == 2; Equality == 3;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;v_k&#039;&#039;||Lagrangian multipliers (for bounds + dual solution vector).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ExitFlag&#039;&#039;||Exit status from miql.m (similar to TOMLAB).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Inform&#039;&#039;||MIQL information parameter.&lt;br /&gt;
&lt;br /&gt;
-4 - Branch and Bound root QP could not be solved.&lt;br /&gt;
&lt;br /&gt;
-3 - Relaxed QP without feasible solution.&lt;br /&gt;
&lt;br /&gt;
-2 - A feasible solution could not be computed by maxnde subproblems.&lt;br /&gt;
&lt;br /&gt;
-1 - A feasible solution does not exist.&lt;br /&gt;
&lt;br /&gt;
0 - The optimal solution is found.&lt;br /&gt;
&lt;br /&gt;
1 - A feasible solution is found, but tree search is terminated because of reaching maxnde nodes.&lt;br /&gt;
&lt;br /&gt;
2 - Index in Prob.MIP.intVars out of bounds.&lt;br /&gt;
&lt;br /&gt;
3 - Internal inconsistency of continuous QP.&lt;br /&gt;
&lt;br /&gt;
4 - Length of a work array is too short.&lt;br /&gt;
&lt;br /&gt;
5 - Sizes are incorrectly set.&lt;br /&gt;
&lt;br /&gt;
6 - An integer option for Branch and Bound is incorrectly set.&lt;br /&gt;
&lt;br /&gt;
7 - Independent Lagrangian multipliers could not be calculated, working arrays are too small, increase maxnde.&lt;br /&gt;
&lt;br /&gt;
8 - Print file or print level is incorrectly set.&lt;br /&gt;
&lt;br /&gt;
9 - Lower variable bound greater than upper variable bound.&lt;br /&gt;
&lt;br /&gt;
11 - Subsolver QL could not solve QP after a maximal number of 40*(n+m) iterations.&lt;br /&gt;
&lt;br /&gt;
12 - The termination accuracy is insufficient for QL to satisfy its convergence criteria.&lt;br /&gt;
&lt;br /&gt;
13 - QL terminated due to an internal inconsistency, e.g., division by zero.&lt;br /&gt;
&lt;br /&gt;
14 - Numerical instabilities prevent successful termination of QL.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; 90 - Constraints are inconsistent and constraint number Inform - 100 is causing the conflict. The problem has no feasible solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rc&#039;&#039;||Reduced costs. If ninf=0, last m == -v_k.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Iter&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;FuncEv&#039;&#039;||Number of function evaluations.  Set to Iter. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;GradEv&#039;&#039;||Number of gradient evaluations. Set to Iter.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;ConstrEv&#039;&#039;||Number of constraint evaluations.  Set to 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;QP.B&#039;&#039;||Basis vector in TOMLAB QP standard.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MinorIter&#039;&#039;||Number of minor iterations. NOT SET.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Solver&#039;&#039;||Name of solver (miql).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverAlgorithm&#039;&#039;||Description of the solver.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.cutges&#039;&#039;||Total number of cutting planes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.nodes&#039;&#039;||Total number of branch and bound nodes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.ctime&#039;&#039;||Time spent generating cutting planes.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.bbtime&#039;&#039;||Time spent for branch and bound process.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.cutgap&#039;&#039;||Gap reduced by cutting planes compared to original relaxed solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.rlxopt&#039;&#039;||Relaxed optimal value.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIQL.gencut&#039;&#039;||Nonzero if cuts were generated.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===qlTL===&lt;br /&gt;
&lt;br /&gt;
====Purpose====&lt;br /&gt;
Solves strictly convex quadratic programming problems.&lt;br /&gt;
&lt;br /&gt;
QL solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) = \frac{1}{2} x^T F x + c^T x\\&lt;br /&gt;
&amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{lcccl}&lt;br /&gt;
x_{L} &amp;amp; \leq &amp;amp; x &amp;amp; \leq &amp;amp; x_{U} \\&lt;br /&gt;
b_{L} &amp;amp; \leq  &amp;amp; A x  &amp;amp; \leq &amp;amp; b_{U} \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;c, x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;F \in \mathbb{R}^{n \times n}&amp;lt;/math&amp;gt; and positive definite,&lt;br /&gt;
&amp;lt;math&amp;gt;A \in \mathbb{R}^{m_1 \times n}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;b_L,b_U \in \mathbb{R}^{m_1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Calling Syntax====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;font-size: 12px&amp;quot;&amp;gt;&lt;br /&gt;
Prob = qpAssign( ... );&lt;br /&gt;
Result = tomRun(&#039;ql&#039;,Prob,...);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Description of Inputs====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Prob	&#039;&#039;Problem description structure. The following fields are used:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Field||Description&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;x_L, x_U&#039;&#039;||Bounds on variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;b_L, b_U&#039;&#039;||Bounds on linear constraints.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||Linear constraint matrix.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;QP.c	&#039;&#039;||Linear coefficients in objective function.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;QP.F &#039;&#039;||Quadratic matrix of size n x n.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOpt&#039;&#039;||Print Level in solver (0 = off, 1 = only final error message).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;QL.eps&#039;&#039;||Desired final accuracy. The parameter value should not be smaller than the underlying machine precision.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;QL.PrintFile &#039;&#039;||Name of print file. Amount/print type determined by optPar(1). Default name &#039;&#039;ql.txt&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Description of Outputs====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Result&#039;&#039; Structure with result from optimization. The following fields are set:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Output||Description&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Result&#039;&#039;||The structure with results (see ResultDef.m).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;x_k&#039;&#039;||Solution vector.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;x_0&#039;&#039;||Initial solution vector.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;g_k&#039;&#039;||Exact gradient computed at optimum.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xState&#039;&#039;||State of variables. Free == 0; On lower == 1; On upper == 2; Fixed == 3;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;bState&#039;&#039;||State of linear constraints.  Free == 0; Lower == 1; Upper == 2; Equality == 3;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;v_k&#039;&#039;||Lagrangian multipliers (for bounds + dual solution vector).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ExitFlag&#039;&#039;||Exit status from ql.m (similar to TOMLAB).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Inform&#039;&#039;||QL information parameter.&lt;br /&gt;
&lt;br /&gt;
0 - Optimal solution with unique minimizer found&lt;br /&gt;
&lt;br /&gt;
1 - Too many iterations&lt;br /&gt;
&lt;br /&gt;
2 - Accuracy insufficient to attain convergence&lt;br /&gt;
&lt;br /&gt;
3 - Internal inconsistency, division by zero&lt;br /&gt;
&lt;br /&gt;
5 - An input parameter was invalide&lt;br /&gt;
&lt;br /&gt;
&amp;gt; 100 - Constraints are inconsistent and Inform=100+iCon where iCon denotes the index of the constraint causing the conflict. The problem has no feasible solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rc&#039;&#039;||Reduced costs. If ninf=0, last m == -v_k.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Iter&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;FuncEv&#039;&#039;||Number of function evaluations.  Set to Iter. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;GradEv&#039;&#039;||Number of gradient evaluations. Set to Iter.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;ConstrEv&#039;&#039;||Number of constraint evaluations.  Set to 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;QP.B&#039;&#039;||Basis vector in TOMLAB QP standard.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MinorIter&#039;&#039;||Number of minor iterations. NOT SET.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Solver&#039;&#039;||Name of solver (ql).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverAlgorithm&#039;&#039;||Description of the solver.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3077</id>
		<title>MIPNLP ecpMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3077"/>
		<updated>2014-10-09T13:31:38Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Prob structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
ecpMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;ecpMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = ecpMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
Warm start is currently not supported, but might be included in a future release.&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in the problem description structure Prob&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;f_Low&#039;&#039;||Lower bound on solution.&lt;br /&gt;
|-&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;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by ecpMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in ecpMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||output&lt;br /&gt;
|-&lt;br /&gt;
|=0||Silent.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;0||Initial information and convergence results.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;1||Output a line whenever the solution has improved, containing:&lt;br /&gt;
nIterations, nCuts, nCuts with criteria fulfilled, nLinearizations, nSpecialCuts, best solution.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;2||Output a line every iteration with the following information:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!label||description&lt;br /&gt;
|-&lt;br /&gt;
|It         ||Iterations&lt;br /&gt;
|-&lt;br /&gt;
|nECP       ||Number of extended cutting planes (ECP)&lt;br /&gt;
|-&lt;br /&gt;
|nAlpha&amp;gt;=lim||Number of ECP with criteria fulfilled&lt;br /&gt;
|-&lt;br /&gt;
|nL         ||Number of linearizations&lt;br /&gt;
|-&lt;br /&gt;
|nSECP      ||Number of special case ECP&amp;lt;br&amp;gt;(created from constraint on bound)&lt;br /&gt;
|-&lt;br /&gt;
|fIPMin     ||Objective of best solution at current iteration&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;3||Output a description of each step in the MINLP algorithm&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;4||Output additional numerical information in some algorithm steps&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;5||Output information in substeps (preprocessing, line search)&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOpt&#039;&#039;||Print level in sub-solvers,  see the documentation for the solver&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverMIP&#039;&#039;||Name of the solver used for MIP subproblems. If TOMLAB /gurobi is installed, gurobi is the default solver. If TOMLAB /CPLEX is installed, CPLEX is second choice as default. Otherwise the default solver is found calling GetSolver(&#039;mip&#039;,1); Supported as subsolvers are gurobi, CPLEX, mipSolve, milpSolve and cutplane.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems when SolverMIP == mipSolve&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure with parameters specific to mixed integer optimization. See the table below describing the fields used in the MIP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ECPMINLP&#039;&#039;||Structure with parameters specific to the ecpMINLP solver. See the table below describing the fields used in the ECPMINLP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below describing the fields used in the optParam structure.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|&#039;&#039;&#039;fields used in Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||ecpMINLP stops if the duality gap is less than DualGap&lt;br /&gt;
DualGap = 1, stop at first integer solution, e.g. DualGap = 0.01,stop if solution &amp;lt; 1% from optimal solution.&lt;br /&gt;
&amp;lt;br&amp;gt;The lower bound Prob.f_Low is used, (default -1.0e300), which can also be set by the user. If f_Low has not been changed from default the lower bound is obtained from the initial solution of a relaxed problem, but only when ECPMINLP.INIT_BND is 1 or 2 (default).&lt;br /&gt;
&amp;lt;br&amp;gt;Default DualGap is -1, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PPP&#039;&#039;||Pre-processing and probing, default is 0.&amp;lt;br&amp;gt;&lt;br /&gt;
0  Not used. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
1  Apply initially on MINLP problem.&amp;lt;br&amp;gt;&lt;br /&gt;
2  Apply each iteration before solving MILP subproblem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If nonzero, a rounding heuristics will be used on the initial NLP solution in order to obtain an initial integer solution. Requires ECPMINLP.INIT_BND enabled. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ECPMINLP structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with solver-specific options.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.ECPMINLP&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;beta&#039;&#039;||Multiplier when increasing alpha after an infeasible MILP solution. &lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for beta is 1.3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;gamma&#039;&#039;||Multiplier when increasing alpha when MILP solution does not violate any nonlinear contraints, but still does not decrease the upper bound of the objective.&lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for gamma is 2.0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PREALLOC&#039;&#039;||Flag enabling preallocation of memory for cutting planes and linearizations.&lt;br /&gt;
&amp;lt;br&amp;gt;0  No preallocation, dynamic growth of arrays. Current default.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Preallocate arrays.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;INIT_BND&#039;&#039;||Selects method for setting lower bound when f_Low not changed from default.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||method&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|0 ||No extra initial lower bound.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|1 ||Use default TOMLAB NLP solver on problem with relaxed integer constraints. Add a linearization if a feasible MINLP solution was found.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|2 ||Add an initial linearization as long as a feasdbile NLP solution was found. The linearization is a simple lower bound on the MILP objective. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|3 ||Same as 2, but also use the gradient in the linearization. This might improve the solution process for some problems where no solution can be found otherwise. But for many problems, using this initial linearization cuts off a feasbiel region and slows down or even hinders the solver completely. Recommended to only use as a last resort.&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SETTOL&#039;&#039;||Flag enabling changing tolerances, described below under optParam.eps_x, optParam.eps_x and optParam.eps_f.&lt;br /&gt;
&amp;lt;br&amp;gt;0  Default. Using the recommended solver default values, 1.0e-3.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Tolerances can be changed, taken from Prob.optParam.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;INTSOLLIM_INCR&#039;&#039;||Integer option when using CPLEX as MIP subsolver.&lt;br /&gt;
&amp;lt;br&amp;gt;Define how much the CPLEX parameter INTSOLLIM increases when a feasible solution is not optimal and all alpha values have met their criteria.&lt;br /&gt;
&amp;lt;br&amp;gt;If set to zero, optimal strategy will be used immediately instead, without any gradual increase of INTSOLLIM.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USECUTPOOL&#039;&#039;||Set nonzero to use a pool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&amp;lt;br&amp;gt;Cuts not active in the MILP-solution for CUTDELBND iterations in a row will be inactivated (removed from the MILP-problem) until they are violated in a new solution.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 0, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTDELBND&#039;&#039;||The number of consecutive times an extended cutting plane can be inactive before it gets removed and put into the inactive pool, if the option USECUTPOOL is set nonzero.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 15 times.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MAXITNOIMP&#039;&#039;||Limit on the number of successive iterations allowed without any improvements at all to neither objective nor solution point before the solver terminates&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 2.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USENLP&#039;&#039;||Set nonzero to use an NLP sub-solver on the original problem with the integer variables fixed at values from the latest MILP solution. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USERESELECT&#039;&#039;||Set nonzero to enable cut reselection heuristics. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SCALECUTS&#039;&#039;||Set nonzero to scale cuts before they are added to the MILP problem. Scaling is done by dividing the cut with its norm. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam Structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 1 also enables IterPrint, setting it to 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_x&#039;&#039;||Linear constraint violation convergence tolerance. Default is 2.0e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_g&#039;&#039;||Constraint violation convergence tolerance. Default is 1.0e-7&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_f&#039;&#039;||Optimality tolerance. Default is 1.0e-8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE:&#039;&#039; For the solver to use these tolerances, the flag &#039;&#039;ECPMINLP.SETTOL&#039;&#039; must be set to nonzero.&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &lt;br /&gt;
&amp;lt;br&amp;gt;0: Solution found, or integer solution with duality gap less than user tolerance.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Maximal number of iterations reached.&lt;br /&gt;
&amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;3: Problem in subsolver, see Inform value.&lt;br /&gt;
&amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &amp;gt; Prob.maxCPU&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Inform for ExitFlag != 3&lt;br /&gt;
&amp;lt;br&amp;gt;0: Global solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Local solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;2: No solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;gt;2: Inform value from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, max(0,fIPMin-fLB)/-fIPMin-, if fIPMin =0; max(0,fIPMin-fLB) if fIPMin == 0. If fIPMin   =0:  Scale with 100, 100*Dual- Gap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;ecpMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Algorithm==&lt;br /&gt;
ecpMINLP Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to MIP subproblem which is then solved by a subsolver in each iteration.&lt;br /&gt;
&lt;br /&gt;
The solver algorithm is mainly based on the paper &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, published in Optimization and Engineering 3, 253-280, 2002, with some modifications.&lt;br /&gt;
&lt;br /&gt;
Most prominent features in addition to the ones described in the main reference above are&lt;br /&gt;
* Solving the relaxed NLP problem initially to obtain a lower bound on the solution.&lt;br /&gt;
* A rounding heuristics performed on the initial NLP solution in order to obtain an initial upper bound on the initial solutions.&lt;br /&gt;
* Optional use of a cutpool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MilpSolve&amp;diff=3060</id>
		<title>MilpSolve</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MilpSolve&amp;diff=3060"/>
		<updated>2014-08-12T14:58:22Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* MIP structure, substructure of Prob */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Solvers]]&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
Solve mixed integer linear programming problems (MILP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;MILPSOLVE&#039;&#039; solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) &amp;amp; = &amp;amp; c^{T}x &amp;amp;  \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;c, x, x_L, x_U \in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in\mathbb{R}^{m\times n}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_L, b_U \in \mathbb{R}^{m}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to&lt;br /&gt;
be integers.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;MILPSOLVE&#039;,Prob, 1); or &lt;br /&gt;
Prob = ProbCheck(Prob, &#039;MILPSOLVE&#039;); &lt;br /&gt;
Result = milpsolveTL(Prob); &lt;br /&gt;
PrintResult(Result,1);&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in &#039;&#039;Prob&#039;&#039;:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;&#039;FieldName&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;x_L, x_U&#039;&#039;||Lower and upper bounds on variables. (Must be dense).&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;b_L, b_U&#039;&#039;||Lower and upper bounds on linear constraints. (Must be dense).&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;A&#039;&#039;||Linear constraint matrix. (Sparse or dense).&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;QP.c&#039;&#039;||Linear objective function coefficients,  size &#039;&#039;nx&#039;&#039;1.&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;BIG&#039;&#039;||Definition of infinity.  Default is 1e30.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;LargeScale&#039;&#039;||Defines if milpsolveTL will convert the A matrix to a sparse matrix or not.&lt;br /&gt;
&lt;br /&gt;
Largescale ! = 0 - sparse&lt;br /&gt;
&lt;br /&gt;
LargeScale = 0 - dense&lt;br /&gt;
&lt;br /&gt;
Default is to use the A matrix just as it is defined.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;PriLevOpt&#039;&#039;||Specifies the printlevel that will be used by MILPSOLVE.&lt;br /&gt;
&lt;br /&gt;
0 (NONE) No outputs&lt;br /&gt;
&lt;br /&gt;
1 (NEUTRAL) Only some specific debug messages in debug print rou- tines are reported.&lt;br /&gt;
&lt;br /&gt;
2 (CRITICAL) Only critical  messages are  reported.  Hard errors like instability,  out of memory.&lt;br /&gt;
&lt;br /&gt;
3 (SEVERE) Only severe messages are reported. Errors.&lt;br /&gt;
&lt;br /&gt;
4 (IMPORTANT) Only important messages are reported. Warnings and Errors.&lt;br /&gt;
&lt;br /&gt;
5 (NORMAL) Normal messages are reported.&lt;br /&gt;
&lt;br /&gt;
6 (DETAILED) Detailed messages are reported. Like model size, con- tinuing B&amp;amp;B improvements.&lt;br /&gt;
&lt;br /&gt;
7 (FULL)  All messages are reported. Useful for debugging purposes and small models.&lt;br /&gt;
&lt;br /&gt;
Default print level is 0, no outputs. PriLevOpt &#039;&#039;&amp;lt; &#039;&#039;0 is interpreted as 0, and larger than 7 is interpreted as 7.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by MILPSOLVE, stops with best point found.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;MILPSOLVE&#039;&#039;||Substructure defininig milpSolve specific options, see the table below.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;MIP&#039;&#039;||Substructure with parameters specific to mixed integer programming problems in TOMLAB, see the table below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MILPSOLVE structure, substructure of [[MilpSolve#Prob structure|Prob]]===&lt;br /&gt;
Solver specific options structure. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;MILPSOLVE&#039;&#039;||colspan=&amp;quot;2&amp;quot;|The following fields are used in &#039;&#039;Prob.MILPSOLVE&#039;&#039;:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ANTI_DEGEN&#039;&#039;||Binary vector. If empty, no anti-degeneracy handling is applied. If the length (i) of the vector is less than 8 elements,only the i first modes are considered. Also if i is longer than 8 elements, the elements after element8 are ignored.&lt;br /&gt;
&lt;br /&gt;
ANTI_DEGEN specifies if special handling must be done to reduce de- generacy/cycling while solving. Setting this flag can avoid cycling, but can also increase numerical instability.&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN FIXEDVARS  ! = 0 Check if  there are equality slacks in the basis and try  to drive  them out in order to reduce chance of degeneracy in Phase 1.&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN COLUMNCHECK  != 0&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN STALLING  != 0&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN NUMFAILURE != 0&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN LOSTFEAS != 0&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN INFEASIBLE  != 0&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN DYNAMIC != 0&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN DURINGBB != 0&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;basis&#039;&#039;||If empty or erroneous, default basis is used. Default start base is the all slack basis (the default simplex starting basis).&lt;br /&gt;
&lt;br /&gt;
Prob.MILPSOLVE.basis stores the basic variables. If an element is less then zero then it means on lower bound, else on upper bound. Element 0 of the array is unused. The default initial basis is bascolumn[x] = -x. By MILPSOLVE  convention, a basic variable is always on its lower bound, meaning that basic variables is always represented with a minus sign.&lt;br /&gt;
&lt;br /&gt;
When a restart is done, the basis vector must be assigned  a correct starting basis.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BASIS_CRASH&#039;&#039;||The set_basiscrash  function  specifies  which basis crash mode  MILP- SOLVE will used.&lt;br /&gt;
&lt;br /&gt;
When no base crash is done (the default), the initial  basis from which MILPSOLVE starts to solve the model is the basis containing all slack or artificial variables that is automatically associates with each constraint.&lt;br /&gt;
&lt;br /&gt;
When base crash is enabled, a heuristic &amp;quot;crash procedure&amp;quot; is executed before the first simplex iteration to quickly choose a basis matrix that has fewer artificial  variables. This procedure tends to reduce the num- ber of iterations to optimality  since a number of iterations are skipped. MILPSOLVE  starts iterating from this basis until optimality.&lt;br /&gt;
&lt;br /&gt;
BASIS_CRASH ! = 2 - No basis crash&lt;br /&gt;
&lt;br /&gt;
BASIS_CRASH = 2 - Most feasible basis&lt;br /&gt;
&lt;br /&gt;
Default is no basis crash.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BB_DEPTH_LIMIT&#039;&#039;||Sets the maximum branch-and-bound depth.  This value makes  sense only if there are integer, semi-continuous or SOS variables in the model so that the branch-and-bound algorithm is used to solve the model. The branch-and-bound algorithm will not go deeper than this level. When BB DEPTH LIMIT i set to 0 then there is no limit  to the depth. The default value is -50. A positive value means that the depth is absolute. A negative value means a relative B&amp;amp;B  depth.  The &amp;quot;order&amp;quot;  of a MIP problem is defined to be 2 times the number of binary variables plus the number of SC and SOS variables. A relative value of -x results in a maximum depth of x times the order of the MIP problem.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BB_FLOOR_FIRST&#039;&#039;||Specifies which branch to take first in branch-and-bound algorithm. Default value is 1.&lt;br /&gt;
&lt;br /&gt;
BB_FLOOR_FIRST = 0 (BRANCH CEILING) Take ceiling branch first &lt;br /&gt;
&lt;br /&gt;
BB_FLOOR_FIRST = 1 (BRANCH FLOOR) Take floor branch first &lt;br /&gt;
&lt;br /&gt;
BB_FLOOR_FIRST = 2 (BRANCH AUTOMATIC) MILPSOLVE decides which branch being taken first&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BB_RULE&#039;&#039;||Specifies the branch-and-bound rule. Default value is 0.&lt;br /&gt;
&lt;br /&gt;
BB_RULE  = 0 (NODE_FIRSTSELECT)  Select lowest  indexed non- integer column&lt;br /&gt;
&lt;br /&gt;
BB_RULE = 1 (NODE_GAPSELECT) Selection based on distance from the current bounds&lt;br /&gt;
&lt;br /&gt;
BB_RULE = 2 (NODE_RANGESELECT) Selection based on the largest current bound&lt;br /&gt;
&lt;br /&gt;
BB_RULE = 3 (NODE_FRACTIONSELECT) Selection based on largest fractional value&lt;br /&gt;
&lt;br /&gt;
BB_RULE = 4 (NODE_PSEUDOCOSTSELECT4) Simple, unweighted pseudo-cost of a variable&lt;br /&gt;
&lt;br /&gt;
BB_RULE = 5 (NODE_PSEUDONONINTSELECT)  This is an ex- tended pseudo-costing strategy based on minimizing the number of in- teger infeasibilities.&lt;br /&gt;
&lt;br /&gt;
BB RULE = 6 (NODE_PSEUDORATIOSELECT)  This is an extended pseudo-costing strategy based on maximizing the normal pseudo-cost divided by the number of infeasibilities. Effectively, it is similar to (the reciprocal of ) a cost/benefit ratio.&lt;br /&gt;
&lt;br /&gt;
BB_RULE = 7 (NODE_USERSELECT)&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BB_RULE_ADD&#039;&#039;||Additional values for the BB RULE. BB RULE is a vector. If the length i of the vector is less than 10 elements, only the i first modes are considered. Also if i is longer than 10 elements, the elements after element 10 is ignored.&lt;br /&gt;
&lt;br /&gt;
BB_RULE ADD(1) ! = 0 (NODE_WEIGHTREVERSEMODE)&lt;br /&gt;
&lt;br /&gt;
BB_RULE ADD(2)  ! = 0 (NODE BRANCHREVERSEMODE) In case when get bb floorfirst is BRANCH AUTOMATIC, select the opposite direction (lower/upper branch) that BRANCH AUTOMATIC had cho- sen.&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(3) ! = 0 (NODE_GREEDYMODE)&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(4) ! = 0 (NODE_PSEUDOCOSTMODE)&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(5) ! = 0 (NODE_DEPTHFIRSTMODE) Select  the node that has already been selected before the number of times&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(6) ! = 0 (NODE_RANDOMIZEMODE)&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(7) !  = 0 (NODE_DYNAMICMODE)    When NODE DEPTHFIRSTMODE is selected, switch off this mode when a first solution is found.&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(8) ! = 0 (NODE_RESTARTMODE)&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(9) ! = 0 (NODE_BREADTHFIRSTMODE) Select the node that has been selected before the fewest number of times or not at all BB RULE ADD(10) ! = 0 (NODE_AUTOORDER)&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BFP&#039;&#039;||Defines which Basis Factorization Package that will be used by MILP- SOLVE.&lt;br /&gt;
&lt;br /&gt;
BFP = 0 : LUSOL&lt;br /&gt;
&lt;br /&gt;
BFP = 1 : built in etaPHI from MILPSOLVE  v3.2&lt;br /&gt;
&lt;br /&gt;
BFP = 2 : Additional  etaPHI BFP = 3 : GLPK&lt;br /&gt;
&lt;br /&gt;
Default BFP is LUSOL.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BREAK_AT_FIRST&#039;&#039;||Specifies if the branch-and-bound algorithm stops at the first found so- lution (BREAK_AT_FIRST != 0) or not (BREAK_AT_FIRST = 0). De- fault is not to stop at the first found solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BREAK_AT_VALUE&#039;&#039;||Specifies if the branch-and-bound algorithm stops when the object value is better than a given value. The default value is (-) infinity.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPAGAP&#039;&#039;||Specifies the absolute MIP gap tolerance for the branch and bound algo- rithm.  This tolerance is the difference between the best-found solution yet and the current solution. If the difference is smaller than this toler- ance then the solution (and all the sub-solutions) is rejected. The default value is 1e-9.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPGAP&#039;&#039;||Specifies the relative MIP gap tolerance for the branch and bound algo- rithm.  The default value is 1e-9.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPSB&#039;&#039;||Specifies the value that is used as a tolerance for the Right Hand Side (RHS) to determine whether  a value should be considered  as 0.  The default epsb value is 1.0e-10&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPSD&#039;&#039;||Specifies the value that is used as a tolerance for reduced costs to deter- mine whether a value should be considered as 0. The default epsd value is 1e-9. If EPSD is empty, EPSD is read from &#039;&#039;Prob.optParam.eps f&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPSEL&#039;&#039;||Specifies the value that is used as a tolerance for rounding values to zero. The default epsel value is 1e-12.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPSINT&#039;&#039;||Specifies  the  tolerance that  is used  to determine whether a floating- point number is in fact an integer. The default value for epsint is 1e-7. Changing this tolerance value can result in faster solving times, but the solution is less integer.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPSPERTURB&#039;&#039;||Specifies the value that is used as perturbation scalar for degenerative problems. The default epsperturb value is 1e-5.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPSPIVOT&#039;&#039;||Specifies the value that is used as a tolerance pivot element to determine whether a value should be considered as 0. The default epspivot value is 2e-7&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;IMPROVEMENT_LEVEL&#039;&#039;||Specifies the iterative improvement level.&lt;br /&gt;
&lt;br /&gt;
IMPROVEMENT LEVEL = 0 (IMPROVE  NONE) improve none &lt;br /&gt;
&lt;br /&gt;
IMPROVEMENT LEVEL = 1 (IMPROVE  FTRAN)  improve FTRAN &lt;br /&gt;
&lt;br /&gt;
IMPROVEMENT LEVEL = 2 (IMPROVE  BTRAN)  improve BTRAN&lt;br /&gt;
&lt;br /&gt;
IMPROVEMENT LEVEL  = 3 (IMPROVE  SOLVE) improve FTRAN + BTRAN.&lt;br /&gt;
&lt;br /&gt;
IMPROVEMENT LEVEL  = 4 (IMPROVE  INVERSE)  triggers automatic inverse accuracy control in the dual simplex, and when an error gap is exceeded the basis is reinverted&lt;br /&gt;
&lt;br /&gt;
Choice 1,2,3 should not be used with MILPSOLVE  5.1.1.3,  because of problems with the solver. Default is 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;LoadFile&#039;&#039;||File that  contains the  model. If LoadFile is a nonempty string which corresponds to actual file, then the model is read from this file rather than from the Prob struct.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;LoadMode&#039;&#039;||1 - LP - MILPSOLVE  LP format&lt;br /&gt;
&lt;br /&gt;
2 - MPS - MPS format&lt;br /&gt;
&lt;br /&gt;
3 - FMPS - Free MPS format&lt;br /&gt;
&lt;br /&gt;
A default value for this field does not exist. Both LoadFile and Load- Mode must be set if a problem will be loaded.&lt;br /&gt;
&lt;br /&gt;
If there is something wrong with LoadMode or LoadFile, an error mes- sage will be printed and MILPSOLVE  will be terminated. Leave Load- Mode and LoadFile empty if the problem not will be loaded from file.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;LogFile&#039;&#039;||Name of file to print MILPSOLVE  log on.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MAXIMIZE	&#039;&#039;||If  MAXIMIZE ! = 0, MILPSOLVE  is set to maximize the objective function, default is to minimize.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MAX_PIVOT&#039;&#039;||Sets the maximum number of pivots between a re-inversion of the matrix. Default is 42.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;NEG_RANGE&#039;&#039;||Specifies the negative value below which variables are split into a negative and a positive part.  This value must always be zero or negative. If a positive value is specified, then 0 is taken. The default value is -1e6.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;PRESOLVE&#039;&#039;||Vector containing possible presolve options. If the length i of the vector is less than 7 elements, only the i first modes are considered. Also if i is longer than 7 elements, the elements after element 7 is ignored.&lt;br /&gt;
&lt;br /&gt;
PRESOLVE(1) ! = 0 (PRESOLVE ROWS) Presolve rows &lt;br /&gt;
&lt;br /&gt;
PRESOLVE(2) ! = 0 (PRESOLVE COLS) Presolve columns &lt;br /&gt;
&lt;br /&gt;
PRESOLVE(3) ! = 0 (PRESOLVE LINDEP)  Eliminate linearly depen- dent rows&lt;br /&gt;
&lt;br /&gt;
PRESOLVE(4) ! = 0 (PRESOLVE SOS) Convert constraints to SOSes (only SOS1 handled)&lt;br /&gt;
&lt;br /&gt;
PRESOLVE(5) ! = 0 (PRESOLVE REDUCEMIP)  If the phase 1 solu- tion process finds that a constraint is redundant then this constraint is deleted.&lt;br /&gt;
&lt;br /&gt;
PRESOLVE(6) ! = 0 (PRESOLVE DUALS) Calculate duals PRESOLVE(7) ! = 0 (PRESOLVE SENSDUALS) Calculate sensitivity if there are integer variables&lt;br /&gt;
&lt;br /&gt;
Default is not to do any presolve.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;PRICING_RULE&#039;&#039;||The pricing rule can be one of the following rules.&lt;br /&gt;
&lt;br /&gt;
PRICING_RULE = 0 Select first (PRICER_FIRSTINDEX)&lt;br /&gt;
&lt;br /&gt;
PRICING_RULE = 1 Select according to Dantzig (PRICER_DANTZIG) &lt;br /&gt;
&lt;br /&gt;
PRICING_RULE = 2 Devex pricing from Paula Harris (PRICER_DEVEX)&lt;br /&gt;
&lt;br /&gt;
PRICING_RULE = 3 Steepest Edge (PRICER STEEPESTEDGE)&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;PRICING_MODE&#039;&#039;||Additional pricing settings, any combination of the modes below. This is a binary vector. If the length i of the vector is less than 7 elements, only the i first modes are considered. Also if i is longer than 7 elements, the elements after element 7 is ignored.&lt;br /&gt;
&lt;br /&gt;
PRICE_PRIMALFALLBACK ! = 0 In case of Steepest Edge, fall back to DEVEX in primal.&lt;br /&gt;
&lt;br /&gt;
PRICE_MULTIPLE ! = 0 Preliminary implementation of the multiple pricing scheme.  This means that attractive candidate entering columns from one iteration may be used in the subsequent iteration, avoiding full updating of reduced costs. In the current implementation, MILPSOLVE only reuses the 2nd best entering column alternative.&lt;br /&gt;
&lt;br /&gt;
PRICE_PARTIAL ! = 0 Enable partial pricing&lt;br /&gt;
&lt;br /&gt;
PRICE_ADAPTIVE ! = 0 Temporarily use First Index if cycling is detected&lt;br /&gt;
&lt;br /&gt;
PRICE_RANDOMIZE  ! = 0 Adds a small randomization effect to the selected pricer&lt;br /&gt;
&lt;br /&gt;
PRICE_LOOPLEFT  ! = 0 Scan entering/leaving columns left rather than right&lt;br /&gt;
&lt;br /&gt;
PRICE_LOOPALTERNATE ! = 0 Scan entering/leaving columns alternatingly left/right&lt;br /&gt;
&lt;br /&gt;
Default basis is PRICER DEVEX combined with PRICE ADAPTIVE.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;sa&#039;&#039;||Struct  containing information  of the sensitivity analysis (SA) MILPSOLVE will perform.&lt;br /&gt;
&lt;br /&gt;
sa.obj =! 0 Perform sensitivity analysis on the objective function&lt;br /&gt;
&lt;br /&gt;
sa.obj = 0 Do not perform sensitivity analysis on the objective function &lt;br /&gt;
&lt;br /&gt;
sa.rhs =! 0 Perform sensitivity analysis on the right hand sides.&lt;br /&gt;
&lt;br /&gt;
sa.rhs = 0 Do not perform sensitivity analysis on the right hand sides.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SaveFileAfter&#039;&#039;||Name  of a file to save the MILPSOLVE object after presolve.The name must be of type string (char), Example: Prob.MILPSOLVE.SaveFileAfter = &#039;save2&#039; If the type is not char SaveFileBefore is set to save2.[file extension].&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SaveFileBefore&#039;&#039;||Name of a file to save the MILPSOLVE object before presolve. The name must be  of type string (char), Example: Prob.MILPSOLVE.SaveFileBefore = &#039;save1&#039;. If the type  is not char SaveFileBefore is set to save1.[file extension].&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SaveMode&#039;&#039;||1 - LP - MILPSOLVE  LP format&lt;br /&gt;
&lt;br /&gt;
2 - MPS - MPS format&lt;br /&gt;
&lt;br /&gt;
3 - FMPS - Free MPS format&lt;br /&gt;
&lt;br /&gt;
If empty, the default format LP is used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SCALE_LIMIT&#039;&#039;||Sets the relative  scaling convergence  criterion  to  the  absolute value of SCALE_LIMIT for the active scaling mode. The integer part of SCALE_LIMIT specifies the maximum number of iterations. Default is 5.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SCALING_ALG&#039;&#039;||Specifies which scaling algorithm will be used by MILPSOLVE.&lt;br /&gt;
&lt;br /&gt;
0 No scaling algorithm&lt;br /&gt;
&lt;br /&gt;
1 (SCALE EXTREME) Scale to convergence using largest absolute value&lt;br /&gt;
&lt;br /&gt;
2 (SCALE RANGE) Scale based on the simple numerical range&lt;br /&gt;
&lt;br /&gt;
3 (SCALE MEAN) Numerical range-based scaling&lt;br /&gt;
&lt;br /&gt;
4 (SCALE GEOMETRIC) Geometric scaling&lt;br /&gt;
&lt;br /&gt;
7 (SCALE CURTISREID) Curtis-reid scaling&lt;br /&gt;
&lt;br /&gt;
Default is 0, no scaling algorithm.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SCALING_ADD&#039;&#039;||Vector containing possible additional scaling parameters. If the length (i) of the vector is less than 7 elements, only the i first modes are considered. Also if i is longer than 7 elements, the elements after element 7 is ignored. SCALING ADD ! = 0 (SCALE_QUADRATIC)&lt;br /&gt;
&lt;br /&gt;
SCALING ADD ! = 0 (SCALE_LOGARITHMIC) Scale to convergence using logarithmic mean of all values&lt;br /&gt;
&lt;br /&gt;
SCALING_ADD  !  = 0  (SCALE_USERWEIGHT) User can specify scalars&lt;br /&gt;
&lt;br /&gt;
SCALING_ADD ! = 0 (SCALE_POWER2) also do Power scaling &lt;br /&gt;
&lt;br /&gt;
SCALING_ADD  ! = 0 (SCALE_EQUILIBRATE) Make  sure that  no scaled number is above 1&lt;br /&gt;
&lt;br /&gt;
SCALING_ADD ! = 0 (SCALE_INTEGERS) Also scaling integer vari- ables&lt;br /&gt;
&lt;br /&gt;
SCALING_ADD ! = 0 (SCALE_DYNUPDATE) Dynamic update&lt;br /&gt;
&lt;br /&gt;
Default is 0, no additional mode.&lt;br /&gt;
&lt;br /&gt;
Settings SCALE_DYNUPDATE is a way to make sure that scaling factors are recomputed. In that case, the scaling factors are recomputed also when a restart is done.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SIMPLEX_TYPE&#039;&#039;||Sets the desired combination of primal and dual simplex algorithms.&lt;br /&gt;
&lt;br /&gt;
5 (SIMPLEX_PRIMAL_PRIMAL) Phase1 Primal, Phase2 Primal&lt;br /&gt;
&lt;br /&gt;
6 (SIMPLEX_DUAL_PRIMAL) Phase1 Dual, Phase2 Primal&lt;br /&gt;
&lt;br /&gt;
9 (SIMPLEX_PRIMAL_DUAL) Phase1 Primal, Phase2 Dual&lt;br /&gt;
&lt;br /&gt;
10 (SIMPLEX_DUAL_DUAL) Phase1 Dual, Phase2 Dual&lt;br /&gt;
&lt;br /&gt;
Default is SIMPLEX DUAL PRIMAL (6).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SOLUTION_LIMIT&#039;&#039;||Sets the solution number that will be returned. This value is only consid- ered if there are integer, semi-continuous or SOS variables in the model so that the branch-and-bound algorithm is used. If there are more solutions with the same objective value, then this number specifies which solution must be returned. Default is 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;sos&#039;&#039;||List of structs containing data about Special Ordered Sets (SOS). See below for further description.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure, substructure of [[MilpSolve#Prob structure|Prob]]===&lt;br /&gt;
Options specific to mixed integer programming problems.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in &#039;&#039;Prob.MIP&#039;&#039;:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;&#039;FieldName&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;IntVars&#039;&#039;||Defines which variables are integers, of general type I or binary type B Variable indices should be in the range [1,...,n].&lt;br /&gt;
&lt;br /&gt;
IntVars is a logical vector ==&#039;&#039;&amp;gt; x&#039;&#039;(&#039;&#039;find&#039;&#039;(&#039;&#039;IntVars &amp;gt; &#039;&#039;0)) are integers&lt;br /&gt;
&lt;br /&gt;
IntVars is a vector of indices ==&#039;&#039;&amp;gt; x&#039;&#039;(&#039;&#039;IntVars&#039;&#039;) are integers (if [], then no integers of type I or B are defined) variables with x L=0 and x U=1, is are set to binary. It is possible to combine integer and semi-continuous type to obtain the semi-integer type.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;fIP&#039;&#039;||This parameter specifies the initial &amp;quot;at least better than&amp;quot; guess for objective function. This is only used in the branch-and-bound algorithm when integer variables exist in the model. All solutions with a worse objective value than this value are immediately rejected. The default is infinity.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;SC&#039;&#039;||A vector with indices for variables of type semi-continuous (SC), a logical vector or a scalar (see MIP.IntVars). A semi-continuous variable i takes either the value 0 or some value in the range [x L(i), x U(i)].  It is possible to combine integer and semi-continuous type to obtain the semi-integer type.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;sos1&#039;&#039;||List of structures defining the Special Ordered Sets of Order One (SOS1). For SOS1 set k, sos1(k).var is a vector of indices for variables of type SOS1 in set k, sos1(k).row is the priority  of SOS k in the set of SOS1 and sos1(k).weight is a vector of the same length as sos1(k).var and it describes the order MILPSOLVE  will weight the variables in SOS1 set k.&lt;br /&gt;
&lt;br /&gt;
a low number of a row and a weight means high priority.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;sos2&#039;&#039;||List of n structures defining the Special Ordered Sets (SOS) of Order Two (SOS2). (see MIP.sos1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization. The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Optimal  solution (or some other solution if optimum could not been found)&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Optimal objective value.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;v_k&#039;&#039;||[rc; duals]. If Reduced cost and dual variables are not available, then v_k is empty.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag&#039;&#039;||TOMLAB information parameter.&lt;br /&gt;
&lt;br /&gt;
0 = Optimal solution found.&lt;br /&gt;
&lt;br /&gt;
1 = Suboptimal solution or user abort.&lt;br /&gt;
&lt;br /&gt;
2 = Unbounded solution.&lt;br /&gt;
&lt;br /&gt;
3 = Numerical failure.&lt;br /&gt;
&lt;br /&gt;
4 = Infeasible model.&lt;br /&gt;
&lt;br /&gt;
10 = Out of memory.&lt;br /&gt;
&lt;br /&gt;
11 = Branch and bound stopped.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Status text from MILPSOLVE.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||MILPSOLVE  information parameter.&lt;br /&gt;
&lt;br /&gt;
-2 = Out of memory.&lt;br /&gt;
&lt;br /&gt;
0 = Optimal solution found.&lt;br /&gt;
&lt;br /&gt;
1 = Suboptimal solution.&lt;br /&gt;
&lt;br /&gt;
2 = Infeasible model.&lt;br /&gt;
&lt;br /&gt;
3 = Unbounded solution.&lt;br /&gt;
&lt;br /&gt;
4 = Degenerate solution.&lt;br /&gt;
&lt;br /&gt;
5 = Numerical failure.&lt;br /&gt;
&lt;br /&gt;
6 = User abort.&lt;br /&gt;
&lt;br /&gt;
7 = Timeout.&lt;br /&gt;
&lt;br /&gt;
10 = Branch and bound failed.&lt;br /&gt;
&lt;br /&gt;
11 = Branch and bound stopped.&lt;br /&gt;
&lt;br /&gt;
12 = Feasible branch and bound solution.&lt;br /&gt;
&lt;br /&gt;
13 = No feasible branch and bound solution. Other = Unknown status.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;Iter&#039;&#039;||The total  number of nodes processed in the branch-and-bound algorithm. Is only applicable if the model contains integer variables. In the case of an LP model Result.Iter contains the number of iterations. This is however not documented.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MinorIter&#039;&#039;||The total number of Branch-and-bound iterations. When the problem is LP, MinorIter equals Result.Iter&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.basis&#039;&#039;||Optimal basis, on the format described above under Prob.MILPSOLVE.basis.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.MaxLevel&#039;&#039;||The deepest Branch-and-bound  level of the last solution. Is only applicable if the model contains integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.sa.objStatus&#039;&#039;||1 successful&lt;br /&gt;
&lt;br /&gt;
0 SA not requested&lt;br /&gt;
&lt;br /&gt;
-1 Error: error from MILPSOLVE&lt;br /&gt;
&lt;br /&gt;
-3 no SA available&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.sa.ObjLower&#039;&#039;||An array that  will  contain the values of the lower limits  on the objective function.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.sa.ObjUpper&#039;&#039;||An array that will contain the values of the upper limits on the objective function.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.sa.RhsStatus&#039;&#039;||see MILPSOLVE.sa.objStatus.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.sa.RhsLower&#039;&#039;||An array that will contain the values of the lower limits on the RHS.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.sa.RhsUpper&#039;&#039;||An array that will contain the values of the upper limits on the RHS.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable&lt;br /&gt;
&lt;br /&gt;
0 - free variable,&lt;br /&gt;
&lt;br /&gt;
1 - variable on lower bound,&lt;br /&gt;
&lt;br /&gt;
2 - variable on upper bound,&lt;br /&gt;
&lt;br /&gt;
3 - variable is fixed, lower bound = upper bound.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each linear constraint&lt;br /&gt;
&lt;br /&gt;
0 - Inactive constraint,&lt;br /&gt;
&lt;br /&gt;
1 - Linear constraint on lower bound,&lt;br /&gt;
&lt;br /&gt;
2 - Linear constraint on upper bound,&lt;br /&gt;
&lt;br /&gt;
3 - Linear equality constraint.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MilpSolve&amp;diff=3059</id>
		<title>MilpSolve</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MilpSolve&amp;diff=3059"/>
		<updated>2014-08-12T14:55:41Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Prob structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Solvers]]&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
Solve mixed integer linear programming problems (MILP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;MILPSOLVE&#039;&#039; solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) &amp;amp; = &amp;amp; c^{T}x &amp;amp;  \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;c, x, x_L, x_U \in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in\mathbb{R}^{m\times n}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_L, b_U \in \mathbb{R}^{m}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to&lt;br /&gt;
be integers.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;MILPSOLVE&#039;,Prob, 1); or &lt;br /&gt;
Prob = ProbCheck(Prob, &#039;MILPSOLVE&#039;); &lt;br /&gt;
Result = milpsolveTL(Prob); &lt;br /&gt;
PrintResult(Result,1);&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in &#039;&#039;Prob&#039;&#039;:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;&#039;FieldName&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;x_L, x_U&#039;&#039;||Lower and upper bounds on variables. (Must be dense).&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;b_L, b_U&#039;&#039;||Lower and upper bounds on linear constraints. (Must be dense).&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;A&#039;&#039;||Linear constraint matrix. (Sparse or dense).&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;QP.c&#039;&#039;||Linear objective function coefficients,  size &#039;&#039;nx&#039;&#039;1.&lt;br /&gt;
|-&lt;br /&gt;
||&#039;&#039;BIG&#039;&#039;||Definition of infinity.  Default is 1e30.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;LargeScale&#039;&#039;||Defines if milpsolveTL will convert the A matrix to a sparse matrix or not.&lt;br /&gt;
&lt;br /&gt;
Largescale ! = 0 - sparse&lt;br /&gt;
&lt;br /&gt;
LargeScale = 0 - dense&lt;br /&gt;
&lt;br /&gt;
Default is to use the A matrix just as it is defined.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;PriLevOpt&#039;&#039;||Specifies the printlevel that will be used by MILPSOLVE.&lt;br /&gt;
&lt;br /&gt;
0 (NONE) No outputs&lt;br /&gt;
&lt;br /&gt;
1 (NEUTRAL) Only some specific debug messages in debug print rou- tines are reported.&lt;br /&gt;
&lt;br /&gt;
2 (CRITICAL) Only critical  messages are  reported.  Hard errors like instability,  out of memory.&lt;br /&gt;
&lt;br /&gt;
3 (SEVERE) Only severe messages are reported. Errors.&lt;br /&gt;
&lt;br /&gt;
4 (IMPORTANT) Only important messages are reported. Warnings and Errors.&lt;br /&gt;
&lt;br /&gt;
5 (NORMAL) Normal messages are reported.&lt;br /&gt;
&lt;br /&gt;
6 (DETAILED) Detailed messages are reported. Like model size, con- tinuing B&amp;amp;B improvements.&lt;br /&gt;
&lt;br /&gt;
7 (FULL)  All messages are reported. Useful for debugging purposes and small models.&lt;br /&gt;
&lt;br /&gt;
Default print level is 0, no outputs. PriLevOpt &#039;&#039;&amp;lt; &#039;&#039;0 is interpreted as 0, and larger than 7 is interpreted as 7.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by MILPSOLVE, stops with best point found.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;MILPSOLVE&#039;&#039;||Substructure defininig milpSolve specific options, see the table below.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
||&#039;&#039;MIP&#039;&#039;||Substructure with parameters specific to mixed integer programming problems in TOMLAB, see the table below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MILPSOLVE structure, substructure of [[MilpSolve#Prob structure|Prob]]===&lt;br /&gt;
Solver specific options structure. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;MILPSOLVE&#039;&#039;||colspan=&amp;quot;2&amp;quot;|The following fields are used in &#039;&#039;Prob.MILPSOLVE&#039;&#039;:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ANTI_DEGEN&#039;&#039;||Binary vector. If empty, no anti-degeneracy handling is applied. If the length (i) of the vector is less than 8 elements,only the i first modes are considered. Also if i is longer than 8 elements, the elements after element8 are ignored.&lt;br /&gt;
&lt;br /&gt;
ANTI_DEGEN specifies if special handling must be done to reduce de- generacy/cycling while solving. Setting this flag can avoid cycling, but can also increase numerical instability.&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN FIXEDVARS  ! = 0 Check if  there are equality slacks in the basis and try  to drive  them out in order to reduce chance of degeneracy in Phase 1.&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN COLUMNCHECK  != 0&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN STALLING  != 0&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN NUMFAILURE != 0&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN LOSTFEAS != 0&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN INFEASIBLE  != 0&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN DYNAMIC != 0&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN DURINGBB != 0&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;basis&#039;&#039;||If empty or erroneous, default basis is used. Default start base is the all slack basis (the default simplex starting basis).&lt;br /&gt;
&lt;br /&gt;
Prob.MILPSOLVE.basis stores the basic variables. If an element is less then zero then it means on lower bound, else on upper bound. Element 0 of the array is unused. The default initial basis is bascolumn[x] = -x. By MILPSOLVE  convention, a basic variable is always on its lower bound, meaning that basic variables is always represented with a minus sign.&lt;br /&gt;
&lt;br /&gt;
When a restart is done, the basis vector must be assigned  a correct starting basis.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BASIS_CRASH&#039;&#039;||The set_basiscrash  function  specifies  which basis crash mode  MILP- SOLVE will used.&lt;br /&gt;
&lt;br /&gt;
When no base crash is done (the default), the initial  basis from which MILPSOLVE starts to solve the model is the basis containing all slack or artificial variables that is automatically associates with each constraint.&lt;br /&gt;
&lt;br /&gt;
When base crash is enabled, a heuristic &amp;quot;crash procedure&amp;quot; is executed before the first simplex iteration to quickly choose a basis matrix that has fewer artificial  variables. This procedure tends to reduce the num- ber of iterations to optimality  since a number of iterations are skipped. MILPSOLVE  starts iterating from this basis until optimality.&lt;br /&gt;
&lt;br /&gt;
BASIS_CRASH ! = 2 - No basis crash&lt;br /&gt;
&lt;br /&gt;
BASIS_CRASH = 2 - Most feasible basis&lt;br /&gt;
&lt;br /&gt;
Default is no basis crash.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BB_DEPTH_LIMIT&#039;&#039;||Sets the maximum branch-and-bound depth.  This value makes  sense only if there are integer, semi-continuous or SOS variables in the model so that the branch-and-bound algorithm is used to solve the model. The branch-and-bound algorithm will not go deeper than this level. When BB DEPTH LIMIT i set to 0 then there is no limit  to the depth. The default value is -50. A positive value means that the depth is absolute. A negative value means a relative B&amp;amp;B  depth.  The &amp;quot;order&amp;quot;  of a MIP problem is defined to be 2 times the number of binary variables plus the number of SC and SOS variables. A relative value of -x results in a maximum depth of x times the order of the MIP problem.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BB_FLOOR_FIRST&#039;&#039;||Specifies which branch to take first in branch-and-bound algorithm. Default value is 1.&lt;br /&gt;
&lt;br /&gt;
BB_FLOOR_FIRST = 0 (BRANCH CEILING) Take ceiling branch first &lt;br /&gt;
&lt;br /&gt;
BB_FLOOR_FIRST = 1 (BRANCH FLOOR) Take floor branch first &lt;br /&gt;
&lt;br /&gt;
BB_FLOOR_FIRST = 2 (BRANCH AUTOMATIC) MILPSOLVE decides which branch being taken first&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BB_RULE&#039;&#039;||Specifies the branch-and-bound rule. Default value is 0.&lt;br /&gt;
&lt;br /&gt;
BB_RULE  = 0 (NODE_FIRSTSELECT)  Select lowest  indexed non- integer column&lt;br /&gt;
&lt;br /&gt;
BB_RULE = 1 (NODE_GAPSELECT) Selection based on distance from the current bounds&lt;br /&gt;
&lt;br /&gt;
BB_RULE = 2 (NODE_RANGESELECT) Selection based on the largest current bound&lt;br /&gt;
&lt;br /&gt;
BB_RULE = 3 (NODE_FRACTIONSELECT) Selection based on largest fractional value&lt;br /&gt;
&lt;br /&gt;
BB_RULE = 4 (NODE_PSEUDOCOSTSELECT4) Simple, unweighted pseudo-cost of a variable&lt;br /&gt;
&lt;br /&gt;
BB_RULE = 5 (NODE_PSEUDONONINTSELECT)  This is an ex- tended pseudo-costing strategy based on minimizing the number of in- teger infeasibilities.&lt;br /&gt;
&lt;br /&gt;
BB RULE = 6 (NODE_PSEUDORATIOSELECT)  This is an extended pseudo-costing strategy based on maximizing the normal pseudo-cost divided by the number of infeasibilities. Effectively, it is similar to (the reciprocal of ) a cost/benefit ratio.&lt;br /&gt;
&lt;br /&gt;
BB_RULE = 7 (NODE_USERSELECT)&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BB_RULE_ADD&#039;&#039;||Additional values for the BB RULE. BB RULE is a vector. If the length i of the vector is less than 10 elements, only the i first modes are considered. Also if i is longer than 10 elements, the elements after element 10 is ignored.&lt;br /&gt;
&lt;br /&gt;
BB_RULE ADD(1) ! = 0 (NODE_WEIGHTREVERSEMODE)&lt;br /&gt;
&lt;br /&gt;
BB_RULE ADD(2)  ! = 0 (NODE BRANCHREVERSEMODE) In case when get bb floorfirst is BRANCH AUTOMATIC, select the opposite direction (lower/upper branch) that BRANCH AUTOMATIC had cho- sen.&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(3) ! = 0 (NODE_GREEDYMODE)&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(4) ! = 0 (NODE_PSEUDOCOSTMODE)&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(5) ! = 0 (NODE_DEPTHFIRSTMODE) Select  the node that has already been selected before the number of times&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(6) ! = 0 (NODE_RANDOMIZEMODE)&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(7) !  = 0 (NODE_DYNAMICMODE)    When NODE DEPTHFIRSTMODE is selected, switch off this mode when a first solution is found.&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(8) ! = 0 (NODE_RESTARTMODE)&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(9) ! = 0 (NODE_BREADTHFIRSTMODE) Select the node that has been selected before the fewest number of times or not at all BB RULE ADD(10) ! = 0 (NODE_AUTOORDER)&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BFP&#039;&#039;||Defines which Basis Factorization Package that will be used by MILP- SOLVE.&lt;br /&gt;
&lt;br /&gt;
BFP = 0 : LUSOL&lt;br /&gt;
&lt;br /&gt;
BFP = 1 : built in etaPHI from MILPSOLVE  v3.2&lt;br /&gt;
&lt;br /&gt;
BFP = 2 : Additional  etaPHI BFP = 3 : GLPK&lt;br /&gt;
&lt;br /&gt;
Default BFP is LUSOL.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BREAK_AT_FIRST&#039;&#039;||Specifies if the branch-and-bound algorithm stops at the first found so- lution (BREAK_AT_FIRST != 0) or not (BREAK_AT_FIRST = 0). De- fault is not to stop at the first found solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BREAK_AT_VALUE&#039;&#039;||Specifies if the branch-and-bound algorithm stops when the object value is better than a given value. The default value is (-) infinity.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPAGAP&#039;&#039;||Specifies the absolute MIP gap tolerance for the branch and bound algo- rithm.  This tolerance is the difference between the best-found solution yet and the current solution. If the difference is smaller than this toler- ance then the solution (and all the sub-solutions) is rejected. The default value is 1e-9.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPGAP&#039;&#039;||Specifies the relative MIP gap tolerance for the branch and bound algo- rithm.  The default value is 1e-9.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPSB&#039;&#039;||Specifies the value that is used as a tolerance for the Right Hand Side (RHS) to determine whether  a value should be considered  as 0.  The default epsb value is 1.0e-10&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPSD&#039;&#039;||Specifies the value that is used as a tolerance for reduced costs to deter- mine whether a value should be considered as 0. The default epsd value is 1e-9. If EPSD is empty, EPSD is read from &#039;&#039;Prob.optParam.eps f&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPSEL&#039;&#039;||Specifies the value that is used as a tolerance for rounding values to zero. The default epsel value is 1e-12.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPSINT&#039;&#039;||Specifies  the  tolerance that  is used  to determine whether a floating- point number is in fact an integer. The default value for epsint is 1e-7. Changing this tolerance value can result in faster solving times, but the solution is less integer.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPSPERTURB&#039;&#039;||Specifies the value that is used as perturbation scalar for degenerative problems. The default epsperturb value is 1e-5.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPSPIVOT&#039;&#039;||Specifies the value that is used as a tolerance pivot element to determine whether a value should be considered as 0. The default epspivot value is 2e-7&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;IMPROVEMENT_LEVEL&#039;&#039;||Specifies the iterative improvement level.&lt;br /&gt;
&lt;br /&gt;
IMPROVEMENT LEVEL = 0 (IMPROVE  NONE) improve none &lt;br /&gt;
&lt;br /&gt;
IMPROVEMENT LEVEL = 1 (IMPROVE  FTRAN)  improve FTRAN &lt;br /&gt;
&lt;br /&gt;
IMPROVEMENT LEVEL = 2 (IMPROVE  BTRAN)  improve BTRAN&lt;br /&gt;
&lt;br /&gt;
IMPROVEMENT LEVEL  = 3 (IMPROVE  SOLVE) improve FTRAN + BTRAN.&lt;br /&gt;
&lt;br /&gt;
IMPROVEMENT LEVEL  = 4 (IMPROVE  INVERSE)  triggers automatic inverse accuracy control in the dual simplex, and when an error gap is exceeded the basis is reinverted&lt;br /&gt;
&lt;br /&gt;
Choice 1,2,3 should not be used with MILPSOLVE  5.1.1.3,  because of problems with the solver. Default is 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;LoadFile&#039;&#039;||File that  contains the  model. If LoadFile is a nonempty string which corresponds to actual file, then the model is read from this file rather than from the Prob struct.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;LoadMode&#039;&#039;||1 - LP - MILPSOLVE  LP format&lt;br /&gt;
&lt;br /&gt;
2 - MPS - MPS format&lt;br /&gt;
&lt;br /&gt;
3 - FMPS - Free MPS format&lt;br /&gt;
&lt;br /&gt;
A default value for this field does not exist. Both LoadFile and Load- Mode must be set if a problem will be loaded.&lt;br /&gt;
&lt;br /&gt;
If there is something wrong with LoadMode or LoadFile, an error mes- sage will be printed and MILPSOLVE  will be terminated. Leave Load- Mode and LoadFile empty if the problem not will be loaded from file.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;LogFile&#039;&#039;||Name of file to print MILPSOLVE  log on.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MAXIMIZE	&#039;&#039;||If  MAXIMIZE ! = 0, MILPSOLVE  is set to maximize the objective function, default is to minimize.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MAX_PIVOT&#039;&#039;||Sets the maximum number of pivots between a re-inversion of the matrix. Default is 42.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;NEG_RANGE&#039;&#039;||Specifies the negative value below which variables are split into a negative and a positive part.  This value must always be zero or negative. If a positive value is specified, then 0 is taken. The default value is -1e6.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;PRESOLVE&#039;&#039;||Vector containing possible presolve options. If the length i of the vector is less than 7 elements, only the i first modes are considered. Also if i is longer than 7 elements, the elements after element 7 is ignored.&lt;br /&gt;
&lt;br /&gt;
PRESOLVE(1) ! = 0 (PRESOLVE ROWS) Presolve rows &lt;br /&gt;
&lt;br /&gt;
PRESOLVE(2) ! = 0 (PRESOLVE COLS) Presolve columns &lt;br /&gt;
&lt;br /&gt;
PRESOLVE(3) ! = 0 (PRESOLVE LINDEP)  Eliminate linearly depen- dent rows&lt;br /&gt;
&lt;br /&gt;
PRESOLVE(4) ! = 0 (PRESOLVE SOS) Convert constraints to SOSes (only SOS1 handled)&lt;br /&gt;
&lt;br /&gt;
PRESOLVE(5) ! = 0 (PRESOLVE REDUCEMIP)  If the phase 1 solu- tion process finds that a constraint is redundant then this constraint is deleted.&lt;br /&gt;
&lt;br /&gt;
PRESOLVE(6) ! = 0 (PRESOLVE DUALS) Calculate duals PRESOLVE(7) ! = 0 (PRESOLVE SENSDUALS) Calculate sensitivity if there are integer variables&lt;br /&gt;
&lt;br /&gt;
Default is not to do any presolve.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;PRICING_RULE&#039;&#039;||The pricing rule can be one of the following rules.&lt;br /&gt;
&lt;br /&gt;
PRICING_RULE = 0 Select first (PRICER_FIRSTINDEX)&lt;br /&gt;
&lt;br /&gt;
PRICING_RULE = 1 Select according to Dantzig (PRICER_DANTZIG) &lt;br /&gt;
&lt;br /&gt;
PRICING_RULE = 2 Devex pricing from Paula Harris (PRICER_DEVEX)&lt;br /&gt;
&lt;br /&gt;
PRICING_RULE = 3 Steepest Edge (PRICER STEEPESTEDGE)&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;PRICING_MODE&#039;&#039;||Additional pricing settings, any combination of the modes below. This is a binary vector. If the length i of the vector is less than 7 elements, only the i first modes are considered. Also if i is longer than 7 elements, the elements after element 7 is ignored.&lt;br /&gt;
&lt;br /&gt;
PRICE_PRIMALFALLBACK ! = 0 In case of Steepest Edge, fall back to DEVEX in primal.&lt;br /&gt;
&lt;br /&gt;
PRICE_MULTIPLE ! = 0 Preliminary implementation of the multiple pricing scheme.  This means that attractive candidate entering columns from one iteration may be used in the subsequent iteration, avoiding full updating of reduced costs. In the current implementation, MILPSOLVE only reuses the 2nd best entering column alternative.&lt;br /&gt;
&lt;br /&gt;
PRICE_PARTIAL ! = 0 Enable partial pricing&lt;br /&gt;
&lt;br /&gt;
PRICE_ADAPTIVE ! = 0 Temporarily use First Index if cycling is detected&lt;br /&gt;
&lt;br /&gt;
PRICE_RANDOMIZE  ! = 0 Adds a small randomization effect to the selected pricer&lt;br /&gt;
&lt;br /&gt;
PRICE_LOOPLEFT  ! = 0 Scan entering/leaving columns left rather than right&lt;br /&gt;
&lt;br /&gt;
PRICE_LOOPALTERNATE ! = 0 Scan entering/leaving columns alternatingly left/right&lt;br /&gt;
&lt;br /&gt;
Default basis is PRICER DEVEX combined with PRICE ADAPTIVE.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;sa&#039;&#039;||Struct  containing information  of the sensitivity analysis (SA) MILPSOLVE will perform.&lt;br /&gt;
&lt;br /&gt;
sa.obj =! 0 Perform sensitivity analysis on the objective function&lt;br /&gt;
&lt;br /&gt;
sa.obj = 0 Do not perform sensitivity analysis on the objective function &lt;br /&gt;
&lt;br /&gt;
sa.rhs =! 0 Perform sensitivity analysis on the right hand sides.&lt;br /&gt;
&lt;br /&gt;
sa.rhs = 0 Do not perform sensitivity analysis on the right hand sides.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SaveFileAfter&#039;&#039;||Name  of a file to save the MILPSOLVE object after presolve.The name must be of type string (char), Example: Prob.MILPSOLVE.SaveFileAfter = &#039;save2&#039; If the type is not char SaveFileBefore is set to save2.[file extension].&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SaveFileBefore&#039;&#039;||Name of a file to save the MILPSOLVE object before presolve. The name must be  of type string (char), Example: Prob.MILPSOLVE.SaveFileBefore = &#039;save1&#039;. If the type  is not char SaveFileBefore is set to save1.[file extension].&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SaveMode&#039;&#039;||1 - LP - MILPSOLVE  LP format&lt;br /&gt;
&lt;br /&gt;
2 - MPS - MPS format&lt;br /&gt;
&lt;br /&gt;
3 - FMPS - Free MPS format&lt;br /&gt;
&lt;br /&gt;
If empty, the default format LP is used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SCALE_LIMIT&#039;&#039;||Sets the relative  scaling convergence  criterion  to  the  absolute value of SCALE_LIMIT for the active scaling mode. The integer part of SCALE_LIMIT specifies the maximum number of iterations. Default is 5.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SCALING_ALG&#039;&#039;||Specifies which scaling algorithm will be used by MILPSOLVE.&lt;br /&gt;
&lt;br /&gt;
0 No scaling algorithm&lt;br /&gt;
&lt;br /&gt;
1 (SCALE EXTREME) Scale to convergence using largest absolute value&lt;br /&gt;
&lt;br /&gt;
2 (SCALE RANGE) Scale based on the simple numerical range&lt;br /&gt;
&lt;br /&gt;
3 (SCALE MEAN) Numerical range-based scaling&lt;br /&gt;
&lt;br /&gt;
4 (SCALE GEOMETRIC) Geometric scaling&lt;br /&gt;
&lt;br /&gt;
7 (SCALE CURTISREID) Curtis-reid scaling&lt;br /&gt;
&lt;br /&gt;
Default is 0, no scaling algorithm.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SCALING_ADD&#039;&#039;||Vector containing possible additional scaling parameters. If the length (i) of the vector is less than 7 elements, only the i first modes are considered. Also if i is longer than 7 elements, the elements after element 7 is ignored. SCALING ADD ! = 0 (SCALE_QUADRATIC)&lt;br /&gt;
&lt;br /&gt;
SCALING ADD ! = 0 (SCALE_LOGARITHMIC) Scale to convergence using logarithmic mean of all values&lt;br /&gt;
&lt;br /&gt;
SCALING_ADD  !  = 0  (SCALE_USERWEIGHT) User can specify scalars&lt;br /&gt;
&lt;br /&gt;
SCALING_ADD ! = 0 (SCALE_POWER2) also do Power scaling &lt;br /&gt;
&lt;br /&gt;
SCALING_ADD  ! = 0 (SCALE_EQUILIBRATE) Make  sure that  no scaled number is above 1&lt;br /&gt;
&lt;br /&gt;
SCALING_ADD ! = 0 (SCALE_INTEGERS) Also scaling integer vari- ables&lt;br /&gt;
&lt;br /&gt;
SCALING_ADD ! = 0 (SCALE_DYNUPDATE) Dynamic update&lt;br /&gt;
&lt;br /&gt;
Default is 0, no additional mode.&lt;br /&gt;
&lt;br /&gt;
Settings SCALE_DYNUPDATE is a way to make sure that scaling factors are recomputed. In that case, the scaling factors are recomputed also when a restart is done.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SIMPLEX_TYPE&#039;&#039;||Sets the desired combination of primal and dual simplex algorithms.&lt;br /&gt;
&lt;br /&gt;
5 (SIMPLEX_PRIMAL_PRIMAL) Phase1 Primal, Phase2 Primal&lt;br /&gt;
&lt;br /&gt;
6 (SIMPLEX_DUAL_PRIMAL) Phase1 Dual, Phase2 Primal&lt;br /&gt;
&lt;br /&gt;
9 (SIMPLEX_PRIMAL_DUAL) Phase1 Primal, Phase2 Dual&lt;br /&gt;
&lt;br /&gt;
10 (SIMPLEX_DUAL_DUAL) Phase1 Dual, Phase2 Dual&lt;br /&gt;
&lt;br /&gt;
Default is SIMPLEX DUAL PRIMAL (6).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SOLUTION_LIMIT&#039;&#039;||Sets the solution number that will be returned. This value is only consid- ered if there are integer, semi-continuous or SOS variables in the model so that the branch-and-bound algorithm is used. If there are more solutions with the same objective value, then this number specifies which solution must be returned. Default is 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;sos&#039;&#039;||List of structs containing data about Special Ordered Sets (SOS). See below for further description.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure, substructure of [[MilpSolve#Prob structure|Prob]]===&lt;br /&gt;
Options specific to mixed integer programming problems.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!|&#039;&#039;MIP&#039;&#039;||colspan=&amp;quot;2&amp;quot;|The following fields are used in &#039;&#039;Prob.MILPSOLVE&#039;&#039;:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;IntVars&#039;&#039;||Defines which variables are integers, of general type I or binary type B Variable indices should be in the range [1,...,n].&lt;br /&gt;
&lt;br /&gt;
IntVars is a logical vector ==&#039;&#039;&amp;gt; x&#039;&#039;(&#039;&#039;find&#039;&#039;(&#039;&#039;IntVars &amp;gt; &#039;&#039;0)) are integers&lt;br /&gt;
&lt;br /&gt;
IntVars is a vector of indices ==&#039;&#039;&amp;gt; x&#039;&#039;(&#039;&#039;IntVars&#039;&#039;) are integers (if [], then no integers of type I or B are defined) variables with x L=0 and x U=1, is are set to binary. It is possible to combine integer and semi-continuous type to obtain the semi-integer type.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;fIP&#039;&#039;||This parameter specifies the initial &amp;quot;at least better than&amp;quot; guess for objective function. This is only used in the branch-and-bound algorithm when integer variables exist in the model. All solutions with a worse objective value than this value are immediately rejected. The default is infinity.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SC&#039;&#039;||A vector with indices for variables of type semi-continuous (SC), a logical vector or a scalar (see MIP.IntVars). A semi-continuous variable i takes either the value 0 or some value in the range [x L(i), x U(i)].  It is possible to combine integer and semi-continuous type to obtain the semi-integer type.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;sos1&#039;&#039;||List of structures defining the Special Ordered Sets of Order One (SOS1). For SOS1 set k, sos1(k).var is a vector of indices for variables of type SOS1 in set k, sos1(k).row is the priority  of SOS k in the set of SOS1 and sos1(k).weight is a vector of the same length as sos1(k).var and it describes the order MILPSOLVE  will weight the variables in SOS1 set k.&lt;br /&gt;
&lt;br /&gt;
a low number of a row and a weight means high priority.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;sos2&#039;&#039;||List of n structures defining the Special Ordered Sets (SOS) of Order Two (SOS2). (see MIP.sos1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization. The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Optimal  solution (or some other solution if optimum could not been found)&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Optimal objective value.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;v_k&#039;&#039;||[rc; duals]. If Reduced cost and dual variables are not available, then v_k is empty.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag&#039;&#039;||TOMLAB information parameter.&lt;br /&gt;
&lt;br /&gt;
0 = Optimal solution found.&lt;br /&gt;
&lt;br /&gt;
1 = Suboptimal solution or user abort.&lt;br /&gt;
&lt;br /&gt;
2 = Unbounded solution.&lt;br /&gt;
&lt;br /&gt;
3 = Numerical failure.&lt;br /&gt;
&lt;br /&gt;
4 = Infeasible model.&lt;br /&gt;
&lt;br /&gt;
10 = Out of memory.&lt;br /&gt;
&lt;br /&gt;
11 = Branch and bound stopped.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Status text from MILPSOLVE.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||MILPSOLVE  information parameter.&lt;br /&gt;
&lt;br /&gt;
-2 = Out of memory.&lt;br /&gt;
&lt;br /&gt;
0 = Optimal solution found.&lt;br /&gt;
&lt;br /&gt;
1 = Suboptimal solution.&lt;br /&gt;
&lt;br /&gt;
2 = Infeasible model.&lt;br /&gt;
&lt;br /&gt;
3 = Unbounded solution.&lt;br /&gt;
&lt;br /&gt;
4 = Degenerate solution.&lt;br /&gt;
&lt;br /&gt;
5 = Numerical failure.&lt;br /&gt;
&lt;br /&gt;
6 = User abort.&lt;br /&gt;
&lt;br /&gt;
7 = Timeout.&lt;br /&gt;
&lt;br /&gt;
10 = Branch and bound failed.&lt;br /&gt;
&lt;br /&gt;
11 = Branch and bound stopped.&lt;br /&gt;
&lt;br /&gt;
12 = Feasible branch and bound solution.&lt;br /&gt;
&lt;br /&gt;
13 = No feasible branch and bound solution. Other = Unknown status.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;Iter&#039;&#039;||The total  number of nodes processed in the branch-and-bound algorithm. Is only applicable if the model contains integer variables. In the case of an LP model Result.Iter contains the number of iterations. This is however not documented.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MinorIter&#039;&#039;||The total number of Branch-and-bound iterations. When the problem is LP, MinorIter equals Result.Iter&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.basis&#039;&#039;||Optimal basis, on the format described above under Prob.MILPSOLVE.basis.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.MaxLevel&#039;&#039;||The deepest Branch-and-bound  level of the last solution. Is only applicable if the model contains integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.sa.objStatus&#039;&#039;||1 successful&lt;br /&gt;
&lt;br /&gt;
0 SA not requested&lt;br /&gt;
&lt;br /&gt;
-1 Error: error from MILPSOLVE&lt;br /&gt;
&lt;br /&gt;
-3 no SA available&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.sa.ObjLower&#039;&#039;||An array that  will  contain the values of the lower limits  on the objective function.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.sa.ObjUpper&#039;&#039;||An array that will contain the values of the upper limits on the objective function.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.sa.RhsStatus&#039;&#039;||see MILPSOLVE.sa.objStatus.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.sa.RhsLower&#039;&#039;||An array that will contain the values of the lower limits on the RHS.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.sa.RhsUpper&#039;&#039;||An array that will contain the values of the upper limits on the RHS.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable&lt;br /&gt;
&lt;br /&gt;
0 - free variable,&lt;br /&gt;
&lt;br /&gt;
1 - variable on lower bound,&lt;br /&gt;
&lt;br /&gt;
2 - variable on upper bound,&lt;br /&gt;
&lt;br /&gt;
3 - variable is fixed, lower bound = upper bound.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each linear constraint&lt;br /&gt;
&lt;br /&gt;
0 - Inactive constraint,&lt;br /&gt;
&lt;br /&gt;
1 - Linear constraint on lower bound,&lt;br /&gt;
&lt;br /&gt;
2 - Linear constraint on upper bound,&lt;br /&gt;
&lt;br /&gt;
3 - Linear equality constraint.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MilpSolve&amp;diff=3058</id>
		<title>MilpSolve</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MilpSolve&amp;diff=3058"/>
		<updated>2014-08-12T14:52:36Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Inputs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Solvers]]&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
Solve mixed integer linear programming problems (MILP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;MILPSOLVE&#039;&#039; solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) &amp;amp; = &amp;amp; c^{T}x &amp;amp;  \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;c, x, x_L, x_U \in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in\mathbb{R}^{m\times n}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_L, b_U \in \mathbb{R}^{m}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to&lt;br /&gt;
be integers.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;MILPSOLVE&#039;,Prob, 1); or &lt;br /&gt;
Prob = ProbCheck(Prob, &#039;MILPSOLVE&#039;); &lt;br /&gt;
Result = milpsolveTL(Prob); &lt;br /&gt;
PrintResult(Result,1);&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Prob&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Problem description structure. The following fields are used:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_L, x_U&#039;&#039;||Lower and upper bounds on variables. (Must be dense).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;b_L, b_U&#039;&#039;||Lower and upper bounds on linear constraints. (Must be dense).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;A&#039;&#039;||Linear constraint matrix. (Sparse or dense).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;QP.c&#039;&#039;||Linear objective function coefficients,  size &#039;&#039;nx&#039;&#039;1.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;BIG&#039;&#039;||Definition of infinity.  Default is 1e30.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;LargeScale&#039;&#039;||Defines if milpsolveTL will convert the A matrix to a sparse matrix or not.&lt;br /&gt;
&lt;br /&gt;
Largescale ! = 0 - sparse&lt;br /&gt;
&lt;br /&gt;
LargeScale = 0 - dense&lt;br /&gt;
&lt;br /&gt;
Default is to use the A matrix just as it is defined.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;PriLevOpt&#039;&#039;||Specifies the printlevel that will be used by MILPSOLVE.&lt;br /&gt;
&lt;br /&gt;
0 (NONE) No outputs&lt;br /&gt;
&lt;br /&gt;
1 (NEUTRAL) Only some specific debug messages in debug print rou- tines are reported.&lt;br /&gt;
&lt;br /&gt;
2 (CRITICAL) Only critical  messages are  reported.  Hard errors like instability,  out of memory.&lt;br /&gt;
&lt;br /&gt;
3 (SEVERE) Only severe messages are reported. Errors.&lt;br /&gt;
&lt;br /&gt;
4 (IMPORTANT) Only important messages are reported. Warnings and Errors.&lt;br /&gt;
&lt;br /&gt;
5 (NORMAL) Normal messages are reported.&lt;br /&gt;
&lt;br /&gt;
6 (DETAILED) Detailed messages are reported. Like model size, con- tinuing B&amp;amp;B improvements.&lt;br /&gt;
&lt;br /&gt;
7 (FULL)  All messages are reported. Useful for debugging purposes and small models.&lt;br /&gt;
&lt;br /&gt;
Default print level is 0, no outputs. PriLevOpt &#039;&#039;&amp;lt; &#039;&#039;0 is interpreted as 0, and larger than 7 is interpreted as 7.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by MILPSOLVE, stops with best point found.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;MILPSOLVE&#039;&#039;||Defines milpSolve specific options, see the table below.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;MIP&#039;&#039;||Structure with parameters specific to mixed integer programming problems in TOMLAB, see the table below.&lt;br /&gt;
|}&lt;br /&gt;
===MILPSOLVE structure, substructure of [[MilpSolve#Prob structure|Prob]]===&lt;br /&gt;
Solver specific options structure. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;MILPSOLVE&#039;&#039;||colspan=&amp;quot;2&amp;quot;|The following fields are used in &#039;&#039;Prob.MILPSOLVE&#039;&#039;:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ANTI_DEGEN&#039;&#039;||Binary vector. If empty, no anti-degeneracy handling is applied. If the length (i) of the vector is less than 8 elements,only the i first modes are considered. Also if i is longer than 8 elements, the elements after element8 are ignored.&lt;br /&gt;
&lt;br /&gt;
ANTI_DEGEN specifies if special handling must be done to reduce de- generacy/cycling while solving. Setting this flag can avoid cycling, but can also increase numerical instability.&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN FIXEDVARS  ! = 0 Check if  there are equality slacks in the basis and try  to drive  them out in order to reduce chance of degeneracy in Phase 1.&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN COLUMNCHECK  != 0&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN STALLING  != 0&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN NUMFAILURE != 0&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN LOSTFEAS != 0&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN INFEASIBLE  != 0&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN DYNAMIC != 0&lt;br /&gt;
&lt;br /&gt;
ANTIDEGEN DURINGBB != 0&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;basis&#039;&#039;||If empty or erroneous, default basis is used. Default start base is the all slack basis (the default simplex starting basis).&lt;br /&gt;
&lt;br /&gt;
Prob.MILPSOLVE.basis stores the basic variables. If an element is less then zero then it means on lower bound, else on upper bound. Element 0 of the array is unused. The default initial basis is bascolumn[x] = -x. By MILPSOLVE  convention, a basic variable is always on its lower bound, meaning that basic variables is always represented with a minus sign.&lt;br /&gt;
&lt;br /&gt;
When a restart is done, the basis vector must be assigned  a correct starting basis.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BASIS_CRASH&#039;&#039;||The set_basiscrash  function  specifies  which basis crash mode  MILP- SOLVE will used.&lt;br /&gt;
&lt;br /&gt;
When no base crash is done (the default), the initial  basis from which MILPSOLVE starts to solve the model is the basis containing all slack or artificial variables that is automatically associates with each constraint.&lt;br /&gt;
&lt;br /&gt;
When base crash is enabled, a heuristic &amp;quot;crash procedure&amp;quot; is executed before the first simplex iteration to quickly choose a basis matrix that has fewer artificial  variables. This procedure tends to reduce the num- ber of iterations to optimality  since a number of iterations are skipped. MILPSOLVE  starts iterating from this basis until optimality.&lt;br /&gt;
&lt;br /&gt;
BASIS_CRASH ! = 2 - No basis crash&lt;br /&gt;
&lt;br /&gt;
BASIS_CRASH = 2 - Most feasible basis&lt;br /&gt;
&lt;br /&gt;
Default is no basis crash.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BB_DEPTH_LIMIT&#039;&#039;||Sets the maximum branch-and-bound depth.  This value makes  sense only if there are integer, semi-continuous or SOS variables in the model so that the branch-and-bound algorithm is used to solve the model. The branch-and-bound algorithm will not go deeper than this level. When BB DEPTH LIMIT i set to 0 then there is no limit  to the depth. The default value is -50. A positive value means that the depth is absolute. A negative value means a relative B&amp;amp;B  depth.  The &amp;quot;order&amp;quot;  of a MIP problem is defined to be 2 times the number of binary variables plus the number of SC and SOS variables. A relative value of -x results in a maximum depth of x times the order of the MIP problem.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BB_FLOOR_FIRST&#039;&#039;||Specifies which branch to take first in branch-and-bound algorithm. Default value is 1.&lt;br /&gt;
&lt;br /&gt;
BB_FLOOR_FIRST = 0 (BRANCH CEILING) Take ceiling branch first &lt;br /&gt;
&lt;br /&gt;
BB_FLOOR_FIRST = 1 (BRANCH FLOOR) Take floor branch first &lt;br /&gt;
&lt;br /&gt;
BB_FLOOR_FIRST = 2 (BRANCH AUTOMATIC) MILPSOLVE decides which branch being taken first&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BB_RULE&#039;&#039;||Specifies the branch-and-bound rule. Default value is 0.&lt;br /&gt;
&lt;br /&gt;
BB_RULE  = 0 (NODE_FIRSTSELECT)  Select lowest  indexed non- integer column&lt;br /&gt;
&lt;br /&gt;
BB_RULE = 1 (NODE_GAPSELECT) Selection based on distance from the current bounds&lt;br /&gt;
&lt;br /&gt;
BB_RULE = 2 (NODE_RANGESELECT) Selection based on the largest current bound&lt;br /&gt;
&lt;br /&gt;
BB_RULE = 3 (NODE_FRACTIONSELECT) Selection based on largest fractional value&lt;br /&gt;
&lt;br /&gt;
BB_RULE = 4 (NODE_PSEUDOCOSTSELECT4) Simple, unweighted pseudo-cost of a variable&lt;br /&gt;
&lt;br /&gt;
BB_RULE = 5 (NODE_PSEUDONONINTSELECT)  This is an ex- tended pseudo-costing strategy based on minimizing the number of in- teger infeasibilities.&lt;br /&gt;
&lt;br /&gt;
BB RULE = 6 (NODE_PSEUDORATIOSELECT)  This is an extended pseudo-costing strategy based on maximizing the normal pseudo-cost divided by the number of infeasibilities. Effectively, it is similar to (the reciprocal of ) a cost/benefit ratio.&lt;br /&gt;
&lt;br /&gt;
BB_RULE = 7 (NODE_USERSELECT)&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BB_RULE_ADD&#039;&#039;||Additional values for the BB RULE. BB RULE is a vector. If the length i of the vector is less than 10 elements, only the i first modes are considered. Also if i is longer than 10 elements, the elements after element 10 is ignored.&lt;br /&gt;
&lt;br /&gt;
BB_RULE ADD(1) ! = 0 (NODE_WEIGHTREVERSEMODE)&lt;br /&gt;
&lt;br /&gt;
BB_RULE ADD(2)  ! = 0 (NODE BRANCHREVERSEMODE) In case when get bb floorfirst is BRANCH AUTOMATIC, select the opposite direction (lower/upper branch) that BRANCH AUTOMATIC had cho- sen.&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(3) ! = 0 (NODE_GREEDYMODE)&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(4) ! = 0 (NODE_PSEUDOCOSTMODE)&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(5) ! = 0 (NODE_DEPTHFIRSTMODE) Select  the node that has already been selected before the number of times&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(6) ! = 0 (NODE_RANDOMIZEMODE)&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(7) !  = 0 (NODE_DYNAMICMODE)    When NODE DEPTHFIRSTMODE is selected, switch off this mode when a first solution is found.&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(8) ! = 0 (NODE_RESTARTMODE)&lt;br /&gt;
&lt;br /&gt;
BB_RULE_ADD(9) ! = 0 (NODE_BREADTHFIRSTMODE) Select the node that has been selected before the fewest number of times or not at all BB RULE ADD(10) ! = 0 (NODE_AUTOORDER)&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BFP&#039;&#039;||Defines which Basis Factorization Package that will be used by MILP- SOLVE.&lt;br /&gt;
&lt;br /&gt;
BFP = 0 : LUSOL&lt;br /&gt;
&lt;br /&gt;
BFP = 1 : built in etaPHI from MILPSOLVE  v3.2&lt;br /&gt;
&lt;br /&gt;
BFP = 2 : Additional  etaPHI BFP = 3 : GLPK&lt;br /&gt;
&lt;br /&gt;
Default BFP is LUSOL.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BREAK_AT_FIRST&#039;&#039;||Specifies if the branch-and-bound algorithm stops at the first found so- lution (BREAK_AT_FIRST != 0) or not (BREAK_AT_FIRST = 0). De- fault is not to stop at the first found solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;BREAK_AT_VALUE&#039;&#039;||Specifies if the branch-and-bound algorithm stops when the object value is better than a given value. The default value is (-) infinity.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPAGAP&#039;&#039;||Specifies the absolute MIP gap tolerance for the branch and bound algo- rithm.  This tolerance is the difference between the best-found solution yet and the current solution. If the difference is smaller than this toler- ance then the solution (and all the sub-solutions) is rejected. The default value is 1e-9.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPGAP&#039;&#039;||Specifies the relative MIP gap tolerance for the branch and bound algo- rithm.  The default value is 1e-9.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPSB&#039;&#039;||Specifies the value that is used as a tolerance for the Right Hand Side (RHS) to determine whether  a value should be considered  as 0.  The default epsb value is 1.0e-10&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPSD&#039;&#039;||Specifies the value that is used as a tolerance for reduced costs to deter- mine whether a value should be considered as 0. The default epsd value is 1e-9. If EPSD is empty, EPSD is read from &#039;&#039;Prob.optParam.eps f&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPSEL&#039;&#039;||Specifies the value that is used as a tolerance for rounding values to zero. The default epsel value is 1e-12.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPSINT&#039;&#039;||Specifies  the  tolerance that  is used  to determine whether a floating- point number is in fact an integer. The default value for epsint is 1e-7. Changing this tolerance value can result in faster solving times, but the solution is less integer.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPSPERTURB&#039;&#039;||Specifies the value that is used as perturbation scalar for degenerative problems. The default epsperturb value is 1e-5.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;EPSPIVOT&#039;&#039;||Specifies the value that is used as a tolerance pivot element to determine whether a value should be considered as 0. The default epspivot value is 2e-7&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;IMPROVEMENT_LEVEL&#039;&#039;||Specifies the iterative improvement level.&lt;br /&gt;
&lt;br /&gt;
IMPROVEMENT LEVEL = 0 (IMPROVE  NONE) improve none &lt;br /&gt;
&lt;br /&gt;
IMPROVEMENT LEVEL = 1 (IMPROVE  FTRAN)  improve FTRAN &lt;br /&gt;
&lt;br /&gt;
IMPROVEMENT LEVEL = 2 (IMPROVE  BTRAN)  improve BTRAN&lt;br /&gt;
&lt;br /&gt;
IMPROVEMENT LEVEL  = 3 (IMPROVE  SOLVE) improve FTRAN + BTRAN.&lt;br /&gt;
&lt;br /&gt;
IMPROVEMENT LEVEL  = 4 (IMPROVE  INVERSE)  triggers automatic inverse accuracy control in the dual simplex, and when an error gap is exceeded the basis is reinverted&lt;br /&gt;
&lt;br /&gt;
Choice 1,2,3 should not be used with MILPSOLVE  5.1.1.3,  because of problems with the solver. Default is 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;LoadFile&#039;&#039;||File that  contains the  model. If LoadFile is a nonempty string which corresponds to actual file, then the model is read from this file rather than from the Prob struct.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;LoadMode&#039;&#039;||1 - LP - MILPSOLVE  LP format&lt;br /&gt;
&lt;br /&gt;
2 - MPS - MPS format&lt;br /&gt;
&lt;br /&gt;
3 - FMPS - Free MPS format&lt;br /&gt;
&lt;br /&gt;
A default value for this field does not exist. Both LoadFile and Load- Mode must be set if a problem will be loaded.&lt;br /&gt;
&lt;br /&gt;
If there is something wrong with LoadMode or LoadFile, an error mes- sage will be printed and MILPSOLVE  will be terminated. Leave Load- Mode and LoadFile empty if the problem not will be loaded from file.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;LogFile&#039;&#039;||Name of file to print MILPSOLVE  log on.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MAXIMIZE	&#039;&#039;||If  MAXIMIZE ! = 0, MILPSOLVE  is set to maximize the objective function, default is to minimize.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MAX_PIVOT&#039;&#039;||Sets the maximum number of pivots between a re-inversion of the matrix. Default is 42.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;NEG_RANGE&#039;&#039;||Specifies the negative value below which variables are split into a negative and a positive part.  This value must always be zero or negative. If a positive value is specified, then 0 is taken. The default value is -1e6.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;PRESOLVE&#039;&#039;||Vector containing possible presolve options. If the length i of the vector is less than 7 elements, only the i first modes are considered. Also if i is longer than 7 elements, the elements after element 7 is ignored.&lt;br /&gt;
&lt;br /&gt;
PRESOLVE(1) ! = 0 (PRESOLVE ROWS) Presolve rows &lt;br /&gt;
&lt;br /&gt;
PRESOLVE(2) ! = 0 (PRESOLVE COLS) Presolve columns &lt;br /&gt;
&lt;br /&gt;
PRESOLVE(3) ! = 0 (PRESOLVE LINDEP)  Eliminate linearly depen- dent rows&lt;br /&gt;
&lt;br /&gt;
PRESOLVE(4) ! = 0 (PRESOLVE SOS) Convert constraints to SOSes (only SOS1 handled)&lt;br /&gt;
&lt;br /&gt;
PRESOLVE(5) ! = 0 (PRESOLVE REDUCEMIP)  If the phase 1 solu- tion process finds that a constraint is redundant then this constraint is deleted.&lt;br /&gt;
&lt;br /&gt;
PRESOLVE(6) ! = 0 (PRESOLVE DUALS) Calculate duals PRESOLVE(7) ! = 0 (PRESOLVE SENSDUALS) Calculate sensitivity if there are integer variables&lt;br /&gt;
&lt;br /&gt;
Default is not to do any presolve.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;PRICING_RULE&#039;&#039;||The pricing rule can be one of the following rules.&lt;br /&gt;
&lt;br /&gt;
PRICING_RULE = 0 Select first (PRICER_FIRSTINDEX)&lt;br /&gt;
&lt;br /&gt;
PRICING_RULE = 1 Select according to Dantzig (PRICER_DANTZIG) &lt;br /&gt;
&lt;br /&gt;
PRICING_RULE = 2 Devex pricing from Paula Harris (PRICER_DEVEX)&lt;br /&gt;
&lt;br /&gt;
PRICING_RULE = 3 Steepest Edge (PRICER STEEPESTEDGE)&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;PRICING_MODE&#039;&#039;||Additional pricing settings, any combination of the modes below. This is a binary vector. If the length i of the vector is less than 7 elements, only the i first modes are considered. Also if i is longer than 7 elements, the elements after element 7 is ignored.&lt;br /&gt;
&lt;br /&gt;
PRICE_PRIMALFALLBACK ! = 0 In case of Steepest Edge, fall back to DEVEX in primal.&lt;br /&gt;
&lt;br /&gt;
PRICE_MULTIPLE ! = 0 Preliminary implementation of the multiple pricing scheme.  This means that attractive candidate entering columns from one iteration may be used in the subsequent iteration, avoiding full updating of reduced costs. In the current implementation, MILPSOLVE only reuses the 2nd best entering column alternative.&lt;br /&gt;
&lt;br /&gt;
PRICE_PARTIAL ! = 0 Enable partial pricing&lt;br /&gt;
&lt;br /&gt;
PRICE_ADAPTIVE ! = 0 Temporarily use First Index if cycling is detected&lt;br /&gt;
&lt;br /&gt;
PRICE_RANDOMIZE  ! = 0 Adds a small randomization effect to the selected pricer&lt;br /&gt;
&lt;br /&gt;
PRICE_LOOPLEFT  ! = 0 Scan entering/leaving columns left rather than right&lt;br /&gt;
&lt;br /&gt;
PRICE_LOOPALTERNATE ! = 0 Scan entering/leaving columns alternatingly left/right&lt;br /&gt;
&lt;br /&gt;
Default basis is PRICER DEVEX combined with PRICE ADAPTIVE.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;sa&#039;&#039;||Struct  containing information  of the sensitivity analysis (SA) MILPSOLVE will perform.&lt;br /&gt;
&lt;br /&gt;
sa.obj =! 0 Perform sensitivity analysis on the objective function&lt;br /&gt;
&lt;br /&gt;
sa.obj = 0 Do not perform sensitivity analysis on the objective function &lt;br /&gt;
&lt;br /&gt;
sa.rhs =! 0 Perform sensitivity analysis on the right hand sides.&lt;br /&gt;
&lt;br /&gt;
sa.rhs = 0 Do not perform sensitivity analysis on the right hand sides.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SaveFileAfter&#039;&#039;||Name  of a file to save the MILPSOLVE object after presolve.The name must be of type string (char), Example: Prob.MILPSOLVE.SaveFileAfter = &#039;save2&#039; If the type is not char SaveFileBefore is set to save2.[file extension].&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SaveFileBefore&#039;&#039;||Name of a file to save the MILPSOLVE object before presolve. The name must be  of type string (char), Example: Prob.MILPSOLVE.SaveFileBefore = &#039;save1&#039;. If the type  is not char SaveFileBefore is set to save1.[file extension].&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SaveMode&#039;&#039;||1 - LP - MILPSOLVE  LP format&lt;br /&gt;
&lt;br /&gt;
2 - MPS - MPS format&lt;br /&gt;
&lt;br /&gt;
3 - FMPS - Free MPS format&lt;br /&gt;
&lt;br /&gt;
If empty, the default format LP is used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SCALE_LIMIT&#039;&#039;||Sets the relative  scaling convergence  criterion  to  the  absolute value of SCALE_LIMIT for the active scaling mode. The integer part of SCALE_LIMIT specifies the maximum number of iterations. Default is 5.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SCALING_ALG&#039;&#039;||Specifies which scaling algorithm will be used by MILPSOLVE.&lt;br /&gt;
&lt;br /&gt;
0 No scaling algorithm&lt;br /&gt;
&lt;br /&gt;
1 (SCALE EXTREME) Scale to convergence using largest absolute value&lt;br /&gt;
&lt;br /&gt;
2 (SCALE RANGE) Scale based on the simple numerical range&lt;br /&gt;
&lt;br /&gt;
3 (SCALE MEAN) Numerical range-based scaling&lt;br /&gt;
&lt;br /&gt;
4 (SCALE GEOMETRIC) Geometric scaling&lt;br /&gt;
&lt;br /&gt;
7 (SCALE CURTISREID) Curtis-reid scaling&lt;br /&gt;
&lt;br /&gt;
Default is 0, no scaling algorithm.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SCALING_ADD&#039;&#039;||Vector containing possible additional scaling parameters. If the length (i) of the vector is less than 7 elements, only the i first modes are considered. Also if i is longer than 7 elements, the elements after element 7 is ignored. SCALING ADD ! = 0 (SCALE_QUADRATIC)&lt;br /&gt;
&lt;br /&gt;
SCALING ADD ! = 0 (SCALE_LOGARITHMIC) Scale to convergence using logarithmic mean of all values&lt;br /&gt;
&lt;br /&gt;
SCALING_ADD  !  = 0  (SCALE_USERWEIGHT) User can specify scalars&lt;br /&gt;
&lt;br /&gt;
SCALING_ADD ! = 0 (SCALE_POWER2) also do Power scaling &lt;br /&gt;
&lt;br /&gt;
SCALING_ADD  ! = 0 (SCALE_EQUILIBRATE) Make  sure that  no scaled number is above 1&lt;br /&gt;
&lt;br /&gt;
SCALING_ADD ! = 0 (SCALE_INTEGERS) Also scaling integer vari- ables&lt;br /&gt;
&lt;br /&gt;
SCALING_ADD ! = 0 (SCALE_DYNUPDATE) Dynamic update&lt;br /&gt;
&lt;br /&gt;
Default is 0, no additional mode.&lt;br /&gt;
&lt;br /&gt;
Settings SCALE_DYNUPDATE is a way to make sure that scaling factors are recomputed. In that case, the scaling factors are recomputed also when a restart is done.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SIMPLEX_TYPE&#039;&#039;||Sets the desired combination of primal and dual simplex algorithms.&lt;br /&gt;
&lt;br /&gt;
5 (SIMPLEX_PRIMAL_PRIMAL) Phase1 Primal, Phase2 Primal&lt;br /&gt;
&lt;br /&gt;
6 (SIMPLEX_DUAL_PRIMAL) Phase1 Dual, Phase2 Primal&lt;br /&gt;
&lt;br /&gt;
9 (SIMPLEX_PRIMAL_DUAL) Phase1 Primal, Phase2 Dual&lt;br /&gt;
&lt;br /&gt;
10 (SIMPLEX_DUAL_DUAL) Phase1 Dual, Phase2 Dual&lt;br /&gt;
&lt;br /&gt;
Default is SIMPLEX DUAL PRIMAL (6).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SOLUTION_LIMIT&#039;&#039;||Sets the solution number that will be returned. This value is only consid- ered if there are integer, semi-continuous or SOS variables in the model so that the branch-and-bound algorithm is used. If there are more solutions with the same objective value, then this number specifies which solution must be returned. Default is 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;sos&#039;&#039;||List of structs containing data about Special Ordered Sets (SOS). See below for further description.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure, substructure of [[MilpSolve#Prob structure|Prob]]===&lt;br /&gt;
Options specific to mixed integer programming problems.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!|&#039;&#039;MIP&#039;&#039;||colspan=&amp;quot;2&amp;quot;|The following fields are used in &#039;&#039;Prob.MILPSOLVE&#039;&#039;:&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;IntVars&#039;&#039;||Defines which variables are integers, of general type I or binary type B Variable indices should be in the range [1,...,n].&lt;br /&gt;
&lt;br /&gt;
IntVars is a logical vector ==&#039;&#039;&amp;gt; x&#039;&#039;(&#039;&#039;find&#039;&#039;(&#039;&#039;IntVars &amp;gt; &#039;&#039;0)) are integers&lt;br /&gt;
&lt;br /&gt;
IntVars is a vector of indices ==&#039;&#039;&amp;gt; x&#039;&#039;(&#039;&#039;IntVars&#039;&#039;) are integers (if [], then no integers of type I or B are defined) variables with x L=0 and x U=1, is are set to binary. It is possible to combine integer and semi-continuous type to obtain the semi-integer type.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;fIP&#039;&#039;||This parameter specifies the initial &amp;quot;at least better than&amp;quot; guess for objective function. This is only used in the branch-and-bound algorithm when integer variables exist in the model. All solutions with a worse objective value than this value are immediately rejected. The default is infinity.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;SC&#039;&#039;||A vector with indices for variables of type semi-continuous (SC), a logical vector or a scalar (see MIP.IntVars). A semi-continuous variable i takes either the value 0 or some value in the range [x L(i), x U(i)].  It is possible to combine integer and semi-continuous type to obtain the semi-integer type.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;sos1&#039;&#039;||List of structures defining the Special Ordered Sets of Order One (SOS1). For SOS1 set k, sos1(k).var is a vector of indices for variables of type SOS1 in set k, sos1(k).row is the priority  of SOS k in the set of SOS1 and sos1(k).weight is a vector of the same length as sos1(k).var and it describes the order MILPSOLVE  will weight the variables in SOS1 set k.&lt;br /&gt;
&lt;br /&gt;
a low number of a row and a weight means high priority.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;sos2&#039;&#039;||List of n structures defining the Special Ordered Sets (SOS) of Order Two (SOS2). (see MIP.sos1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization. The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Optimal  solution (or some other solution if optimum could not been found)&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Optimal objective value.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;v_k&#039;&#039;||[rc; duals]. If Reduced cost and dual variables are not available, then v_k is empty.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag&#039;&#039;||TOMLAB information parameter.&lt;br /&gt;
&lt;br /&gt;
0 = Optimal solution found.&lt;br /&gt;
&lt;br /&gt;
1 = Suboptimal solution or user abort.&lt;br /&gt;
&lt;br /&gt;
2 = Unbounded solution.&lt;br /&gt;
&lt;br /&gt;
3 = Numerical failure.&lt;br /&gt;
&lt;br /&gt;
4 = Infeasible model.&lt;br /&gt;
&lt;br /&gt;
10 = Out of memory.&lt;br /&gt;
&lt;br /&gt;
11 = Branch and bound stopped.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Status text from MILPSOLVE.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||MILPSOLVE  information parameter.&lt;br /&gt;
&lt;br /&gt;
-2 = Out of memory.&lt;br /&gt;
&lt;br /&gt;
0 = Optimal solution found.&lt;br /&gt;
&lt;br /&gt;
1 = Suboptimal solution.&lt;br /&gt;
&lt;br /&gt;
2 = Infeasible model.&lt;br /&gt;
&lt;br /&gt;
3 = Unbounded solution.&lt;br /&gt;
&lt;br /&gt;
4 = Degenerate solution.&lt;br /&gt;
&lt;br /&gt;
5 = Numerical failure.&lt;br /&gt;
&lt;br /&gt;
6 = User abort.&lt;br /&gt;
&lt;br /&gt;
7 = Timeout.&lt;br /&gt;
&lt;br /&gt;
10 = Branch and bound failed.&lt;br /&gt;
&lt;br /&gt;
11 = Branch and bound stopped.&lt;br /&gt;
&lt;br /&gt;
12 = Feasible branch and bound solution.&lt;br /&gt;
&lt;br /&gt;
13 = No feasible branch and bound solution. Other = Unknown status.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;Iter&#039;&#039;||The total  number of nodes processed in the branch-and-bound algorithm. Is only applicable if the model contains integer variables. In the case of an LP model Result.Iter contains the number of iterations. This is however not documented.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MinorIter&#039;&#039;||The total number of Branch-and-bound iterations. When the problem is LP, MinorIter equals Result.Iter&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.basis&#039;&#039;||Optimal basis, on the format described above under Prob.MILPSOLVE.basis.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.MaxLevel&#039;&#039;||The deepest Branch-and-bound  level of the last solution. Is only applicable if the model contains integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.sa.objStatus&#039;&#039;||1 successful&lt;br /&gt;
&lt;br /&gt;
0 SA not requested&lt;br /&gt;
&lt;br /&gt;
-1 Error: error from MILPSOLVE&lt;br /&gt;
&lt;br /&gt;
-3 no SA available&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.sa.ObjLower&#039;&#039;||An array that  will  contain the values of the lower limits  on the objective function.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.sa.ObjUpper&#039;&#039;||An array that will contain the values of the upper limits on the objective function.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.sa.RhsStatus&#039;&#039;||see MILPSOLVE.sa.objStatus.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.sa.RhsLower&#039;&#039;||An array that will contain the values of the lower limits on the RHS.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MILPSOLVE.sa.RhsUpper&#039;&#039;||An array that will contain the values of the upper limits on the RHS.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable&lt;br /&gt;
&lt;br /&gt;
0 - free variable,&lt;br /&gt;
&lt;br /&gt;
1 - variable on lower bound,&lt;br /&gt;
&lt;br /&gt;
2 - variable on upper bound,&lt;br /&gt;
&lt;br /&gt;
3 - variable is fixed, lower bound = upper bound.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each linear constraint&lt;br /&gt;
&lt;br /&gt;
0 - Inactive constraint,&lt;br /&gt;
&lt;br /&gt;
1 - Linear constraint on lower bound,&lt;br /&gt;
&lt;br /&gt;
2 - Linear constraint on upper bound,&lt;br /&gt;
&lt;br /&gt;
3 - Linear equality constraint.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=PROPT&amp;diff=3057</id>
		<title>PROPT</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=PROPT&amp;diff=3057"/>
		<updated>2014-08-07T07:27:35Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Modeling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
The following sections describe the functionality of PROPT. It is recommended to get familiar with a few examples (included with software) to get accustomed with the notations used.&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
&lt;br /&gt;
The PROPT software is included in the general TOMLAB  installation executable.  Please refer to the TOMLAB Installation manual for further information.  The following Matlab commands can be used to verify a successful installation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; cd c:\tomlab\&lt;br /&gt;
&amp;gt;&amp;gt; startup&lt;br /&gt;
&amp;gt;&amp;gt; vanDerPol&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After a few seconds two graphs should display the state and control variables for the example.&lt;br /&gt;
&lt;br /&gt;
===Foreword to the software===&lt;br /&gt;
&lt;br /&gt;
The software is provided without  limitations to all registered customers in order to demonstrated what PROPT is capable of. The implementation of the extensive example library (more then 100 test cases are included) has eliminated most bugs, but there may still be a few that has escaped attention.&lt;br /&gt;
&lt;br /&gt;
If problems are encountered  please email a copy of the problem for debugging. (All examples and data are treated as strictly confidential unless other instructions are given.) A status report can be expected within 24 hours.&lt;br /&gt;
&lt;br /&gt;
===Initial  remarks===&lt;br /&gt;
&lt;br /&gt;
PROPT is a combined modeling, compilation and solver engine for generation of highly complex optimal control problems. The users will  need to have licenses for the TOMLAB  Base Module, TOMLAB  /SNOPT  (or other suitable nonlinear TOMLAB solver) (always included with a demo license).&lt;br /&gt;
&lt;br /&gt;
It is highly recommended to take a look at the example collection included with the software before building a new problem (Tip:  Copy one of the examples and use as a starting-point).&lt;br /&gt;
&lt;br /&gt;
The brysonDenham problems in the examples folder contain very extensive  documentation, explanations and general information about the usage and software design.&lt;br /&gt;
&lt;br /&gt;
PROPT aims to encompass all areas of optimal control including:&lt;br /&gt;
&lt;br /&gt;
*Aerodynamic trajectory control&lt;br /&gt;
&lt;br /&gt;
*Bang bang control&lt;br /&gt;
&lt;br /&gt;
*Chemical engineering&lt;br /&gt;
&lt;br /&gt;
*Dynamic systems&lt;br /&gt;
&lt;br /&gt;
*General optimal control&lt;br /&gt;
&lt;br /&gt;
*Large-scale linear control&lt;br /&gt;
&lt;br /&gt;
*Multi-phase system control&lt;br /&gt;
&lt;br /&gt;
*Mechanical engineering design&lt;br /&gt;
&lt;br /&gt;
*Non-differentiable control&lt;br /&gt;
&lt;br /&gt;
*Parameters estimation for dynamic systems&lt;br /&gt;
&lt;br /&gt;
*Singular control&lt;br /&gt;
&lt;br /&gt;
At least one example from each area is included in the example suite.&lt;br /&gt;
&lt;br /&gt;
==Introduction to PROPT==&lt;br /&gt;
&lt;br /&gt;
PROPT  is a software package  intended to solve  dynamic optimization  problems.  Such problems are usually described by&lt;br /&gt;
&lt;br /&gt;
*A state-space model of a system.  This can be either a set of ordinary differential equations (&#039;&#039;&#039;ODE&#039;&#039;&#039;) or differential algebraic equations (&#039;&#039;&#039;DAE&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
*Initial  and/or final conditions (sometimes also conditions at other points).&lt;br /&gt;
&lt;br /&gt;
*A cost functional, i.e. a scalar value that depends on the state trajectories and the control function.&lt;br /&gt;
&lt;br /&gt;
*Sometimes, additional equations and variables that,  for example, relate the initial  and final conditions to each other.&lt;br /&gt;
&lt;br /&gt;
The goal of PROPT is to enable the formulation of such problem descriptions as seamlessly as possible, without having to worry about the mathematics of the actual solver. Once a problem has been properly defined, PROPT will take care of all the necessary steps in order to return a solution.2&lt;br /&gt;
&lt;br /&gt;
PROPT uses pseudospectral  collocation methods (and other options) for solving optimal control problems. This means that  the solution takes the form of a polynomial, and this polynomial satisfies the  DAE  and the path constraints at the collocation points (Note that both the DAE and the path constraints can be violated between collocation points). The default choice is to use Gauss points as collocation points, although the user can specify any set of points to use.&lt;br /&gt;
&lt;br /&gt;
It should be noted that the code is written in a general way, allowing for a DAE rather than just an ODE formulation with path constraints.&lt;br /&gt;
&lt;br /&gt;
Parameter estimation for dynamic systems is intrinsically supported by the framework as scalar decision variables can be introduced in the formulation.&lt;br /&gt;
&lt;br /&gt;
===Overview of PROPT syntax===&lt;br /&gt;
&lt;br /&gt;
A PROPT  problem is defined with  tomSym objects and standard Matlab  expressions (usually in cell arrays), which contain information about different aspects of the problem.&lt;br /&gt;
&lt;br /&gt;
In general an optimal control consists of the following:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Phases: &#039;&#039;&#039;A problem may contain several different phases, each with its own set of variables and equations.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Independent:  &#039;&#039;&#039;Variables that are independent (normally time).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;States: &#039;&#039;&#039;(Could also be called &amp;quot;dependent&amp;quot;) States (short for &#039;&#039;state variables &#039;&#039;) are continuous functions of the independent variable.  Control variables are (possibly) discontinuous functions of the same variable.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Controls:  &#039;&#039;&#039;Control variables (states that may be discontinuous).&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Scalars: &#039;&#039;&#039;A problem may also contain unknown scalar variables that are solved for at the same time as the controls and state trajectories.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Parameters:  &#039;&#039;&#039;Numeric constants that are used to define a problem.&lt;br /&gt;
&lt;br /&gt;
2 This is accomplished by translating the dynamic problem into a nonlinear programming  problem, generating Matlab  function  files and a TOMLAB problem, that  can be passed to a numeric solver.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Expressions: &#039;&#039;&#039;Intermediate results in computations.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Equations and inequalities:  &#039;&#039;&#039;The core of the problem definition.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Cost: &#039;&#039;&#039;A performance index or objective function to be minimized.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PROPT has many built-in  features:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Computation of the constant matrices used for the differentiation and integration of the polynomials used to approximate the solution to the trajectory optimization problem.&lt;br /&gt;
&lt;br /&gt;
*Code manipulation to turn user-supplied expressions into Matlab code for the cost function &#039;&#039;f &#039;&#039;and constraint function &#039;&#039;c &#039;&#039;(with two levels of analytical derivative and sparsity patterns). The files are passed to a nonlinear programming solver (by default) in TOMLAB  for final processing.&lt;br /&gt;
&lt;br /&gt;
*Functionality for plotting and computing a variety of information for the solution to the problem.&lt;br /&gt;
&lt;br /&gt;
*Integrated support for non-smooth (hybrid) optimal control problems.&lt;br /&gt;
&lt;br /&gt;
Note: The tomSym and PROPT softwares are the first Matlab modules to enable complete source transformation for optimal control problem.&lt;br /&gt;
&lt;br /&gt;
===Vector representation===&lt;br /&gt;
&lt;br /&gt;
In PROPT, each state is represented by a scalar &amp;lt;math&amp;gt;x_0&amp;lt;/math&amp;gt; and a vector &amp;lt;math&amp;gt;\mathbf{x} = \left[ \begin{array}{c}x_1 \\ \vdots \\ x_N&lt;br /&gt;
\end{array} \right]&amp;lt;/math&amp;gt;, such that &amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt; corresponds to the value of the state at the i:th collocation point.&lt;br /&gt;
&lt;br /&gt;
State equations are written on vector form, and hence apply at all&lt;br /&gt;
collocation points. The initial point is treated separately, so the&lt;br /&gt;
state equations do not apply at the initial point.&lt;br /&gt;
&lt;br /&gt;
The final state is not a free variable. Instead, it is computed via the interpolating polynomial.&lt;br /&gt;
&lt;br /&gt;
===Global optimality===&lt;br /&gt;
&lt;br /&gt;
PROPT does not use Pontryagin&#039;s maximum principle, rather it uses a pseudospectral method, however the results are mathematically equivalent. This means that if the solver prints &amp;quot;an optimal solution was found&amp;quot;, the solution satisfies necessary, but not sufficient, conditions of optimality.  It is guaranteed that the returned solution cannot be improved by an infinitesimal change in the trajectory, but there may exist completely different trajectories that are better.&lt;br /&gt;
&lt;br /&gt;
A recommended procedure for finding other solutions is to set conservative bounds for all variables (states, controls and parameters) and change the solver to &amp;quot;multiMin&amp;quot;. This will run a large number of optimizations from random starting points. If they all converge to the same minimum, this is an indication, but no guarantee, that the solution is indeed the global optimum.&lt;br /&gt;
&lt;br /&gt;
In  order guarantee that  the global optimum is obtained, one must either solve the Hamilton-Jacobi-Bellman equation (which PROPT does not) or show that the problem is convex and therefore only has one optimum (which 3 The  final  state could  be computed  by  integrating the  ODE,  however, as we use a DAE,  it is more convenient  to  go via  the interpolating polynomial.  Proofs that  these methods are mathematically equivalent have been published.&lt;br /&gt;
&lt;br /&gt;
may not be the case). If ezsolve claims that the problem type is &amp;quot;LP&amp;quot; or &amp;quot;QP&amp;quot;, the problem is convex, and the solution is a global optimum.&lt;br /&gt;
&lt;br /&gt;
It is also worth mentioning that a solution computed by PROPT only satisfies the ODE and constraints in the specified collocation points. There is no guarantee that the solution holds between those points. A common way of testing the integrity  of a solution is to re-run the computation using twice as many collocation points. If nothing changes, then there was probably enough points in the first computation.&lt;br /&gt;
&lt;br /&gt;
==Modeling optimal control problems==&lt;br /&gt;
&lt;br /&gt;
In order to understand the basic modeling features in PROPT it is best to start with a simple example. Open the file called &#039;&#039;brysonDenham.m &#039;&#039;located in /tomlab/propt/examples.&lt;br /&gt;
&lt;br /&gt;
There are also &#039;&#039;brysonDenhamShort.m&#039;&#039;,  &#039;&#039;brysonDenhamDetailed.m&#039;&#039;,  &#039;&#039;brysonDenhamTwoPhase.m &#039;&#039;that solve the same problem, utilizing different features of PROPT.&lt;br /&gt;
&lt;br /&gt;
To solve the problem, simply enter the following in the Matlab command prompt:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; brysonDenham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==A simple example==&lt;br /&gt;
&lt;br /&gt;
The following example can be found in &#039;&#039;vanDerPol.m &#039;&#039;in /tomlab/propt/examples. The objective is to solve the following problem:&lt;br /&gt;
&lt;br /&gt;
minimize:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ccc}&lt;br /&gt;
J &amp;amp;=&amp;amp; x_3(t_f)&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
subject to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{lll}&lt;br /&gt;
\frac{dx_1}{dt} &amp;amp;=&amp;amp; (1-x_2^2)*x_1-x_2+u \\&lt;br /&gt;
\frac{dx_2}{dt} &amp;amp;=&amp;amp; x_1 \\&lt;br /&gt;
\frac{dx_3}{dt} &amp;amp;=&amp;amp; x_1^2+x_2^2+u^2 \\&lt;br /&gt;
\\&lt;br /&gt;
-0.3 &amp;lt;= &amp;amp;u&amp;amp; &amp;lt;= 1.0 \\&lt;br /&gt;
x(t_0) &amp;amp;=&amp;amp; [0 \ 1 \ 0]&#039; \\&lt;br /&gt;
t_f &amp;amp;=&amp;amp; 5&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To solve the problem with PROPT the following compact code can be used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 toms t&lt;br /&gt;
 p = tomPhase(&#039;p&#039;, t, 0, 5, 60);&lt;br /&gt;
 setPhase(p);&lt;br /&gt;
&lt;br /&gt;
 tomStates x1 x2 x3&lt;br /&gt;
 tomControls u&lt;br /&gt;
&lt;br /&gt;
 % Initial guess&lt;br /&gt;
 x0 = {icollocate({x1 == 0; x2 == 1; x3 == 0})&lt;br /&gt;
     collocate(u == -0.01)};&lt;br /&gt;
&lt;br /&gt;
 % Box constraints&lt;br /&gt;
 cbox = {-10  &amp;lt;= icollocate(x1) &amp;lt;= 10&lt;br /&gt;
     -10  &amp;lt;= icollocate(x2) &amp;lt;= 10&lt;br /&gt;
     -10  &amp;lt;= icollocate(x3) &amp;lt;= 10&lt;br /&gt;
     -0.3 &amp;lt;= collocate(u)   &amp;lt;= 1};&lt;br /&gt;
&lt;br /&gt;
 % Boundary constraints&lt;br /&gt;
 cbnd = initial({x1 == 0; x2 == 1; x3 == 0});&lt;br /&gt;
&lt;br /&gt;
 % ODEs and path constraints&lt;br /&gt;
 ceq = collocate({dot(x1) == (1-x2.^2).*x1-x2+u&lt;br /&gt;
     dot(x2) == x1; dot(x3) == x1.^2+x2.^2+u.^2});&lt;br /&gt;
&lt;br /&gt;
 % Objective&lt;br /&gt;
 objective = final(x3);&lt;br /&gt;
&lt;br /&gt;
 % Solve the problem&lt;br /&gt;
 options = struct;&lt;br /&gt;
 options.name = &#039;Van Der Pol&#039;;&lt;br /&gt;
 solution = ezsolve(objective, {cbox, cbnd, ceq}, x0, options);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Code generation===&lt;br /&gt;
&lt;br /&gt;
It is possible to compile permanently, in order to keep the autogenerated code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; Prob = sym2prob(&#039;lpcon&#039;,objective, {cbox, cbnd, ceq}, x0, options);&lt;br /&gt;
&amp;gt;&amp;gt; Prob.FUNCS&lt;br /&gt;
&lt;br /&gt;
ans =&lt;br /&gt;
&lt;br /&gt;
      f: &#039;lp_f&#039;&lt;br /&gt;
      g: &#039;lp_g&#039;&lt;br /&gt;
      H: &#039;lp_H&#039;&lt;br /&gt;
      c: &#039;c_AFBHVT&#039;&lt;br /&gt;
     dc: &#039;dc_AFBHVT&#039;&lt;br /&gt;
    d2c: &#039;d2c_AFBHVT&#039;&lt;br /&gt;
      r: []&lt;br /&gt;
      J: []&lt;br /&gt;
    d2r: []&lt;br /&gt;
     fc: []&lt;br /&gt;
    gdc: []&lt;br /&gt;
     fg: []&lt;br /&gt;
    cdc: []&lt;br /&gt;
     rJ: []&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; edit c_AFBHVT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code that was generated can be found in the $TEMP directory. The objective in this case is linear and can found in the Prob structure (&#039;&#039;Prob.QP.c&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
Here is what the auto generated constraint code may look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 function out = c_AFBHVT(tempX,Prob)&lt;br /&gt;
 % c_AFBHVT - Autogenerated file.&lt;br /&gt;
 tempD=Prob.tomSym.c;&lt;br /&gt;
 x3_p = reshape(tempX(183:243),61,1);&lt;br /&gt;
 u_p = reshape(tempX(1:60),60,1);&lt;br /&gt;
 x2_p = reshape(tempX(122:182),61,1);&lt;br /&gt;
 x1_p = reshape(tempX(61:121),61,1);&lt;br /&gt;
 tempC7   = tempD{2}*x2_p;&lt;br /&gt;
 tempC8   = tempC7.^2;&lt;br /&gt;
 tempC10  = tempD{2}*x1_p;&lt;br /&gt;
 out      = [(tempD{3}-tempC8).*tempC10-tempC7+u_p-0.2*(tempD{1}*x1_p);...&lt;br /&gt;
            tempC10.^2+tempC8+u_p.^2-0.2*(tempD{1}*x3_p)];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the objective function to optimize (in this case a simple linear objective already available in TOMLAB  (hence not auto generated, but defined by the &#039;&#039;Prob &#039;&#039;field used)):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 function f = lp_f(x, Prob)&lt;br /&gt;
 f = Prob.QP.c&#039;*x(:);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Modeling===&lt;br /&gt;
&lt;br /&gt;
The PROPT system uses equations  and expressions (collected in cells) to model optimal control problems. Equations must be written either using (== &#039;&#039;&amp;lt;&#039;&#039;= &#039;&#039;&amp;gt;&#039;&#039;=) equality/inequality  markers.&lt;br /&gt;
&lt;br /&gt;
It is possible to include more than one equation on the same line. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 toms a b c&lt;br /&gt;
 cnbd = {a &amp;lt;= b &amp;lt;= c};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
does the same job as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 toms a b c&lt;br /&gt;
 cnbd = {a &amp;lt;= b&lt;br /&gt;
  b &amp;lt;= c};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(The same is true for equalities.) &lt;br /&gt;
&lt;br /&gt;
Be careful! This syntax is allowed in tomSym and PROPT because it is very common in mathematical notation, and allows for more compact code. Since it is not correct MATLAB notation, it will give unexpected results if the middle object is not a symbol. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 a = 1;&lt;br /&gt;
 b = 2;&lt;br /&gt;
 toms c&lt;br /&gt;
 cbnd = {a &amp;lt;= b &amp;lt;= c} % This gives an error!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When working with optimal control problems, one typically work with expressions that are valid for all collocation points.  The functions &#039;&#039;collocate &#039;&#039;and &#039;&#039;icollocate &#039;&#039;can be used to extend an arbitrary  expressions to the necessary collocation points.&lt;br /&gt;
&lt;br /&gt;
Consider for example the starting points:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 tomStates x1&lt;br /&gt;
 tomControls u1&lt;br /&gt;
 x0 = {icollocate(x1==1); collocate(u1==1)};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: icollocate, as it is working with a state variable, also includes the starting point.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Scale the problem:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Proper scaling may speed up convergence, and conversely, improperly scaled problems may converge slowly or not at all. Both unknowns and equations can be scaled.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Don&#039;t  use inf in equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is strongly discouraged to use -inf/inf in equations. This is because the equation may be evaluated by subtracting its left-hand side from the right-hand side and comparing the result to zero, which could have unexpected consequences.&lt;br /&gt;
&lt;br /&gt;
Equations like &#039;&#039;x &amp;lt;= Inf &#039;&#039; are better left out completely (Although in many cases tomSym will know to ignore them anyway).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Avoid  using non-smooth functions:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Because the optimization routines rely on derivatives, non-smooth functions should be avoided. A common exam- ple of a non-smooth function is the Heaviside function &#039;&#039;H &#039;&#039;, defined as &#039;&#039;H &#039;&#039;(&#039;&#039;x&#039;&#039;) = 1 for &#039;&#039;x &amp;gt; &#039;&#039;0, and &#039;&#039;H &#039;&#039;(&#039;&#039;x&#039;&#039;) = 0 for &#039;&#039;x = &#039;&#039;0,&lt;br /&gt;
&lt;br /&gt;
which in Matlab code can be written as (&#039;&#039;x &amp;gt; &#039;&#039;0). A smoother expression, which has the same behavior for &#039;&#039;x &amp;gt;&amp;gt; a &#039;&#039;is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
H_s = \frac{1}{2} \left( 1 + \tanh ( x/a ) \right) &lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the problems are non-smooth in the independent variable (time, t), the problem should normally be separated into phases.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Use descriptive names for equations, states, controls, and variables:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The names used for states, controls, and variables make the code easier to read. Consider using names such as&lt;br /&gt;
&lt;br /&gt;
&amp;quot;speed&amp;quot;, &amp;quot;position&amp;quot;,  &amp;quot;concentration&amp;quot;, etc. instead of &amp;quot;x1&amp;quot;,  &amp;quot;x2&amp;quot;,  &amp;quot;x3&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The names used for equations do not matter in most cases. However,  they will be useful when accessing Lagrange multipliers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Re-solve on successively finer grids:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If a very fine grid is needed in order to obtain a good solution, it is usually a good idea to solve the problem on a less dense grid first, and then re-solve, by using the obtained solution as a starting point. The following code will do the trick:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 for n=[10 40]&lt;br /&gt;
    p = tomPhase(&#039;p&#039;, t, 0, 6, n);&lt;br /&gt;
    setPhase(p);&lt;br /&gt;
    tomStates x1 x2&lt;br /&gt;
&lt;br /&gt;
    % Initial guess&lt;br /&gt;
    if n == 10&lt;br /&gt;
        x0 = {p1 == 0; p2 == 0};&lt;br /&gt;
    else&lt;br /&gt;
        x0 = {p1 == p1opt; p2 == p2opt&lt;br /&gt;
            icollocate({x1 == x1opt; x2 == x2opt})};&lt;br /&gt;
    end&lt;br /&gt;
    ...&lt;br /&gt;
    ...&lt;br /&gt;
    ...&lt;br /&gt;
    solution = ezsolve(objective, {cbox, cbnd, ceq}, x0, options);&lt;br /&gt;
&lt;br /&gt;
    % Optimal x, p for starting point&lt;br /&gt;
    x1opt = subs(x1, solution);&lt;br /&gt;
    x2opt = subs(x2, solution);&lt;br /&gt;
    p1opt = subs(p1, solution);&lt;br /&gt;
    p2opt = subs(p2, solution);&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See for example &#039;&#039;denbighSystem.m &#039;&#039;and &#039;&#039;drugScheduling.m&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
====Modeling notes====&lt;br /&gt;
&lt;br /&gt;
The examples included with the software in many cases just scratch the surface of the capabilities of PROPT. The software is designed for maximum user flexibility  and with many &amp;quot;hidden&amp;quot; features. The following notes are worth keeping in mind when modeling optimal control problems.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Left-hand  side treatment:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The left hand side of equations do not have to be a single time-derivative.  Things like &#039;&#039;collocate&#039;&#039;(&#039;&#039;m * dot&#039;&#039;(&#039;&#039;v&#039;&#039;) == &#039;&#039;F &#039;&#039;) work just fine, even if m is a state variable (A constraint that prevents m from becoming to small may improve convergence).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Second derivatives:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Second derivatives are allowed, as in &#039;&#039;collocate&#039;&#039;(&#039;&#039;dot&#039;&#039;(&#039;&#039;dot&#039;&#039;(&#039;&#039;x&#039;&#039;)) == &#039;&#039;a&#039;&#039;), although convergence is almost always better when including extra states to avoid this.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Equations do not have to include any time-derivative. For example &#039;&#039;collocate&#039;&#039;(0&#039;&#039;.&#039;&#039;5 &#039;&#039;* m * v&#039;&#039;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; + &#039;&#039;m * g * h&#039;&#039;)  == &#039;&#039;initial&#039;&#039;(0&#039;&#039;.&#039;&#039;5 &#039;&#039;* m * v&#039;&#039;&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; + &#039;&#039;m * g * h&#039;&#039;) will work just fine in the PROPT framework.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Fixed  end times:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Problems with fixed end-times enables the use of any form of expression involving the collocation points in time since the collocation points are pre-determined.&lt;br /&gt;
&lt;br /&gt;
The following illustrates how t can (should) be used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 toms t&lt;br /&gt;
 % Will cause an error if myfunc is undefined for tomSym&lt;br /&gt;
 myfunc(t);&lt;br /&gt;
&lt;br /&gt;
 % This works since collocate(t) is a double vector and not a&lt;br /&gt;
 % tomSym object.&lt;br /&gt;
 myfunc(collocate(t))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also worth noting that feval bypasses tomSym, so it is possible to call any function, at the expense of slower derivatives. In the case of a fixed end time, there are no derivatives:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 toms t&lt;br /&gt;
 % Works since tomSym is bypassed.&lt;br /&gt;
 collocate(feval(&#039;myfunc&#039;,t))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Segmented constraints:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
With PROPT is it possible to define constraints that are valid for only a part of phase. In addition, it is possible to define constraints for other points than the collocation points which could assist in avoiding constraint violations in between the collocation points.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;mcollocate &#039;&#039;automates this process for the entire phase and imposes twice  the number of constraints,  i.e.  the solution will be constrained  in between each collocation point as well.&lt;br /&gt;
&lt;br /&gt;
The following example shows how to set segmented constraints (valid for a part of the phase) for time-free and time-fixed problems.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 % For variable end time (the number of constraints need to be fixed)&lt;br /&gt;
 % Relax all constraints below the cutoff, while 0 above&lt;br /&gt;
 con = {collocate((8*(t-0.5).^2-0.5-x2) &amp;gt;= -1e6*(t&amp;lt;0.4))};&lt;br /&gt;
&lt;br /&gt;
 % When the end time is fixed there are many possible solutions.&lt;br /&gt;
 % One can use custom points or a set of collocation points if needed.&lt;br /&gt;
 tsteps = collocate(t);&lt;br /&gt;
 n = length(tsteps);&lt;br /&gt;
 y = atPoints(p,tsteps(round(n/3):round(n/2)),(8*(t-0.5).^2-0.5-x2));&lt;br /&gt;
 con = {y &amp;gt;= 0};&lt;br /&gt;
&lt;br /&gt;
 % Alternatively one could write for custom points.&lt;br /&gt;
 con = atPoints(p,linspace(0.4, 0.5, 10),(8*(t-0.5).^2-0.5-x2) &amp;gt;= 0);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Constant unknowns:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is possible to mix constant unknowns (created with &amp;quot;toms&amp;quot;)  into the equations, and those will become part of the solution: &#039;&#039;icollocate&#039;&#039;(0&#039;&#039;.&#039;&#039;5 &#039;&#039;* m * v&#039;&#039;2 + &#039;&#039;m * g * h &#039;&#039;== &#039;&#039;Etot&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Higher-index DAEs:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Higher-index DAEs usually converge nicely with PROPT. One can use dot() on entire expressions to get symbolic time derivatives to use when creating lower index DAEs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lagrangian equations:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Deducing Lagrangian equations manually is usually not necessary, but if needed, one can use tomSym for derivatives. TomSym allows for computation of symbolic derivatives with respect to constant scalars and matrices using the &amp;quot;derivative&amp;quot; function, but this does not work for tomStates or tomControls.  The current implementation is therefore to create expressions using normal tomSym variables (created with the &amp;quot;toms&amp;quot;  command), use the derivative function and then use &amp;quot;subs&amp;quot; function to replace the constants with states and controls before calling collocate.&lt;br /&gt;
&lt;br /&gt;
===Independent variables, scalars and constants===&lt;br /&gt;
&lt;br /&gt;
Independent variables can be defined  as follows (yes, it is that simple!):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 toms t  % Time&lt;br /&gt;
 toms tf % Final time&lt;br /&gt;
 % Phase name, time, start, end, number of nodes&lt;br /&gt;
 p = tomPhase(&#039;p&#039;, t, 0, tf, 25);&lt;br /&gt;
 cbox = {20 &amp;lt;= tf &amp;lt;= 30}; % Bounds on end time&lt;br /&gt;
 x0 = {tf == 22); % Starting point for end time (must be set before used&lt;br /&gt;
                  % in other expressions)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also possible use scalar variables  within the PROPT framework:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 toms p1&lt;br /&gt;
 cbox = {1 &amp;lt;= p1 &amp;lt;= 2};&lt;br /&gt;
 x0 = {p1 == 1.3);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the variables define lower, upper bound and a suitable guess.&lt;br /&gt;
&lt;br /&gt;
A constant variable ki0 can be defined with the following statement (i.e. no difference from normal Matlab code):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ki0 = [1e3; 1e7; 10; 1e-3];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===State and control variables===&lt;br /&gt;
&lt;br /&gt;
The difference between state and control variables is that  states are continuous between  phases, while control variables can be discontinuous.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
Unconstrained state variable &#039;&#039;x&#039;&#039;1  with a starting guess from 0 to 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 tomStates x1&lt;br /&gt;
 x0 = icollocate(x1 == t/tf);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
State variable &#039;&#039;x&#039;&#039;1  with  bounds of 0.5 and 10.  The starting guess should be set as well  to avoid any potential singularities:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 tomStates x1&lt;br /&gt;
 cbox = {0.5 &amp;lt;= icollocate(x1) &amp;lt;= 10};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Control variable T with a &amp;quot;table&amp;quot;  defining the starting point:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 tomControls T&lt;br /&gt;
 x0 = collocate(T==273*(t&amp;lt;100)+415*(t&amp;gt;=100));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Boundary, path, event and integral constraints===&lt;br /&gt;
&lt;br /&gt;
Boundary constraints are defined as expressions since the problem size is reduced. For example if state variable&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;x&#039;&#039;1  has to start in 1 and end in 1 and &#039;&#039;x&#039;&#039;2  has to travel from 0 to 2 define:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cbnd1 = initial(x1 == 1);&lt;br /&gt;
 cbnd2 = initial(x2 == 0);&lt;br /&gt;
 cbnd3 = final(x1 == 1);&lt;br /&gt;
 cbnd4 = final(x2 == 2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A variety of path, event and integral constraints are shown below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 x3min     = icollocate(x3 &amp;gt;= 0.5);    % Path constraint&lt;br /&gt;
 integral1 = {integrate(x3) - 1 == 0}; % Integral constraint&lt;br /&gt;
 final3    = final(x3) &amp;gt;= 0.5;         % Final event constraint&lt;br /&gt;
 init1     = initial(x1) &amp;lt;= 2.0;       % Initial event constraint&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039;: When defining integral constraints that span over several phase, use either of the following notations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
integrate(p1,x3p1) + integrate(p2,x3p1) + integrate(p3,x3p1) &amp;lt;= 2.1e3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or with expressions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 p1qx3 == integrate(p1,x3p1);&lt;br /&gt;
 p2qx3 == integrate(p2,x3p1);&lt;br /&gt;
 p3qx3 == integrate(p3,x3p1);&lt;br /&gt;
&lt;br /&gt;
 qx2sum = {p1qx3 + p2qx3 + p3qx3 &amp;lt;= 2.1e3};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Multi-phase optimal  control==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;brysonDenhamTwoPhase.m &#039;&#039;is a good example for multi-phase optimal control. The user simply have to link the states to complete the problem formulation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 link = {final(p1,x1p1) == initial(p2,x1p2)&lt;br /&gt;
         final(p1,x2p1) == initial(p2,x2p2)};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to keep in mind that the costs have to be individually  defined for the phases in the case that a integrating function is used.&lt;br /&gt;
&lt;br /&gt;
==Scaling of optimal control problems==&lt;br /&gt;
&lt;br /&gt;
Scaling of optimal control problems are best done after they are defined. The level of the cost function, variables, states and controls should be balanced around 1.&lt;br /&gt;
&lt;br /&gt;
PROPT  does however, have an automated scaling feature that  could be tested if needed. The option can be activated by setting:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 options.scale = &#039;auto&#039;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;shuttleEntry.m &#039;&#039;and &#039;&#039;minimumClimbEng.m &#039;&#039;exemplify how to use and enable the scaling of optimal control problems.&lt;br /&gt;
&lt;br /&gt;
==Setting  solver and options==&lt;br /&gt;
&lt;br /&gt;
The solver options can be set in &#039;&#039;options.*&#039;&#039;. See &#039;&#039;help ezsolve &#039;&#039;for more information. The following code exemplifies  some basic settings:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options.solver = &#039;knitro&#039;; % Change the solver&lt;br /&gt;
options.type   = &#039;lpcon&#039;;  % Set the problem type to avoid identification&lt;br /&gt;
                            % Nonlinear problem with linear objective&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also possible to gain complete control over the solver by bypassing the &#039;&#039;ezsolve &#039;&#039;command  and converting the problem to a standard TOMLAB  Prob structure.&lt;br /&gt;
&lt;br /&gt;
The following code will, for example, run vanDerPol (it  is possible to edit the example directly of course), then convert the problem and run it with ALG 3 (SLQP) in KNITRO,  and finally extract the standard solution.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 vanDerPol;&lt;br /&gt;
 Prob = sym2prob(objective, {cbox, cbnd, ceq}, x0, options);&lt;br /&gt;
 Prob.KNITRO.options.ALG = 3;&lt;br /&gt;
 Result = tomRun(&#039;knitro&#039;, Prob, 1);&lt;br /&gt;
 solution = getSolution(Result);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Solving optimal  control problems==&lt;br /&gt;
&lt;br /&gt;
The preceding sections show how to setup and define an optimal control problem using PROPT.  Many addi- tional features have been implemented,  such as advanced input error identification, to facilitate fast modeling and debugging.&lt;br /&gt;
&lt;br /&gt;
[[PROPT functions for setting upp an ODE]]&lt;br /&gt;
&lt;br /&gt;
===Advanced functions and operators===&lt;br /&gt;
&lt;br /&gt;
Some user may wish to use more advanced function of PROPT as well. The following function can be useful in many situations.&lt;br /&gt;
&lt;br /&gt;
====atPoints - Expand  a propt  tomSym  to a set of points on a phase.====&lt;br /&gt;
&lt;br /&gt;
y = atPoints(phase, t, x)  for a m-by-n tomSym object x, and a vector t of length p, returns an p-by-m*n tomSym with values of x for each value of t (this is done via substitution).&lt;br /&gt;
&lt;br /&gt;
If x is a cell array of tomSym objects, then atPoints is applied recursively to each element in the array.&lt;br /&gt;
&lt;br /&gt;
If x is an equality or inequality, and the left-hand-side is divided by a symbolic phase.tdelta, then both sides are multiplied by phase.tdelta&lt;br /&gt;
&lt;br /&gt;
See also: tomPhase&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Overloaded methods:&lt;br /&gt;
     tomSym/atPoints&lt;br /&gt;
     tomSym/atPoints&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====interp1p - Polynomial  interpolation.====&lt;br /&gt;
&lt;br /&gt;
yi = interp1p(x,y,xi) fits a polynomial to the points (x,y) and evaluates that polynomial at xi to compute yi. The behavior of interp1p is different from that of interp1 in that the same high-degree  polynomial is fitted to all points. This is usually not a good idea, and for general interpolation interp1 is to be preferred. However, it works well in some cases, such as when the points x are the roots of a Legendre polynomial.&lt;br /&gt;
&lt;br /&gt;
Overloaded  methods: tomSym/interp1p tomSym/interp1p&lt;br /&gt;
&lt;br /&gt;
====proptGausspoints - Generate  a list of gauss points.====&lt;br /&gt;
&lt;br /&gt;
[r, w]  = gausspoints(nquad) = proptGausspoints(n)&lt;br /&gt;
&lt;br /&gt;
Input:  n - The number of points requested&lt;br /&gt;
&lt;br /&gt;
Output r - The Gauss points (roots of a Legendre polynomial of order n.) w - The weights for Gaussian quadrature.&lt;br /&gt;
&lt;br /&gt;
====proptDiffMatrix - Differentiation matrix  for interpPoly.====&lt;br /&gt;
&lt;br /&gt;
M   = proptDiffMatrix(X,XI,N) creates a matrix  M of the values of the N:th  derivatives  of the interpolating polynomials defined by the roots X, at the points XI. Each column of M corresponds to a specific root, and each row corresponds to a component of XI.&lt;br /&gt;
&lt;br /&gt;
===Screen output===&lt;br /&gt;
&lt;br /&gt;
The screen output depends on the functionality of the nonlinear programming solver. In most cases screen output can be generated with the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options.PriLevOpt = 1; % or higher for more output&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A print level of 3 is recommended when using the global NLP solver &#039;&#039;multiMin&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Solution structure===&lt;br /&gt;
&lt;br /&gt;
The solution structure from PROPT contains the relevant results.&lt;br /&gt;
&lt;br /&gt;
It is possible to use the solution information to evaluate any custom expressions. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 subs(x1.*x2,solution);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Plotting===&lt;br /&gt;
&lt;br /&gt;
See [[Plotting and Evaluating PROPT Results]]&lt;br /&gt;
&lt;br /&gt;
For a quick way to do a simple plot, see &#039;&#039;help tomSym/ezplot&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Optimal Control Examples==&lt;br /&gt;
&lt;br /&gt;
*[[PROPT Optimal Control Examples|Optimal Control Examples]]&lt;br /&gt;
&lt;br /&gt;
[[Category:PROPT]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=PdcoTL&amp;diff=3056</id>
		<title>PdcoTL</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=PdcoTL&amp;diff=3056"/>
		<updated>2014-08-06T14:55:05Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Solvers]]&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pdcoTL &#039;&#039;solves linearly constrained convex nonlinear optimization problems of the kind&lt;br /&gt;
&lt;br /&gt;
====Equation: pdcoTL====&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_x &amp;amp; f(x) \\&lt;br /&gt;
\mathrm{s/t} &amp;amp; x_L &amp;amp; \leq &amp;amp; x  &amp;amp; \leq &amp;amp; x_U \\&lt;br /&gt;
{}           &amp;amp; b_L &amp;amp; \leq &amp;amp; Ax &amp;amp; \leq &amp;amp; b_U \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;f(x)&amp;lt;/math&amp;gt; is a convex nonlinear function, &amp;lt;math&amp;gt;x,x_L,x_U \in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m \times n}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_L, b_U \in \mathbb{R}^{m}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result=tomRun(&#039;pdco&#039;,Prob,...);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Prob&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Problem description structure. The following fields are used:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Initial &#039;&#039;x &#039;&#039;vector, used if non-empty.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;b_L,b_U&#039;&#039;||Lower and upper bounds for the linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;PriLevOpt&#039;&#039;||Print level in &#039;&#039;pdsco &#039;&#039;solver. If &#039;&#039;&amp;gt; &#039;&#039;0: prints summary information.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SOL&#039;&#039;||Structure with SOL special parameters:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;pdco&#039;&#039;||Options structure with fields as defined  by &#039;&#039;pdcoSet&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;d1&#039;&#039;||Primal regularization vector. Must be a positive vector (length &#039;&#039;n&#039;&#039;) or scalar, in which case &#039;&#039;D&#039;&#039;1 = &#039;&#039;diag&#039;&#039;(&#039;&#039;d&#039;&#039;1) is used. Default: 10&#039;&#039;-&#039;&#039;4 .&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;d2&#039;&#039;||Dual regularization vector.  Must be a positive vector (length &#039;&#039;m&#039;&#039;) or a scalar value, in which case &#039;&#039;D&#039;&#039;2 = &#039;&#039;diag&#039;&#039;(&#039;&#039;d&#039;&#039;2) is used. Default: 10&#039;&#039;-&#039;&#039;4 .&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;y0&#039;&#039;||Initial  dual parameters for linear constraints (default 0)&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;z0&#039;&#039;||Initial  dual parameters for simple bounds (default 1&#039;&#039;/N &#039;&#039;)&lt;br /&gt;
&#039;&#039;xsize&#039;&#039;,&#039;&#039;zsize &#039;&#039;are used to scale (&#039;&#039;x, y, z&#039;&#039;). Good estimates should improve the performance of the barrier method.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xsize&#039;&#039;||Estimate of the biggest x at the solution. (default 1&#039;&#039;/N &#039;&#039;)&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;zsize&#039;&#039;||Estimate of the biggest z at the solution. (default 1&#039;&#039;/N &#039;&#039;)&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;optParam&#039;&#039;||Structure with optimization parameters. The following fields are used:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;MaxIter&#039;&#039;||Maximum number of iterations. (&#039;&#039;Prob.SOL.pdco.MaxIter&#039;&#039;).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;MinorIter&#039;&#039;||Maximum number of iterations in &#039;&#039;LSQR&#039;&#039; (&#039;&#039;Prob.SOL.pdco.LSQRMaxIter&#039;&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;eps_x&#039;&#039;||Accuracy for satisfying &#039;&#039;x&#039;&#039;1 &#039;&#039;. * z&#039;&#039;1 = 0&#039;&#039;, x&#039;&#039;2 &#039;&#039;.z&#039;&#039;1 = 0, where &#039;&#039;z &#039;&#039;= &#039;&#039;z&#039;&#039;1 &#039;&#039;- z&#039;&#039;2 and &#039;&#039;z&#039;&#039;1 &#039;&#039;, z&#039;&#039;2 &#039;&#039;&amp;gt; &#039;&#039;0.(&#039;&#039;Prob.SOL.pdco.OptTol&#039;&#039;)&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;bTol&#039;&#039;||Accuracy for satisfying &#039;&#039;Ax &#039;&#039;+ &#039;&#039;D&#039;&#039;&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&#039;&#039;r &#039;&#039;= &#039;&#039;b&#039;&#039;, &#039;&#039;A&amp;lt;sup&amp;gt;T&amp;lt;/sup&amp;gt; y &#039;&#039;+ &#039;&#039;z &#039;&#039;= &#039;&#039;&amp;amp;nabla;f &#039;&#039;(&#039;&#039;x&#039;&#039;) and &#039;&#039;x - x&#039;&#039;1  = &#039;&#039;bL , x &#039;&#039;+&#039;&#039;x&#039;&#039;2 = &#039;&#039;bU &#039;&#039;, where &#039;&#039;x&#039;&#039;&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; &#039;&#039;, x&#039;&#039;&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;  &#039;&#039;&amp;gt; &#039;&#039;0 (&#039;&#039;Prob.SOL.pdco.FeaTol&#039;&#039;)&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;wait&#039;&#039;||0 - solve the problem with default internal parameters; 1 - pause: allows interactive resetting of parameters. (&#039;&#039;Prob.SOL.pdco.wait&#039;&#039;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization. The following fields are set by &#039;&#039;pdcoTL&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution vector&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient of the function at the solution&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;H_k&#039;&#039;||Hessian of the function at the solution, diagonal only&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Initial  solution vector&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_0&#039;&#039;||Function value at start, x = x_0&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of variables. Free == 0; On lower == 1; On upper == 2; Fixed == 3;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of linear constraints.  Free == 0; Lower == 1; Upper == 2; Equality == 3;&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;v_k&#039;&#039;||Lagrangian multipliers (orignal bounds + constraints )&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;y_k&#039;&#039;||Lagrangian multipliers (for bounds + dual solution vector) The full [&#039;&#039;z&#039;&#039;; &#039;&#039;y&#039;&#039;] vector as returned from &#039;&#039;pdco&#039;&#039;, including slacks and extra linear constraints after rewriting constraints:  &#039;&#039;-inf  &amp;lt; b_L &amp;lt; A * x &amp;lt; b_U &amp;lt; inf &#039;&#039;; non-inf lower AND upper bounds&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitFlag&#039;&#039;||Tomlab Exit status from &#039;&#039;pdco &#039;&#039;MEX&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||&#039;&#039;pdco&#039;&#039;information parameter: 0 = Solution found;&lt;br /&gt;
|-&lt;br /&gt;
|||0||Solution found&lt;br /&gt;
|-&lt;br /&gt;
|||1||Too many iterations&lt;br /&gt;
|-&lt;br /&gt;
|||2||Linesearch failed too often&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter&#039;&#039;||Number of iterations&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;FuncEv&#039;&#039;||Number of function evaluations &lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;GradEv&#039;&#039;||Number of gradient evaluations &lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;HessEv&#039;&#039;||Number of Hessian evaluations&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Name of the solver (&#039;pdco&#039;)&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of the solver&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pdco &#039;&#039;implements an primal-dual barrier method developed at Stanford Systems Optimization Laboratory (SOL).&lt;br /&gt;
&lt;br /&gt;
The problem ([[#Equation: pdcoTL]]) is first reformulated into SOL PDCO form:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_x &amp;amp; f(x) \\&lt;br /&gt;
\mathrm{s/t} &amp;amp; x_L &amp;amp; \leq &amp;amp; x  &amp;amp; \leq &amp;amp; x_U \\&lt;br /&gt;
{}           &amp;amp;     &amp;amp;      &amp;amp; Ax &amp;amp;   =  &amp;amp; b \\&lt;br /&gt;
{}           &amp;amp; {r \mathrm{\ unconstrained}} \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem actually solved by &#039;&#039;pdco &#039;&#039;is&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{lllcll}&lt;br /&gt;
\min\limits_{x,r} &amp;amp;&lt;br /&gt;
{\phi(x) + \frac{1}{2}\|D_1 x\|^2 + \frac{1}{2}\|r\|^2 } \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{lllcll}&lt;br /&gt;
\mathrm{s/t}  &amp;amp; x_L &amp;amp; \leq &amp;amp; x      &amp;amp; \leq &amp;amp; x_U  \\&lt;br /&gt;
{}            &amp;amp; Ax  &amp;amp;  +   &amp;amp; D_{2}r &amp;amp;   =  &amp;amp; b    \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;D_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;D_2&amp;lt;/math&amp;gt; are positive-definite diagonal matrices defined from &amp;lt;math&amp;gt;d_1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;d_2&amp;lt;/math&amp;gt; given in Prob.SOL.d1 and Prob.SOL.d2.&lt;br /&gt;
&lt;br /&gt;
In particular, &amp;lt;math&amp;gt;d_2&amp;lt;/math&amp;gt; indicates the accuracy required for satisfying each row of &amp;lt;math&amp;gt;Ax=b&amp;lt;/math&amp;gt;. See &#039;&#039;pdco.m&#039;&#039; for a detailed discussion of &amp;lt;math&amp;gt;D_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;D_2&amp;lt;/math&amp;gt;. Note that in &#039;&#039;pdco&#039;&#039;, the objective &amp;lt;math&amp;gt;f(x)&amp;lt;/math&amp;gt; is denoted &amp;lt;math&amp;gt;\phi(x)&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;bl == x\_L&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;bu == x\_U&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
Problem 14 and 15 in &#039;&#039;tomlab/testprob/con prob.m &#039;&#039;are good examples of the use of &#039;&#039;pdcoTL&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==M-files Used==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pdcoSet.m&#039;&#039;, &#039;&#039;pdco.m&#039;&#039;, &#039;&#039;Tlsqrmat.m&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pdscoTL.m&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=TOMLAB_Overall_Design&amp;diff=3055</id>
		<title>TOMLAB Overall Design</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=TOMLAB_Overall_Design&amp;diff=3055"/>
		<updated>2014-08-05T14:20:45Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Table: Generally constrained nonlinear (con) test problems. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the TOMLAB Manual|link=[[TOMLAB|TOMLAB Manual]]}}&lt;br /&gt;
[[Category:Manuals]]&lt;br /&gt;
The scope of TOMLAB  is large and broad, and therefore there is a need of a well-designed system. It is also natural to use the power of the Matlab language, to make the system flexible and easy to use and maintain. The concept of structure arrays is used and the ability in Matlab to execute Matlab code defined as string expressions and to execute functions specified by a string.&lt;br /&gt;
&lt;br /&gt;
==Structure Input  and Output==&lt;br /&gt;
&lt;br /&gt;
Normally, when solving an optimization problem, a direct call to a solver is made with a long list of parameters in the call.  The parameter list is solver-dependent and makes it difficult  to make additions and changes to the system.&lt;br /&gt;
&lt;br /&gt;
TOMLAB  solves the problem in two steps. First the problem is defined and stored in a Matlab structure. Then the solver is called with a single argument, the problem structure. Solvers that were not originally developed for the TOMLAB  environment needs the usual long list of parameters. This is handled by the driver routine &#039;&#039;tomRun.m&#039;&#039; which can call any available solver, hiding the details of the call from the user. The solver output is collected in a standardized result structure and returned to the user.&lt;br /&gt;
&lt;br /&gt;
==Introduction  to Solver and Problem Types==&lt;br /&gt;
&lt;br /&gt;
TOMLAB  solves a number of different types of optimization problems. The currently defined types are listed in [[#Table: The different types of optimization problems defined in TOMLAB.]].&lt;br /&gt;
&lt;br /&gt;
The global variable &#039;&#039;probType &#039;&#039;contains the current type of optimization problem to be solved. An optimization solver is defined to be of type &#039;&#039;solvType&#039;&#039;, where &#039;&#039;solvType &#039;&#039;is any of the &#039;&#039;probType &#039;&#039;entries in [[#Table: The different types of optimization problems defined in TOMLAB.]]. It is clear that a solver of a certain &#039;&#039;solvType &#039;&#039;is able to solve a problem defined to be of another type.  For example, a constrained nonlinear programming solver should  be able to solve unconstrained problems, linear and quadratic programs and constrained nonlinear least squares problems. In the graphical user interface and menu system an additional variable &#039;&#039;optType &#039;&#039;is defined to keep track of what type of problem is defined as the main subject.  As an example, the user may select the type of optimization to be quadratic programming (&#039;&#039;optType &#039;&#039;== 2), then select a particular problem that is a linear programming problem (&#039;&#039;probType &#039;&#039;== 8) and then as the solver choose a constrained NLP solver like MINOS (&#039;&#039;solvType &#039;&#039;== 3).&lt;br /&gt;
&lt;br /&gt;
====Table: The different types of optimization problems defined in TOMLAB.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
!probType&lt;br /&gt;
!&lt;br /&gt;
!Type of optimization problem&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;uc&#039;&#039;&#039;||1||Unconstrained optimization (incl. bound constraints).&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;qp&#039;&#039;&#039;||2||Quadratic programming.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;con&#039;&#039;&#039;||3||Constrained nonlinear optimization.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;ls&#039;&#039;&#039;||4||Nonlinear least squares problems (incl. bound constraints).&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lls&#039;&#039;&#039;||5||Linear least squares problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;cls&#039;&#039;&#039;||6||Constrained nonlinear least squares problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;mip&#039;&#039;&#039;||7||Mixed-Integer programming.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lp&#039;&#039;&#039;||8||Linear programming.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;glb&#039;&#039;&#039;||9||Box-bounded global optimization.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;glc&#039;&#039;&#039;||10||Global mixed-integer nonlinear programming.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;miqp&#039;&#039;&#039;||11||Constrained mixed-integer quadratic programming.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;minlp&#039;&#039;&#039;||12||Constrained mixed-integer nonlinear optimization.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lmi&#039;&#039;&#039;||13||Semi-definite programming with Linear Matrix  Inequalities.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;bmi&#039;&#039;&#039;||14||Semi-definite programming with Bilinear Matrix  Inequalities.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;exp&#039;&#039;&#039;||15||Exponential fitting  problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;nts&#039;&#039;&#039;||16||Nonlinear Time Series.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lcp&#039;&#039;&#039;||22||Linear Mixed-Complimentary Problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;mcp&#039;&#039;&#039;||23||Nonlinear Mixed-Complimentary Problems.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Please note that since the actual numbers used for &#039;&#039;probType &#039;&#039;may change in future releases, it is recommended to use the text abbreviations. See help for &#039;&#039;checkType &#039;&#039;for further information. &lt;br /&gt;
&lt;br /&gt;
Define &#039;&#039;probSet &#039;&#039;to be a set of defined optimization  problems belonging to a certain class of problems of type &#039;&#039;probType&#039;&#039;. Each &#039;&#039;probSet &#039;&#039;is physically stored in one file, an &#039;&#039;Init  File&#039;&#039;. In [[#Table: Defined test problem sets in TOMLAB. probSets marked with * are not part of the standard distribution]] the currently defined problem sets are listed, and new &#039;&#039;probSet &#039;&#039;sets are easily added.&lt;br /&gt;
&lt;br /&gt;
====Table: Defined test problem sets in TOMLAB. probSets marked with * are not part of the standard distribution====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
!probSet&lt;br /&gt;
!probType&lt;br /&gt;
!Description of test problem set&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;uc&#039;&#039;&#039;||1||Unconstrained test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;qp&#039;&#039;&#039;||2||Quadratic programming test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;con&#039;&#039;&#039;||3||Constrained test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;ls&#039;&#039;&#039;||4||Nonlinear least squares test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lls&#039;&#039;&#039;||5||Linear least squares problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;cls&#039;&#039;&#039;||6||Linear constrained nonlinear least squares problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;mip&#039;&#039;&#039;||7||Mixed-integer programming problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lp&#039;&#039;&#039;||8||Linear programming problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;glb&#039;&#039;&#039;||9||Box-bounded global optimization test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;glc&#039;&#039;&#039;||10||Global MINLP  test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;miqp&#039;&#039;&#039;||11||Constrained mixed-integer quadratic problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;minlp&#039;&#039;&#039;||12||Constrained mixed-integer nonlinear problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lmi&#039;&#039;&#039;||13||Semi-definite programming with Linear Matrix  Inequalities.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;bmi&#039;&#039;&#039;||14||Semi-definite programming with Bilinear Matrix  Inequalities.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;exp&#039;&#039;&#039;||15||Exponential fitting  problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;nts&#039;&#039;&#039;||16||Nonlinear time series problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lcp&#039;&#039;&#039;||22||Linear mixed-complimentary problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;mcp&#039;&#039;&#039;||23||Nonlinear mixed-complimentary problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;mgh&#039;&#039;&#039;||4||More, Garbow, Hillstrom nonlinear least squares problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;chs&#039;&#039;&#039;||3||Hock-Schittkowski constrained test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;uhs&#039;&#039;&#039;||1||Hock-Schittkowski unconstrained test problems.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The names of the predefined Init Files that do the problem setup, and the corresponding low level routines are constructed as two  parts.  The first part being the abbreviation of the relevant  &#039;&#039;probSet&#039;&#039;, see  [[#Table: Defined test problem sets in TOMLAB. probSets marked with * are not part of the standard distribution]], and the second part denotes the computed task, shown in [[#Table: Names for predefined Init Files and low level m-files in TOMLAB.]] The user normally does not have to define the more complicated functions &#039;&#039;o_d2c &#039;&#039;and &#039;&#039;o_d2r&#039;&#039;.  It is recommended to supply this information when using solvers which can utilize second order information, such as TOMLAB /KNITRO and TOMLAB /CONOPT.&lt;br /&gt;
&lt;br /&gt;
====Table: Names for predefined Init Files and low level m-files in TOMLAB.====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;background-color:#ffffff;&amp;quot;&lt;br /&gt;
!Generic name&lt;br /&gt;
!Purpose (&#039;&#039;o&#039;&#039; is any probSet, e.g. &#039;&#039;o&#039;&#039;=con)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;prob||Init File that either defines a string matrix with problem names&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;f||Compute objective function &amp;lt;math&amp;gt;f(x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;g||Compute the gradient vector &amp;lt;math&amp;gt;g(x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;H||Compute the Hessian matrix &amp;lt;math&amp;gt;H(x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;c||Compute the vector of constraint functions &amp;lt;math&amp;gt;c(x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;dc||Compute the matrix of constraint normals, &amp;lt;math&amp;gt;\partial c(x) /dx&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;d2c||Compute the 2nd part of 2nd derivative matrix of the Lagrangian function, &amp;lt;math&amp;gt;\sum_i \lambda_i \partial^2 c_i(x) / dx^2&amp;lt;/math&amp;gt; .&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;r||Compute the residual vector &amp;lt;math&amp;gt;r(x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;J ||Compute the Jacobian matrix &amp;lt;math&amp;gt;J(x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;d2r||Compute the 2nd part of the Hessian matrix, &amp;lt;math&amp;gt;\sum_i r_i(x) \partial^2 r_i(x) / dx^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Init  File has two modes of operation; either return a string matrix  with the names of the problems in the &#039;&#039;probSet &#039;&#039;or a structure with all information about the selected problem. All fields in the structure, named &#039;&#039;Prob&#039;&#039;, are presented in tables in [[TOMLAB Appendix A|Appendix A]]. Using a structure makes it easy to add new items without too many changes in the rest of the system. For further discussion about the definition of optimization problems in TOMLAB, see [[TOMLAB Defining Problems in TOMLAB|Defining Problems in TOMLAB]].&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;
==The Process of Solving Optimization Problems==&lt;br /&gt;
&lt;br /&gt;
A flow-chart of the process of optimization in TOMLAB is shown in [[#Figure: The process of optimization in TOMLAB.]]. It is inefficient to use an interactive system. This is symbolized with the &#039;&#039;Standard User&#039;&#039; box in the figure, which directly runs the &#039;&#039;Optimization Driver&#039;&#039;, &#039;&#039;tomRun&#039;&#039;. The direct solver call is possible for all TOMLAB  solvers, if the user has executed &#039;&#039;ProbCheck &#039;&#039;prior to the call. See [[TOMLAB Problem Types and Solver Routines]] for a list of the TOMLAB  solvers.&lt;br /&gt;
&lt;br /&gt;
Depending on the type of problem, the user needs to supply the &#039;&#039;low-level  &#039;&#039;routines that calculate the objective function, constraint functions for constrained problems, and also if possible, derivatives.  To simplify this coding process so that the work has to be performed only once, TOMLAB  provides &#039;&#039;gateway &#039;&#039;routines that ensure that any solver can obtain the values in the correct format.&lt;br /&gt;
&lt;br /&gt;
For example, when working with a least squares problem, it is natural to code the function that computes the vector of residual functions &amp;lt;math&amp;gt;r_i(x_1,x_2,\ldots)&amp;lt;/math&amp;gt;, since a dedicated least squares solver probably operates on the residual while a general nonlinear solver needs a scalar function, in this case &amp;lt;math&amp;gt;f(x) = \frac{1}{2} r^T(x)r(x)&amp;lt;/math&amp;gt;. Such issues are automatically handled by the gateway functions.&lt;br /&gt;
&lt;br /&gt;
====Figure: The process of optimization in TOMLAB.====&lt;br /&gt;
[[File:The process of optimization in TOMLAB.png|thumb|550px|none|alt=The process of optimization in TOMLAB|&amp;lt;caption&amp;gt;The process of optimization in TOMLAB.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
==Low Level Routines and Gateway Routines==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Low level routines &#039;&#039;are the routines that compute:&lt;br /&gt;
&lt;br /&gt;
*The objective function value&lt;br /&gt;
&lt;br /&gt;
*The gradient vector&lt;br /&gt;
&lt;br /&gt;
*The Hessian matrix (second derivative matrix)&lt;br /&gt;
&lt;br /&gt;
*The residual vector (for nonlinear least squares problems)&lt;br /&gt;
&lt;br /&gt;
*The Jacobian matrix (for nonlinear least squares problems)&lt;br /&gt;
&lt;br /&gt;
*The vector of constraint functions&lt;br /&gt;
&lt;br /&gt;
*The matrix of constraint normals (the constraint Jacobian)&lt;br /&gt;
&lt;br /&gt;
*The second part of the second derivative of the Lagrangian function. The last three routines are only needed for constrained problems.&lt;br /&gt;
&lt;br /&gt;
The names of these routines are defined in the structure fields &#039;&#039;Prob.FUNCS.f&#039;&#039;, &#039;&#039;Prob.FUNCS.g&#039;&#039;, &#039;&#039;Prob.FUNCS.H &#039;&#039;etc.&lt;br /&gt;
&lt;br /&gt;
It is the task for the &#039;&#039;Assign &#039;&#039;routine to set the names of the low level m-files. This is done by a call to the routine &#039;&#039;conAssign &#039;&#039;with the names as arguments  for example. There are &#039;&#039;Assign &#039;&#039;routines for all problem types handled by TOMLAB. As an example,  see &#039;help conAssign&#039; in MATLAB.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = conAssign(&#039;f&#039;, &#039;g&#039;, &#039;H&#039;, HessPattern, x_L,  x_U, Name,x_0,... &lt;br /&gt;
pSepFunc, fLowBnd, A,  b_L,  b_U, &#039;c&#039;, &#039;dc&#039;, &#039;d2c&#039;, ConsPattern,... &lt;br /&gt;
c_L,  c_U, x_min,  x_max, f_opt, x_opt);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only the low level routines relevant for a certain type of optimization problem need to be coded. There are dummy routines for the others.  Numerical differentiation is automatically used for gradient, Jacobian and constraint gradient if the corresponding user routine is non present or left out when calling &#039;&#039;conAssign&#039;&#039;. However, the solver always needs more time to estimate the derivatives compared to if the user supplies a code for them.  Also the numerical accuracy is lower for estimated derivatives, so it is recommended that the user always tries to code the derivatives, if it is possible. Another option is automatic differentiation with TOMLAB  /MAD.&lt;br /&gt;
&lt;br /&gt;
TOMLAB  uses gateway routines (&#039;&#039;nlp_f&#039;&#039;, &#039;&#039;nlp_g&#039;&#039;, &#039;&#039;nlp_H&#039;&#039;, &#039;&#039;nlp_c&#039;&#039;, &#039;&#039;nlp_dc&#039;&#039;, &#039;&#039;nlp_d2c&#039;&#039;, &#039;&#039;nlp_r&#039;&#039;, &#039;&#039;nlp_J&#039;&#039;, &#039;&#039;nlp_d2r&#039;&#039;). These routines extract the search directions and line search steps, count iterations, handle separable functions, keep track of the kind of differentiation wanted etc. They also handle the separable NLLS case and NLLS weighting. By the use of global variables, unnecessary evaluations of the user supplied routines are avoided.&lt;br /&gt;
&lt;br /&gt;
To get a picture of how the low-level routines are used in the system, consider [[#The chain of calls when computing the objective function value in ucSolve for a nonlinear least squares problem defined in mgh_prob, mgh_r and mgh_J.]] and [[#The chain of calls when computing the numerical approximation of the gradient in &#039;&#039;ucSolve&#039;&#039; for an unconstrained problem defined in uc_prob and uc_f.]]. [[#The chain of calls when computing the objective function value in ucSolve for a nonlinear least squares problem defined in mgh_prob, mgh_r and mgh_J.]] illustrates the chain of calls when computing the objective function value in &#039;&#039;ucSolve &#039;&#039;for a nonlinear least squares problem defined in &#039;&#039;mgh prob&#039;&#039;, &#039;&#039;mgh r &#039;&#039;and &#039;&#039;mgh J&#039;&#039;.  [[#The chain of calls when computing the numerical approximation of the gradient in ucSolve for an unconstrained problem defined in uc_prob and uc_f.]] illustrates the chain of calls when computing the numerical approximation of the gradient  (by use of the  routine &#039;&#039;fdng&#039;&#039;) in &#039;&#039;ucSolve &#039;&#039;for an unconstrained problem defined in &#039;&#039;uc_prob &#039;&#039;and &#039;&#039;uc_f&#039;&#039;. Information about a problem is stored in the structure variable &#039;&#039;Prob&#039;&#039;, described in detail in the tables in Appendix A. This variable is an argument to all low level routines. In the field element &#039;&#039;Prob.user&#039;&#039;, problem specific information&lt;br /&gt;
&lt;br /&gt;
====The chain of calls when computing the objective function value in &#039;&#039;ucSolve&#039;&#039; for a nonlinear least squares problem defined in &#039;&#039;mgh_prob&#039;&#039;, &#039;&#039;mgh_r &#039;&#039;and &#039;&#039;mgh_J&#039;&#039;.====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
ucSolve &amp;lt;==&amp;gt; nlp_f &amp;lt;==&amp;gt; ls_f &amp;lt;==&amp;gt; nlp_r &amp;lt;==&amp;gt; mgh_r&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The chain of calls when computing the numerical approximation of the gradient in &#039;&#039;ucSolve&#039;&#039; for an unconstrained problem defined in &#039;&#039;uc_prob &#039;&#039;and &#039;&#039;uc_f&#039;&#039;.====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
ucSolve &amp;lt;==&amp;gt; nlp_g &amp;lt;==&amp;gt; fdng &amp;lt;==&amp;gt; nlp_r &amp;lt;==&amp;gt; uc_f&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
needed to evaluate the low level routines are stored. This field is most often used if problem related questions are asked when generating the problem. It is often the case that the user wants to supply the low-level routines with additional information besides the variables &#039;&#039;x&#039;&#039; that are optimized. Any unused fields could be defined in the structure &#039;&#039;Prob&#039;&#039; for that purpose. To avoid potential conflicts with future TOMLAB releases, it is recommended to use subfields of &#039;&#039;Prob.user&#039;&#039;. It the user wants to send some variables a, B and C, then, after creating the &#039;&#039;Prob&#039;&#039; structure, these extra variables are added to the structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.user.a=a; &lt;br /&gt;
Prob.user.B=B; &lt;br /&gt;
Prob.user.C=C;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, because the &#039;&#039;Prob&#039;&#039; structure is sent to all low-level routines, in any of these routines the variables are picked out from the structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
a = Prob.user.a; &lt;br /&gt;
B = Prob.user.B; &lt;br /&gt;
C = Prob.user.C;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more detailed description of how to define new problems is given in sections [[TOMLAB Solving Linear Quadratic and Integer Programming Problems]], [[TOMLAB Solving Unconstrained and Constrained Optimization Problems]] and [[TOMLAB Solving Global Optimization Problems]]. The usage of &#039;&#039;Prob.user&#039;&#039; is described in [[TOMLAB Utility Functions#User Supplied Problem Parameters]].&lt;br /&gt;
&lt;br /&gt;
Different solvers all have different demand on how information should be supplied, i.e. the function to optimize, the gradient vector, the Hessian matrix etc.  To be able to code the problem only once, and then use this formulation to run all types of solvers, interface routines that returns information in the format needed for the relevant solver were developed.&lt;br /&gt;
&lt;br /&gt;
[[#Table: Generally constrained nonlinear (con) test problems.]] describes the low level test functions and the corresponding Init File routine needed for the predefined constrained optimization  (&#039;&#039;&#039;con&#039;&#039;&#039;) problems. For the predefined unconstrained optimization  (&#039;&#039;&#039;uc&#039;&#039;&#039;)  problems, the global optimization (&#039;&#039;&#039;glb, glc&#039;&#039;&#039;) problems and the quadratic programming problems (&#039;&#039;&#039;qp&#039;&#039;&#039;) similar routines have been defined.&lt;br /&gt;
&lt;br /&gt;
To conclude, the system design is flexible and easy to expand in many different ways.&lt;br /&gt;
&lt;br /&gt;
====Table: Generally constrained nonlinear (con) test problems.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;background-color:#ffffff;&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;con_prob&#039;&#039;||Init File. Does the initialization  of the &#039;&#039;&#039;con &#039;&#039;&#039;test problems. &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;con_f&#039;&#039;||Compute the objective function &amp;lt;math&amp;gt;f(x)&amp;lt;/math&amp;gt; for &#039;&#039;&#039;con&#039;&#039;&#039; test problems. &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;con_g&#039;&#039;||Compute the gradient &amp;lt;math&amp;gt;g(x)&amp;lt;/math&amp;gt; for &#039;&#039;&#039;con&#039;&#039;&#039; test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;con_H&#039;&#039;||Compute the Hessian matrix &amp;lt;math&amp;gt;H(x)&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;f(x)&amp;lt;/math&amp;gt; for &#039;&#039;&#039;con &#039;&#039;&#039; test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;con_c&#039;&#039;||Compute the constraint residuals &amp;lt;math&amp;gt;c(x)&amp;lt;/math&amp;gt; for &#039;&#039;&#039;con&#039;&#039;&#039; test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;con_dc&#039;&#039;||Compute the derivative of the constraint residuals for &#039;&#039;&#039;con&#039;&#039;&#039; test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;con_d2c&#039;&#039;||Compute the 2nd part of 2nd derivative matrix of the Lagrangian function, &amp;lt;math&amp;gt;\sum_i \lambda_i \partial^2 c_i(x) / dx^2&amp;lt;/math&amp;gt; for &#039;&#039;&#039;con &#039;&#039;&#039; test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;con_fm&#039;&#039;||Compute merit function &amp;lt;math&amp;gt;\theta(x_k)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;con_gm&#039;&#039;||Compute gradient of merit function &amp;lt;math&amp;gt;\theta(x_k)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=TOMLAB_Overall_Design&amp;diff=3054</id>
		<title>TOMLAB Overall Design</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=TOMLAB_Overall_Design&amp;diff=3054"/>
		<updated>2014-08-05T14:20:27Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Table: Names for predefined Init Files and low level m-files in TOMLAB. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the TOMLAB Manual|link=[[TOMLAB|TOMLAB Manual]]}}&lt;br /&gt;
[[Category:Manuals]]&lt;br /&gt;
The scope of TOMLAB  is large and broad, and therefore there is a need of a well-designed system. It is also natural to use the power of the Matlab language, to make the system flexible and easy to use and maintain. The concept of structure arrays is used and the ability in Matlab to execute Matlab code defined as string expressions and to execute functions specified by a string.&lt;br /&gt;
&lt;br /&gt;
==Structure Input  and Output==&lt;br /&gt;
&lt;br /&gt;
Normally, when solving an optimization problem, a direct call to a solver is made with a long list of parameters in the call.  The parameter list is solver-dependent and makes it difficult  to make additions and changes to the system.&lt;br /&gt;
&lt;br /&gt;
TOMLAB  solves the problem in two steps. First the problem is defined and stored in a Matlab structure. Then the solver is called with a single argument, the problem structure. Solvers that were not originally developed for the TOMLAB  environment needs the usual long list of parameters. This is handled by the driver routine &#039;&#039;tomRun.m&#039;&#039; which can call any available solver, hiding the details of the call from the user. The solver output is collected in a standardized result structure and returned to the user.&lt;br /&gt;
&lt;br /&gt;
==Introduction  to Solver and Problem Types==&lt;br /&gt;
&lt;br /&gt;
TOMLAB  solves a number of different types of optimization problems. The currently defined types are listed in [[#Table: The different types of optimization problems defined in TOMLAB.]].&lt;br /&gt;
&lt;br /&gt;
The global variable &#039;&#039;probType &#039;&#039;contains the current type of optimization problem to be solved. An optimization solver is defined to be of type &#039;&#039;solvType&#039;&#039;, where &#039;&#039;solvType &#039;&#039;is any of the &#039;&#039;probType &#039;&#039;entries in [[#Table: The different types of optimization problems defined in TOMLAB.]]. It is clear that a solver of a certain &#039;&#039;solvType &#039;&#039;is able to solve a problem defined to be of another type.  For example, a constrained nonlinear programming solver should  be able to solve unconstrained problems, linear and quadratic programs and constrained nonlinear least squares problems. In the graphical user interface and menu system an additional variable &#039;&#039;optType &#039;&#039;is defined to keep track of what type of problem is defined as the main subject.  As an example, the user may select the type of optimization to be quadratic programming (&#039;&#039;optType &#039;&#039;== 2), then select a particular problem that is a linear programming problem (&#039;&#039;probType &#039;&#039;== 8) and then as the solver choose a constrained NLP solver like MINOS (&#039;&#039;solvType &#039;&#039;== 3).&lt;br /&gt;
&lt;br /&gt;
====Table: The different types of optimization problems defined in TOMLAB.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
!probType&lt;br /&gt;
!&lt;br /&gt;
!Type of optimization problem&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;uc&#039;&#039;&#039;||1||Unconstrained optimization (incl. bound constraints).&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;qp&#039;&#039;&#039;||2||Quadratic programming.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;con&#039;&#039;&#039;||3||Constrained nonlinear optimization.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;ls&#039;&#039;&#039;||4||Nonlinear least squares problems (incl. bound constraints).&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lls&#039;&#039;&#039;||5||Linear least squares problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;cls&#039;&#039;&#039;||6||Constrained nonlinear least squares problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;mip&#039;&#039;&#039;||7||Mixed-Integer programming.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lp&#039;&#039;&#039;||8||Linear programming.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;glb&#039;&#039;&#039;||9||Box-bounded global optimization.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;glc&#039;&#039;&#039;||10||Global mixed-integer nonlinear programming.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;miqp&#039;&#039;&#039;||11||Constrained mixed-integer quadratic programming.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;minlp&#039;&#039;&#039;||12||Constrained mixed-integer nonlinear optimization.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lmi&#039;&#039;&#039;||13||Semi-definite programming with Linear Matrix  Inequalities.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;bmi&#039;&#039;&#039;||14||Semi-definite programming with Bilinear Matrix  Inequalities.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;exp&#039;&#039;&#039;||15||Exponential fitting  problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;nts&#039;&#039;&#039;||16||Nonlinear Time Series.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lcp&#039;&#039;&#039;||22||Linear Mixed-Complimentary Problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;mcp&#039;&#039;&#039;||23||Nonlinear Mixed-Complimentary Problems.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Please note that since the actual numbers used for &#039;&#039;probType &#039;&#039;may change in future releases, it is recommended to use the text abbreviations. See help for &#039;&#039;checkType &#039;&#039;for further information. &lt;br /&gt;
&lt;br /&gt;
Define &#039;&#039;probSet &#039;&#039;to be a set of defined optimization  problems belonging to a certain class of problems of type &#039;&#039;probType&#039;&#039;. Each &#039;&#039;probSet &#039;&#039;is physically stored in one file, an &#039;&#039;Init  File&#039;&#039;. In [[#Table: Defined test problem sets in TOMLAB. probSets marked with * are not part of the standard distribution]] the currently defined problem sets are listed, and new &#039;&#039;probSet &#039;&#039;sets are easily added.&lt;br /&gt;
&lt;br /&gt;
====Table: Defined test problem sets in TOMLAB. probSets marked with * are not part of the standard distribution====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
!probSet&lt;br /&gt;
!probType&lt;br /&gt;
!Description of test problem set&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;uc&#039;&#039;&#039;||1||Unconstrained test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;qp&#039;&#039;&#039;||2||Quadratic programming test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;con&#039;&#039;&#039;||3||Constrained test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;ls&#039;&#039;&#039;||4||Nonlinear least squares test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lls&#039;&#039;&#039;||5||Linear least squares problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;cls&#039;&#039;&#039;||6||Linear constrained nonlinear least squares problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;mip&#039;&#039;&#039;||7||Mixed-integer programming problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lp&#039;&#039;&#039;||8||Linear programming problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;glb&#039;&#039;&#039;||9||Box-bounded global optimization test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;glc&#039;&#039;&#039;||10||Global MINLP  test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;miqp&#039;&#039;&#039;||11||Constrained mixed-integer quadratic problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;minlp&#039;&#039;&#039;||12||Constrained mixed-integer nonlinear problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lmi&#039;&#039;&#039;||13||Semi-definite programming with Linear Matrix  Inequalities.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;bmi&#039;&#039;&#039;||14||Semi-definite programming with Bilinear Matrix  Inequalities.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;exp&#039;&#039;&#039;||15||Exponential fitting  problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;nts&#039;&#039;&#039;||16||Nonlinear time series problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lcp&#039;&#039;&#039;||22||Linear mixed-complimentary problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;mcp&#039;&#039;&#039;||23||Nonlinear mixed-complimentary problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;mgh&#039;&#039;&#039;||4||More, Garbow, Hillstrom nonlinear least squares problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;chs&#039;&#039;&#039;||3||Hock-Schittkowski constrained test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;uhs&#039;&#039;&#039;||1||Hock-Schittkowski unconstrained test problems.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The names of the predefined Init Files that do the problem setup, and the corresponding low level routines are constructed as two  parts.  The first part being the abbreviation of the relevant  &#039;&#039;probSet&#039;&#039;, see  [[#Table: Defined test problem sets in TOMLAB. probSets marked with * are not part of the standard distribution]], and the second part denotes the computed task, shown in [[#Table: Names for predefined Init Files and low level m-files in TOMLAB.]] The user normally does not have to define the more complicated functions &#039;&#039;o_d2c &#039;&#039;and &#039;&#039;o_d2r&#039;&#039;.  It is recommended to supply this information when using solvers which can utilize second order information, such as TOMLAB /KNITRO and TOMLAB /CONOPT.&lt;br /&gt;
&lt;br /&gt;
====Table: Names for predefined Init Files and low level m-files in TOMLAB.====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;background-color:#ffffff;&amp;quot;&lt;br /&gt;
!Generic name&lt;br /&gt;
!Purpose (&#039;&#039;o&#039;&#039; is any probSet, e.g. &#039;&#039;o&#039;&#039;=con)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;prob||Init File that either defines a string matrix with problem names&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;f||Compute objective function &amp;lt;math&amp;gt;f(x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;g||Compute the gradient vector &amp;lt;math&amp;gt;g(x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;H||Compute the Hessian matrix &amp;lt;math&amp;gt;H(x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;c||Compute the vector of constraint functions &amp;lt;math&amp;gt;c(x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;dc||Compute the matrix of constraint normals, &amp;lt;math&amp;gt;\partial c(x) /dx&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;d2c||Compute the 2nd part of 2nd derivative matrix of the Lagrangian function, &amp;lt;math&amp;gt;\sum_i \lambda_i \partial^2 c_i(x) / dx^2&amp;lt;/math&amp;gt; .&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;r||Compute the residual vector &amp;lt;math&amp;gt;r(x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;J ||Compute the Jacobian matrix &amp;lt;math&amp;gt;J(x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;o_&#039;&#039;d2r||Compute the 2nd part of the Hessian matrix, &amp;lt;math&amp;gt;\sum_i r_i(x) \partial^2 r_i(x) / dx^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Init  File has two modes of operation; either return a string matrix  with the names of the problems in the &#039;&#039;probSet &#039;&#039;or a structure with all information about the selected problem. All fields in the structure, named &#039;&#039;Prob&#039;&#039;, are presented in tables in [[TOMLAB Appendix A|Appendix A]]. Using a structure makes it easy to add new items without too many changes in the rest of the system. For further discussion about the definition of optimization problems in TOMLAB, see [[TOMLAB Defining Problems in TOMLAB|Defining Problems in TOMLAB]].&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;
==The Process of Solving Optimization Problems==&lt;br /&gt;
&lt;br /&gt;
A flow-chart of the process of optimization in TOMLAB is shown in [[#Figure: The process of optimization in TOMLAB.]]. It is inefficient to use an interactive system. This is symbolized with the &#039;&#039;Standard User&#039;&#039; box in the figure, which directly runs the &#039;&#039;Optimization Driver&#039;&#039;, &#039;&#039;tomRun&#039;&#039;. The direct solver call is possible for all TOMLAB  solvers, if the user has executed &#039;&#039;ProbCheck &#039;&#039;prior to the call. See [[TOMLAB Problem Types and Solver Routines]] for a list of the TOMLAB  solvers.&lt;br /&gt;
&lt;br /&gt;
Depending on the type of problem, the user needs to supply the &#039;&#039;low-level  &#039;&#039;routines that calculate the objective function, constraint functions for constrained problems, and also if possible, derivatives.  To simplify this coding process so that the work has to be performed only once, TOMLAB  provides &#039;&#039;gateway &#039;&#039;routines that ensure that any solver can obtain the values in the correct format.&lt;br /&gt;
&lt;br /&gt;
For example, when working with a least squares problem, it is natural to code the function that computes the vector of residual functions &amp;lt;math&amp;gt;r_i(x_1,x_2,\ldots)&amp;lt;/math&amp;gt;, since a dedicated least squares solver probably operates on the residual while a general nonlinear solver needs a scalar function, in this case &amp;lt;math&amp;gt;f(x) = \frac{1}{2} r^T(x)r(x)&amp;lt;/math&amp;gt;. Such issues are automatically handled by the gateway functions.&lt;br /&gt;
&lt;br /&gt;
====Figure: The process of optimization in TOMLAB.====&lt;br /&gt;
[[File:The process of optimization in TOMLAB.png|thumb|550px|none|alt=The process of optimization in TOMLAB|&amp;lt;caption&amp;gt;The process of optimization in TOMLAB.&amp;lt;/caption&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
==Low Level Routines and Gateway Routines==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Low level routines &#039;&#039;are the routines that compute:&lt;br /&gt;
&lt;br /&gt;
*The objective function value&lt;br /&gt;
&lt;br /&gt;
*The gradient vector&lt;br /&gt;
&lt;br /&gt;
*The Hessian matrix (second derivative matrix)&lt;br /&gt;
&lt;br /&gt;
*The residual vector (for nonlinear least squares problems)&lt;br /&gt;
&lt;br /&gt;
*The Jacobian matrix (for nonlinear least squares problems)&lt;br /&gt;
&lt;br /&gt;
*The vector of constraint functions&lt;br /&gt;
&lt;br /&gt;
*The matrix of constraint normals (the constraint Jacobian)&lt;br /&gt;
&lt;br /&gt;
*The second part of the second derivative of the Lagrangian function. The last three routines are only needed for constrained problems.&lt;br /&gt;
&lt;br /&gt;
The names of these routines are defined in the structure fields &#039;&#039;Prob.FUNCS.f&#039;&#039;, &#039;&#039;Prob.FUNCS.g&#039;&#039;, &#039;&#039;Prob.FUNCS.H &#039;&#039;etc.&lt;br /&gt;
&lt;br /&gt;
It is the task for the &#039;&#039;Assign &#039;&#039;routine to set the names of the low level m-files. This is done by a call to the routine &#039;&#039;conAssign &#039;&#039;with the names as arguments  for example. There are &#039;&#039;Assign &#039;&#039;routines for all problem types handled by TOMLAB. As an example,  see &#039;help conAssign&#039; in MATLAB.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = conAssign(&#039;f&#039;, &#039;g&#039;, &#039;H&#039;, HessPattern, x_L,  x_U, Name,x_0,... &lt;br /&gt;
pSepFunc, fLowBnd, A,  b_L,  b_U, &#039;c&#039;, &#039;dc&#039;, &#039;d2c&#039;, ConsPattern,... &lt;br /&gt;
c_L,  c_U, x_min,  x_max, f_opt, x_opt);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only the low level routines relevant for a certain type of optimization problem need to be coded. There are dummy routines for the others.  Numerical differentiation is automatically used for gradient, Jacobian and constraint gradient if the corresponding user routine is non present or left out when calling &#039;&#039;conAssign&#039;&#039;. However, the solver always needs more time to estimate the derivatives compared to if the user supplies a code for them.  Also the numerical accuracy is lower for estimated derivatives, so it is recommended that the user always tries to code the derivatives, if it is possible. Another option is automatic differentiation with TOMLAB  /MAD.&lt;br /&gt;
&lt;br /&gt;
TOMLAB  uses gateway routines (&#039;&#039;nlp_f&#039;&#039;, &#039;&#039;nlp_g&#039;&#039;, &#039;&#039;nlp_H&#039;&#039;, &#039;&#039;nlp_c&#039;&#039;, &#039;&#039;nlp_dc&#039;&#039;, &#039;&#039;nlp_d2c&#039;&#039;, &#039;&#039;nlp_r&#039;&#039;, &#039;&#039;nlp_J&#039;&#039;, &#039;&#039;nlp_d2r&#039;&#039;). These routines extract the search directions and line search steps, count iterations, handle separable functions, keep track of the kind of differentiation wanted etc. They also handle the separable NLLS case and NLLS weighting. By the use of global variables, unnecessary evaluations of the user supplied routines are avoided.&lt;br /&gt;
&lt;br /&gt;
To get a picture of how the low-level routines are used in the system, consider [[#The chain of calls when computing the objective function value in ucSolve for a nonlinear least squares problem defined in mgh_prob, mgh_r and mgh_J.]] and [[#The chain of calls when computing the numerical approximation of the gradient in &#039;&#039;ucSolve&#039;&#039; for an unconstrained problem defined in uc_prob and uc_f.]]. [[#The chain of calls when computing the objective function value in ucSolve for a nonlinear least squares problem defined in mgh_prob, mgh_r and mgh_J.]] illustrates the chain of calls when computing the objective function value in &#039;&#039;ucSolve &#039;&#039;for a nonlinear least squares problem defined in &#039;&#039;mgh prob&#039;&#039;, &#039;&#039;mgh r &#039;&#039;and &#039;&#039;mgh J&#039;&#039;.  [[#The chain of calls when computing the numerical approximation of the gradient in ucSolve for an unconstrained problem defined in uc_prob and uc_f.]] illustrates the chain of calls when computing the numerical approximation of the gradient  (by use of the  routine &#039;&#039;fdng&#039;&#039;) in &#039;&#039;ucSolve &#039;&#039;for an unconstrained problem defined in &#039;&#039;uc_prob &#039;&#039;and &#039;&#039;uc_f&#039;&#039;. Information about a problem is stored in the structure variable &#039;&#039;Prob&#039;&#039;, described in detail in the tables in Appendix A. This variable is an argument to all low level routines. In the field element &#039;&#039;Prob.user&#039;&#039;, problem specific information&lt;br /&gt;
&lt;br /&gt;
====The chain of calls when computing the objective function value in &#039;&#039;ucSolve&#039;&#039; for a nonlinear least squares problem defined in &#039;&#039;mgh_prob&#039;&#039;, &#039;&#039;mgh_r &#039;&#039;and &#039;&#039;mgh_J&#039;&#039;.====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
ucSolve &amp;lt;==&amp;gt; nlp_f &amp;lt;==&amp;gt; ls_f &amp;lt;==&amp;gt; nlp_r &amp;lt;==&amp;gt; mgh_r&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The chain of calls when computing the numerical approximation of the gradient in &#039;&#039;ucSolve&#039;&#039; for an unconstrained problem defined in &#039;&#039;uc_prob &#039;&#039;and &#039;&#039;uc_f&#039;&#039;.====&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
ucSolve &amp;lt;==&amp;gt; nlp_g &amp;lt;==&amp;gt; fdng &amp;lt;==&amp;gt; nlp_r &amp;lt;==&amp;gt; uc_f&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
needed to evaluate the low level routines are stored. This field is most often used if problem related questions are asked when generating the problem. It is often the case that the user wants to supply the low-level routines with additional information besides the variables &#039;&#039;x&#039;&#039; that are optimized. Any unused fields could be defined in the structure &#039;&#039;Prob&#039;&#039; for that purpose. To avoid potential conflicts with future TOMLAB releases, it is recommended to use subfields of &#039;&#039;Prob.user&#039;&#039;. It the user wants to send some variables a, B and C, then, after creating the &#039;&#039;Prob&#039;&#039; structure, these extra variables are added to the structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.user.a=a; &lt;br /&gt;
Prob.user.B=B; &lt;br /&gt;
Prob.user.C=C;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, because the &#039;&#039;Prob&#039;&#039; structure is sent to all low-level routines, in any of these routines the variables are picked out from the structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
a = Prob.user.a; &lt;br /&gt;
B = Prob.user.B; &lt;br /&gt;
C = Prob.user.C;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more detailed description of how to define new problems is given in sections [[TOMLAB Solving Linear Quadratic and Integer Programming Problems]], [[TOMLAB Solving Unconstrained and Constrained Optimization Problems]] and [[TOMLAB Solving Global Optimization Problems]]. The usage of &#039;&#039;Prob.user&#039;&#039; is described in [[TOMLAB Utility Functions#User Supplied Problem Parameters]].&lt;br /&gt;
&lt;br /&gt;
Different solvers all have different demand on how information should be supplied, i.e. the function to optimize, the gradient vector, the Hessian matrix etc.  To be able to code the problem only once, and then use this formulation to run all types of solvers, interface routines that returns information in the format needed for the relevant solver were developed.&lt;br /&gt;
&lt;br /&gt;
[[#Table: Generally constrained nonlinear (con) test problems.]] describes the low level test functions and the corresponding Init File routine needed for the predefined constrained optimization  (&#039;&#039;&#039;con&#039;&#039;&#039;) problems. For the predefined unconstrained optimization  (&#039;&#039;&#039;uc&#039;&#039;&#039;)  problems, the global optimization (&#039;&#039;&#039;glb, glc&#039;&#039;&#039;) problems and the quadratic programming problems (&#039;&#039;&#039;qp&#039;&#039;&#039;) similar routines have been defined.&lt;br /&gt;
&lt;br /&gt;
To conclude, the system design is flexible and easy to expand in many different ways.&lt;br /&gt;
&lt;br /&gt;
====Table: Generally constrained nonlinear (con) test problems.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;con_prob&#039;&#039;||Init File. Does the initialization  of the &#039;&#039;&#039;con &#039;&#039;&#039;test problems. &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;con_f&#039;&#039;||Compute the objective function &amp;lt;math&amp;gt;f(x)&amp;lt;/math&amp;gt; for &#039;&#039;&#039;con&#039;&#039;&#039; test problems. &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;con_g&#039;&#039;||Compute the gradient &amp;lt;math&amp;gt;g(x)&amp;lt;/math&amp;gt; for &#039;&#039;&#039;con&#039;&#039;&#039; test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;con_H&#039;&#039;||Compute the Hessian matrix &amp;lt;math&amp;gt;H(x)&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;f(x)&amp;lt;/math&amp;gt; for &#039;&#039;&#039;con &#039;&#039;&#039; test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;con_c&#039;&#039;||Compute the constraint residuals &amp;lt;math&amp;gt;c(x)&amp;lt;/math&amp;gt; for &#039;&#039;&#039;con&#039;&#039;&#039; test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;con_dc&#039;&#039;||Compute the derivative of the constraint residuals for &#039;&#039;&#039;con&#039;&#039;&#039; test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;con_d2c&#039;&#039;||Compute the 2nd part of 2nd derivative matrix of the Lagrangian function, &amp;lt;math&amp;gt;\sum_i \lambda_i \partial^2 c_i(x) / dx^2&amp;lt;/math&amp;gt; for &#039;&#039;&#039;con &#039;&#039;&#039; test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;con_fm&#039;&#039;||Compute merit function &amp;lt;math&amp;gt;\theta(x_k)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;con_gm&#039;&#039;||Compute gradient of merit function &amp;lt;math&amp;gt;\theta(x_k)&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=TOMLAB_Solving_Least_Squares_and_Parameter_Estimation_Problems&amp;diff=3053</id>
		<title>TOMLAB Solving Least Squares and Parameter Estimation Problems</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=TOMLAB_Solving_Least_Squares_and_Parameter_Estimation_Problems&amp;diff=3053"/>
		<updated>2014-08-05T14:18:56Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Table: Exponential fitting  test problems. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the TOMLAB Manual|link=[[TOMLAB|TOMLAB Manual]]}}&lt;br /&gt;
[[Category:Manuals]]&lt;br /&gt;
This section describes how to define and solve different types of linear and nonlinear least squares and parameter estimation problems. Several examples are given on how to proceed, depending on if a quick solution is wanted, or more advanced tests are needed. TOMLAB  is also compatible with MathWorks Optimization TB.  See [[TOMLAB Appendix E]] for more information and test examples.&lt;br /&gt;
&lt;br /&gt;
All demonstration examples that  are using the TOMLAB  format are collected in the directory &#039;&#039;examples&#039;&#039;. The examples relevant to this section are &#039;&#039;lsDemo &#039;&#039;and &#039;&#039;llsDemo&#039;&#039;. The full path to these files are always given in the text.&lt;br /&gt;
&lt;br /&gt;
[[TOMLAB_Solving_Least_Squares_and_Parameter_Estimation_Problems#Large_Scale_LS_problems_with_Tlsqr|Large Scale LS problems with Tlsqr]] contains information on solving extreme large-scale &#039;&#039;&#039;ls &#039;&#039;&#039;problems with &#039;&#039;Tlsqr&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Linear Least Squares Problems==&lt;br /&gt;
&lt;br /&gt;
This section shows examples how to define and solve linear least squares problems using the TOMLAB  format. As a first illustration, the example &#039;&#039;lls1Demo &#039;&#039;in file &#039;&#039;llsDemo &#039;&#039;shows how to fit a linear least squares model with linear constraints to given data. This test problem is taken from the User&#039;s Guide of &#039;&#039;LSSOL&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Name=&#039;LSSOL test example&#039;;&lt;br /&gt;
&lt;br /&gt;
%  In TOMLAB it is best to use Inf and -Inf, not big numbers. &lt;br /&gt;
n = 9; 	% Number of unknown parameters&lt;br /&gt;
x_L = [-2 -2  -Inf, -2*ones(1,6)]&#039;;&lt;br /&gt;
x_U = 2*ones(n,1);&lt;br /&gt;
&lt;br /&gt;
A       = [ ones(1,8) 4;  1:4,-2,1 1 1 1;  1 -1  1 -1, ones(1,5)];&lt;br /&gt;
b_L = [2     -Inf  -4]&#039;;&lt;br /&gt;
b_U = [Inf     -2  -2]&#039;;&lt;br /&gt;
&lt;br /&gt;
y = ones(10,1);&lt;br /&gt;
C  = [ ones(1,n); 1 2 1 1 1 1 2 0 0; 1 1 3 1 1 1 -1 -1 -3; ...&lt;br /&gt;
1 1 1 4 1 1 1 1 1;1 1 1 3 1 1 1 1 1; 1 1 2 1 1 0 0 0 -1; ...&lt;br /&gt;
1 1 1 1 0 1 1 1 1;1 1 1 0 1 1 1 1 1; 1 1 0 1 1 1 2 2 3;  ...&lt;br /&gt;
1 0 1 1 1 1 0 2 2];&lt;br /&gt;
&lt;br /&gt;
x_0 = 1./[1:n]&#039;;&lt;br /&gt;
&lt;br /&gt;
t           = [];   %  No time set for y(t) (used for plotting)&lt;br /&gt;
weightY     = [];   %  No weighting &lt;br /&gt;
weightType  = [];   %  No weighting type set&lt;br /&gt;
&lt;br /&gt;
x_min	    = [];   %  No lower bound for plotting &lt;br /&gt;
x_max	    = [];   %  No upper bound for plotting&lt;br /&gt;
&lt;br /&gt;
Prob = llsAssign(C, y, x_L,  x_U, Name, x_0,  t, weightType,   weightY, ...&lt;br /&gt;
                 A,  b_L,  b_U,	x_min,  x_max); Result 	= tomRun(&#039;lsei&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is trivial to change the solver in the call to &#039;&#039;tomRun&#039;&#039; to a nonlinear least squares solver, e.g. &#039;&#039;clsSolve&#039;&#039;, or a general nonlinear programming solver.&lt;br /&gt;
&lt;br /&gt;
==Linear Least Squares Problems using the SOL Solver LSSOL==&lt;br /&gt;
&lt;br /&gt;
The example &#039;&#039;lls2Demo&#039;&#039; in file &#039;&#039;llsDemo&#039;&#039; shows how to fit a linear least squares model with linear constraints to given data using a direct call to the SOL solver &#039;&#039;LSSOL&#039;&#039;. The test problem is taken from the User&#039;s Guide of &#039;&#039;LSSOL&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
%   Note that when calling the LSSOL MEX interface directly, avoid using&lt;br /&gt;
%   Inf and -Inf. Instead use big numbers that indicate Inf.&lt;br /&gt;
%   The standard for the MEX interfaces is 1E20 and -1E20, respectively.&lt;br /&gt;
&lt;br /&gt;
n = 9; % There are nine unknown  parameters, and 10 equations &lt;br /&gt;
x_L = [-2 -2  -1E20,  -2*ones(1,6)]&#039;;&lt;br /&gt;
x_U = 2*ones(n,1);&lt;br /&gt;
&lt;br /&gt;
A   = [ ones(1,8) 4;  1:4,-2,1 1 1 1;  1 -1  1 -1, ones(1,5)];&lt;br /&gt;
b_L = [2 	-1E20 -4]&#039;;&lt;br /&gt;
b_U = [1E20	   -2 -2]&#039;;&lt;br /&gt;
% Must put lower and upper bounds on variables and constraints together &lt;br /&gt;
bl = [x_L;b_L];&lt;br /&gt;
bu = [x_U;b_U];&lt;br /&gt;
&lt;br /&gt;
H   = [ ones(1,n); 1 2 1 1 1 1 2 0 0;  1 1 3 1 1 1 -1  -1  -3; ...&lt;br /&gt;
        1 1 1 4 1 1 1 1 1;1  1 1 3 1 1 1 1 1;1  1 2 1 1 0 0 0 -1; ...&lt;br /&gt;
        1 1 1 1 0 1 1 1 1;1  1 1 0 1 1 1 1 1;1  1 0 1 1 1 2 2 3;  ...&lt;br /&gt;
        1 0 1 1 1 1 0 2 2];&lt;br /&gt;
y   = ones(10,1);&lt;br /&gt;
&lt;br /&gt;
x_0 = 1./[1:n]&#039;;&lt;br /&gt;
&lt;br /&gt;
% Set empty indicating default values for most variables&lt;br /&gt;
c         = [];	          % No linear coefficients, they are for LP/QP &lt;br /&gt;
Warm	  = [];	          % No warm start&lt;br /&gt;
iState	  = [];	          % No warm start&lt;br /&gt;
Upper	  = [];	          % C  is not factorized &lt;br /&gt;
kx 	  = [];	          % No warm  start&lt;br /&gt;
SpecsFile = [];	          % No parameter settings in a SPECS file &lt;br /&gt;
PriLev 	  = [];	          % PriLev is not really used in LSSOL &lt;br /&gt;
ProbName  = [];           % ProbName is not really used in LSSOL &lt;br /&gt;
optPar(1) = 50;           % Set print level at maximum&lt;br /&gt;
PrintFile  = &#039;lssol.txt&#039;; % Print result on the file with name lssol.txt&lt;br /&gt;
&lt;br /&gt;
z0 = (y-H*x_0);&lt;br /&gt;
f0  = 0.5*z0&#039;*z0;&lt;br /&gt;
fprintf(&#039;Initial function value  %f\n&#039;,f0);&lt;br /&gt;
&lt;br /&gt;
[x,  Inform, iState, cLamda, Iter, fObj, r, kx]  = ... &lt;br /&gt;
     lssol( A,  bl, bu,  c, x_0,  optPar, H,  y, Warm, ...&lt;br /&gt;
     iState, Upper,  kx,  SpecsFile, PrintFile,  PriLev, ProbName );&lt;br /&gt;
&lt;br /&gt;
%  We could equally well call with the following shorter call:&lt;br /&gt;
%  [x,  Inform, iState, cLamda, Iter, fObj, r, kx]  = ...&lt;br /&gt;
%       lssol( A,  bl, bu,  c, x, optPar, H,  y);&lt;br /&gt;
&lt;br /&gt;
z = (y-H*x);&lt;br /&gt;
f = 0.5*z&#039;*z;&lt;br /&gt;
fprintf(&#039;Optimal  function value  %f\n&#039;,f);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Nonlinear  Least Squares Problems==&lt;br /&gt;
&lt;br /&gt;
This section shows examples how to define and solve nonlinear least squares problems using the TOMLAB  format. As a first illustration,  the example &#039;&#039;ls1Demo &#039;&#039;in file &#039;&#039;lsDemo &#039;&#039;shows how to fit a nonlinear model of exponential type with three unknown parameters to experimental data. This problem, &#039;&#039;Gisela&#039;&#039;, is also defined as problem three in &#039;&#039;ls_prob&#039;&#039;.  A weighting parameter &#039;&#039;K &#039;&#039;is sent  to the residual and Jacobian routine using the &#039;&#039;Prob &#039;&#039;structure.  The solver &#039;&#039;clsSolve &#039;&#039;is called directly. Note that the user only defines the routine to compute the residual vector and the Jacobian matrix of derivatives. TOMLAB  has special routines &#039;&#039;ls f&#039;&#039;, &#039;&#039;ls g &#039;&#039;and &#039;&#039;ls H &#039;&#039;that computes the nonlinear least squares objective function value, given the residuals, as well as the gradient and the approximative Hessian, see [[#Table: Constrained nonlinear least squares (cls) test problems.]]. The residual routine for this problem is defined in file &#039;&#039;ls1_r &#039;&#039;in the directory &#039;&#039;example&#039;&#039; with the statements&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
function r = ls_r(x, Prob)&lt;br /&gt;
&lt;br /&gt;
% Compute  residuals to  nonlinear least squares  problem  Gisela&lt;br /&gt;
&lt;br /&gt;
% US_A is the standard TOMLAB global parameter to be used in the&lt;br /&gt;
% communication between the residual and the Jacobian  routine &lt;br /&gt;
&lt;br /&gt;
global US_A&lt;br /&gt;
&lt;br /&gt;
% The extra weight parameter K is sent as part of the structure&lt;br /&gt;
K = Prob.user.K;&lt;br /&gt;
t = Prob.LS.t(:); % Pick  up the  time  points&lt;br /&gt;
&lt;br /&gt;
% Exponential expressions to be later used when computing the Jacobian&lt;br /&gt;
US_A.e1  = exp(-x(1)*t); US_A.e2  = exp(-x(2)*t);&lt;br /&gt;
&lt;br /&gt;
r = K*x(1)*(US_A.e2  - US_A.e1) / (x(3)*(x(1)-x(2))) - Prob.LS.y;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this example also shows how to communicate information between the residual and the Jacobian routine. It is best to use any of the predefined global variables &#039;&#039;US_A&#039;&#039; and &#039;&#039;US_B&#039;&#039;, because then there will be no conflicts with respect to global variables if recursive calls are used. In this example the global variable &#039;&#039;US_A&#039;&#039; is used as structure array storing two vectors with exponential expressions. The Jacobian routine for this problem is defined in the file &#039;&#039;ls1_J &#039;&#039; in the directory &#039;&#039;example&#039;&#039;. The global variable &#039;&#039;US_A&#039;&#039; is accessed to obtain the exponential expressions, see the statements below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
function J = ls1_J(x,  Prob)&lt;br /&gt;
&lt;br /&gt;
% Computes the Jacobian to least squares problem Gisela. J(i,j) is dr_i/d_x_j&lt;br /&gt;
% Parameter K  is input in the  structure &lt;br /&gt;
Prob a = Prob.user.K * x(1)/(x(3)*(x(1)-x(2)));&lt;br /&gt;
b      = x(1)-x(2);&lt;br /&gt;
t      = Prob.LS.t;&lt;br /&gt;
&lt;br /&gt;
% Pick up the globally saved exponential computations &lt;br /&gt;
global US_A&lt;br /&gt;
e1 = US_A.e1; e2 = US_A.e2;&lt;br /&gt;
&lt;br /&gt;
% Compute the three columns in the Jacobian, one for each of variable&lt;br /&gt;
J = a * [ t.*e1+(e2-e1)*(1-1/b), -t.*e2+(e2-e1)/b, (e1-e2)/x(3) ];&lt;br /&gt;
&lt;br /&gt;
The following statements solve the &#039;&#039;Gisela &#039;&#039;problem.&lt;br /&gt;
%   --------------------------------------------------------------------- &lt;br /&gt;
function ls1Demo - Nonlinear parameter  estimation with  3 unknowns&lt;br /&gt;
%   --------------------------------------------------------------------- &lt;br /&gt;
&lt;br /&gt;
Name=&#039;Gisela&#039;;&lt;br /&gt;
&lt;br /&gt;
% Time values&lt;br /&gt;
t = [0.25; 0.5; 0.75; 1;  1.5; 2;  3;  4;  6;  8;  12;  24;  32;  48;  54;  72;  80;...&lt;br /&gt;
     96;  121;  144;  168;  192;  216;  246;  276;  324;  348;  386];&lt;br /&gt;
&lt;br /&gt;
%   Observations&lt;br /&gt;
y = [30.5; 44;  43;  41.5; 38.6; 38.6; 39;  41;  37;  37;  24;  32;  29;  23;  21;...&lt;br /&gt;
      19;  17;  14;  9.5; 8.5; 7;  6;  6;  4.5; 3.6; 3;  2.2; 1.6];&lt;br /&gt;
&lt;br /&gt;
x_0 = [6.8729,0.0108,0.1248]&#039;; %   Initial values  for unknown  x&lt;br /&gt;
&lt;br /&gt;
%   Generate the problem structure using the TOMLAB  format (short call)&lt;br /&gt;
%   Prob = clsAssign(r, J, JacPattern, x_L, x_U, Name, x_0,  ...&lt;br /&gt;
%	             y, t, weightType, weightY, SepAlg,  fLowBnd, ...&lt;br /&gt;
%	             A,  b_L,  b_U, c, dc, ConsPattern, c_L,  c_U, ...&lt;br /&gt;
%	             x_min,  x_max, f_opt, x_opt);&lt;br /&gt;
&lt;br /&gt;
Prob = clsAssign(&#039;ls1_r&#039;, &#039;ls1_J&#039;, [], [], [], Name, x_0,  y, t);&lt;br /&gt;
&lt;br /&gt;
% Weighting  parameter K in model is sent to r and J computation using Prob&lt;br /&gt;
Prob.user.K = 5;&lt;br /&gt;
&lt;br /&gt;
Result 	= tomRun(&#039;clsSolve&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second example &#039;&#039;ls2Demo &#039;&#039;in file &#039;&#039;lsDemo &#039;&#039;solves the same problem as &#039;&#039;ls1Demo&#039;&#039;,  but using numerical differences to compute the Jacobian matrix in each iteration.  To make TOMLAB  avoid using the Jacobian routine, the variable &#039;&#039;Prob.NumDiff &#039;&#039;has to be set nonzero. Also in this example the flag &#039;&#039;Prob.optParam.IterPrint  &#039;&#039;is set to enable one line of printing for each iteration.  The changed statements are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Prob.NumDiff            = 1; % Use standard  numerical differences&lt;br /&gt;
Prob.optParam.IterPrint = 1; % Print one line each iteration&lt;br /&gt;
&lt;br /&gt;
Result    = tomRun(&#039;clsSolve&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third example &#039;&#039;ls3Demo &#039;&#039;in file &#039;&#039;lsDemo &#039;&#039;solves the same problem as &#039;&#039;ls1Demo&#039;&#039;,  but six times for different values of the parameter &#039;&#039;K &#039;&#039;in the range [3&#039;&#039;.&#039;&#039;8&#039;&#039;, &#039;&#039;5&#039;&#039;.&#039;&#039;0]. It illustrates that it is not necessary to remake the problem structure &#039;&#039;Prob &#039;&#039;for each optimization, but instead just change the parameters needed. The &#039;&#039;Result &#039;&#039;structure is saved as an vector of structure arrays, to enable post analysis of the results. The changed statements are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
for i=1:6&lt;br /&gt;
   Prob.user.K = 3.8  + 0.2*i;&lt;br /&gt;
   Result(i)	= tomRun(&#039;clsSolve&#039;,Prob,2);&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
fprintf(&#039;\nWEIGHT PARAMETER  K  is %9.3f\n\n\n&#039;,Prob.user.K);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[#Table: Constrained nonlinear least squares (cls) test problems.]] describes the low level routines and the initialization  routines needed for the predefined constrained nonlinear least squares (&#039;&#039;&#039;cls&#039;&#039;&#039;) test problems. Similar routines are needed for the nonlinear least squares (&#039;&#039;&#039;ls&#039;&#039;&#039;) test problems (here no constraint routines are needed).&lt;br /&gt;
&lt;br /&gt;
====Table: Constrained nonlinear least squares (cls) test problems.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;background-color:#ffffff;&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cls_prob&#039;&#039;||Initialization  of &#039;&#039;&#039;cls &#039;&#039;&#039;test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cls_r&#039;&#039;||Compute the residual vector &amp;lt;math&amp;gt;r_i(x), i = 1,...,m.~ x \in \mathbb{R}^n&amp;lt;/math&amp;gt; &#039;&#039;for &#039;&#039;&#039;cls &#039;&#039;&#039; test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cls_J&#039;&#039;||Compute the Jacobian matrix &amp;lt;math&amp;gt;J_{ij}(x)=\partial r_i / d x_j,&lt;br /&gt;
i=1,...,m, j=1,...,n&amp;lt;/math&amp;gt; &#039;&#039;for &#039;&#039;&#039;cls &#039;&#039;&#039; test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cls_c&#039;&#039;||Compute the vector of constraint functions &#039;&#039;c&#039;&#039;(&#039;&#039;x&#039;&#039;) for &#039;&#039;&#039;cls &#039;&#039;&#039;test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cls_dc&#039;&#039;||Compute the matrix of constraint normals &amp;lt;math&amp;gt;\partial&lt;br /&gt;
c(x)/dx&amp;lt;/math&amp;gt; &#039;&#039;for &#039;&#039;&#039;cls &#039;&#039;&#039;test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cls_d2c&#039;&#039;||Compute the second part of the second derivative of the Lagrangian function for &#039;&#039;&#039;cls &#039;&#039;&#039;test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ls_f&#039;&#039;||General routine to compute the objective function value &amp;lt;math&amp;gt;f(x) =&lt;br /&gt;
{1\over2} r(x)^T  r(x)&amp;lt;/math&amp;gt; for nonlinear least squares type of problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ls_g&#039;&#039;||General routine to compute the  gradient  &amp;lt;math&amp;gt;g(x) = J(x)^T r(x)&amp;lt;/math&amp;gt; for nonlinear least squares type of problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ls_H&#039;&#039;||General routine to compute the Hessian approximation &amp;lt;math&amp;gt;H(x) = J(x)^T * J(x)&amp;lt;/math&amp;gt; for nonlinear least squares type of problems.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Fitting Sums of Exponentials to Empirical Data==&lt;br /&gt;
&lt;br /&gt;
In TOMLAB the problem of fitting  sums of positively weighted exponential functions to empirical data may be formulated either as a nonlinear least squares problem or a separable nonlinear least squares problem. Several empirical data series are predefined and artificial data series may also be generated. There are five different types of exponential models with special treatment in TOMLAB, shown in [[#Table: Exponential models treated in TOMLAB.]]. In research in cooperation with Todd Walton, Vicksburg, USA, TOMLAB  has been used to estimate parameters using maximum likelihood in simulated Weibull distributions, and Gumbel and Gamma distributions with real data. TOMLAB has also been useful for parameter estimation in stochastic hydrology using real-life data.&lt;br /&gt;
&lt;br /&gt;
====Table: Exponential models treated in TOMLAB.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;5&amp;quot; style=&amp;quot;background-color:#ffffff;&amp;quot;&lt;br /&gt;
|&amp;lt;math&amp;gt;f(t) = \sum\limits_i^p \alpha_i e^{-\beta_i t}&amp;lt;/math&amp;gt;, || &amp;lt;math&amp;gt;\alpha_i \geq 0&amp;lt;/math&amp;gt;, || &amp;lt;math&amp;gt;0\leq\beta_1&amp;lt;\beta_2&amp;lt; ... &amp;lt;\beta_p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;math&amp;gt;f(t) = \sum\limits_i^p \alpha_i e^{-\beta_i t}&amp;lt;/math&amp;gt;, || &amp;lt;math&amp;gt;\alpha_i \geq 0&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;0\leq\beta_1&amp;lt;\beta_2&amp;lt; ... &amp;lt;\beta_p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;math&amp;gt;f(t) = \sum\limits_i^p \alpha_i(1-e^{-\beta_i t})&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;\alpha_i \geq 0&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;0\leq\beta_1&amp;lt;\beta_2&amp;lt; ... &amp;lt;\beta_p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;math&amp;gt;f(t) = \sum\limits_i^p t \alpha_i e^{-\beta_i t}&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;\alpha_i \geq 0&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;0\leq\beta_1&amp;lt;\beta_2&amp;lt; ... &amp;lt;\beta_p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;math&amp;gt;f(t) = \sum\limits_i^p (t \alpha_i-\gamma_i) e^{-\beta_i t}&amp;lt;/math&amp;gt;, || &amp;lt;math&amp;gt;\alpha_i,\gamma_i \geq 0&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;0\leq\beta_1&amp;lt;\beta_2&amp;lt; ... &amp;gt;\beta_p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;math&amp;gt;f(t) = \sum\limits_i^p t \alpha_i e^{-\beta_i (t - \gamma_i)}&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;\alpha_i \geq 0&amp;lt;/math&amp;gt;, || &amp;lt;math&amp;gt;0\leq\beta_1&amp;lt;\beta_2&amp;lt; ... &amp;lt;\beta_p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Algorithms to find starting values for different number of exponential terms are implemented. Test results show that these initial value algorithms are very close to the true solution for equidistant problems and fairly good for non-equidistant problems. Good initial values are extremely important when solving real life exponential fitting  problems, because they are so ill-conditioned. [[#Table: Exponential fitting test problems.]] shows the relevant routines.&lt;br /&gt;
&lt;br /&gt;
====Table: Exponential fitting  test problems.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;background-color:#ffffff;&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;expAssign&#039;&#039;||Assign exponential fitting  problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_ArtP&#039;&#039;||Generate artificial exponential sum problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;expInit&#039;&#039;||Find starting values for the exponential parameters &amp;lt;math&amp;gt;\lambda&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;expSolve&#039;&#039;||Solve exponential fitting  problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_prob&#039;&#039;||Defines a exponential fitting  type of problem, with data series (&#039;&#039;t, y&#039;&#039;).  The file includes data from several different empirical test series.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;Helax_prob&#039;&#039;||Defines 335 medical research problems supplied by Helax AB, Uppsala, Sweden, where an exponential model is fitted to data. The actual data series (&#039;&#039;t, y&#039;&#039;) are stored on one file each, i.e. 335 data files, 8MB large, and are not distributed. A sample of five similar files are part of &#039;&#039;exp prob&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_r&#039;&#039;||Compute the residual vector &amp;lt;math&amp;gt;r_i(x), i = 1,...,m.~ x \in \mathbb{R}^n&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_J&#039;&#039;||Compute the Jacobian matrix &amp;lt;math&amp;gt;\partial r_i / d x_j, i=1,...,m, j=1,...,n&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_d2r&#039;&#039;||Compute the 2nd part of the second derivative for the nonlinear least squares exponential fitting  problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_c&#039;&#039;||Compute the constraints &amp;lt;math&amp;gt;\lambda_1 &amp;lt; \lambda_2 &amp;lt; ...&amp;lt;/math&amp;gt; on the exponential parameters &amp;lt;math&amp;gt;\lambda_i, i=1,...,p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_dc&#039;&#039;||Compute matrix of constraint normals for constrained exponential fitting  problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_d2c&#039;&#039;||Compute second part of second derivative  matrix  of the Lagrangian function for constrained exponential fitting  problem. This is a zero matrix,  because the constraints are linear.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_q&#039;&#039;||Find starting values for exponential parameters &amp;lt;math&amp;gt;\lambda_i, i=1,...,p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_p&#039;&#039;||Find optimal number of exponential terms, &#039;&#039;p&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Large Scale LS problems with Tlsqr==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Tlsqr &#039;&#039;MEX  solver provides special parameters for advanced memory handling, enabling the user to solve extremely large linear least squares problems.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll take the problem of solving &#039;&#039;Ax &#039;&#039;= &#039;&#039;b &#039;&#039;in the least squares  sense as a prototype problem for this section. Here, &#039;&#039;A ? &#039;&#039;R&#039;&#039;m×n &#039;&#039;is a dense or sparse matrix and &#039;&#039;b ? &#039;&#039;R&#039;&#039;m &#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Controlling  memory allocation in &#039;&#039;&#039;&#039;&#039;Tlsqr&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The normal mode of operation of &#039;&#039;Tlsqr &#039;&#039;is that memory for the &#039;&#039;A &#039;&#039;matrix is allocated and deallocated  each time the solver is called. In a real-life situation with a very large &#039;&#039;A &#039;&#039;and where the solver is called repeatedly, this may become inefficient and even cause problems  getting memory because of memory fragmenting.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Tlsqr &#039;&#039;solver provides a parameter &#039;&#039;Alloc&#039;&#039;, given as the second element of the first input parameter to control the memory handling. The possible values of &#039;&#039;Alloc &#039;&#039;and their meanings are given in [[#Table: Alloc values for Tlsqr]].&lt;br /&gt;
&lt;br /&gt;
====Table: &#039;&#039;Alloc &#039;&#039;values for &#039;&#039;Tlsqr&#039;&#039;====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Alloc (m(2))&lt;br /&gt;
!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||Normal operation: allocate - solve - deallocate&lt;br /&gt;
|-&lt;br /&gt;
|1||Only allocate, no results returned&lt;br /&gt;
|-&lt;br /&gt;
|2||Allocate and solve, no deallocate&lt;br /&gt;
|-&lt;br /&gt;
|3||Only solve, no allocate/deallocate&lt;br /&gt;
|-&lt;br /&gt;
|4||Solve and deallocate&lt;br /&gt;
|-&lt;br /&gt;
|5||Deallocate only, no results returned&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An example of the calling sequence is given below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; m   = 60000;  n = 1000;  d = 0.01; % Size  and density of  A&lt;br /&gt;
&amp;gt;&amp;gt; A  = sprand(m,n,d);	              % Sparse random matrix&lt;br /&gt;
&amp;gt;&amp;gt; b = ones(m,1);	              % Right  hand side&lt;br /&gt;
&amp;gt;&amp;gt; whos A&lt;br /&gt;
&lt;br /&gt;
  Name	     Size 	  Bytes 	Class&lt;br /&gt;
  A	60000x500	3584784	        sparse  array&lt;br /&gt;
&lt;br /&gt;
Grand total is 298565 elements  using  3584784 bytes&lt;br /&gt;
&lt;br /&gt;
%   =======================================================================&lt;br /&gt;
%   Simple standard call to Tlsqr, Alloc is set to default 0 if m is scalar&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; x=Tlsqr(m,n,A,[],[],b);&lt;br /&gt;
&lt;br /&gt;
% =======================================================================&lt;br /&gt;
% To solve  repeatedly with  e.g. the  same  A  but  different b,&lt;br /&gt;
% the  user  may  do:&lt;br /&gt;
&lt;br /&gt;
% Indicate to Tlsqr to allocate and solve the problem&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; m(2) = 2 &lt;br /&gt;
m =&lt;br /&gt;
      60000	2&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; x = Tlsqr(m,n,A,[],[],b); % First solution&lt;br /&gt;
&lt;br /&gt;
%   Indicate to  Tlsqr that memory  is  already allocated,&lt;br /&gt;
%   and that no deallocation should  occur  on exit&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; m(2) = 3 &lt;br /&gt;
m =&lt;br /&gt;
      60000	3&lt;br /&gt;
&lt;br /&gt;
% Loop 100 times, calling  Tlsqr each time  - without re-allocation of  memory&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; for  k=1:100&lt;br /&gt;
&amp;gt;&amp;gt;	b = (...);	          % E.g. alter the right hand side each time&lt;br /&gt;
&amp;gt;&amp;gt;	x = Tlsqr(m,n,A,[],[],b); % Call Tlsqr, now with m(2)=3&lt;br /&gt;
&amp;gt;&amp;gt; end&lt;br /&gt;
&lt;br /&gt;
% Final call, with m(2) = 4: Solve and deallocate&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; m(2) = 4 &lt;br /&gt;
m =&lt;br /&gt;
      60000	4&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; x=Tlsqr(m,n,A,[],[],b);&lt;br /&gt;
&lt;br /&gt;
%   Alternatively, to  just deallocate, the  user  could  do&lt;br /&gt;
&amp;gt;&amp;gt; m(2) = 5;&lt;br /&gt;
&amp;gt;&amp;gt; Tlsqr(m,n,A,[],[],b); % Nothing is returned&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Further Memory Control:  The  maxneA  Parameter&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If the number of non-zero elements in a sparse &#039;&#039;A &#039;&#039;matrix increases in the middle of a &#039;&#039;Tlsqr&#039;&#039;-calling loop, the initially allocated space will not be sufficient. One solution is that the user checks this prior to calling &#039;&#039;Tlsqr &#039;&#039;and reallocating if necessary.  The other solution is to set &#039;&#039;m&#039;&#039;(3) to an upper limit  (&#039;&#039;maxneA&#039;&#039;) of the number of nonzero elements in &#039;&#039;A &#039;&#039;in the first allocation call. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   &amp;gt;&amp;gt; m   = [ 60000	1 1E6 ]&lt;br /&gt;
&lt;br /&gt;
m =&lt;br /&gt;
    60000	1	1000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will initiate a &#039;&#039;Tlsqr &#039;&#039;session, allocating sufficient memory to allow &#039;&#039;A&#039;&#039; matrices with up to 1.000.000 nonzeros. If the allocated memory is still insufficient, &#039;&#039;Tlsqr&#039;&#039; will try to reallocate enough space for the operation to continue.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Using Global Variables with Tlsqr and Tlsqrglob.m&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For cases where it is not possible to send the &#039;&#039;A&#039;&#039; matrix to &#039;&#039;Tlsqr&#039;&#039; because it is simply too large, the user may choose to use the &#039;&#039;tomlab/mex/Tlsqrglob.m &#039;&#039;routine.&lt;br /&gt;
&lt;br /&gt;
This function, which more often than not needs to be customized to the application in mind, should provide the following functionality:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
function y = Tlsqrglob( mode, m, n,  x, Aname, rw )&lt;br /&gt;
&lt;br /&gt;
global A&lt;br /&gt;
&lt;br /&gt;
if mode==1 &lt;br /&gt;
  y = A*x; &lt;br /&gt;
else&lt;br /&gt;
  y = A&#039;*x;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The purpose is to provide the possibility to define a global variable &#039;&#039;A &#039;&#039;and perform the multiplication  without transferring this potentially very large matrix to the MEX function &#039;&#039;Tlsqr&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If several matrices are involved, for example if &#039;&#039;A &#039;&#039;= [&#039;&#039;A&#039;&#039;&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; ; &#039;&#039;A&#039;&#039;&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; ], this approach can be used to eliminate the need to explicitly repeatedly form the composite matrix &#039;&#039;A &#039;&#039;during a run. &#039;&#039;Tlsqrglob.m &#039;&#039;should then be (copied and) modified as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
function y = Tlsqrglob( mode, m, n,  x, Aname, rw )&lt;br /&gt;
&lt;br /&gt;
global A1 A2 &lt;br /&gt;
&lt;br /&gt;
if mode==1&lt;br /&gt;
  y = A1*x;&lt;br /&gt;
  y = [y ; A2*x];&lt;br /&gt;
else&lt;br /&gt;
  M = size(A1,1);&lt;br /&gt;
  y = A1&#039; * x(1:M) + ...&lt;br /&gt;
  A2&#039; * x(M+1:end);&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use the global approach, &#039;&#039;Tlsqr &#039;&#039;must be called with the name of the global multiplication  routine, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
[ x, ... ] = Tlsqr(m,n,&#039;Tlsqrglob&#039;,...);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=TOMLAB_Solving_Least_Squares_and_Parameter_Estimation_Problems&amp;diff=3052</id>
		<title>TOMLAB Solving Least Squares and Parameter Estimation Problems</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=TOMLAB_Solving_Least_Squares_and_Parameter_Estimation_Problems&amp;diff=3052"/>
		<updated>2014-08-05T14:18:41Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Table: Exponential models treated in TOMLAB. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the TOMLAB Manual|link=[[TOMLAB|TOMLAB Manual]]}}&lt;br /&gt;
[[Category:Manuals]]&lt;br /&gt;
This section describes how to define and solve different types of linear and nonlinear least squares and parameter estimation problems. Several examples are given on how to proceed, depending on if a quick solution is wanted, or more advanced tests are needed. TOMLAB  is also compatible with MathWorks Optimization TB.  See [[TOMLAB Appendix E]] for more information and test examples.&lt;br /&gt;
&lt;br /&gt;
All demonstration examples that  are using the TOMLAB  format are collected in the directory &#039;&#039;examples&#039;&#039;. The examples relevant to this section are &#039;&#039;lsDemo &#039;&#039;and &#039;&#039;llsDemo&#039;&#039;. The full path to these files are always given in the text.&lt;br /&gt;
&lt;br /&gt;
[[TOMLAB_Solving_Least_Squares_and_Parameter_Estimation_Problems#Large_Scale_LS_problems_with_Tlsqr|Large Scale LS problems with Tlsqr]] contains information on solving extreme large-scale &#039;&#039;&#039;ls &#039;&#039;&#039;problems with &#039;&#039;Tlsqr&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Linear Least Squares Problems==&lt;br /&gt;
&lt;br /&gt;
This section shows examples how to define and solve linear least squares problems using the TOMLAB  format. As a first illustration, the example &#039;&#039;lls1Demo &#039;&#039;in file &#039;&#039;llsDemo &#039;&#039;shows how to fit a linear least squares model with linear constraints to given data. This test problem is taken from the User&#039;s Guide of &#039;&#039;LSSOL&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Name=&#039;LSSOL test example&#039;;&lt;br /&gt;
&lt;br /&gt;
%  In TOMLAB it is best to use Inf and -Inf, not big numbers. &lt;br /&gt;
n = 9; 	% Number of unknown parameters&lt;br /&gt;
x_L = [-2 -2  -Inf, -2*ones(1,6)]&#039;;&lt;br /&gt;
x_U = 2*ones(n,1);&lt;br /&gt;
&lt;br /&gt;
A       = [ ones(1,8) 4;  1:4,-2,1 1 1 1;  1 -1  1 -1, ones(1,5)];&lt;br /&gt;
b_L = [2     -Inf  -4]&#039;;&lt;br /&gt;
b_U = [Inf     -2  -2]&#039;;&lt;br /&gt;
&lt;br /&gt;
y = ones(10,1);&lt;br /&gt;
C  = [ ones(1,n); 1 2 1 1 1 1 2 0 0; 1 1 3 1 1 1 -1 -1 -3; ...&lt;br /&gt;
1 1 1 4 1 1 1 1 1;1 1 1 3 1 1 1 1 1; 1 1 2 1 1 0 0 0 -1; ...&lt;br /&gt;
1 1 1 1 0 1 1 1 1;1 1 1 0 1 1 1 1 1; 1 1 0 1 1 1 2 2 3;  ...&lt;br /&gt;
1 0 1 1 1 1 0 2 2];&lt;br /&gt;
&lt;br /&gt;
x_0 = 1./[1:n]&#039;;&lt;br /&gt;
&lt;br /&gt;
t           = [];   %  No time set for y(t) (used for plotting)&lt;br /&gt;
weightY     = [];   %  No weighting &lt;br /&gt;
weightType  = [];   %  No weighting type set&lt;br /&gt;
&lt;br /&gt;
x_min	    = [];   %  No lower bound for plotting &lt;br /&gt;
x_max	    = [];   %  No upper bound for plotting&lt;br /&gt;
&lt;br /&gt;
Prob = llsAssign(C, y, x_L,  x_U, Name, x_0,  t, weightType,   weightY, ...&lt;br /&gt;
                 A,  b_L,  b_U,	x_min,  x_max); Result 	= tomRun(&#039;lsei&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is trivial to change the solver in the call to &#039;&#039;tomRun&#039;&#039; to a nonlinear least squares solver, e.g. &#039;&#039;clsSolve&#039;&#039;, or a general nonlinear programming solver.&lt;br /&gt;
&lt;br /&gt;
==Linear Least Squares Problems using the SOL Solver LSSOL==&lt;br /&gt;
&lt;br /&gt;
The example &#039;&#039;lls2Demo&#039;&#039; in file &#039;&#039;llsDemo&#039;&#039; shows how to fit a linear least squares model with linear constraints to given data using a direct call to the SOL solver &#039;&#039;LSSOL&#039;&#039;. The test problem is taken from the User&#039;s Guide of &#039;&#039;LSSOL&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
%   Note that when calling the LSSOL MEX interface directly, avoid using&lt;br /&gt;
%   Inf and -Inf. Instead use big numbers that indicate Inf.&lt;br /&gt;
%   The standard for the MEX interfaces is 1E20 and -1E20, respectively.&lt;br /&gt;
&lt;br /&gt;
n = 9; % There are nine unknown  parameters, and 10 equations &lt;br /&gt;
x_L = [-2 -2  -1E20,  -2*ones(1,6)]&#039;;&lt;br /&gt;
x_U = 2*ones(n,1);&lt;br /&gt;
&lt;br /&gt;
A   = [ ones(1,8) 4;  1:4,-2,1 1 1 1;  1 -1  1 -1, ones(1,5)];&lt;br /&gt;
b_L = [2 	-1E20 -4]&#039;;&lt;br /&gt;
b_U = [1E20	   -2 -2]&#039;;&lt;br /&gt;
% Must put lower and upper bounds on variables and constraints together &lt;br /&gt;
bl = [x_L;b_L];&lt;br /&gt;
bu = [x_U;b_U];&lt;br /&gt;
&lt;br /&gt;
H   = [ ones(1,n); 1 2 1 1 1 1 2 0 0;  1 1 3 1 1 1 -1  -1  -3; ...&lt;br /&gt;
        1 1 1 4 1 1 1 1 1;1  1 1 3 1 1 1 1 1;1  1 2 1 1 0 0 0 -1; ...&lt;br /&gt;
        1 1 1 1 0 1 1 1 1;1  1 1 0 1 1 1 1 1;1  1 0 1 1 1 2 2 3;  ...&lt;br /&gt;
        1 0 1 1 1 1 0 2 2];&lt;br /&gt;
y   = ones(10,1);&lt;br /&gt;
&lt;br /&gt;
x_0 = 1./[1:n]&#039;;&lt;br /&gt;
&lt;br /&gt;
% Set empty indicating default values for most variables&lt;br /&gt;
c         = [];	          % No linear coefficients, they are for LP/QP &lt;br /&gt;
Warm	  = [];	          % No warm start&lt;br /&gt;
iState	  = [];	          % No warm start&lt;br /&gt;
Upper	  = [];	          % C  is not factorized &lt;br /&gt;
kx 	  = [];	          % No warm  start&lt;br /&gt;
SpecsFile = [];	          % No parameter settings in a SPECS file &lt;br /&gt;
PriLev 	  = [];	          % PriLev is not really used in LSSOL &lt;br /&gt;
ProbName  = [];           % ProbName is not really used in LSSOL &lt;br /&gt;
optPar(1) = 50;           % Set print level at maximum&lt;br /&gt;
PrintFile  = &#039;lssol.txt&#039;; % Print result on the file with name lssol.txt&lt;br /&gt;
&lt;br /&gt;
z0 = (y-H*x_0);&lt;br /&gt;
f0  = 0.5*z0&#039;*z0;&lt;br /&gt;
fprintf(&#039;Initial function value  %f\n&#039;,f0);&lt;br /&gt;
&lt;br /&gt;
[x,  Inform, iState, cLamda, Iter, fObj, r, kx]  = ... &lt;br /&gt;
     lssol( A,  bl, bu,  c, x_0,  optPar, H,  y, Warm, ...&lt;br /&gt;
     iState, Upper,  kx,  SpecsFile, PrintFile,  PriLev, ProbName );&lt;br /&gt;
&lt;br /&gt;
%  We could equally well call with the following shorter call:&lt;br /&gt;
%  [x,  Inform, iState, cLamda, Iter, fObj, r, kx]  = ...&lt;br /&gt;
%       lssol( A,  bl, bu,  c, x, optPar, H,  y);&lt;br /&gt;
&lt;br /&gt;
z = (y-H*x);&lt;br /&gt;
f = 0.5*z&#039;*z;&lt;br /&gt;
fprintf(&#039;Optimal  function value  %f\n&#039;,f);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Nonlinear  Least Squares Problems==&lt;br /&gt;
&lt;br /&gt;
This section shows examples how to define and solve nonlinear least squares problems using the TOMLAB  format. As a first illustration,  the example &#039;&#039;ls1Demo &#039;&#039;in file &#039;&#039;lsDemo &#039;&#039;shows how to fit a nonlinear model of exponential type with three unknown parameters to experimental data. This problem, &#039;&#039;Gisela&#039;&#039;, is also defined as problem three in &#039;&#039;ls_prob&#039;&#039;.  A weighting parameter &#039;&#039;K &#039;&#039;is sent  to the residual and Jacobian routine using the &#039;&#039;Prob &#039;&#039;structure.  The solver &#039;&#039;clsSolve &#039;&#039;is called directly. Note that the user only defines the routine to compute the residual vector and the Jacobian matrix of derivatives. TOMLAB  has special routines &#039;&#039;ls f&#039;&#039;, &#039;&#039;ls g &#039;&#039;and &#039;&#039;ls H &#039;&#039;that computes the nonlinear least squares objective function value, given the residuals, as well as the gradient and the approximative Hessian, see [[#Table: Constrained nonlinear least squares (cls) test problems.]]. The residual routine for this problem is defined in file &#039;&#039;ls1_r &#039;&#039;in the directory &#039;&#039;example&#039;&#039; with the statements&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
function r = ls_r(x, Prob)&lt;br /&gt;
&lt;br /&gt;
% Compute  residuals to  nonlinear least squares  problem  Gisela&lt;br /&gt;
&lt;br /&gt;
% US_A is the standard TOMLAB global parameter to be used in the&lt;br /&gt;
% communication between the residual and the Jacobian  routine &lt;br /&gt;
&lt;br /&gt;
global US_A&lt;br /&gt;
&lt;br /&gt;
% The extra weight parameter K is sent as part of the structure&lt;br /&gt;
K = Prob.user.K;&lt;br /&gt;
t = Prob.LS.t(:); % Pick  up the  time  points&lt;br /&gt;
&lt;br /&gt;
% Exponential expressions to be later used when computing the Jacobian&lt;br /&gt;
US_A.e1  = exp(-x(1)*t); US_A.e2  = exp(-x(2)*t);&lt;br /&gt;
&lt;br /&gt;
r = K*x(1)*(US_A.e2  - US_A.e1) / (x(3)*(x(1)-x(2))) - Prob.LS.y;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this example also shows how to communicate information between the residual and the Jacobian routine. It is best to use any of the predefined global variables &#039;&#039;US_A&#039;&#039; and &#039;&#039;US_B&#039;&#039;, because then there will be no conflicts with respect to global variables if recursive calls are used. In this example the global variable &#039;&#039;US_A&#039;&#039; is used as structure array storing two vectors with exponential expressions. The Jacobian routine for this problem is defined in the file &#039;&#039;ls1_J &#039;&#039; in the directory &#039;&#039;example&#039;&#039;. The global variable &#039;&#039;US_A&#039;&#039; is accessed to obtain the exponential expressions, see the statements below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
function J = ls1_J(x,  Prob)&lt;br /&gt;
&lt;br /&gt;
% Computes the Jacobian to least squares problem Gisela. J(i,j) is dr_i/d_x_j&lt;br /&gt;
% Parameter K  is input in the  structure &lt;br /&gt;
Prob a = Prob.user.K * x(1)/(x(3)*(x(1)-x(2)));&lt;br /&gt;
b      = x(1)-x(2);&lt;br /&gt;
t      = Prob.LS.t;&lt;br /&gt;
&lt;br /&gt;
% Pick up the globally saved exponential computations &lt;br /&gt;
global US_A&lt;br /&gt;
e1 = US_A.e1; e2 = US_A.e2;&lt;br /&gt;
&lt;br /&gt;
% Compute the three columns in the Jacobian, one for each of variable&lt;br /&gt;
J = a * [ t.*e1+(e2-e1)*(1-1/b), -t.*e2+(e2-e1)/b, (e1-e2)/x(3) ];&lt;br /&gt;
&lt;br /&gt;
The following statements solve the &#039;&#039;Gisela &#039;&#039;problem.&lt;br /&gt;
%   --------------------------------------------------------------------- &lt;br /&gt;
function ls1Demo - Nonlinear parameter  estimation with  3 unknowns&lt;br /&gt;
%   --------------------------------------------------------------------- &lt;br /&gt;
&lt;br /&gt;
Name=&#039;Gisela&#039;;&lt;br /&gt;
&lt;br /&gt;
% Time values&lt;br /&gt;
t = [0.25; 0.5; 0.75; 1;  1.5; 2;  3;  4;  6;  8;  12;  24;  32;  48;  54;  72;  80;...&lt;br /&gt;
     96;  121;  144;  168;  192;  216;  246;  276;  324;  348;  386];&lt;br /&gt;
&lt;br /&gt;
%   Observations&lt;br /&gt;
y = [30.5; 44;  43;  41.5; 38.6; 38.6; 39;  41;  37;  37;  24;  32;  29;  23;  21;...&lt;br /&gt;
      19;  17;  14;  9.5; 8.5; 7;  6;  6;  4.5; 3.6; 3;  2.2; 1.6];&lt;br /&gt;
&lt;br /&gt;
x_0 = [6.8729,0.0108,0.1248]&#039;; %   Initial values  for unknown  x&lt;br /&gt;
&lt;br /&gt;
%   Generate the problem structure using the TOMLAB  format (short call)&lt;br /&gt;
%   Prob = clsAssign(r, J, JacPattern, x_L, x_U, Name, x_0,  ...&lt;br /&gt;
%	             y, t, weightType, weightY, SepAlg,  fLowBnd, ...&lt;br /&gt;
%	             A,  b_L,  b_U, c, dc, ConsPattern, c_L,  c_U, ...&lt;br /&gt;
%	             x_min,  x_max, f_opt, x_opt);&lt;br /&gt;
&lt;br /&gt;
Prob = clsAssign(&#039;ls1_r&#039;, &#039;ls1_J&#039;, [], [], [], Name, x_0,  y, t);&lt;br /&gt;
&lt;br /&gt;
% Weighting  parameter K in model is sent to r and J computation using Prob&lt;br /&gt;
Prob.user.K = 5;&lt;br /&gt;
&lt;br /&gt;
Result 	= tomRun(&#039;clsSolve&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second example &#039;&#039;ls2Demo &#039;&#039;in file &#039;&#039;lsDemo &#039;&#039;solves the same problem as &#039;&#039;ls1Demo&#039;&#039;,  but using numerical differences to compute the Jacobian matrix in each iteration.  To make TOMLAB  avoid using the Jacobian routine, the variable &#039;&#039;Prob.NumDiff &#039;&#039;has to be set nonzero. Also in this example the flag &#039;&#039;Prob.optParam.IterPrint  &#039;&#039;is set to enable one line of printing for each iteration.  The changed statements are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Prob.NumDiff            = 1; % Use standard  numerical differences&lt;br /&gt;
Prob.optParam.IterPrint = 1; % Print one line each iteration&lt;br /&gt;
&lt;br /&gt;
Result    = tomRun(&#039;clsSolve&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third example &#039;&#039;ls3Demo &#039;&#039;in file &#039;&#039;lsDemo &#039;&#039;solves the same problem as &#039;&#039;ls1Demo&#039;&#039;,  but six times for different values of the parameter &#039;&#039;K &#039;&#039;in the range [3&#039;&#039;.&#039;&#039;8&#039;&#039;, &#039;&#039;5&#039;&#039;.&#039;&#039;0]. It illustrates that it is not necessary to remake the problem structure &#039;&#039;Prob &#039;&#039;for each optimization, but instead just change the parameters needed. The &#039;&#039;Result &#039;&#039;structure is saved as an vector of structure arrays, to enable post analysis of the results. The changed statements are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
for i=1:6&lt;br /&gt;
   Prob.user.K = 3.8  + 0.2*i;&lt;br /&gt;
   Result(i)	= tomRun(&#039;clsSolve&#039;,Prob,2);&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
fprintf(&#039;\nWEIGHT PARAMETER  K  is %9.3f\n\n\n&#039;,Prob.user.K);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[#Table: Constrained nonlinear least squares (cls) test problems.]] describes the low level routines and the initialization  routines needed for the predefined constrained nonlinear least squares (&#039;&#039;&#039;cls&#039;&#039;&#039;) test problems. Similar routines are needed for the nonlinear least squares (&#039;&#039;&#039;ls&#039;&#039;&#039;) test problems (here no constraint routines are needed).&lt;br /&gt;
&lt;br /&gt;
====Table: Constrained nonlinear least squares (cls) test problems.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;background-color:#ffffff;&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cls_prob&#039;&#039;||Initialization  of &#039;&#039;&#039;cls &#039;&#039;&#039;test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cls_r&#039;&#039;||Compute the residual vector &amp;lt;math&amp;gt;r_i(x), i = 1,...,m.~ x \in \mathbb{R}^n&amp;lt;/math&amp;gt; &#039;&#039;for &#039;&#039;&#039;cls &#039;&#039;&#039; test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cls_J&#039;&#039;||Compute the Jacobian matrix &amp;lt;math&amp;gt;J_{ij}(x)=\partial r_i / d x_j,&lt;br /&gt;
i=1,...,m, j=1,...,n&amp;lt;/math&amp;gt; &#039;&#039;for &#039;&#039;&#039;cls &#039;&#039;&#039; test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cls_c&#039;&#039;||Compute the vector of constraint functions &#039;&#039;c&#039;&#039;(&#039;&#039;x&#039;&#039;) for &#039;&#039;&#039;cls &#039;&#039;&#039;test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cls_dc&#039;&#039;||Compute the matrix of constraint normals &amp;lt;math&amp;gt;\partial&lt;br /&gt;
c(x)/dx&amp;lt;/math&amp;gt; &#039;&#039;for &#039;&#039;&#039;cls &#039;&#039;&#039;test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cls_d2c&#039;&#039;||Compute the second part of the second derivative of the Lagrangian function for &#039;&#039;&#039;cls &#039;&#039;&#039;test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ls_f&#039;&#039;||General routine to compute the objective function value &amp;lt;math&amp;gt;f(x) =&lt;br /&gt;
{1\over2} r(x)^T  r(x)&amp;lt;/math&amp;gt; for nonlinear least squares type of problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ls_g&#039;&#039;||General routine to compute the  gradient  &amp;lt;math&amp;gt;g(x) = J(x)^T r(x)&amp;lt;/math&amp;gt; for nonlinear least squares type of problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ls_H&#039;&#039;||General routine to compute the Hessian approximation &amp;lt;math&amp;gt;H(x) = J(x)^T * J(x)&amp;lt;/math&amp;gt; for nonlinear least squares type of problems.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Fitting Sums of Exponentials to Empirical Data==&lt;br /&gt;
&lt;br /&gt;
In TOMLAB the problem of fitting  sums of positively weighted exponential functions to empirical data may be formulated either as a nonlinear least squares problem or a separable nonlinear least squares problem. Several empirical data series are predefined and artificial data series may also be generated. There are five different types of exponential models with special treatment in TOMLAB, shown in [[#Table: Exponential models treated in TOMLAB.]]. In research in cooperation with Todd Walton, Vicksburg, USA, TOMLAB  has been used to estimate parameters using maximum likelihood in simulated Weibull distributions, and Gumbel and Gamma distributions with real data. TOMLAB has also been useful for parameter estimation in stochastic hydrology using real-life data.&lt;br /&gt;
&lt;br /&gt;
====Table: Exponential models treated in TOMLAB.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;5&amp;quot; style=&amp;quot;background-color:#ffffff;&amp;quot;&lt;br /&gt;
|&amp;lt;math&amp;gt;f(t) = \sum\limits_i^p \alpha_i e^{-\beta_i t}&amp;lt;/math&amp;gt;, || &amp;lt;math&amp;gt;\alpha_i \geq 0&amp;lt;/math&amp;gt;, || &amp;lt;math&amp;gt;0\leq\beta_1&amp;lt;\beta_2&amp;lt; ... &amp;lt;\beta_p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;math&amp;gt;f(t) = \sum\limits_i^p \alpha_i e^{-\beta_i t}&amp;lt;/math&amp;gt;, || &amp;lt;math&amp;gt;\alpha_i \geq 0&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;0\leq\beta_1&amp;lt;\beta_2&amp;lt; ... &amp;lt;\beta_p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;math&amp;gt;f(t) = \sum\limits_i^p \alpha_i(1-e^{-\beta_i t})&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;\alpha_i \geq 0&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;0\leq\beta_1&amp;lt;\beta_2&amp;lt; ... &amp;lt;\beta_p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;math&amp;gt;f(t) = \sum\limits_i^p t \alpha_i e^{-\beta_i t}&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;\alpha_i \geq 0&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;0\leq\beta_1&amp;lt;\beta_2&amp;lt; ... &amp;lt;\beta_p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;math&amp;gt;f(t) = \sum\limits_i^p (t \alpha_i-\gamma_i) e^{-\beta_i t}&amp;lt;/math&amp;gt;, || &amp;lt;math&amp;gt;\alpha_i,\gamma_i \geq 0&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;0\leq\beta_1&amp;lt;\beta_2&amp;lt; ... &amp;gt;\beta_p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;math&amp;gt;f(t) = \sum\limits_i^p t \alpha_i e^{-\beta_i (t - \gamma_i)}&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;\alpha_i \geq 0&amp;lt;/math&amp;gt;, || &amp;lt;math&amp;gt;0\leq\beta_1&amp;lt;\beta_2&amp;lt; ... &amp;lt;\beta_p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Algorithms to find starting values for different number of exponential terms are implemented. Test results show that these initial value algorithms are very close to the true solution for equidistant problems and fairly good for non-equidistant problems. Good initial values are extremely important when solving real life exponential fitting  problems, because they are so ill-conditioned. [[#Table: Exponential fitting test problems.]] shows the relevant routines.&lt;br /&gt;
&lt;br /&gt;
====Table: Exponential fitting  test problems.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;expAssign&#039;&#039;||Assign exponential fitting  problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_ArtP&#039;&#039;||Generate artificial exponential sum problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;expInit&#039;&#039;||Find starting values for the exponential parameters &amp;lt;math&amp;gt;\lambda&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;expSolve&#039;&#039;||Solve exponential fitting  problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_prob&#039;&#039;||Defines a exponential fitting  type of problem, with data series (&#039;&#039;t, y&#039;&#039;).  The file includes data from several different empirical test series.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;Helax_prob&#039;&#039;||Defines 335 medical research problems supplied by Helax AB, Uppsala, Sweden, where an exponential model is fitted to data. The actual data series (&#039;&#039;t, y&#039;&#039;) are stored on one file each, i.e. 335 data files, 8MB large, and are not distributed. A sample of five similar files are part of &#039;&#039;exp prob&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_r&#039;&#039;||Compute the residual vector &amp;lt;math&amp;gt;r_i(x), i = 1,...,m.~ x \in \mathbb{R}^n&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_J&#039;&#039;||Compute the Jacobian matrix &amp;lt;math&amp;gt;\partial r_i / d x_j, i=1,...,m, j=1,...,n&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_d2r&#039;&#039;||Compute the 2nd part of the second derivative for the nonlinear least squares exponential fitting  problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_c&#039;&#039;||Compute the constraints &amp;lt;math&amp;gt;\lambda_1 &amp;lt; \lambda_2 &amp;lt; ...&amp;lt;/math&amp;gt; on the exponential parameters &amp;lt;math&amp;gt;\lambda_i, i=1,...,p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_dc&#039;&#039;||Compute matrix of constraint normals for constrained exponential fitting  problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_d2c&#039;&#039;||Compute second part of second derivative  matrix  of the Lagrangian function for constrained exponential fitting  problem. This is a zero matrix,  because the constraints are linear.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_q&#039;&#039;||Find starting values for exponential parameters &amp;lt;math&amp;gt;\lambda_i, i=1,...,p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_p&#039;&#039;||Find optimal number of exponential terms, &#039;&#039;p&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Large Scale LS problems with Tlsqr==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Tlsqr &#039;&#039;MEX  solver provides special parameters for advanced memory handling, enabling the user to solve extremely large linear least squares problems.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll take the problem of solving &#039;&#039;Ax &#039;&#039;= &#039;&#039;b &#039;&#039;in the least squares  sense as a prototype problem for this section. Here, &#039;&#039;A ? &#039;&#039;R&#039;&#039;m×n &#039;&#039;is a dense or sparse matrix and &#039;&#039;b ? &#039;&#039;R&#039;&#039;m &#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Controlling  memory allocation in &#039;&#039;&#039;&#039;&#039;Tlsqr&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The normal mode of operation of &#039;&#039;Tlsqr &#039;&#039;is that memory for the &#039;&#039;A &#039;&#039;matrix is allocated and deallocated  each time the solver is called. In a real-life situation with a very large &#039;&#039;A &#039;&#039;and where the solver is called repeatedly, this may become inefficient and even cause problems  getting memory because of memory fragmenting.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Tlsqr &#039;&#039;solver provides a parameter &#039;&#039;Alloc&#039;&#039;, given as the second element of the first input parameter to control the memory handling. The possible values of &#039;&#039;Alloc &#039;&#039;and their meanings are given in [[#Table: Alloc values for Tlsqr]].&lt;br /&gt;
&lt;br /&gt;
====Table: &#039;&#039;Alloc &#039;&#039;values for &#039;&#039;Tlsqr&#039;&#039;====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Alloc (m(2))&lt;br /&gt;
!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||Normal operation: allocate - solve - deallocate&lt;br /&gt;
|-&lt;br /&gt;
|1||Only allocate, no results returned&lt;br /&gt;
|-&lt;br /&gt;
|2||Allocate and solve, no deallocate&lt;br /&gt;
|-&lt;br /&gt;
|3||Only solve, no allocate/deallocate&lt;br /&gt;
|-&lt;br /&gt;
|4||Solve and deallocate&lt;br /&gt;
|-&lt;br /&gt;
|5||Deallocate only, no results returned&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An example of the calling sequence is given below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; m   = 60000;  n = 1000;  d = 0.01; % Size  and density of  A&lt;br /&gt;
&amp;gt;&amp;gt; A  = sprand(m,n,d);	              % Sparse random matrix&lt;br /&gt;
&amp;gt;&amp;gt; b = ones(m,1);	              % Right  hand side&lt;br /&gt;
&amp;gt;&amp;gt; whos A&lt;br /&gt;
&lt;br /&gt;
  Name	     Size 	  Bytes 	Class&lt;br /&gt;
  A	60000x500	3584784	        sparse  array&lt;br /&gt;
&lt;br /&gt;
Grand total is 298565 elements  using  3584784 bytes&lt;br /&gt;
&lt;br /&gt;
%   =======================================================================&lt;br /&gt;
%   Simple standard call to Tlsqr, Alloc is set to default 0 if m is scalar&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; x=Tlsqr(m,n,A,[],[],b);&lt;br /&gt;
&lt;br /&gt;
% =======================================================================&lt;br /&gt;
% To solve  repeatedly with  e.g. the  same  A  but  different b,&lt;br /&gt;
% the  user  may  do:&lt;br /&gt;
&lt;br /&gt;
% Indicate to Tlsqr to allocate and solve the problem&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; m(2) = 2 &lt;br /&gt;
m =&lt;br /&gt;
      60000	2&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; x = Tlsqr(m,n,A,[],[],b); % First solution&lt;br /&gt;
&lt;br /&gt;
%   Indicate to  Tlsqr that memory  is  already allocated,&lt;br /&gt;
%   and that no deallocation should  occur  on exit&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; m(2) = 3 &lt;br /&gt;
m =&lt;br /&gt;
      60000	3&lt;br /&gt;
&lt;br /&gt;
% Loop 100 times, calling  Tlsqr each time  - without re-allocation of  memory&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; for  k=1:100&lt;br /&gt;
&amp;gt;&amp;gt;	b = (...);	          % E.g. alter the right hand side each time&lt;br /&gt;
&amp;gt;&amp;gt;	x = Tlsqr(m,n,A,[],[],b); % Call Tlsqr, now with m(2)=3&lt;br /&gt;
&amp;gt;&amp;gt; end&lt;br /&gt;
&lt;br /&gt;
% Final call, with m(2) = 4: Solve and deallocate&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; m(2) = 4 &lt;br /&gt;
m =&lt;br /&gt;
      60000	4&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; x=Tlsqr(m,n,A,[],[],b);&lt;br /&gt;
&lt;br /&gt;
%   Alternatively, to  just deallocate, the  user  could  do&lt;br /&gt;
&amp;gt;&amp;gt; m(2) = 5;&lt;br /&gt;
&amp;gt;&amp;gt; Tlsqr(m,n,A,[],[],b); % Nothing is returned&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Further Memory Control:  The  maxneA  Parameter&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If the number of non-zero elements in a sparse &#039;&#039;A &#039;&#039;matrix increases in the middle of a &#039;&#039;Tlsqr&#039;&#039;-calling loop, the initially allocated space will not be sufficient. One solution is that the user checks this prior to calling &#039;&#039;Tlsqr &#039;&#039;and reallocating if necessary.  The other solution is to set &#039;&#039;m&#039;&#039;(3) to an upper limit  (&#039;&#039;maxneA&#039;&#039;) of the number of nonzero elements in &#039;&#039;A &#039;&#039;in the first allocation call. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   &amp;gt;&amp;gt; m   = [ 60000	1 1E6 ]&lt;br /&gt;
&lt;br /&gt;
m =&lt;br /&gt;
    60000	1	1000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will initiate a &#039;&#039;Tlsqr &#039;&#039;session, allocating sufficient memory to allow &#039;&#039;A&#039;&#039; matrices with up to 1.000.000 nonzeros. If the allocated memory is still insufficient, &#039;&#039;Tlsqr&#039;&#039; will try to reallocate enough space for the operation to continue.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Using Global Variables with Tlsqr and Tlsqrglob.m&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For cases where it is not possible to send the &#039;&#039;A&#039;&#039; matrix to &#039;&#039;Tlsqr&#039;&#039; because it is simply too large, the user may choose to use the &#039;&#039;tomlab/mex/Tlsqrglob.m &#039;&#039;routine.&lt;br /&gt;
&lt;br /&gt;
This function, which more often than not needs to be customized to the application in mind, should provide the following functionality:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
function y = Tlsqrglob( mode, m, n,  x, Aname, rw )&lt;br /&gt;
&lt;br /&gt;
global A&lt;br /&gt;
&lt;br /&gt;
if mode==1 &lt;br /&gt;
  y = A*x; &lt;br /&gt;
else&lt;br /&gt;
  y = A&#039;*x;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The purpose is to provide the possibility to define a global variable &#039;&#039;A &#039;&#039;and perform the multiplication  without transferring this potentially very large matrix to the MEX function &#039;&#039;Tlsqr&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If several matrices are involved, for example if &#039;&#039;A &#039;&#039;= [&#039;&#039;A&#039;&#039;&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; ; &#039;&#039;A&#039;&#039;&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; ], this approach can be used to eliminate the need to explicitly repeatedly form the composite matrix &#039;&#039;A &#039;&#039;during a run. &#039;&#039;Tlsqrglob.m &#039;&#039;should then be (copied and) modified as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
function y = Tlsqrglob( mode, m, n,  x, Aname, rw )&lt;br /&gt;
&lt;br /&gt;
global A1 A2 &lt;br /&gt;
&lt;br /&gt;
if mode==1&lt;br /&gt;
  y = A1*x;&lt;br /&gt;
  y = [y ; A2*x];&lt;br /&gt;
else&lt;br /&gt;
  M = size(A1,1);&lt;br /&gt;
  y = A1&#039; * x(1:M) + ...&lt;br /&gt;
  A2&#039; * x(M+1:end);&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use the global approach, &#039;&#039;Tlsqr &#039;&#039;must be called with the name of the global multiplication  routine, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
[ x, ... ] = Tlsqr(m,n,&#039;Tlsqrglob&#039;,...);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=TOMLAB_Solving_Least_Squares_and_Parameter_Estimation_Problems&amp;diff=3051</id>
		<title>TOMLAB Solving Least Squares and Parameter Estimation Problems</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=TOMLAB_Solving_Least_Squares_and_Parameter_Estimation_Problems&amp;diff=3051"/>
		<updated>2014-08-05T14:18:18Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Table: Constrained nonlinear least squares (cls) test problems. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the TOMLAB Manual|link=[[TOMLAB|TOMLAB Manual]]}}&lt;br /&gt;
[[Category:Manuals]]&lt;br /&gt;
This section describes how to define and solve different types of linear and nonlinear least squares and parameter estimation problems. Several examples are given on how to proceed, depending on if a quick solution is wanted, or more advanced tests are needed. TOMLAB  is also compatible with MathWorks Optimization TB.  See [[TOMLAB Appendix E]] for more information and test examples.&lt;br /&gt;
&lt;br /&gt;
All demonstration examples that  are using the TOMLAB  format are collected in the directory &#039;&#039;examples&#039;&#039;. The examples relevant to this section are &#039;&#039;lsDemo &#039;&#039;and &#039;&#039;llsDemo&#039;&#039;. The full path to these files are always given in the text.&lt;br /&gt;
&lt;br /&gt;
[[TOMLAB_Solving_Least_Squares_and_Parameter_Estimation_Problems#Large_Scale_LS_problems_with_Tlsqr|Large Scale LS problems with Tlsqr]] contains information on solving extreme large-scale &#039;&#039;&#039;ls &#039;&#039;&#039;problems with &#039;&#039;Tlsqr&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Linear Least Squares Problems==&lt;br /&gt;
&lt;br /&gt;
This section shows examples how to define and solve linear least squares problems using the TOMLAB  format. As a first illustration, the example &#039;&#039;lls1Demo &#039;&#039;in file &#039;&#039;llsDemo &#039;&#039;shows how to fit a linear least squares model with linear constraints to given data. This test problem is taken from the User&#039;s Guide of &#039;&#039;LSSOL&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Name=&#039;LSSOL test example&#039;;&lt;br /&gt;
&lt;br /&gt;
%  In TOMLAB it is best to use Inf and -Inf, not big numbers. &lt;br /&gt;
n = 9; 	% Number of unknown parameters&lt;br /&gt;
x_L = [-2 -2  -Inf, -2*ones(1,6)]&#039;;&lt;br /&gt;
x_U = 2*ones(n,1);&lt;br /&gt;
&lt;br /&gt;
A       = [ ones(1,8) 4;  1:4,-2,1 1 1 1;  1 -1  1 -1, ones(1,5)];&lt;br /&gt;
b_L = [2     -Inf  -4]&#039;;&lt;br /&gt;
b_U = [Inf     -2  -2]&#039;;&lt;br /&gt;
&lt;br /&gt;
y = ones(10,1);&lt;br /&gt;
C  = [ ones(1,n); 1 2 1 1 1 1 2 0 0; 1 1 3 1 1 1 -1 -1 -3; ...&lt;br /&gt;
1 1 1 4 1 1 1 1 1;1 1 1 3 1 1 1 1 1; 1 1 2 1 1 0 0 0 -1; ...&lt;br /&gt;
1 1 1 1 0 1 1 1 1;1 1 1 0 1 1 1 1 1; 1 1 0 1 1 1 2 2 3;  ...&lt;br /&gt;
1 0 1 1 1 1 0 2 2];&lt;br /&gt;
&lt;br /&gt;
x_0 = 1./[1:n]&#039;;&lt;br /&gt;
&lt;br /&gt;
t           = [];   %  No time set for y(t) (used for plotting)&lt;br /&gt;
weightY     = [];   %  No weighting &lt;br /&gt;
weightType  = [];   %  No weighting type set&lt;br /&gt;
&lt;br /&gt;
x_min	    = [];   %  No lower bound for plotting &lt;br /&gt;
x_max	    = [];   %  No upper bound for plotting&lt;br /&gt;
&lt;br /&gt;
Prob = llsAssign(C, y, x_L,  x_U, Name, x_0,  t, weightType,   weightY, ...&lt;br /&gt;
                 A,  b_L,  b_U,	x_min,  x_max); Result 	= tomRun(&#039;lsei&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is trivial to change the solver in the call to &#039;&#039;tomRun&#039;&#039; to a nonlinear least squares solver, e.g. &#039;&#039;clsSolve&#039;&#039;, or a general nonlinear programming solver.&lt;br /&gt;
&lt;br /&gt;
==Linear Least Squares Problems using the SOL Solver LSSOL==&lt;br /&gt;
&lt;br /&gt;
The example &#039;&#039;lls2Demo&#039;&#039; in file &#039;&#039;llsDemo&#039;&#039; shows how to fit a linear least squares model with linear constraints to given data using a direct call to the SOL solver &#039;&#039;LSSOL&#039;&#039;. The test problem is taken from the User&#039;s Guide of &#039;&#039;LSSOL&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
%   Note that when calling the LSSOL MEX interface directly, avoid using&lt;br /&gt;
%   Inf and -Inf. Instead use big numbers that indicate Inf.&lt;br /&gt;
%   The standard for the MEX interfaces is 1E20 and -1E20, respectively.&lt;br /&gt;
&lt;br /&gt;
n = 9; % There are nine unknown  parameters, and 10 equations &lt;br /&gt;
x_L = [-2 -2  -1E20,  -2*ones(1,6)]&#039;;&lt;br /&gt;
x_U = 2*ones(n,1);&lt;br /&gt;
&lt;br /&gt;
A   = [ ones(1,8) 4;  1:4,-2,1 1 1 1;  1 -1  1 -1, ones(1,5)];&lt;br /&gt;
b_L = [2 	-1E20 -4]&#039;;&lt;br /&gt;
b_U = [1E20	   -2 -2]&#039;;&lt;br /&gt;
% Must put lower and upper bounds on variables and constraints together &lt;br /&gt;
bl = [x_L;b_L];&lt;br /&gt;
bu = [x_U;b_U];&lt;br /&gt;
&lt;br /&gt;
H   = [ ones(1,n); 1 2 1 1 1 1 2 0 0;  1 1 3 1 1 1 -1  -1  -3; ...&lt;br /&gt;
        1 1 1 4 1 1 1 1 1;1  1 1 3 1 1 1 1 1;1  1 2 1 1 0 0 0 -1; ...&lt;br /&gt;
        1 1 1 1 0 1 1 1 1;1  1 1 0 1 1 1 1 1;1  1 0 1 1 1 2 2 3;  ...&lt;br /&gt;
        1 0 1 1 1 1 0 2 2];&lt;br /&gt;
y   = ones(10,1);&lt;br /&gt;
&lt;br /&gt;
x_0 = 1./[1:n]&#039;;&lt;br /&gt;
&lt;br /&gt;
% Set empty indicating default values for most variables&lt;br /&gt;
c         = [];	          % No linear coefficients, they are for LP/QP &lt;br /&gt;
Warm	  = [];	          % No warm start&lt;br /&gt;
iState	  = [];	          % No warm start&lt;br /&gt;
Upper	  = [];	          % C  is not factorized &lt;br /&gt;
kx 	  = [];	          % No warm  start&lt;br /&gt;
SpecsFile = [];	          % No parameter settings in a SPECS file &lt;br /&gt;
PriLev 	  = [];	          % PriLev is not really used in LSSOL &lt;br /&gt;
ProbName  = [];           % ProbName is not really used in LSSOL &lt;br /&gt;
optPar(1) = 50;           % Set print level at maximum&lt;br /&gt;
PrintFile  = &#039;lssol.txt&#039;; % Print result on the file with name lssol.txt&lt;br /&gt;
&lt;br /&gt;
z0 = (y-H*x_0);&lt;br /&gt;
f0  = 0.5*z0&#039;*z0;&lt;br /&gt;
fprintf(&#039;Initial function value  %f\n&#039;,f0);&lt;br /&gt;
&lt;br /&gt;
[x,  Inform, iState, cLamda, Iter, fObj, r, kx]  = ... &lt;br /&gt;
     lssol( A,  bl, bu,  c, x_0,  optPar, H,  y, Warm, ...&lt;br /&gt;
     iState, Upper,  kx,  SpecsFile, PrintFile,  PriLev, ProbName );&lt;br /&gt;
&lt;br /&gt;
%  We could equally well call with the following shorter call:&lt;br /&gt;
%  [x,  Inform, iState, cLamda, Iter, fObj, r, kx]  = ...&lt;br /&gt;
%       lssol( A,  bl, bu,  c, x, optPar, H,  y);&lt;br /&gt;
&lt;br /&gt;
z = (y-H*x);&lt;br /&gt;
f = 0.5*z&#039;*z;&lt;br /&gt;
fprintf(&#039;Optimal  function value  %f\n&#039;,f);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Nonlinear  Least Squares Problems==&lt;br /&gt;
&lt;br /&gt;
This section shows examples how to define and solve nonlinear least squares problems using the TOMLAB  format. As a first illustration,  the example &#039;&#039;ls1Demo &#039;&#039;in file &#039;&#039;lsDemo &#039;&#039;shows how to fit a nonlinear model of exponential type with three unknown parameters to experimental data. This problem, &#039;&#039;Gisela&#039;&#039;, is also defined as problem three in &#039;&#039;ls_prob&#039;&#039;.  A weighting parameter &#039;&#039;K &#039;&#039;is sent  to the residual and Jacobian routine using the &#039;&#039;Prob &#039;&#039;structure.  The solver &#039;&#039;clsSolve &#039;&#039;is called directly. Note that the user only defines the routine to compute the residual vector and the Jacobian matrix of derivatives. TOMLAB  has special routines &#039;&#039;ls f&#039;&#039;, &#039;&#039;ls g &#039;&#039;and &#039;&#039;ls H &#039;&#039;that computes the nonlinear least squares objective function value, given the residuals, as well as the gradient and the approximative Hessian, see [[#Table: Constrained nonlinear least squares (cls) test problems.]]. The residual routine for this problem is defined in file &#039;&#039;ls1_r &#039;&#039;in the directory &#039;&#039;example&#039;&#039; with the statements&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
function r = ls_r(x, Prob)&lt;br /&gt;
&lt;br /&gt;
% Compute  residuals to  nonlinear least squares  problem  Gisela&lt;br /&gt;
&lt;br /&gt;
% US_A is the standard TOMLAB global parameter to be used in the&lt;br /&gt;
% communication between the residual and the Jacobian  routine &lt;br /&gt;
&lt;br /&gt;
global US_A&lt;br /&gt;
&lt;br /&gt;
% The extra weight parameter K is sent as part of the structure&lt;br /&gt;
K = Prob.user.K;&lt;br /&gt;
t = Prob.LS.t(:); % Pick  up the  time  points&lt;br /&gt;
&lt;br /&gt;
% Exponential expressions to be later used when computing the Jacobian&lt;br /&gt;
US_A.e1  = exp(-x(1)*t); US_A.e2  = exp(-x(2)*t);&lt;br /&gt;
&lt;br /&gt;
r = K*x(1)*(US_A.e2  - US_A.e1) / (x(3)*(x(1)-x(2))) - Prob.LS.y;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this example also shows how to communicate information between the residual and the Jacobian routine. It is best to use any of the predefined global variables &#039;&#039;US_A&#039;&#039; and &#039;&#039;US_B&#039;&#039;, because then there will be no conflicts with respect to global variables if recursive calls are used. In this example the global variable &#039;&#039;US_A&#039;&#039; is used as structure array storing two vectors with exponential expressions. The Jacobian routine for this problem is defined in the file &#039;&#039;ls1_J &#039;&#039; in the directory &#039;&#039;example&#039;&#039;. The global variable &#039;&#039;US_A&#039;&#039; is accessed to obtain the exponential expressions, see the statements below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
function J = ls1_J(x,  Prob)&lt;br /&gt;
&lt;br /&gt;
% Computes the Jacobian to least squares problem Gisela. J(i,j) is dr_i/d_x_j&lt;br /&gt;
% Parameter K  is input in the  structure &lt;br /&gt;
Prob a = Prob.user.K * x(1)/(x(3)*(x(1)-x(2)));&lt;br /&gt;
b      = x(1)-x(2);&lt;br /&gt;
t      = Prob.LS.t;&lt;br /&gt;
&lt;br /&gt;
% Pick up the globally saved exponential computations &lt;br /&gt;
global US_A&lt;br /&gt;
e1 = US_A.e1; e2 = US_A.e2;&lt;br /&gt;
&lt;br /&gt;
% Compute the three columns in the Jacobian, one for each of variable&lt;br /&gt;
J = a * [ t.*e1+(e2-e1)*(1-1/b), -t.*e2+(e2-e1)/b, (e1-e2)/x(3) ];&lt;br /&gt;
&lt;br /&gt;
The following statements solve the &#039;&#039;Gisela &#039;&#039;problem.&lt;br /&gt;
%   --------------------------------------------------------------------- &lt;br /&gt;
function ls1Demo - Nonlinear parameter  estimation with  3 unknowns&lt;br /&gt;
%   --------------------------------------------------------------------- &lt;br /&gt;
&lt;br /&gt;
Name=&#039;Gisela&#039;;&lt;br /&gt;
&lt;br /&gt;
% Time values&lt;br /&gt;
t = [0.25; 0.5; 0.75; 1;  1.5; 2;  3;  4;  6;  8;  12;  24;  32;  48;  54;  72;  80;...&lt;br /&gt;
     96;  121;  144;  168;  192;  216;  246;  276;  324;  348;  386];&lt;br /&gt;
&lt;br /&gt;
%   Observations&lt;br /&gt;
y = [30.5; 44;  43;  41.5; 38.6; 38.6; 39;  41;  37;  37;  24;  32;  29;  23;  21;...&lt;br /&gt;
      19;  17;  14;  9.5; 8.5; 7;  6;  6;  4.5; 3.6; 3;  2.2; 1.6];&lt;br /&gt;
&lt;br /&gt;
x_0 = [6.8729,0.0108,0.1248]&#039;; %   Initial values  for unknown  x&lt;br /&gt;
&lt;br /&gt;
%   Generate the problem structure using the TOMLAB  format (short call)&lt;br /&gt;
%   Prob = clsAssign(r, J, JacPattern, x_L, x_U, Name, x_0,  ...&lt;br /&gt;
%	             y, t, weightType, weightY, SepAlg,  fLowBnd, ...&lt;br /&gt;
%	             A,  b_L,  b_U, c, dc, ConsPattern, c_L,  c_U, ...&lt;br /&gt;
%	             x_min,  x_max, f_opt, x_opt);&lt;br /&gt;
&lt;br /&gt;
Prob = clsAssign(&#039;ls1_r&#039;, &#039;ls1_J&#039;, [], [], [], Name, x_0,  y, t);&lt;br /&gt;
&lt;br /&gt;
% Weighting  parameter K in model is sent to r and J computation using Prob&lt;br /&gt;
Prob.user.K = 5;&lt;br /&gt;
&lt;br /&gt;
Result 	= tomRun(&#039;clsSolve&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second example &#039;&#039;ls2Demo &#039;&#039;in file &#039;&#039;lsDemo &#039;&#039;solves the same problem as &#039;&#039;ls1Demo&#039;&#039;,  but using numerical differences to compute the Jacobian matrix in each iteration.  To make TOMLAB  avoid using the Jacobian routine, the variable &#039;&#039;Prob.NumDiff &#039;&#039;has to be set nonzero. Also in this example the flag &#039;&#039;Prob.optParam.IterPrint  &#039;&#039;is set to enable one line of printing for each iteration.  The changed statements are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Prob.NumDiff            = 1; % Use standard  numerical differences&lt;br /&gt;
Prob.optParam.IterPrint = 1; % Print one line each iteration&lt;br /&gt;
&lt;br /&gt;
Result    = tomRun(&#039;clsSolve&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third example &#039;&#039;ls3Demo &#039;&#039;in file &#039;&#039;lsDemo &#039;&#039;solves the same problem as &#039;&#039;ls1Demo&#039;&#039;,  but six times for different values of the parameter &#039;&#039;K &#039;&#039;in the range [3&#039;&#039;.&#039;&#039;8&#039;&#039;, &#039;&#039;5&#039;&#039;.&#039;&#039;0]. It illustrates that it is not necessary to remake the problem structure &#039;&#039;Prob &#039;&#039;for each optimization, but instead just change the parameters needed. The &#039;&#039;Result &#039;&#039;structure is saved as an vector of structure arrays, to enable post analysis of the results. The changed statements are&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
for i=1:6&lt;br /&gt;
   Prob.user.K = 3.8  + 0.2*i;&lt;br /&gt;
   Result(i)	= tomRun(&#039;clsSolve&#039;,Prob,2);&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
fprintf(&#039;\nWEIGHT PARAMETER  K  is %9.3f\n\n\n&#039;,Prob.user.K);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[#Table: Constrained nonlinear least squares (cls) test problems.]] describes the low level routines and the initialization  routines needed for the predefined constrained nonlinear least squares (&#039;&#039;&#039;cls&#039;&#039;&#039;) test problems. Similar routines are needed for the nonlinear least squares (&#039;&#039;&#039;ls&#039;&#039;&#039;) test problems (here no constraint routines are needed).&lt;br /&gt;
&lt;br /&gt;
====Table: Constrained nonlinear least squares (cls) test problems.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;background-color:#ffffff;&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cls_prob&#039;&#039;||Initialization  of &#039;&#039;&#039;cls &#039;&#039;&#039;test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cls_r&#039;&#039;||Compute the residual vector &amp;lt;math&amp;gt;r_i(x), i = 1,...,m.~ x \in \mathbb{R}^n&amp;lt;/math&amp;gt; &#039;&#039;for &#039;&#039;&#039;cls &#039;&#039;&#039; test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cls_J&#039;&#039;||Compute the Jacobian matrix &amp;lt;math&amp;gt;J_{ij}(x)=\partial r_i / d x_j,&lt;br /&gt;
i=1,...,m, j=1,...,n&amp;lt;/math&amp;gt; &#039;&#039;for &#039;&#039;&#039;cls &#039;&#039;&#039; test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cls_c&#039;&#039;||Compute the vector of constraint functions &#039;&#039;c&#039;&#039;(&#039;&#039;x&#039;&#039;) for &#039;&#039;&#039;cls &#039;&#039;&#039;test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cls_dc&#039;&#039;||Compute the matrix of constraint normals &amp;lt;math&amp;gt;\partial&lt;br /&gt;
c(x)/dx&amp;lt;/math&amp;gt; &#039;&#039;for &#039;&#039;&#039;cls &#039;&#039;&#039;test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;cls_d2c&#039;&#039;||Compute the second part of the second derivative of the Lagrangian function for &#039;&#039;&#039;cls &#039;&#039;&#039;test problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ls_f&#039;&#039;||General routine to compute the objective function value &amp;lt;math&amp;gt;f(x) =&lt;br /&gt;
{1\over2} r(x)^T  r(x)&amp;lt;/math&amp;gt; for nonlinear least squares type of problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ls_g&#039;&#039;||General routine to compute the  gradient  &amp;lt;math&amp;gt;g(x) = J(x)^T r(x)&amp;lt;/math&amp;gt; for nonlinear least squares type of problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ls_H&#039;&#039;||General routine to compute the Hessian approximation &amp;lt;math&amp;gt;H(x) = J(x)^T * J(x)&amp;lt;/math&amp;gt; for nonlinear least squares type of problems.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Fitting Sums of Exponentials to Empirical Data==&lt;br /&gt;
&lt;br /&gt;
In TOMLAB the problem of fitting  sums of positively weighted exponential functions to empirical data may be formulated either as a nonlinear least squares problem or a separable nonlinear least squares problem. Several empirical data series are predefined and artificial data series may also be generated. There are five different types of exponential models with special treatment in TOMLAB, shown in [[#Table: Exponential models treated in TOMLAB.]]. In research in cooperation with Todd Walton, Vicksburg, USA, TOMLAB  has been used to estimate parameters using maximum likelihood in simulated Weibull distributions, and Gumbel and Gamma distributions with real data. TOMLAB has also been useful for parameter estimation in stochastic hydrology using real-life data.&lt;br /&gt;
&lt;br /&gt;
====Table: Exponential models treated in TOMLAB.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|&amp;lt;math&amp;gt;f(t) = \sum\limits_i^p \alpha_i e^{-\beta_i t}&amp;lt;/math&amp;gt;, || &amp;lt;math&amp;gt;\alpha_i \geq 0&amp;lt;/math&amp;gt;, || &amp;lt;math&amp;gt;0\leq\beta_1&amp;lt;\beta_2&amp;lt; ... &amp;lt;\beta_p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;math&amp;gt;f(t) = \sum\limits_i^p \alpha_i e^{-\beta_i t}&amp;lt;/math&amp;gt;, || &amp;lt;math&amp;gt;\alpha_i \geq 0&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;0\leq\beta_1&amp;lt;\beta_2&amp;lt; ... &amp;lt;\beta_p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;math&amp;gt;f(t) = \sum\limits_i^p \alpha_i(1-e^{-\beta_i t})&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;\alpha_i \geq 0&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;0\leq\beta_1&amp;lt;\beta_2&amp;lt; ... &amp;lt;\beta_p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;math&amp;gt;f(t) = \sum\limits_i^p t \alpha_i e^{-\beta_i t}&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;\alpha_i \geq 0&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;0\leq\beta_1&amp;lt;\beta_2&amp;lt; ... &amp;lt;\beta_p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;math&amp;gt;f(t) = \sum\limits_i^p (t \alpha_i-\gamma_i) e^{-\beta_i t}&amp;lt;/math&amp;gt;, || &amp;lt;math&amp;gt;\alpha_i,\gamma_i \geq 0&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;0\leq\beta_1&amp;lt;\beta_2&amp;lt; ... &amp;gt;\beta_p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;math&amp;gt;f(t) = \sum\limits_i^p t \alpha_i e^{-\beta_i (t - \gamma_i)}&amp;lt;/math&amp;gt;, ||  &amp;lt;math&amp;gt;\alpha_i \geq 0&amp;lt;/math&amp;gt;, || &amp;lt;math&amp;gt;0\leq\beta_1&amp;lt;\beta_2&amp;lt; ... &amp;lt;\beta_p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Algorithms to find starting values for different number of exponential terms are implemented. Test results show that these initial value algorithms are very close to the true solution for equidistant problems and fairly good for non-equidistant problems. Good initial values are extremely important when solving real life exponential fitting  problems, because they are so ill-conditioned. [[#Table: Exponential fitting test problems.]] shows the relevant routines.&lt;br /&gt;
&lt;br /&gt;
====Table: Exponential fitting  test problems.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;expAssign&#039;&#039;||Assign exponential fitting  problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_ArtP&#039;&#039;||Generate artificial exponential sum problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;expInit&#039;&#039;||Find starting values for the exponential parameters &amp;lt;math&amp;gt;\lambda&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;expSolve&#039;&#039;||Solve exponential fitting  problems.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_prob&#039;&#039;||Defines a exponential fitting  type of problem, with data series (&#039;&#039;t, y&#039;&#039;).  The file includes data from several different empirical test series.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;Helax_prob&#039;&#039;||Defines 335 medical research problems supplied by Helax AB, Uppsala, Sweden, where an exponential model is fitted to data. The actual data series (&#039;&#039;t, y&#039;&#039;) are stored on one file each, i.e. 335 data files, 8MB large, and are not distributed. A sample of five similar files are part of &#039;&#039;exp prob&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_r&#039;&#039;||Compute the residual vector &amp;lt;math&amp;gt;r_i(x), i = 1,...,m.~ x \in \mathbb{R}^n&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_J&#039;&#039;||Compute the Jacobian matrix &amp;lt;math&amp;gt;\partial r_i / d x_j, i=1,...,m, j=1,...,n&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_d2r&#039;&#039;||Compute the 2nd part of the second derivative for the nonlinear least squares exponential fitting  problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_c&#039;&#039;||Compute the constraints &amp;lt;math&amp;gt;\lambda_1 &amp;lt; \lambda_2 &amp;lt; ...&amp;lt;/math&amp;gt; on the exponential parameters &amp;lt;math&amp;gt;\lambda_i, i=1,...,p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_dc&#039;&#039;||Compute matrix of constraint normals for constrained exponential fitting  problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_d2c&#039;&#039;||Compute second part of second derivative  matrix  of the Lagrangian function for constrained exponential fitting  problem. This is a zero matrix,  because the constraints are linear.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_q&#039;&#039;||Find starting values for exponential parameters &amp;lt;math&amp;gt;\lambda_i, i=1,...,p&amp;lt;/math&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;exp_p&#039;&#039;||Find optimal number of exponential terms, &#039;&#039;p&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Large Scale LS problems with Tlsqr==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Tlsqr &#039;&#039;MEX  solver provides special parameters for advanced memory handling, enabling the user to solve extremely large linear least squares problems.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll take the problem of solving &#039;&#039;Ax &#039;&#039;= &#039;&#039;b &#039;&#039;in the least squares  sense as a prototype problem for this section. Here, &#039;&#039;A ? &#039;&#039;R&#039;&#039;m×n &#039;&#039;is a dense or sparse matrix and &#039;&#039;b ? &#039;&#039;R&#039;&#039;m &#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Controlling  memory allocation in &#039;&#039;&#039;&#039;&#039;Tlsqr&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The normal mode of operation of &#039;&#039;Tlsqr &#039;&#039;is that memory for the &#039;&#039;A &#039;&#039;matrix is allocated and deallocated  each time the solver is called. In a real-life situation with a very large &#039;&#039;A &#039;&#039;and where the solver is called repeatedly, this may become inefficient and even cause problems  getting memory because of memory fragmenting.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Tlsqr &#039;&#039;solver provides a parameter &#039;&#039;Alloc&#039;&#039;, given as the second element of the first input parameter to control the memory handling. The possible values of &#039;&#039;Alloc &#039;&#039;and their meanings are given in [[#Table: Alloc values for Tlsqr]].&lt;br /&gt;
&lt;br /&gt;
====Table: &#039;&#039;Alloc &#039;&#039;values for &#039;&#039;Tlsqr&#039;&#039;====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Alloc (m(2))&lt;br /&gt;
!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|0||Normal operation: allocate - solve - deallocate&lt;br /&gt;
|-&lt;br /&gt;
|1||Only allocate, no results returned&lt;br /&gt;
|-&lt;br /&gt;
|2||Allocate and solve, no deallocate&lt;br /&gt;
|-&lt;br /&gt;
|3||Only solve, no allocate/deallocate&lt;br /&gt;
|-&lt;br /&gt;
|4||Solve and deallocate&lt;br /&gt;
|-&lt;br /&gt;
|5||Deallocate only, no results returned&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An example of the calling sequence is given below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; m   = 60000;  n = 1000;  d = 0.01; % Size  and density of  A&lt;br /&gt;
&amp;gt;&amp;gt; A  = sprand(m,n,d);	              % Sparse random matrix&lt;br /&gt;
&amp;gt;&amp;gt; b = ones(m,1);	              % Right  hand side&lt;br /&gt;
&amp;gt;&amp;gt; whos A&lt;br /&gt;
&lt;br /&gt;
  Name	     Size 	  Bytes 	Class&lt;br /&gt;
  A	60000x500	3584784	        sparse  array&lt;br /&gt;
&lt;br /&gt;
Grand total is 298565 elements  using  3584784 bytes&lt;br /&gt;
&lt;br /&gt;
%   =======================================================================&lt;br /&gt;
%   Simple standard call to Tlsqr, Alloc is set to default 0 if m is scalar&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; x=Tlsqr(m,n,A,[],[],b);&lt;br /&gt;
&lt;br /&gt;
% =======================================================================&lt;br /&gt;
% To solve  repeatedly with  e.g. the  same  A  but  different b,&lt;br /&gt;
% the  user  may  do:&lt;br /&gt;
&lt;br /&gt;
% Indicate to Tlsqr to allocate and solve the problem&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; m(2) = 2 &lt;br /&gt;
m =&lt;br /&gt;
      60000	2&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; x = Tlsqr(m,n,A,[],[],b); % First solution&lt;br /&gt;
&lt;br /&gt;
%   Indicate to  Tlsqr that memory  is  already allocated,&lt;br /&gt;
%   and that no deallocation should  occur  on exit&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; m(2) = 3 &lt;br /&gt;
m =&lt;br /&gt;
      60000	3&lt;br /&gt;
&lt;br /&gt;
% Loop 100 times, calling  Tlsqr each time  - without re-allocation of  memory&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; for  k=1:100&lt;br /&gt;
&amp;gt;&amp;gt;	b = (...);	          % E.g. alter the right hand side each time&lt;br /&gt;
&amp;gt;&amp;gt;	x = Tlsqr(m,n,A,[],[],b); % Call Tlsqr, now with m(2)=3&lt;br /&gt;
&amp;gt;&amp;gt; end&lt;br /&gt;
&lt;br /&gt;
% Final call, with m(2) = 4: Solve and deallocate&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; m(2) = 4 &lt;br /&gt;
m =&lt;br /&gt;
      60000	4&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; x=Tlsqr(m,n,A,[],[],b);&lt;br /&gt;
&lt;br /&gt;
%   Alternatively, to  just deallocate, the  user  could  do&lt;br /&gt;
&amp;gt;&amp;gt; m(2) = 5;&lt;br /&gt;
&amp;gt;&amp;gt; Tlsqr(m,n,A,[],[],b); % Nothing is returned&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Further Memory Control:  The  maxneA  Parameter&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If the number of non-zero elements in a sparse &#039;&#039;A &#039;&#039;matrix increases in the middle of a &#039;&#039;Tlsqr&#039;&#039;-calling loop, the initially allocated space will not be sufficient. One solution is that the user checks this prior to calling &#039;&#039;Tlsqr &#039;&#039;and reallocating if necessary.  The other solution is to set &#039;&#039;m&#039;&#039;(3) to an upper limit  (&#039;&#039;maxneA&#039;&#039;) of the number of nonzero elements in &#039;&#039;A &#039;&#039;in the first allocation call. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   &amp;gt;&amp;gt; m   = [ 60000	1 1E6 ]&lt;br /&gt;
&lt;br /&gt;
m =&lt;br /&gt;
    60000	1	1000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will initiate a &#039;&#039;Tlsqr &#039;&#039;session, allocating sufficient memory to allow &#039;&#039;A&#039;&#039; matrices with up to 1.000.000 nonzeros. If the allocated memory is still insufficient, &#039;&#039;Tlsqr&#039;&#039; will try to reallocate enough space for the operation to continue.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Using Global Variables with Tlsqr and Tlsqrglob.m&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For cases where it is not possible to send the &#039;&#039;A&#039;&#039; matrix to &#039;&#039;Tlsqr&#039;&#039; because it is simply too large, the user may choose to use the &#039;&#039;tomlab/mex/Tlsqrglob.m &#039;&#039;routine.&lt;br /&gt;
&lt;br /&gt;
This function, which more often than not needs to be customized to the application in mind, should provide the following functionality:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
function y = Tlsqrglob( mode, m, n,  x, Aname, rw )&lt;br /&gt;
&lt;br /&gt;
global A&lt;br /&gt;
&lt;br /&gt;
if mode==1 &lt;br /&gt;
  y = A*x; &lt;br /&gt;
else&lt;br /&gt;
  y = A&#039;*x;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The purpose is to provide the possibility to define a global variable &#039;&#039;A &#039;&#039;and perform the multiplication  without transferring this potentially very large matrix to the MEX function &#039;&#039;Tlsqr&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If several matrices are involved, for example if &#039;&#039;A &#039;&#039;= [&#039;&#039;A&#039;&#039;&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; ; &#039;&#039;A&#039;&#039;&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; ], this approach can be used to eliminate the need to explicitly repeatedly form the composite matrix &#039;&#039;A &#039;&#039;during a run. &#039;&#039;Tlsqrglob.m &#039;&#039;should then be (copied and) modified as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
function y = Tlsqrglob( mode, m, n,  x, Aname, rw )&lt;br /&gt;
&lt;br /&gt;
global A1 A2 &lt;br /&gt;
&lt;br /&gt;
if mode==1&lt;br /&gt;
  y = A1*x;&lt;br /&gt;
  y = [y ; A2*x];&lt;br /&gt;
else&lt;br /&gt;
  M = size(A1,1);&lt;br /&gt;
  y = A1&#039; * x(1:M) + ...&lt;br /&gt;
  A2&#039; * x(M+1:end);&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To use the global approach, &#039;&#039;Tlsqr &#039;&#039;must be called with the name of the global multiplication  routine, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
[ x, ... ] = Tlsqr(m,n,&#039;Tlsqrglob&#039;,...);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=TOMLAB_Problem_Types_and_Solver_Routines&amp;diff=3050</id>
		<title>TOMLAB Problem Types and Solver Routines</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=TOMLAB_Problem_Types_and_Solver_Routines&amp;diff=3050"/>
		<updated>2014-07-31T11:38:23Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: /* Solver Routines in TOMLAB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Manuals]]&lt;br /&gt;
{{Part Of Manual|title=the TOMLAB Manual|link=[[TOMLAB|TOMLAB Manual]]}}&lt;br /&gt;
Section [[#Problem Types Defined in TOMLAB|Problem Types Defined in TOMLAB]] defines all problem types in TOMLAB. Each problem definition is accompanied by brief suggestions on suitable solvers. This is followed in [[#Solver Routines in TOMLAB|Solver Routines in TOMLAB]] by a complete list of the available solver routines in TOMLAB and the various available extensions,  such as /SOL and /CGO.&lt;br /&gt;
&lt;br /&gt;
==Problem Types Defined in TOMLAB==&lt;br /&gt;
&lt;br /&gt;
===Unconstrained Optimization Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;unconstrained optimization &#039;&#039;&#039;(&#039;&#039;&#039;uc&#039;&#039;&#039;) problem is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\&lt;br /&gt;
&amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{lcccl}&lt;br /&gt;
x_{L} &amp;amp; \leq  &amp;amp; x &amp;amp; \leq &amp;amp; x_{U}, \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;f(x) \in \mathbb{R}&amp;lt;/math&amp;gt; . For unbounded variables, the corresponding elements of &amp;lt;math&amp;gt;x_L,x_U&amp;lt;/math&amp;gt; may be set to &amp;lt;math&amp;gt;\pm \infty&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /KNITRO and TOMLAB /SNOPT&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The TOMLAB  Base Module routine &#039;&#039;ucSolve &#039;&#039;includes several of the most popular search step methods for unconstrained optimization. The search step methods for unconstrained optimization included in &#039;&#039;ucSolve &#039;&#039;are: the Newton method, the quasi-Newton BFGS and DFP method, the Fletcher-Reeves and Polak-Ribiere conjugate-gradient method, and the Fletcher conjugate descent method. The quasi-Newton methods may either update the inverse Hessian (standard) or the Hessian itself. The Newton method and the quasi-Newton methods updating the Hessian use a subspace minimization technique to handle rank problems. The quasi-Newton algorithms also use safe guarding techniques to avoid rank problem in the updated matrix.&lt;br /&gt;
&lt;br /&gt;
Another TOMLAB Base Module solver suitable for unconstrained problems is the structural trust region algorithm &#039;&#039;sTrustr&#039;&#039;, combined with an initial  trust region radius algorithm.  It treats partially separable functions. Safeguarded BFGS or DFP are used for the quasi-Newton update, if the analytical Hessian is not used. The set of constrained nonlinear solvers could also be used for unconstrained problems.&lt;br /&gt;
&lt;br /&gt;
===Quadratic Programming Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;quadratic  programming  &#039;&#039;&#039;(&#039;&#039;&#039;qp&#039;&#039;&#039;) problem is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) = \frac{1}{2} x^T F x + c^T x \\&lt;br /&gt;
&amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{lcccl}&lt;br /&gt;
x_{L} &amp;amp; \leq  &amp;amp; x    &amp;amp; \leq &amp;amp; x_{U}, \\&lt;br /&gt;
b_{L} &amp;amp; \leq  &amp;amp; A x  &amp;amp; \leq &amp;amp; b_{U} \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;c, x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;F \in \mathbb{R}^{n \times n}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;A \in \mathbb{R}^{m_1 \times n}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;b_L,b_U \in \mathbb{R}^{m_1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /KNITRO,  TOMLAB /SNOPT and TOMLAB /MINLP&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
A positive semidefinite &#039;&#039;F &#039;&#039;-matrix gives a convex QP, otherwise the problem is nonconvex. Nonconvex quadratic programs are solved with a standard active-set method, implemented in the TOM routine &#039;&#039;qpSolve&#039;&#039;. &#039;&#039;qpSolve &#039;&#039;explicitly  treats both inequality and equality constraints, as well as lower and upper bounds on the variables (simple bounds). It converges to a local minimum for indefinite quadratic programs.&lt;br /&gt;
&lt;br /&gt;
In TOMLAB &#039;&#039;MINOS &#039;&#039;in the general or the QP-version (&#039;&#039;QP-MINOS&#039;&#039;),  or the dense QP solver &#039;&#039;QPOPT &#039;&#039;may be used. In the TOMLAB  /SOL extension the &#039;&#039;SQOPT &#039;&#039;solver is suitable for both dense and large, sparse convex QP and &#039;&#039;SNOPT &#039;&#039;works fine for dense or sparse nonconvex QP.&lt;br /&gt;
&lt;br /&gt;
For very large-scale problems, an interior point solver is recommended,  such as TOMLAB  /KNITRO or TOMLAB /BARNLP.&lt;br /&gt;
&lt;br /&gt;
TOMLAB  /CPLEX, TOMLAB  /Xpress and TOMLAB  /XA should always be considered  for large-scale QP problems.&lt;br /&gt;
&lt;br /&gt;
===Constrained Nonlinear Optimization Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;constrained nonlinear optimization &#039;&#039;&#039;problem (&#039;&#039;&#039;con&#039;&#039;&#039;) is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\&lt;br /&gt;
&amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{lcccl}&lt;br /&gt;
x_{L} &amp;amp; \leq  &amp;amp; x    &amp;amp; \leq &amp;amp; x_{U}, \\&lt;br /&gt;
b_{L} &amp;amp; \leq  &amp;amp; A x  &amp;amp; \leq &amp;amp; b_{U} \\&lt;br /&gt;
c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;f(x) \in \mathbb{R}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;A&lt;br /&gt;
\in \mathbb{R}^{m_1 \times n}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;b_L,b_U \in \mathbb{R}^{m_1}&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;c_L,c(x),c_U \in \mathbb{R}^{m_2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /SNOPT, TOMLAB /NPSOL and TOMLAB /KNITRO&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For general constrained nonlinear optimization a sequential quadratic programming (SQP) method by Schittkowski is implemented in the TOMLAB  Base Module solver &#039;&#039;conSolve&#039;&#039;.  &#039;&#039;conSolve &#039;&#039;also includes an implementation of the Han-Powell SQP method. There are also a TOMLAB  Base Module routine &#039;&#039;nlpSolve &#039;&#039;implementing the Filter SQP by Fletcher and Leyffer.&lt;br /&gt;
&lt;br /&gt;
Another constrained solver in TOMLAB  is the structural trust region algorithm &#039;&#039;sTrustr&#039;&#039;, described above. Currently, &#039;&#039;sTrustr &#039;&#039;only solves problems where the feasible region, defined by the constraints, is convex. TOMLAB /MINOS  solves constrained nonlinear programs. The TOMLAB  /SOL extension gives an additional set of general solvers for dense or sparse problems.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;sTrustr&#039;&#039;, &#039;&#039;pdco &#039;&#039;and &#039;&#039;pdsco &#039;&#039;in TOMLAB  Base Module handle nonlinear problems with &#039;&#039;linear  &#039;&#039;constraints only.&lt;br /&gt;
&lt;br /&gt;
There are many other options for large-scale nonlinear optimization to consider in TOMLAB. TOMLAB /CONOPT, TOMLAB /BARNLP, TOMLAB  /MINLP, TOMLAB  /NLPQL and TOMLAB  /SPRNLP.&lt;br /&gt;
&lt;br /&gt;
===Box-bounded Global Optimization Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;box-bounded global optimization &#039;&#039;&#039;(&#039;&#039;&#039;glb&#039;&#039;&#039;) problem is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\&lt;br /&gt;
&amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{llcccll}&lt;br /&gt;
-\infty &amp;lt; &amp;amp;x_{L} &amp;amp; \leq  &amp;amp; x &amp;amp; \leq &amp;amp; x_{U}&amp;amp; &amp;lt; \infty , \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;f(x) \in \mathbb{R}&amp;lt;/math&amp;gt;, i.e. problems that have finite simple bounds on all variables.&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /LGO and TOMLAB /CGO with  TOMLAB /SOL&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The TOM solver &#039;&#039;glbSolve &#039;&#039;implements the DIRECT algorithm, which is a modification of the standard Lipschitzian approach that eliminates the need to specify a Lipschitz constant. In &#039;&#039;glbSolve &#039;&#039;no derivative information is used. For global optimization problems with expensive function evaluations the TOMLAB  /CGO  routine &#039;&#039;ego &#039;&#039;implements the Efficient Global Optimization (EGO) algorithm. The idea of the EGO algorithm is to first fit a response surface to data collected by evaluating the objective function at a few points.  Then, EGO balances between finding the minimum of the surface and improving the approximation by sampling where the prediction error may be high.&lt;br /&gt;
&lt;br /&gt;
===Global Mixed-integer Nonlinear Programming Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;global mixed-integer nonlinear programming  &#039;&#039;&#039;(&#039;&#039;&#039;glc&#039;&#039;&#039;) problem is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\&lt;br /&gt;
&amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{llcccll}&lt;br /&gt;
-\infty &amp;lt; &amp;amp;x_{L} &amp;amp; \leq  &amp;amp; x &amp;amp; \leq &amp;amp; x_{U}&amp;amp; &amp;lt; \infty  \\&lt;br /&gt;
&amp;amp;b_{L} &amp;amp; \leq  &amp;amp; A x  &amp;amp; \leq &amp;amp; b_{U}&amp;amp; \\&lt;br /&gt;
&amp;amp;c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U},&amp;amp; x_{j} \in \mathbb{N}\ ~~\forall j \in I&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;f(x) \in \mathbb{R}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;A \in \mathbb{R}^{m_1 \times n}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;b_L,b_U \in \mathbb{R}^{m_1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;c_L,c(x),c_U \in \mathbb{R}^{m_2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt;, the index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt;, are restricted to be integers.&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /OQNLP&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The TOMLAB  Base Module solver &#039;&#039;glcSolve &#039;&#039;implements an extended version of the DIRECT algorithm, that handles problems with both nonlinear and integer constraints.&lt;br /&gt;
&lt;br /&gt;
===Linear Programming Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;linear programming  &#039;&#039;&#039;(&#039;&#039;&#039;lp&#039;&#039;&#039;) problem is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) = c^T x \\&lt;br /&gt;
&amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{lcccl}&lt;br /&gt;
x_{L} &amp;amp; \leq  &amp;amp; x    &amp;amp; \leq &amp;amp; x_{U}, \\&lt;br /&gt;
b_{L} &amp;amp; \leq  &amp;amp; A x  &amp;amp; \leq &amp;amp; b_{U} \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;c, x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;,&lt;br /&gt;
&amp;lt;math&amp;gt;A \in \mathbb{R}^{m_1 \times n}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;b_L,b_U \in \mathbb{R}^{m_1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /CPLEX, TOMLAB /Xpress  and TOMLAB /XA&#039;&#039;&#039;. &lt;br /&gt;
The TOMLAB  Base Module solver &#039;&#039;lpSimplex &#039;&#039;implements a simplex algorithm for &#039;&#039;&#039;lp &#039;&#039;&#039;problems.&lt;br /&gt;
&lt;br /&gt;
When a dual feasible point is known in (6) it is efficient to use the dual simplex algorithm implemented in the TOMLAB  Base Module solver &#039;&#039;DualSolve&#039;&#039;. In TOMLAB  /MINOS  the LP interface to &#039;&#039;MINOS&#039;&#039;, called &#039;&#039;LP-MINOS &#039;&#039;is efficient for solving large, sparse LP problems. Dense problems are solved by &#039;&#039;LPOPT&#039;&#039;.  The TOMLAB  /SOL extension gives the additional possibility of using &#039;&#039;SQOPT &#039;&#039;to solve large, sparse LP.&lt;br /&gt;
&lt;br /&gt;
The recommended solvers normally outperforms all other solvers.&lt;br /&gt;
&lt;br /&gt;
===Mixed-integer Programming Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;mixed-integer  programming  problem &#039;&#039;&#039;(&#039;&#039;&#039;mip&#039;&#039;&#039;)  is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) = c^T x \\&lt;br /&gt;
&amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{lcccl}&lt;br /&gt;
x_{L} &amp;amp; \leq  &amp;amp; x    &amp;amp; \leq &amp;amp; x_{U}, \\&lt;br /&gt;
b_{L} &amp;amp; \leq  &amp;amp; A x  &amp;amp; \leq &amp;amp; b_{U}, ~x_{j} \in \mathbb{N}\ ~~\forall j \in I  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;c, x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;A \in \mathbb{R}^{m_1&lt;br /&gt;
\times n}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;b_L,b_U \in \mathbb{R}^{m_1}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x&lt;br /&gt;
\in I&amp;lt;/math&amp;gt;, the index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be&lt;br /&gt;
integers. Equality constraints are defined by setting the lower&lt;br /&gt;
bound equal to the upper bound, i.e. for constraint &amp;lt;math&amp;gt;i: b_{L}(i)&lt;br /&gt;
=  b_{U}(i)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /CPLEX, TOMLAB /Xpress  and TOMLAB /XA&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Mixed-integer programs can be solved using the TOMLAB  Base Module routine &#039;&#039;mipSolve &#039;&#039;that  implements a standard branch-and-bound algorithm.  When dual feasible solutions are available, mipSolve  is using the TOMLAB  dual simplex solver DualSolve  to solve subproblems, which is significantly faster than using an ordinary linear programming solver, like the TOMLAB  lpSimplex. &#039;&#039;mipSolve &#039;&#039;also implements user defined priorities for variable selection, and different tree search strategies. For 0/1 - knapsack problems a round-down primal heuristic is included. Another TOMLAB  Base Module solver is the cutting plane routine &#039;&#039;cutplane&#039;&#039;, using Gomory cuts.  It is recommended to use &#039;&#039;mipSolve &#039;&#039;with the LP version of &#039;&#039;MINOS &#039;&#039;with warm starts for the subproblems, giving great speed improvement. The TOMLAB  /Xpress extension  gives access to the state-of-the-art LP, QP, MILP  and MIQP solver Xpress-MP. For many MIP problems, it is necessary to use such a powerful solver, if the solution should be obtained in any reasonable time frame. TOMLAB /CPLEX is equally powerful as TOMLAB  /Xpress and also includes a network solver.&lt;br /&gt;
&lt;br /&gt;
===Linear Least Squares Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;linear least squares &#039;&#039;&#039;(&#039;&#039;&#039;lls&#039;&#039;&#039;) problem is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) = \frac{1}{2} || C x - d || \\&lt;br /&gt;
&amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{lcccl}&lt;br /&gt;
x_{L} &amp;amp; \leq  &amp;amp; x   &amp;amp; \leq &amp;amp; x_{U}, \\&lt;br /&gt;
b_{L} &amp;amp; \leq  &amp;amp; A x  &amp;amp; \leq &amp;amp; b_{U} \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;d \in \mathbb{R}^M&amp;lt;/math&amp;gt;,&lt;br /&gt;
&amp;lt;math&amp;gt;C \in \mathbb{R}^{M \times n}&amp;lt;/math&amp;gt;,&lt;br /&gt;
&amp;lt;math&amp;gt;A \in \mathbb{R}^{m_1 \times n}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;b_L,b_U \in \mathbb{R}^{m_1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;c_L,c(x),c_U \in \mathbb{R}^{m_2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /LSSOL&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tlsqr &#039;&#039;solves unconstrained  sparse &#039;&#039;&#039;lls &#039;&#039;&#039;problems. &#039;&#039;lsei &#039;&#039;solves the general dense problems. &#039;&#039;Tnnls &#039;&#039;is &lt;br /&gt;
&lt;br /&gt;
a fast and robust replacement for the Matlab nnls. The general least squares solver &#039;&#039;clsSolve &#039;&#039;may also be used. &lt;br /&gt;
&lt;br /&gt;
In the TOMLAB&lt;br /&gt;
&lt;br /&gt;
/NPSOL or TOMLAB  /SOL extension the &#039;&#039;LSSOL &#039;&#039;solver is suitable for dense linear least squares problems.&lt;br /&gt;
&lt;br /&gt;
===Constrained Nonlinear Least Squares Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;constrained nonlinear least squares &#039;&#039;&#039;(&#039;&#039;&#039;cls&#039;&#039;&#039;) problem is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{ll}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) = \frac{1}{2} r(x)^T r(x) \\&lt;br /&gt;
&amp;amp;  \\&lt;br /&gt;
s/t &amp;amp; \begin{array}{lcccl}&lt;br /&gt;
x_{L} &amp;amp; \leq  &amp;amp; x   &amp;amp; \leq &amp;amp; x_{U}, \\&lt;br /&gt;
b_{L} &amp;amp; \leq  &amp;amp; A x  &amp;amp; \leq &amp;amp; b_{U} \\&lt;br /&gt;
c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&lt;br /&gt;
\end{array}&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;r(x) \in \mathbb{R}^M&amp;lt;/math&amp;gt;,&lt;br /&gt;
&amp;lt;math&amp;gt;A \in \mathbb{R}^{m_1 \times n}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;b_L,b_U \in \mathbb{R}^{m_1}&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;c_L,c(x),c_U \in \mathbb{R}^{m_2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /NLSSOL&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The TOMLAB  Base Module nonlinear least squares solver &#039;&#039;clsSolve &#039;&#039;treats problems with bound constraints in a similar way as the routine &#039;&#039;ucSolve&#039;&#039;. This strategy is combined with an active-set strategy to handle linear equality and inequality constraints.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;clsSolve &#039;&#039;includes seven optimization methods for nonlinear  least squares problems, among them: the Gauss-Newton method, the Al-Baali-Fletcher and the Fletcher-Xu hybrid method, and the Huschens TSSM method. If rank problems occur, the solver uses subspace minimization.  The line search algorithm used is the same as for unconstrained problems.&lt;br /&gt;
&lt;br /&gt;
Another fast and robust solver is &#039;&#039;NLSSOL&#039;&#039;, available in the TOMLAB  /NPSOL or the TOMLAB  /SOL extension toolbox.&lt;br /&gt;
&lt;br /&gt;
One important utility routine is the TOMLAB  Base Module line search algorithm &#039;&#039;LineSearch&#039;&#039;,  used by the solvers &#039;&#039;conSolve&#039;&#039;, &#039;&#039;clsSolve &#039;&#039;and &#039;&#039;ucSolve&#039;&#039;. It implements a modified version of an algorithm by Fletcher. The line search algorithm uses quadratic and cubic interpolation. Another TOMLAB  Base Module routine, &#039;&#039;preSolve&#039;&#039;, is running a presolve analysis on a system of linear qualities, linear inequalities and simple bounds.   An algorithm by Gondzio, somewhat modified, is implemented in &#039;&#039;preSolve&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Linear Semi-definite Programming Problem===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;linear semi-definite programming  problem with  linear matrix inequalities &#039;&#039;&#039;(&#039;&#039;&#039;sdp&#039;&#039;&#039;) is defined as&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{rccccl}&lt;br /&gt;
\min\limits_{x} &amp;amp; {f(x) = {c^T}x} \\&lt;br /&gt;
&amp;amp; \\s/t &amp;amp; x_{L}   &amp;amp; \leq &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U}\\&lt;br /&gt;
&amp;amp; b_{L}   &amp;amp; \leq &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&lt;br /&gt;
&amp;amp; {r}{Q^{i}_0 + Q^{i}_{k}x_{k} \sum{k=1}^{n} \preccurlyeq 0,\qquad i=1,\ldots,m.} \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;c, x, x_L, x_U \in \mathbb{R}^n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;A \in \mathbb{R}^{m_l\times n}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;b_L,b_U \in \mathbb{R}^{m_l}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Q^{i}_{k}&amp;lt;/math&amp;gt; are symmetric matrices of similar dimensions in each constraint &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;. If there are several LMI constraints, each may have it&#039;s own dimension.&lt;br /&gt;
&lt;br /&gt;
Recommended solvers: &#039;&#039;&#039;TOMLAB /PENSDP and TOMLAB /PENBMI&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;linear semi-definite programming  problem with  bilinear  matrix  inequalities &#039;&#039;&#039;(&#039;&#039;&#039;bmi&#039;&#039;&#039;)  is defined similarly to but with the matrix inequality&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
Q^{i}_0 + \sum_{k=1}^{n} Q^{i}_{k} x_{k} + \sum_{k=1}^{n} \sum_{l=1}^{n} x_{k}x_{l} K^{i}_{kl} \preccurlyeq 0&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The MEX  solvers &#039;&#039;pensdp &#039;&#039;and &#039;&#039;penbmi &#039;&#039;treat  &#039;&#039;&#039;sdp &#039;&#039;&#039;and &#039;&#039;&#039;bmi  &#039;&#039;&#039;problems, respectively.  These are available in the TOMLAB  /PENSDP and TOMLAB  /PENBMI toolboxes.&lt;br /&gt;
&lt;br /&gt;
The MEX-file solver &#039;&#039;pensdp &#039;&#039;available in the TOMLAB  /PENSDP toolbox implements a penalty method aimed at large-scale dense and sparse &#039;&#039;&#039;sdp &#039;&#039;&#039;problems. The interface to the solver allows for data input in the sparse SDPA input format as well as a TOMLAB  specific format corresponding to.&lt;br /&gt;
&lt;br /&gt;
The MEX-file solver &#039;&#039;penbmi &#039;&#039;available in the TOMLAB  /PENBMI toolbox is similar to &#039;&#039;pensdp&#039;&#039;, with added support for the bilinear matrix inequalities.&lt;br /&gt;
&lt;br /&gt;
==Solver Routines in TOMLAB==&lt;br /&gt;
&lt;br /&gt;
===TOMLAB Base Module===&lt;br /&gt;
&lt;br /&gt;
TOMLAB  includes a large set of optimization solvers. Most of them were originally developed by the Applied Optimization and Modeling group (TOM). Since then they have been improved e.g. to handle Matlab sparse arrays and been further  developed. [[#Table: The optimization solvers in TOMLAB Base Module.]]. lists the main set of TOM optimization solvers in all versions of TOMLAB.&lt;br /&gt;
&lt;br /&gt;
====Table: The optimization solvers in TOMLAB Base Module.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[clsSolve]]||Constrained nonlinear least squares. Handles simple bounds and linear equality and inequality constraints using an active-set strategy.  Implements Gauss-Newton, and hybrid quasi-Newton and Gauss-Newton methods.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[conSolve]]||Constrained nonlinear minimization solver using two different sequential quadratic programming methods.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[cutPlane]]||Mixed-integer programming using a cutting plane algorithm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[DualSolve]]||Solves a linear program with a dual feasible starting point.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[glbSolve]]||Box-bounded global optimization, using only function values.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[glcCluster]]||Hybrid algorithm for constrained mixed-integer global optimization. Uses a combination of &#039;&#039;glcFast &#039;&#039;(DIRECT) and a clustering algorithm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[glcSolve]]||Global mixed-integer nonlinear programming, using no derivatives.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[infSolve]]||Constrained minimax optimization. Reformulates problem and calls any suitable nonlinear solver.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[lpSimplex]]||Linear programming using a simplex algorithm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[MilpSolve]]||Mixed-integer programming using branch and bound.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[L1Solve]]||Constrained L1 optimization. Reformulates problem and calls any suitable nonlinear solver.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[mipSolve]]||Mixed-integer programming using a branch-and-bound algorithm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[nlpSolve]]||Constrained nonlinear minimization solver using a filter SQP algorithm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[pdcoTL]]||Linearly constrained nonlinear minimization solver using a primal- dual barrier algorithm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[pdscoTL]]||Linearly constrained nonlinear minimization solver using a primal- dual barrier algorithm, for separable functions.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[qpSolve]]||Non-convex quadratic programming.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[slsSolve]]||Sparse constrained nonlinear least squares. Reformulates problem and calls any suitable sparse nonlinear solver.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[sTrustr]]||Constrained convex optimization of partially separable functions, using a structural trust region algorithm.&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[ucSolve]]||Unconstrained optimization with simple bounds on the parameters. Implements Newton, quasi-Newton and conjugate-gradient methods.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Additional  Fortran solvers in TOMLAB  are listed in [[#Table: Additional solvers in TOMLAB.]]. They are called using a set of MEX-file interfaces developed in TOMLAB.&lt;br /&gt;
&lt;br /&gt;
====Table: Additional solvers in TOMLAB.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;goalSolve&#039;&#039;||Solves sparse multi-objective goal attainment problems&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;lsei&#039;&#039;||Dense constrained  linear least squares&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;qld&#039;&#039;||Convex quadratic programming&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;Tfzero&#039;&#039;||Finding a zero to f(x) in an interval, &#039;&#039;x &#039;&#039; is one-dimensional.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;Tlsqr&#039;&#039;|| Sparse linear least squares.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;Tnnls&#039;&#039;||Nonnegative constrained linear least squares&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /BARNLP===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB /BARNLP solves large-scale nonlinear programming problems using a sparse primal-dual interior point algorithm, in conjunction with a filter for globalization. The solver package was developed in co-operation with Boeing Phantom Works. The TOMLAB  /BARNLP package is described in a separate manual available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /CGO===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB /CGO solves costly global optimization problems. The solvers are listed in [[#Table: Additional solvers in TOMLAB /CGO.]]. They are written in a combination of Matlab and Fortran code, where the Fortran code is called using a set of &lt;br /&gt;
MEX-file interfaces developed in TOMLAB.&lt;br /&gt;
&lt;br /&gt;
====Table: Additional solvers in TOMLAB /CGO.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;rbfSolve||&#039;&#039;Costly constrained box-bounded optimization using a RBF algorithm.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ego&#039;&#039;||Costly constrained box-bounded optimization using the Efficient Global Optimization (EGO) algorithm.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /CONOPT===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB /CONOPT  solves large-scale nonlinear programming problems with a feasible path GRG method .  The solver package was developed in co-operation with Arki  Consulting and Development A/S. The TOMLAB  /CONOPT  is described in a separate manual available at [http://tomopt.com/ http://tomopt.com]. There is also m-file help available.&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /CPLEX===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /CPLEX solves large-scale mixed-integer linear and quadratic programming prob- lems. The solver package was developed in co-operation with ILOG S.A. The TOMLAB  /CPLEX solver package and interface are described in a manual available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /KNITRO===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /KNITRO solves large-scale nonlinear programming problems with interior (barrier) point trust-region methods. The solver package was developed in co-operation with Ziena Optimization Inc. The TOMLAB  /KNITRO manual is available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /LGO===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /LGO  solves global nonlinear programming problems. The LGO solver package is developed by Pint´er Consulting Services, Inc. The TOMLAB  /LGO  manual is available at [http://tomopt.com/ http://tomopt.com/].&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /MINLP===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /MINLP provides solvers for continuous and mixed-integer quadratic programming&lt;br /&gt;
&lt;br /&gt;
(&#039;&#039;&#039;qp&#039;&#039;&#039;,&#039;&#039;&#039;miqp&#039;&#039;&#039;)  and continuous and mixed-integer nonlinear constrained optimization (&#039;&#039;&#039;con&#039;&#039;&#039;, &#039;&#039;&#039;minlp&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
All  four solvers, written  by Roger Fletcher and Sven Leyffer, University of Dundee, Scotland, are available in sparse and dense versions.  The solvers are listed in [[#Table: Solver routines in TOMLAB /MINLP.]].&lt;br /&gt;
&lt;br /&gt;
The TOMLAB  /MINLP manual is available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
====Table: Solver routines in TOMLAB /MINLP.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;bqpd&#039;&#039;||Quadratic programming using a null-space method.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;miqpBB&#039;&#039;||Mixed-integer quadratic programming using &#039;&#039;bqpd &#039;&#039;as subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;filterSQP&#039;&#039;||Constrained nonlinear minimization using a Filtered Sequential QP method.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;minlpBB&#039;&#039;||Constrained, mixed-integer nonlinear minimization using a branch- and-bound search scheme. &#039;&#039;filterSQP &#039;&#039;is used as NLP solver.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /MINOS===&lt;br /&gt;
&lt;br /&gt;
Another set of Fortran solvers were developed by the Stanford Optimization Laboratory (SOL). [[#Table: The SOL optimization solvers in TOMLAB /MINOS.]] lists the solvers included in TOMLAB  /MINOS.  The solvers are called using a set of MEX-file interfaces  developed as part of TOMLAB.  All  functionality of the SOL solvers are available and changeable in the TOMLAB  framework in Matlab.&lt;br /&gt;
&lt;br /&gt;
====Table: The SOL optimization solvers in TOMLAB /MINOS.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;MINOS 5.51||&#039;&#039;Sparse linear and nonlinear programming with linear and nonlin- ear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;LP-MINOS||&#039;&#039;A special version of the &#039;&#039;MINOS 5.5 &#039;&#039;MEX-file interface for sparse linear programming.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;QP-MINOS&#039;&#039;||A special version of the &#039;&#039;MINOS 5.5 &#039;&#039;MEX-file interface for sparse quadratic programming.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;LPOPT 1.0-10&#039;&#039;||Dense linear programming.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;QPOPT 1.0-10	&#039;&#039;||Non-convex quadratic programming with dense constraint matrix and sparse or dense quadratic matrix.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /OQNLP===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /OQNLP  uses a multistart  heuristic algorithm to find global optima of smooth constrained nonlinear programs (NLPs) and mixed-integer nonlinear programs (MINLPs). The solver package was developed in co-operation with Optimal Methods Inc. The TOMLAB  /OQNLP  manual is available at [http://tomopt.com/ http://tomopt.com/] &lt;br /&gt;
&lt;br /&gt;
===TOMLAB /NLPQL===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /NLPQL solves dense nonlinear programming problems, multi  criteria optimiza- tion  problems and nonlinear fitting  problems.  The solver package  was developed in co-operation with  Klaus Schittkowski. The TOMLAB  /NLPQL manual is available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /NPSOL===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /NPSOL is a sub package of TOMLAB  /SOL. The package includes the MINOS solvers as well as NPSOL, LSSOL and NLSSOL. The TOMLAB  /NPSOL manual is available at [http://tomopt.com/ http://tomopt].&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /PENBMI===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /PENBMI solves linear semi-definite programming problems with linear and bilinear matrix inequalities. The solvers are listed in [[#Additional solvers in TOMLAB /PENBMI.]]. They are written in a combination of Matlab and C code. The TOMLAB  /PENBMI manual is available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
====Additional solvers in TOMLAB /PENBMI.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;penbmi&#039;&#039;||Sparse and dense linear semi-definite programming using a penalty algorithm.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;penfeas bmi&#039;&#039;||Feasibility check of systems of linear matrix inequalities, using &#039;&#039;penbmi&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /PENSDP===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB /PENSDP solves linear semi-definite programming problems with linear matrix inequalities. The solvers are listed in [[#Table: Additional solvers in TOMLAB /PENSDP.]]. They are written  in a combination of Matlab and C code. The TOMLAB  /PENSDP manual is available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
====Table: Additional solvers in TOMLAB /PENSDP.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;pensdp&#039;&#039;||Sparse and dense linear semi-definite programming using a penalty algorithm.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;penfeas_sdp&#039;&#039;||Feasibility check of systems of linear matrix inequalities, using &#039;&#039;pensdp&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /SNOPT===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB /SNOPT is a sub package of TOMLAB /SOL. The package includes the MINOS solvers as well as SNOPT and SQOPT. The TOMLAB /SNOPT manual is available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /SOL===&lt;br /&gt;
&lt;br /&gt;
The extension toolbox TOMLAB /SOL gives access to the complete set of Fortran solvers developed by the Stanford Systems Optimization Laboratory (SOL). These solvers are listed in [[#Table: The SOL optimization solvers in TOMLAB /MINOS.]] and [[#Table: The optimization solvers in the TOMLAB /SOL toolbox.]].&lt;br /&gt;
&lt;br /&gt;
====Table: The optimization solvers in the TOMLAB /SOL toolbox.====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Function&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;NPSOL 5.02&#039;&#039;||Dense linear and nonlinear programming with linear and nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SNOPT 6.2-2&#039;&#039;||Large, sparse linear and nonlinear programming with linear and nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SQOPT 6.2-2&#039;&#039;||Sparse convex quadratic programming.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;NLSSOL 5.0-2&#039;&#039;||Constrained nonlinear  least squares. NLSSOL  is  based on NPSOL. No reference except for general NPSOL reference.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;LSSOL 1.05-4&#039;&#039;||Dense linear and quadratic programs (convex), and constrained linear least squares problems.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /SPRNLP===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /SPRNLP solves large-scale nonlinear programming problems. SPRNLP is a state- of-the-art sequential quadratic programming (SQP) method, using an augmented Lagrangian merit function and safeguarded line search.  The solver package was developed in co-operation with Boeing Phantom Works.  The TOMLAB  /SPRNLP package is described in a separate manual available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /XA===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /XA solves large-scale linear, binary, integer and semi-continuous linear program- ming problems, as well as quadratic programming problems. The solver package was developed in co-operation with  Sunset Software  Technology.  The TOMLAB  /XA package is described in a separate manual available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
===TOMLAB /Xpress===&lt;br /&gt;
&lt;br /&gt;
The add-on toolbox TOMLAB  /Xpress solves large-scale mixed-integer linear and quadratic programming prob- lems. The solver package was developed in co-operation with Dash Optimization  Ltd.  The TOMLAB  /Xpress solver package and interface are described in the html manual that comes with the installation package. There is also a TOMLAB  /Xpress manual available at [http://tomopt.com/ http://tomopt.com].&lt;br /&gt;
&lt;br /&gt;
===Finding  Available  Solvers===&lt;br /&gt;
&lt;br /&gt;
To get a list of all available solvers, including Fortran, C and Matlab Optimization Toolbox solvers, for a certain &#039;&#039;solvType&#039;&#039;, call the routine &#039;&#039;SolverList &#039;&#039;with &#039;&#039;solvType  &#039;&#039;as argument. &#039;&#039;solvType &#039;&#039;should either be a string (&#039;uc&#039;, &#039;con&#039; etc.) or the corresponding &#039;&#039;solvType &#039;&#039;number as given in following [[#Table: solvProbType]]. For example, if wanting a list of all available solvers of &#039;&#039;solvType &#039;&#039;&#039;&#039;&#039;con&#039;&#039;&#039;, then&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
SolverList(&#039;con&#039;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
gives the output&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;&amp;gt; SolverList(&#039;con&#039;);&lt;br /&gt;
&lt;br /&gt;
Tomlab recommended choice for Constrained Nonlinear Programming (NLP)&lt;br /&gt;
&lt;br /&gt;
npsol&lt;br /&gt;
&lt;br /&gt;
Other solvers for NLP &lt;br /&gt;
&lt;br /&gt;
    Licensed:&lt;br /&gt;
&lt;br /&gt;
    nlpSolve&lt;br /&gt;
    conSolve&lt;br /&gt;
    sTrustr&lt;br /&gt;
    constr&lt;br /&gt;
    minos&lt;br /&gt;
    PDCO&lt;br /&gt;
    snopt&lt;br /&gt;
    fmincon&lt;br /&gt;
    filterSQP&lt;br /&gt;
    PDSCO&lt;br /&gt;
    knitro&lt;br /&gt;
    conopt&lt;br /&gt;
    nlpqlp&lt;br /&gt;
&lt;br /&gt;
    Non-licensed:&lt;br /&gt;
&lt;br /&gt;
    NONE&lt;br /&gt;
&lt;br /&gt;
Solvers also handling NLP &lt;br /&gt;
&lt;br /&gt;
    Licensed:&lt;br /&gt;
    &lt;br /&gt;
    glcSolve&lt;br /&gt;
    glcFast&lt;br /&gt;
    glcCluster&lt;br /&gt;
    lgo&lt;br /&gt;
    minlpBB&lt;br /&gt;
    ego&lt;br /&gt;
    rbfSolve&lt;br /&gt;
    arbfmip&lt;br /&gt;
&lt;br /&gt;
    Non-licensed:&lt;br /&gt;
&lt;br /&gt;
    NONE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;SolverList &#039;&#039;also returns two  output  arguments: all available solvers as a string matrix  and a vector with  the corresponding &#039;&#039;solvType &#039;&#039;for each solver.&lt;br /&gt;
&lt;br /&gt;
Note that solvers for a more general problem type may be used to solve the problem. In [[#Table: solvProbType]] an attempt has been made to classify these relations.&lt;br /&gt;
&lt;br /&gt;
====Table: solvProbType====&lt;br /&gt;
&lt;br /&gt;
The problem classes (&#039;&#039;probType&#039;&#039;) possible to solve with each type of solver (&#039;&#039;solvType&#039;&#039;) is marked with an &#039;&#039;x&#039;&#039;.  When the solver is in theory possible to use, but from a practical point of view is probably not suitable, parenthesis are added (&#039;&#039;x&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!|| colspan=&amp;quot;10&amp;quot; align=&amp;quot;center&amp;quot; border=&amp;quot;2&amp;quot; | solvType&lt;br /&gt;
|-&lt;br /&gt;
!probType||uc||qp||con||ls||lls||cls||mip||lp||glb||glc&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;uc&#039;&#039;&#039;||x||||x||||||||||||x||(x)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;qp&#039;&#039;&#039;||||x||x||||||||||||||(x)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;con&#039;&#039;&#039;||||||x||||||||||||||(x)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;ls&#039;&#039;&#039;||||||x||x||||x||||||||(x)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lls&#039;&#039;&#039;||||x||x||x||x||x||||||||(x)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;cls&#039;&#039;&#039;||||||x||||||x||||||||(x)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;mip&#039;&#039;&#039;||||||||||||||x||||||(x)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;lp&#039;&#039;&#039;||||x||x||||||||x||x||||(x)&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;glb&#039;&#039;&#039;||||||(x)||||||||||||x||x&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;glc&#039;&#039;&#039;||||||(x)||||||||||||||x&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;exp&#039;&#039;&#039;||x||||x||(x)||||x||||||||(x)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_stoaMINLP&amp;diff=3049</id>
		<title>MIPNLP stoaMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_stoaMINLP&amp;diff=3049"/>
		<updated>2014-07-14T10:41:10Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: Created page with &amp;quot;{{Part Of Manual|title=the MIPNLP Manual|link=MIPNLP Manual}} ==Purpose==  stoaMINLP solves convex mixed-integer nonlinear programming problems (MINLP).  &amp;#039;&amp;#039;stoaMINLP &amp;#039;...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
stoaMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;stoaMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Recommended is to first set IterPrint, to get information each iteration&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.optParam.IterPrint = 1;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = stoaMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
To make a restart (warm start), just set the warm start flag, and call stoaMINLP once again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.WarmStart = 1;&lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
stoaMINLP will read warm start information from the stoaMINLPSave.mat file. Another warm start (with same MaxFunc) is made by just calling tomRun again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result  = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make a restart from the warm start information in the Result structure, make a call to WarmDefGLOBAL before calling stoaMINLP. WarmDefGLOBAL moves information from the Result structure to the Prob structure and sets the warm start flag, &amp;lt;code&amp;gt;Prob.WarmStart = 1;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = WarmDefGLOBAL(&#039;stoaMINLP&#039;, Prob,  Result);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where Result is the result structure returned by the previous run. A warm start (with same MaxIter)  is done by just calling tomRun again:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result  = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make another warm start with new MaxIter 100, say, redefine MaxIter as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob.optParam.MaxIter = 100;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then repeat the two lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Prob = WarmDefGLOBAL(&#039;stoaMINLP&#039;, Prob,  Result); &lt;br /&gt;
Result = tomRun(&#039;stoaMINLP&#039;, Prob,  2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in &#039;&#039;Prob&#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;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&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;Convex&#039;&#039;||If  Convex==1,  assume NLP  problems are convex,  and only one local NLP solver call is used at each node. &amp;lt;br&amp;gt;If Convex==0 (Default), multiMin  is used to do many calls to a local solver to determine the global minima at each node. The global minimum with most components integer valued is chosen.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by stoaMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in stoaMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOpt&#039;&#039;||Print level in sub-solvers (SNOPT and other NLP solvers):&amp;lt;br&amp;gt;=0 No output; &#039;&#039;&amp;gt;&#039;&#039;0 Convergence results.&amp;lt;br&amp;gt;&#039;&#039;&amp;gt;&#039;&#039;1 Output every iteration, &amp;lt;br&amp;gt;&#039;&#039;&amp;gt;&#039;&#039;2 Output each step in the NLP alg&amp;lt;br&amp;gt;For other NLP solvers,  see the documentation for the solver&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;WarmStart&#039;&#039;||If   true, &#039;&#039;&amp;gt;&#039;&#039;0, stoaMINLP  reads the output  from the last run   from Prob.stoaMINLP, if it exists. If it doesn&#039;t exist, stoaMINLP attempts to open and read warm start data from mat-file stoaMINLPSave.mat. stoaMINLP uses the warm start information to continue from the last run. The mat-file minlp- SolveSave.mat is saved every Prob.MIP.SaveFreq iteration.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverNLP&#039;&#039;||Name of the solver used for NLP subproblems.  If empty, the default solver is found calling GetSolver(&#039;con&#039;,1); &amp;lt;br&amp;gt;If TOMLAB  /SOL installed, SNOPT is the default solver.&amp;lt;br&amp;gt;If SolverNLP is a SOL solver (SNOPT, MINOS or NPSOL), the SOL.optPar and SOL.PrintFile is used:&amp;lt;br&amp;gt;See help minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems. If empty, the default solver is found calling GetSolver(&#039;lp&#039;,1). If TOMLAB /SOL or /SNOPT or /NPSOL installed, MINOS is the default solver. If SolverLP is a SOL solver (MINOS, SNOPT or NPSOL), the SOL.optPar and SOL.PrintFile is used: See help minosTL.m, npsolTL.m or snoptTL.m for how to set these parameters.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverNLP0&#039;&#039;||Name of the solver used for the initial NLP-problem. If empty, SolverNLP is used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverUC&#039;&#039;||Solver used for the unconstrained feasibility problem, NLPF. NLPF is solved in case the NLP problem is infeasible. &amp;lt;br&amp;gt;If empty, the default solver is found calling GetSolver(&#039;uc&#039;,LargeScale,0).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;RandState&#039;&#039;||If Convex == 0, RandState is sent to multiMin  to initialize the random generator. RandState is used as follows: &amp;lt;br&amp;gt;If &#039;&#039;&amp;gt; &#039;&#039;0, rand(&#039;state&#039;,RandState) is set to initialize the pseudo-random generator.&amp;lt;br&amp;gt; If &#039;&#039;&amp;lt; &#039;&#039;0, rand(&#039;state&#039;,sum(100*clock)) is set to give a new set of random values each run. &amp;lt;br&amp;gt;If RandState == 0, rand(&#039;state&#039;,) is not called. &amp;lt;br&amp;gt;Default is RandState = -1&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure defining integer optimization parameters. See the table below for a description of each field used in &#039;&#039;Prob.MIP&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;STOAMINLP&#039;&#039;||Structure with solver-specific options. See the table below with descriptions of the fields used in &#039;&#039;Prob.STOAMINLP&#039;&#039;.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below with descriptions of the fields used in &#039;&#039;Prob.optParam&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in &#039;&#039;&#039;Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;VarWeight&#039;&#039;||Weight for each variable in the variable selection phase. &amp;lt;br&amp;gt; A lower value gives higher priority. Setting Prob.MIP.VarWeight might improve convergence.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||&#039;&#039;stoaMINLP &#039;&#039;stops if the duality gap is less than DualGap. DualGap = 1, stop at first integer solution e.g. DualGap = 0.01, stop if solution &#039;&#039;&amp;lt; &#039;&#039;1% from optimal solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;NodeSel&#039;&#039;||Node selection method: &amp;lt;br&amp;gt;= 1 Depth First. Priority on nodes with more integer components. Default &amp;lt;br&amp;gt;= 2 Breadth First. Priority on nodes with more integer components. &amp;lt;br&amp;gt;= 3 Pure LIFO (Last in, first out) Depth First. &amp;lt;br&amp;gt;= 4 Pure FIFO (First in, first out) Breadth First. &amp;lt;br&amp;gt;= 5 Maximize integer components. &amp;lt;br&amp;gt;= 6 Best bound.&amp;lt;br&amp;gt;= 7 Best estimate using pseudo-costs. &amp;lt;br&amp;gt;= 8 Best projection.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;Backtrack&#039;&#039;||Node selection method to use after an integer solution has been found. &amp;lt;br&amp;gt;Available choices are the same as for NodeSel. Default is 2, Breadth First.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;VarSel&#039;&#039;||Variable selection method in branch and bound. &amp;lt;br&amp;gt;= 1 Use variable with most fractional value. &amp;lt;br&amp;gt;= 2 Use gradient and distance to nearest integer value. &amp;lt;br&amp;gt;= 3 Pseudo-cost-based branching.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;KNAPSACK&#039;&#039;||If = 1, use a knapsack heuristic. Default 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If = 1, use a rounding heuristic. Default 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SaveFreq&#039;&#039;||Warm start info saved on stoaMINLPSave.mat every SaveFreq iteration (default -1, i.e. no warm start info is saved)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===STOAMINLP structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with solver-specific options&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.STOAMINLP&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;USECUTS&#039;&#039;||Flag to use cutting plane algorithm described in [[StoaMINLP#Algorithm]]. Using cuts is not recommended for nonconvex problems. &amp;lt;br&amp;gt;Set nonzero to enable, zero to disable. By default, USECUTS = Prob.Convex.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;B_ecp&#039;&#039;||Parameter regulating likelihood of linearization using extended cutting plane. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;K_ecp&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for  extended cutting plane linearizations. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;M_ecp&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using extended cutting plane. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;B_ff&#039;&#039;||Parameter regulating likelihood of linearization using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;K_ff&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for  linearizations using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;M_ff&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using fixed fractional integer decision variables. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;B_nlpr&#039;&#039;||Parameter regulating likelihood of linearization using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 10. &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;K_nlpr&#039;&#039;||Parameter regulating &amp;quot;tailing off&amp;quot; detection for linearizations using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 0.001.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;M_nlpr&#039;&#039;||Parameter regulating the balance between branching the search tree and adding linearizations using the solution of the relaxed NLP problem. See [[StoaMINLP#Algorithm]] for more information. Default 10.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rTYPE&#039;&#039;||= 0  r is fixed to the value in rVALUE.&amp;lt;br&amp;gt;= 1  r is a uniformly distributed random number in the interval [0,1]. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;rVALUE&#039;&#039;||Defines the value of r when rTYPE is set to zero. Default is 0.5.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTPOOL&#039;&#039;||= 0 All linearizations constraints are kept in the master problem. &amp;lt;br&amp;gt;= 1 Manage a pool with inactive linearization constraints. If an inactive constraint gets violated, it is brought back from the pool. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTDELBND&#039;&#039;||The number of consecutive times a linearization can be inactive before it gets removed and put into the inactive pool. Default 15.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTLIMDEL&#039;&#039;||= 0  No extra deletion of cuts. Default when Prob.Convex == 1.&amp;lt;br&amp;gt;= 1  Delete any cuts limiting the true feasible region when detected. Such cuts will appear if the problem has nonlinear constraints. Default when Prob.Convex == 0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PCITL&#039;&#039;||Limit on time spent per node calculating initial pseudo costs when VarSel == 3. Default is 120 (s).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;LINPRINT&#039;&#039;||Set nonzero to print short information about the type of linearization added. Default 0. enabled when IterPrint &amp;gt; 3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;POOLPRINT&#039;&#039;||Set nonzero to print information about the cutpool management. Default 0. Enabled when IterPrint &amp;gt; 4.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam structure===&lt;br /&gt;
&lt;br /&gt;
Substructure in Prob with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam:&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;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 1 also enables IterPrint, setting it to 1. &amp;lt;br&amp;gt;&lt;br /&gt;
The information printed for different levels is as follows: &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;0 A line at each evaluated node with the following: &amp;lt;br&amp;gt;&lt;br /&gt;
Iteration number: &amp;lt;br&amp;gt;&lt;br /&gt;
Depth in tree (symbol L[] - empty list, symbol Gap - Dual Gap convergence), &amp;lt;br&amp;gt;fNLP (Optimal  f(x)  current node), &amp;lt;br&amp;gt;fIPMin  (Best integer feasible f(x) found), &amp;lt;br&amp;gt;LowBnd (Lower bound on optimal integer feasible f(x)), &amp;lt;br&amp;gt;Dual Gap in absolut value and percent, &amp;lt;br&amp;gt;The length of the node list L, -L-, &amp;lt;br&amp;gt;The Inform and ExitFlag the solver returned at the current node, &amp;lt;br&amp;gt;FuEv (Number of function evaluations  used by solver at current node), &amp;lt;br&amp;gt;date/time stamp. &amp;lt;br&amp;gt;Outer approximation linearizations, number of cuts in active/inactive pool (|C| #A #I). &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt; 1 A line at each evaluated node with the information described above.&amp;lt;br&amp;gt;&lt;br /&gt;
Moreover, with IterPrint enabled a notice is printed whenever the algorithm switches node selection methods. &amp;lt;br&amp;gt;&lt;br /&gt;
Setting a higher value of IterPrint gives more detailed information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;gt;2 Depth, number of integer components and lower bound on objective for each node in L.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;3 Sets LINPRINT = 1, print info about linearizations added (if used).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;gt;4 Sets POOLPRINT = 1, print info about cut-pool management (if used).&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;bTol&#039;&#039;||Linear constraint violation convergence tolerance.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;cTol&#039;&#039;||Constraint violation convergence tolerance.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fTol&#039;&#039;||Optimality tolerance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &amp;lt;br&amp;gt;0: Global optimal solution found, or integer solution with duality gap less than user tolerance. &amp;lt;br&amp;gt;1: Maximal number of iterations reached. &amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found. &amp;lt;br&amp;gt;4: No feasible point found running NLP relaxation.&amp;lt;br&amp;gt;5: Illegal x_0 found in NLP relaxation. &amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &#039;&#039;&amp;gt; &#039;&#039;Prob.MaxCPU).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Code telling type of convergence, returned from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, max(0,fIPMin-fLB)/-fIPMin-, if fIPMin =0; max(0,fIPMin-fLB) if fIPMin == 0. If fIPMin   =0:  Scale with 100, 100*Dual- Gap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;v_k&#039;&#039;||Lagrange multipliers.  Bounds, Linear and Nonlinear Constraints, size n + mLin + mNonLin.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;f_0&#039;&#039;||Function value at start.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;stoaMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;stoaMINLP&#039;&#039;||A structure with  warm start information.  Use with  WarmDefGLOBAL,  see example [[StoaMINLP#Warm_Start|here]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3048</id>
		<title>MIPNLP ecpMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3048"/>
		<updated>2014-07-14T10:02:47Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Part Of Manual|title=the MIPNLP Manual|link=[[MIPNLP|MIPNLP Manual]]}}&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
ecpMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;ecpMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = ecpMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
Warm start is currently not supported, but might be included in a future release.&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in the problem description structure Prob&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;f_Low&#039;&#039;||Lower bound on solution.&lt;br /&gt;
|-&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;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by ecpMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in ecpMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||output&lt;br /&gt;
|-&lt;br /&gt;
|=0||Silent.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;0||Initial information and convergence results.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;1||Output a line whenever the solution has improved, containing:&lt;br /&gt;
nIterations, nCuts, nCuts with criteria fulfilled, nLinearizations, nSpecialCuts, best solution.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;2||Output a line every iteration with the following information:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!label||description&lt;br /&gt;
|-&lt;br /&gt;
|It         ||Iterations&lt;br /&gt;
|-&lt;br /&gt;
|nECP       ||Number of extended cutting planes (ECP)&lt;br /&gt;
|-&lt;br /&gt;
|nAlpha&amp;gt;=lim||Number of ECP with criteria fulfilled&lt;br /&gt;
|-&lt;br /&gt;
|nL         ||Number of linearizations&lt;br /&gt;
|-&lt;br /&gt;
|nSECP      ||Number of special case ECP&amp;lt;br&amp;gt;(created from constraint on bound)&lt;br /&gt;
|-&lt;br /&gt;
|fIPMin     ||Objective of best solution at current iteration&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;3||Output a description of each step in the MINLP algorithm&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;4||Output additional numerical information in some algorithm steps&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;5||Output information in substeps (preprocessing, line search)&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOpt&#039;&#039;||Print level in sub-solvers,  see the documentation for the solver&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverMIP&#039;&#039;||Name of the solver used for MIP subproblems. If empty, the default solver is found calling GetSolver(&#039;mip&#039;,1). If TOMLAB /CPLEX is installed, CPLEX is the default solver. Recommended TOMLAB solver to use as subsolvers are milpSolve, CPLEX  and mipSolve. Which solver performs the best varies depending on the MINLP problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems when SolverMIP == mipSolve&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure with parameters specific to mixed integer optimization. See the table below describing the fields used in the MIP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ECPMINLP&#039;&#039;||Structure with parameters specific to the ecpMINLP solver. See the table below describing the fields used in the ECPMINLP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below describing the fields used in the optParam structure.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|&#039;&#039;&#039;fields used in Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||ecpMINLP stops if the duality gap is less than DualGap&lt;br /&gt;
DualGap = 1, stop at first integer solution, e.g. DualGap = 0.01,stop if solution &amp;lt; 1% from optimal solution.&lt;br /&gt;
&amp;lt;br&amp;gt;The lower bound Prob.f_Low is used, (default -1.0e300), which can also be set by the user. If f_Low has not been changed from default the lower bound is obtained from the initial solution of a relaxed problem, but only when ECPMINLP.INIT_BND is 1 or 2 (default).&lt;br /&gt;
&amp;lt;br&amp;gt;Default DualGap is -1, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PPP&#039;&#039;||Pre-processing and probing, default is 0.&amp;lt;br&amp;gt;&lt;br /&gt;
0  Not used. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
1  Apply initially on MINLP problem.&amp;lt;br&amp;gt;&lt;br /&gt;
2  Apply each iteration before solving MILP subproblem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If nonzero, a rounding heuristics will be used on the initial NLP solution in order to obtain an initial integer solution. Requires ECPMINLP.INIT_BND enabled. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ECPMINLP structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with solver-specific options.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.ECPMINLP&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;beta&#039;&#039;||Multiplier when increasing alpha after an infeasible MILP solution. &lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for beta is 1.3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;gamma&#039;&#039;||Multiplier when increasing alpha when MILP solution does not violate any nonlinear contraints, but still does not decrease the upper bound of the objective.&lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for gamma is 2.0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PREALLOC&#039;&#039;||Flag enabling preallocation of memory for cutting planes and linearizations.&lt;br /&gt;
&amp;lt;br&amp;gt;0  No preallocation, dynamic growth of arrays. Current default.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Preallocate arrays.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;INIT_BND&#039;&#039;||Selects method for setting lower bound when f_Low not changed from default.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||method&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|0 ||No extra initial lower bound.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|1 ||Use default TOMLAB NLP solver on problem with relaxed integer constraints. Add a linearization if a feasible MINLP solution was found.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|2 ||Add an initial linearization as long as a feasdbile NLP solution was found. The linearization is a simple lower bound on the MILP objective. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|3 ||Same as 2, but also use the gradient in the linearization. This might improve the solution process for some problems where no solution can be found otherwise. But for many problems, using this initial linearization cuts off a feasbiel region and slows down or even hinders the solver completely. Recommended to only use as a last resort.&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SETTOL&#039;&#039;||Flag enabling changing tolerances, described below under optParam.eps_x, optParam.eps_x and optParam.eps_f.&lt;br /&gt;
&amp;lt;br&amp;gt;0  Default. Using the recommended solver default values, 1.0e-3.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Tolerances can be changed, taken from Prob.optParam.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;INTSOLLIM_INCR&#039;&#039;||Integer option when using CPLEX as MIP subsolver.&lt;br /&gt;
&amp;lt;br&amp;gt;Define how much the CPLEX parameter INTSOLLIM increases when a feasible solution is not optimal and all alpha values have met their criteria.&lt;br /&gt;
&amp;lt;br&amp;gt;If set to zero, optimal strategy will be used immediately instead, without any gradual increase of INTSOLLIM.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USECUTPOOL&#039;&#039;||Set nonzero to use a pool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&amp;lt;br&amp;gt;Cuts not active in the MILP-solution for CUTDELBND iterations in a row will be inactivated (removed from the MILP-problem) until they are violated in a new solution.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 0, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTDELBND&#039;&#039;||The number of consecutive times an extended cutting plane can be inactive before it gets removed and put into the inactive pool, if the option USECUTPOOL is set nonzero.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 15 times.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MAXITNOIMP&#039;&#039;||Limit on the number of successive iterations allowed without any improvements at all to neither objective nor solution point before the solver terminates&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 2.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USENLP&#039;&#039;||Set nonzero to use an NLP sub-solver on the original problem with the integer variables fixed at values from the latest MILP solution. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USERESELECT&#039;&#039;||Set nonzero to enable cut reselection heuristics. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SCALECUTS&#039;&#039;||Set nonzero to scale cuts before they are added to the MILP problem. Scaling is done by dividing the cut with its norm. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam Structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 1 also enables IterPrint, setting it to 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_x&#039;&#039;||Linear constraint violation convergence tolerance. Default is 2.0e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_g&#039;&#039;||Constraint violation convergence tolerance. Default is 1.0e-7&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_f&#039;&#039;||Optimality tolerance. Default is 1.0e-8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE:&#039;&#039; For the solver to use these tolerances, the flag &#039;&#039;ECPMINLP.SETTOL&#039;&#039; must be set to nonzero.&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &lt;br /&gt;
&amp;lt;br&amp;gt;0: Solution found, or integer solution with duality gap less than user tolerance.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Maximal number of iterations reached.&lt;br /&gt;
&amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;3: Problem in subsolver, see Inform value.&lt;br /&gt;
&amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &amp;gt; Prob.maxCPU&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Inform for ExitFlag != 3&lt;br /&gt;
&amp;lt;br&amp;gt;0: Global solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Local solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;2: No solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;gt;2: Inform value from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, max(0,fIPMin-fLB)/-fIPMin-, if fIPMin =0; max(0,fIPMin-fLB) if fIPMin == 0. If fIPMin   =0:  Scale with 100, 100*Dual- Gap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;ecpMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Algorithm==&lt;br /&gt;
ecpMINLP Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to MIP subproblem which is then solved by a subsolver in each iteration.&lt;br /&gt;
&lt;br /&gt;
The solver algorithm is mainly based on the paper &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, published in Optimization and Engineering 3, 253-280, 2002, with some modifications.&lt;br /&gt;
&lt;br /&gt;
Most prominent features in addition to the ones described in the main reference above are&lt;br /&gt;
* Solving the relaxed NLP problem initially to obtain a lower bound on the solution.&lt;br /&gt;
* A rounding heuristics performed on the initial NLP solution in order to obtain an initial upper bound on the initial solutions.&lt;br /&gt;
* Optional use of a cutpool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&lt;br /&gt;
[[Category:MIPNLP]]&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3047</id>
		<title>MIPNLP ecpMINLP</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=MIPNLP_ecpMINLP&amp;diff=3047"/>
		<updated>2014-07-14T09:58:34Z</updated>

		<summary type="html">&lt;p&gt;Bjorn: Created page with &amp;quot;==Purpose==  ecpMINLP solves convex mixed-integer nonlinear programming problems (MINLP).  &amp;#039;&amp;#039;ecpMINLP &amp;#039;&amp;#039;solves problems of the form  &amp;lt;math&amp;gt; \begin{array}{cccccc} \min\limits_{x} ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Purpose==&lt;br /&gt;
&lt;br /&gt;
ecpMINLP solves convex mixed-integer nonlinear programming problems (MINLP).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;ecpMINLP &#039;&#039;solves problems of the form&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{cccccc}&lt;br /&gt;
\min\limits_{x} &amp;amp; f(x) \\s/t &amp;amp; x_{L} &amp;amp; \leq  &amp;amp; x  &amp;amp; \leq &amp;amp; x_{U} \\&amp;amp; b_{L} &amp;amp; \leq  &amp;amp; Ax &amp;amp; \leq &amp;amp; b_{U} \\&amp;amp; c_{L} &amp;amp; \leq  &amp;amp; c(x) &amp;amp; \leq &amp;amp; c_{U} \\&amp;amp;       &amp;amp;       &amp;amp; {x_{j} \in \mathbb{N} \ \ \forall j \in I}  \\&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;x,x_{L},x_{U}\in \mathbb{R}^{n}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;c(x),c_{L},c_{U}\in&lt;br /&gt;
\mathbb{R}^{m_{1}}&amp;lt;/math&amp;gt; , &amp;lt;math&amp;gt;A\in \mathbb{R}^{m_{2}\times n}&amp;lt;/math&amp;gt; and&lt;br /&gt;
&amp;lt;math&amp;gt;b_{L},b_{U}\in \mathbb{R}^{m_{2}}&amp;lt;/math&amp;gt;. The variables &amp;lt;math&amp;gt;x \in I&amp;lt;/math&amp;gt; , the&lt;br /&gt;
index subset of &amp;lt;math&amp;gt;1,...,n&amp;lt;/math&amp;gt; are restricted to be integers.&lt;br /&gt;
&lt;br /&gt;
==Calling  Syntax==&lt;br /&gt;
&lt;br /&gt;
Driver call, including printing with level 2:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Direct solver call:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
Result = ecpMINLP(Prob);&lt;br /&gt;
PrintResult(Result);&lt;br /&gt;
Result = tomRun(&#039;ecpMINLP&#039;,Prob,...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Warm Start ===&lt;br /&gt;
Warm start is currently not supported, but might be included in a future release.&lt;br /&gt;
&lt;br /&gt;
==Inputs==&lt;br /&gt;
&lt;br /&gt;
===Prob structure===&lt;br /&gt;
The &#039;&#039;&#039;TOMLAB&#039;&#039;&#039; problem structure&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|The following fields are used in the problem description structure Prob&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_L&#039;&#039;||Lower bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;x_U&#039;&#039;||Upper bounds on x.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;A&#039;&#039;||The linear constraint matrix.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_L&#039;&#039;||Lower bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;b_U&#039;&#039;||Upper bounds on linear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_L&#039;&#039;||Lower bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;c_U&#039;&#039;||Upper bounds on nonlinear constraints.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;f_Low&#039;&#039;||Lower bound on solution.&lt;br /&gt;
|-&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;MaxCPU&#039;&#039;||Maximal CPU Time (in seconds) to be used by ecpMINLP, stops with  best point found&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLev&#039;&#039;||Print level in ecpMINLP (default 1). Also see optParam.IterPrint&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||output&lt;br /&gt;
|-&lt;br /&gt;
|=0||Silent.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;0||Initial information and convergence results.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;1||Output a line whenever the solution has improved, containing:&lt;br /&gt;
nIterations, nCuts, nCuts with criteria fulfilled, nLinearizations, nSpecialCuts, best solution.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;2||Output a line every iteration with the following information:&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!label||description&lt;br /&gt;
|-&lt;br /&gt;
|It         ||Iterations&lt;br /&gt;
|-&lt;br /&gt;
|nECP       ||Number of extended cutting planes (ECP)&lt;br /&gt;
|-&lt;br /&gt;
|nAlpha&amp;gt;=lim||Number of ECP with criteria fulfilled&lt;br /&gt;
|-&lt;br /&gt;
|nL         ||Number of linearizations&lt;br /&gt;
|-&lt;br /&gt;
|nSECP      ||Number of special case ECP&amp;lt;br&amp;gt;(created from constraint on bound)&lt;br /&gt;
|-&lt;br /&gt;
|fIPMin     ||Objective of best solution at current iteration&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;3||Output a description of each step in the MINLP algorithm&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;4||Output additional numerical information in some algorithm steps&lt;br /&gt;
|-&lt;br /&gt;
|&amp;gt;5||Output information in substeps (preprocessing, line search)&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PriLevOpt&#039;&#039;||Print level in sub-solvers,  see the documentation for the solver&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SolverMIP&#039;&#039;||Name of the solver used for MIP subproblems. If empty, the default solver is found calling GetSolver(&#039;mip&#039;,1). If TOMLAB /CPLEX is installed, CPLEX is the default solver. Recommended TOMLAB solver to use as subsolvers are milpSolve, CPLEX  and mipSolve. Which solver performs the best varies depending on the MINLP problem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;SolverLP&#039;&#039;||Name of the solver used for LP subproblems when SolverMIP == mipSolve&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;MIP&#039;&#039;||Structure with parameters specific to mixed integer optimization. See the table below describing the fields used in the MIP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ECPMINLP&#039;&#039;||Structure with parameters specific to the ecpMINLP solver. See the table below describing the fields used in the ECPMINLP structure.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;optParam&#039;&#039;||Structure with general optimization parameters. See the table below describing the fields used in the optParam structure.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===MIP structure===&lt;br /&gt;
Substructure in Prob with parameters related to mixed integer programming.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|&#039;&#039;&#039;fields used in Prob.MIP&#039;&#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;IntVars&#039;&#039;||If empty, all variables are assumed non-integer. &amp;lt;br&amp;gt;If islogical(IntVars) (=all  elements are 0/1),  then 1 = integer variable, 0 = continuous variable. &amp;lt;br&amp;gt;If any element &#039;&#039;&amp;gt;&#039;&#039;1, IntVars is the indices for integer variables.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;fIP&#039;&#039;||An upper bound on the IP value wanted. Makes it possible to cut branches and avoid node computations. Used even if xIP not given.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;xIP&#039;&#039;||The x-values giving the fIP value, if a solution (xIP,fIP)  is known.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;DualGap&#039;&#039;||ecpMINLP stops if the duality gap is less than DualGap&lt;br /&gt;
DualGap = 1, stop at first integer solution, e.g. DualGap = 0.01,stop if solution &amp;lt; 1% from optimal solution.&lt;br /&gt;
&amp;lt;br&amp;gt;The lower bound Prob.f_Low is used, (default -1.0e300), which can also be set by the user. If f_Low has not been changed from default the lower bound is obtained from the initial solution of a relaxed problem, but only when ECPMINLP.INIT_BND is 1 or 2 (default).&lt;br /&gt;
&amp;lt;br&amp;gt;Default DualGap is -1, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PPP&#039;&#039;||Pre-processing and probing, default is 0.&amp;lt;br&amp;gt;&lt;br /&gt;
0  Not used. Default.&amp;lt;br&amp;gt;&lt;br /&gt;
1  Apply initially on MINLP problem.&amp;lt;br&amp;gt;&lt;br /&gt;
2  Apply each iteration before solving MILP subproblem.&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;ROUNDH&#039;&#039;||If nonzero, a rounding heuristics will be used on the initial NLP solution in order to obtain an initial integer solution. Requires ECPMINLP.INIT_BND enabled. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ECPMINLP structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with solver-specific options.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.ECPMINLP&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;beta&#039;&#039;||Multiplier when increasing alpha after an infeasible MILP solution. &lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for beta is 1.3.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;gamma&#039;&#039;||Multiplier when increasing alpha when MILP solution does not violate any nonlinear contraints, but still does not decrease the upper bound of the objective.&lt;br /&gt;
&amp;lt;br&amp;gt;Alpha is a parameter individually adjusting each cutting plane, starting at 1.0 and increasing until meeting a certain criterion. &amp;lt;br&amp;gt;Default value for gamma is 2.0.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;PREALLOC&#039;&#039;||Flag enabling preallocation of memory for cutting planes and linearizations.&lt;br /&gt;
&amp;lt;br&amp;gt;0  No preallocation, dynamic growth of arrays. Current default.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Preallocate arrays.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;INIT_BND&#039;&#039;||Selects method for setting lower bound when f_Low not changed from default.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!value||method&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|0 ||No extra initial lower bound.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|1 ||Use default TOMLAB NLP solver on problem with relaxed integer constraints. Add a linearization if a feasible MINLP solution was found.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|2 ||Add an initial linearization as long as a feasdbile NLP solution was found. The linearization is a simple lower bound on the MILP objective. Default.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|3 ||Same as 2, but also use the gradient in the linearization. This might improve the solution process for some problems where no solution can be found otherwise. But for many problems, using this initial linearization cuts off a feasbiel region and slows down or even hinders the solver completely. Recommended to only use as a last resort.&lt;br /&gt;
|}&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SETTOL&#039;&#039;||Flag enabling changing tolerances, described below under optParam.eps_x, optParam.eps_x and optParam.eps_f.&lt;br /&gt;
&amp;lt;br&amp;gt;0  Default. Using the recommended solver default values, 1.0e-3.&lt;br /&gt;
&amp;lt;br&amp;gt;1  Tolerances can be changed, taken from Prob.optParam.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;INTSOLLIM_INCR&#039;&#039;||Integer option when using CPLEX as MIP subsolver.&lt;br /&gt;
&amp;lt;br&amp;gt;Define how much the CPLEX parameter INTSOLLIM increases when a feasible solution is not optimal and all alpha values have met their criteria.&lt;br /&gt;
&amp;lt;br&amp;gt;If set to zero, optimal strategy will be used immediately instead, without any gradual increase of INTSOLLIM.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USECUTPOOL&#039;&#039;||Set nonzero to use a pool for the alpha-regulated extended cutting planes.&lt;br /&gt;
&amp;lt;br&amp;gt;Cuts not active in the MILP-solution for CUTDELBND iterations in a row will be inactivated (removed from the MILP-problem) until they are violated in a new solution.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 0, not used.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;CUTDELBND&#039;&#039;||The number of consecutive times an extended cutting plane can be inactive before it gets removed and put into the inactive pool, if the option USECUTPOOL is set nonzero.&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 15 times.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MAXITNOIMP&#039;&#039;||Limit on the number of successive iterations allowed without any improvements at all to neither objective nor solution point before the solver terminates&lt;br /&gt;
&amp;lt;br&amp;gt;Default is 2.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USENLP&#039;&#039;||Set nonzero to use an NLP sub-solver on the original problem with the integer variables fixed at values from the latest MILP solution. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;USERESELECT&#039;&#039;||Set nonzero to enable cut reselection heuristics. Default is 1, enabled.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;SCALECUTS&#039;&#039;||Set nonzero to scale cuts before they are added to the MILP problem. Scaling is done by dividing the cut with its norm. Default is 1, enabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===optParam Structure===&lt;br /&gt;
Substructure in &#039;&#039;Prob&#039;&#039; with general optimization parameters.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot;|fields used in Prob.optParam&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039;||&#039;&#039;&#039;Value&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;MaxIter&#039;&#039;||Maximal number of iterations, default 10000&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;IterPrint&#039;&#039;||Print short information each iteration. Setting PriLev &amp;gt; 1 also enables IterPrint, setting it to 1.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_x&#039;&#039;||Linear constraint violation convergence tolerance. Default is 2.0e-6&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_g&#039;&#039;||Constraint violation convergence tolerance. Default is 1.0e-7&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&#039;&#039;eps_f&#039;&#039;||Optimality tolerance. Default is 1.0e-8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE:&#039;&#039; For the solver to use these tolerances, the flag &#039;&#039;ECPMINLP.SETTOL&#039;&#039; must be set to nonzero.&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!&#039;&#039;Result&#039;&#039;||colspan=&amp;quot;2&amp;quot;|Structure with result from optimization.  The following fields are changed:&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Iter 	&#039;&#039;||Number of iterations.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;ExitFlag	&#039;&#039;||Exit flag. &lt;br /&gt;
&amp;lt;br&amp;gt;0: Solution found, or integer solution with duality gap less than user tolerance.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Maximal number of iterations reached.&lt;br /&gt;
&amp;lt;br&amp;gt;2: Empty feasible set, no integer solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;3: Problem in subsolver, see Inform value.&lt;br /&gt;
&amp;lt;br&amp;gt;99: Maximal CPU Time used (cputime &amp;gt; Prob.maxCPU&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Inform&#039;&#039;||Inform for ExitFlag != 3&lt;br /&gt;
&amp;lt;br&amp;gt;0: Global solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;1: Local solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;2: No solution found.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;gt;2: Inform value from subsolver.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;ExitText&#039;&#039;||Text string giving &#039;&#039;ExitFlag&#039;&#039; and &#039;&#039;Inform&#039;&#039; information.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;DualGap&#039;&#039;||Relative duality gap, max(0,fIPMin-fLB)/-fIPMin-, if fIPMin =0; max(0,fIPMin-fLB) if fIPMin == 0. If fIPMin   =0:  Scale with 100, 100*Dual- Gap, to get the percentage duality gap. For absolute value duality gap: scale with fIPMin, fIPMin * DualGap&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_k&#039;&#039;||Solution.&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|||&#039;&#039;f_k&#039;&#039;||Function value at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;g_k&#039;&#039;||Gradient vector at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;c_k&#039;&#039;||Constraint values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cJac&#039;&#039;||Constraint derivative values at optimum.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;xState&#039;&#039;||State of each variable, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_xState_for_the_variable.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;bState&#039;&#039;||State of each constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_bState_for_each_linear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;cState&#039;&#039;||State of each general constraint, described in [[TOMLAB_Appendix_B#Table:_The_state_variable_cState_for_each_nonlinear_constraint.|TOMLAB Appendix B]].&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;x_0&#039;&#039;||Starting point x_0.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Solver&#039;&#039;||Solver used (&#039;ecpMINLP&#039;).&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;SolverAlgorithm&#039;&#039;||Description of method used.&lt;br /&gt;
|-&lt;br /&gt;
|||&#039;&#039;Prob&#039;&#039;||Problem structure used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Algorithm==&lt;br /&gt;
ecpMINLP Solves convex or pseudo-convex mixed-integer nonlinear programming problems using an extended cutting plane algorithm with cuts regulated by a parameter-vector alpha. Cuts and linearizations are added to MIP subproblem which is then solved by a subsolver in each iteration.&lt;br /&gt;
&lt;br /&gt;
The solver algorithm is mainly based on the paper &#039;Solving Pseudo-Convex Mixed Integer Optimization Problems by Cutting Plane Techniques&#039; by Tapio Westerlund and Ray Pörn, published in Optimization and Engineering 3, 253-280, 2002, with some modifications.&lt;br /&gt;
&lt;br /&gt;
Most prominent features in addition to the ones described in the main reference above are&lt;br /&gt;
* Solving the relaxed NLP problem initially to obtain a lower bound on the solution.&lt;br /&gt;
* A rounding heuristics performed on the initial NLP solution in order to obtain an initial upper bound on the initial solutions.&lt;br /&gt;
* Optional use of a cutpool for the alpha-regulated extended cutting planes.&lt;/div&gt;</summary>
		<author><name>Bjorn</name></author>
	</entry>
</feed>