1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
|
<?xml version="1.0" encoding="UTF-8"?>
<refentry version="5.0-subset Scilab" xml:id="qld" 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:db="http://docbook.org/ns/docbook">
<info>
<pubdate>$LastChangedDate: 2008-03-26 09:50:39 +0100 (Wed, 26 Mar 2008)
$</pubdate>
</info>
<refnamediv>
<refname>qld</refname>
<refpurpose>linear quadratic programming solver</refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>[x,lagr]=qld(Q,p,C,b,ci,cs,me [,tol])
[x,lagr,info]=qld(Q,p,C,b,ci,cs,me [,tol])</synopsis>
</refsynopsisdiv>
<refsection>
<title>Parameters</title>
<variablelist>
<varlistentry>
<term>Q</term>
<listitem>
<para>real positive definite symmetric matrix (dimension <literal>n
x n</literal>).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>p</term>
<listitem>
<para>real (column) vector (dimension <literal> n</literal>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>C</term>
<listitem>
<para>real matrix (dimension <literal> (me + md) x
n</literal>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>b</term>
<listitem>
<para>RHS column vector (dimension <literal> (me +
md)</literal>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>ci</term>
<listitem>
<para>column vector of lower-bounds (dimension
<literal>n</literal>). If there are no lower bound constraints, put
<literal>ci = []</literal>. If some components of
<literal>x</literal> are bounded from below, set the other
(unconstrained) values of <literal>ci</literal> to a very large
negative number (e.g. <literal>ci(j) =
-number_properties('huge')</literal>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>cs</term>
<listitem>
<para>column vector of upper-bounds. (Same remarks as above).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>me</term>
<listitem>
<para>number of equality constraints (i.e. <literal>C(1:me,:)*x =
b(1:me)</literal>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>tol</term>
<listitem>
<para>Floatting point number, required précision.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>x</term>
<listitem>
<para>optimal solution found.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>lagr</term>
<listitem>
<para>vector of Lagrange multipliers. If lower and upper-bounds
<literal>ci,cs</literal> are provided, <literal>lagr</literal> has
<literal>n + me + md</literal> components and
<literal>lagr(1:n)</literal> is the Lagrange vector associated with
the bound constraints and <literal>lagr (n+1 : n + me +
md)</literal> is the Lagrange vector associated with the linear
constraints. (If an upper-bound (resp. lower-bound) constraint
<literal>i</literal> is active <literal>lagr(i)</literal> is > 0
(resp. <0). If no bounds are provided, <literal>lagr</literal>
has only <literal>me + md</literal> components.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>info</term>
<listitem>
<para>integer, return the execution status instead of sending
errors.</para>
<para>info==1 : Too many iterations needed</para>
<para>info==2 : Accuracy insufficient to statisfy convergence
criterion</para>
<para>info==5 : Length of working array is too short</para>
<para>info==10: The constraints are inconsistent</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Description</title>
<informalequation>
<mediaobject>
<imageobject>
<imagedata align="center" fileref="../mml/qld_equation_1.mml" />
</imageobject>
</mediaobject>
</informalequation>
<para>This function requires <literal>Q</literal> to be positive definite,
if it is not the case, one may use the The contributed toolbox "<emphasis
role="bold">quapro</emphasis>".</para>
</refsection>
<refsection>
<title>Examples</title>
<programlisting role="example"><![CDATA[
//Find x in R^6 such that:
//C1*x = b1 (3 equality constraints i.e me=3)
C1= [1,-1,1,0,3,1;
-1,0,-3,-4,5,6;
2,5,3,0,1,0];
b1=[1;2;3];
//C2*x <= b2 (2 inequality constraints)
C2=[0,1,0,1,2,-1;
-1,0,2,1,1,0];
b2=[-1;2.5];
//with x between ci and cs:
ci=[-1000;-10000;0;-1000;-1000;-1000];cs=[10000;100;1.5;100;100;1000];
//and minimize 0.5*x'*Q*x + p'*x with
p=[1;2;3;4;5;6]; Q=eye(6,6);
//No initial point is given;
C=[C1;C2];
b=[b1;b2];
me=3;
[x,lagr]=qld(Q,p,C,b,ci,cs,me)
//Only linear constraints (1 to 4) are active (lagr(1:6)=0):
]]></programlisting>
</refsection>
<refsection>
<title>See Also</title>
<simplelist type="inline">
<member><link linkend="qpsolve">qpsolve</link></member>
<member><link linkend="optim">optim</link></member>
</simplelist>
<para>The contributed toolbox "quapro" may also be of interest, in
particular for singular <literal>Q</literal>.</para>
</refsection>
<refsection>
<title>Authors</title>
<variablelist>
<varlistentry>
<term>K.Schittkowski</term>
<listitem>
<para>, University of Bayreuth, Germany</para>
</listitem>
</varlistentry>
<varlistentry>
<term>A.L. Tits and J.L. Zhou</term>
<listitem>
<para>, University of Maryland</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Used Functions</title>
<para><literal>ql0001.f</literal> in
<literal>modules/optimization/src/fortran/ql0001.f</literal></para>
</refsection>
</refentry>
|