diff options
Diffstat (limited to 'help/en_US/linprog.xml')
-rwxr-xr-x | help/en_US/linprog.xml | 222 |
1 files changed, 222 insertions, 0 deletions
diff --git a/help/en_US/linprog.xml b/help/en_US/linprog.xml new file mode 100755 index 0000000..1aa6e7c --- /dev/null +++ b/help/en_US/linprog.xml @@ -0,0 +1,222 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + * + * This help file was generated from linprog.sci using help_from_sci(). + * + --> + +<refentry version="5.0-subset Scilab" xml:id="linprog" xml:lang="en" + xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:ns3="http://www.w3.org/1999/xhtml" + xmlns:mml="http://www.w3.org/1998/Math/MathML" + xmlns:scilab="http://www.scilab.org" + xmlns:db="http://docbook.org/ns/docbook"> + + <refnamediv> + <refname>linprog</refname> + <refpurpose>Solves a linear programming problem.</refpurpose> + </refnamediv> + + +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + xopt = linprog(c,A,b) + xopt = linprog(c,A,b,Aeq,beq) + xopt = linprog(c,A,b,Aeq,beq,lb,ub) + xopt = linprog(c,A,b,Aeq,beq,lb,ub,param) + [xopt, fopt, exitflag, output, lambda] = linprog(file) + [xopt,fopt,exitflag,output,lambda] = linprog( ... ) + + </synopsis> +</refsynopsisdiv> + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>c :</term> + <listitem><para> a vector of double, contains coefficients of the variables in the objective</para></listitem></varlistentry> + <varlistentry><term>A :</term> + <listitem><para> a matrix of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.</para></listitem></varlistentry> + <varlistentry><term>b :</term> + <listitem><para> a vector of double, represents the linear coefficients in the inequality constraints A⋅x ≤ b.</para></listitem></varlistentry> + <varlistentry><term>Aeq :</term> + <listitem><para> a matrix of double, represents the linear coefficients in the equality constraints Aeq⋅x = beq.</para></listitem></varlistentry> + <varlistentry><term>beq :</term> + <listitem><para> a vector of double, represents the linear coefficients in the equality constraints Aeq⋅x = beq.</para></listitem></varlistentry> + <varlistentry><term>lb :</term> + <listitem><para> Lower bounds, specified as a vector or array of double. lb represents the lower bounds elementwise in lb ≤ x ≤ ub.</para></listitem></varlistentry> + <varlistentry><term>ub :</term> + <listitem><para> Upper bounds, specified as a vector or array of double. ub represents the upper bounds elementwise in lb ≤ x ≤ ub.</para></listitem></varlistentry> + <varlistentry><term>options :</term> + <listitem><para> a list containing the parameters to be set.</para></listitem></varlistentry> + <varlistentry><term>file :</term> + <listitem><para> a string describing the path to the mps file.</para></listitem></varlistentry> + <varlistentry><term>xopt :</term> + <listitem><para> a vector of double, the computed solution of the optimization problem.</para></listitem></varlistentry> + <varlistentry><term>fopt :</term> + <listitem><para> a double, the value of the function at x.</para></listitem></varlistentry> + <varlistentry><term>status :</term> + <listitem><para> status flag returned from symphony. See below for details.</para></listitem></varlistentry> + <varlistentry><term>output :</term> + <listitem><para> The output data structure contains detailed information about the optimization process. See below for details.</para></listitem></varlistentry> + <varlistentry><term>lambda :</term> + <listitem><para> The structure consist of the Lagrange multipliers at the solution of problem. See below for details.</para></listitem></varlistentry> + </variablelist> +</refsection> + +<refsection> + <title>Description</title> + <para> +OSI-CLP is used for solving the linear programming problems, OSI-CLP is a library written in C++. +Search the minimum of a constrained linear programming problem specified by : + </para> + <para> +<latex> +\begin{eqnarray} +&\mbox{min}_{x} +& c^T⋅x \\ +& \text{subject to} & A⋅x \leq b \\ +& & Aeq⋅x = beq \\ +& & lb \leq x \leq ub \\ +\end{eqnarray} +</latex> +The routine calls Clp for solving the linear programming problem, Clp is a library written in C++. + </para> + <para> +The exitflag allows to know the status of the optimization which is given back by Ipopt. +<itemizedlist> +<listitem>exitflag=0 : Optimal Solution Found </listitem> +<listitem>exitflag=1 : Primal Infeasible </listitem> +<listitem>exitflag=2 : Dual Infeasible</listitem> +<listitem>exitflag=3 : Maximum Number of Iterations Exceeded. Output may not be optimal.</listitem> +<listitem>exitflag=4 : Solution Abandoned</listitem> +<listitem>exitflag=5 : Primal objective limit reached.</listitem> +<listitem>exitflag=6 : Dual objective limit reached.</listitem> +</itemizedlist> + </para> + <para> +For more details on exitflag see the ipopt documentation, go to http://www.coin-or.org/Ipopt/documentation/ + </para> + <para> +The output data structure contains detailed informations about the optimization process. +It has type "struct" and contains the following fields. +<itemizedlist> +<listitem>output.iterations: The number of iterations performed during the search</listitem> +<listitem>output.constrviolation: The max-norm of the constraint violation.</listitem> +</itemizedlist> + </para> + <para> +The lambda data structure contains the Lagrange multipliers at the end +of optimization. In the current version the values are returned only when the the solution is optimal. +It has type "struct" and contains the following fields. +<itemizedlist> +<listitem>lambda.lower: The Lagrange multipliers for the lower bound constraints.</listitem> +<listitem>lambda.upper: The Lagrange multipliers for the upper bound constraints.</listitem> +<listitem>lambda.eqlin: The Lagrange multipliers for the linear equality constraints.</listitem> +<listitem>lambda.ineqlin: The Lagrange multipliers for the linear inequality constraints.</listitem> +</itemizedlist> + </para> + <para> +</para> +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +//Optimal problems +//Linear program, linear inequality constraints +c=[-1,-1/3]' +A=[1,1;1,1/4;1,-1;-1/4,-1;-1,-1;-1,1] +b=[2,1,2,1,-1,2] +[xopt,fopt,exitflag,output,lambda]=linprog(c, A, b) +// Press ENTER to continue + + ]]></programlisting> +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +//Linear program with Linear Inequalities and Equalities` +c=[-1,-1/3]' +A=[1,1;1,1/4;1,-1;-1/4,-1;-1,-1;-1,1] +b=[2,1,2,1,-1,2] +Aeq=[1,1/4] +beq=[1/2] +[xopt,fopt,exitflag,output,lambda]=linprog(c, A, b, Aeq, beq) +// Press ENTER to continue + + ]]></programlisting> +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +//Linear program with all constraint types +c=[-1,-1/3]' +A=[1,1;1,1/4;1,-1;-1/4,-1;-1,-1;-1,1] +b=[2,1,2,1,-1,2] +Aeq=[1,1/4] +beq=[1/2] +lb=[-1,-0.5] +ub=[1.5,1.25] +[xopt,fopt,exitflag,output,lambda]=linprog(c, A, b, Aeq, beq, lb, ub) +// Press ENTER to continue + + ]]></programlisting> +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +//Primal Infeasible Problem +c=[-1,-1,-1]' +A=[1,2,-1] +b=[-4] +Aeq=[1,5,3;1,1,0] +beq=[10,100] +lb=[0,0,0] +ub=[%inf,%inf,%inf] +[xopt,fopt,exitflag,output,lambda]= linprog(c,A,b,Aeq,beq,lb,ub) +// Press ENTER to continue + + ]]></programlisting> +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +//Dual Infeasible Problem +c=[3,5,-7]' +A=[-1,-1,4;1,1,4] +b=[-8,5] +Aeq=[] +beq=[] +lb=[-%inf,-%inf,-%inf] +ub=[%inf,%inf,%inf] +[xopt,fopt,exitflag,output,lambda]= linprog(c,A,b,Aeq,beq,lb,ub) +// Press ENTER to continue + + ]]></programlisting> +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +filepath = get_absolute_file_path('linprog.dem.sce'); +filepath = filepath + "exmip1.mps" +[xopt,fopt,exitflag,output,lambda] =linprog(filepath); + ]]></programlisting> +</refsection> + +<refsection> + <title>Authors</title> + <simplelist type="vert"> + <member>Bhanu Priya Sayal, Guru Pradeep Reddy</member> + </simplelist> +</refsection> +</refentry> |