From a2a0a5bdfb33abec17d1a3d4c0c784a83ceb91c1 Mon Sep 17 00:00:00 2001
From: Serge Steer
Date: Fri, 13 Jun 2008 13:43:26 +0000
Subject: [PATCH 1/1] quapro pushed out as a toolbox

scilab/modules/optimization/help/en_US/qld.xml  145 ++++++++
.../modules/optimization/help/en_US/qp_solve.xml  206 ++++++++++++++
scilab/modules/optimization/help/en_US/qpsolve.xml  234 ++++++++++++++++
3 files changed, 468 insertions(+), 117 deletions()
diff git a/scilab/modules/optimization/help/en_US/qld.xml b/scilab/modules/optimization/help/en_US/qld.xml
index 2f514c2..0799d8e 100644
 a/scilab/modules/optimization/help/en_US/qld.xml
+++ b/scilab/modules/optimization/help/en_US/qld.xml
@@ 1,124 +1,176 @@


+
+
 $LastChangedDate$
+ $LastChangedDate: 20080326 09:50:39 +0100 (Wed, 26 Mar 2008)
+ $
+
qld
 linear quadratic programming solver
+
+ linear quadratic programming solver
+
Calling Sequence
+
[x,lagr]=qld(Q,p,C,b,ci,cs,me [,tol])
[x,lagr,info]=qld(Q,p,C,b,ci,cs,me [,tol])
+
Parameters
+
Q
+
 real positive definite symmetric matrix (dimension n x n).
+ real positive definite symmetric matrix (dimension n
+ x n).
+
p
+
real (column) vector (dimension n)
+
C
+
 real matrix (dimension (me + md) x n)
+ real matrix (dimension (me + md) x
+ n)
+
b
+
 RHS column vector (dimension (me + md))
+ RHS column vector (dimension (me +
+ md))
+
ci
+
 column vector of lowerbounds (dimension n). If
 there are no lower bound constraints, put ci = []. If
 some components of x are bounded from below, set the
 other (unconstrained) values of ci to a very large
 negative number (e.g. ci(j) =
 number_properties('huge').
+ column vector of lowerbounds (dimension
+ n). If there are no lower bound constraints, put
+ ci = []. If some components of
+ x are bounded from below, set the other
+ (unconstrained) values of ci to a very large
+ negative number (e.g. ci(j) =
+ number_properties('huge').
+
cs
+
column vector of upperbounds. (Same remarks as above).
+
me
+
 number of equality constraints (i.e. C(1:me,:)*x = b(1:me))
+ number of equality constraints (i.e. C(1:me,:)*x =
+ b(1:me))
+
tol
+
 :Floatting point number, required précision.
+ :Floatting point number, required prÃÂ©cision.
+
x
+
optimal solution found.
+
lagr
+
 vector of Lagrange multipliers. If lower and upperbounds
 ci,cs are provided, lagr has n +
 me + md components and lagr(1:n) is the
 Lagrange vector associated with the bound constraints and
 lagr (n+1 : n + me + md) is the Lagrange vector
 associated with the linear constraints. (If an upperbound
 (resp. lowerbound) constraint i is active
 lagr(i) is > 0 (resp. <0). If no bounds are
 provided, lagr has only me + md
 components.
+ vector of Lagrange multipliers. If lower and upperbounds
+ ci,cs are provided, lagr has
+ n + me + md components and
+ lagr(1:n) is the Lagrange vector associated with
+ the bound constraints and lagr (n+1 : n + me +
+ md) is the Lagrange vector associated with the linear
+ constraints. (If an upperbound (resp. lowerbound) constraint
+ i is active lagr(i) is > 0
+ (resp. <0). If no bounds are provided, lagr
+ has only me + md components.
+
info
+
integer, return the execution status instead of sending
 errors.
+ errors.
+
info==1 : Too many iterations needed
 info==2 : Accuracy insufficient to statisfy convergence criterion
+
+ info==2 : Accuracy insufficient to statisfy convergence
+ criterion
+
info==5 : Length of working array is too short
+
info==10: The constraints are inconsistent
+
Description
+
Minimize 0.5*x'*Q*x + p'*x
+
under the constraints

C(j,:) x = b(j), j=1,...,me
 C(j,:) x <= b(j), j=me+1,...,me+md
 ci <= x <= cs
+ C(j,:) x <= b(j), j=me+1,...,me+md
+ ci <= x <= cs
 ]]>
 This function requires Q to be positive definite, if it is
 not the case, one may use the quapro function.
+
+
+ This function requires Q to be positive definite,
+ if it is not the case, one may use the The contributed toolbox "quapro".
+
Examples

//Find x in R^6 such that:
//C1*x = b1 (3 equality constraints i.e me=3)
@@ 126,7 +178,7 @@ 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*x <= b2 (2 inequality constraints)
C2=[0,1,0,1,2,1;
1,0,2,1,1,0];
b2=[1;2.5];
@@ 141,38 +193,51 @@ me=3;
[x,lagr]=qld(Q,p,C,b,ci,cs,me)
//Only linear constraints (1 to 4) are active (lagr(1:6)=0):
 ]]>
+
+
See Also
+
 quapro
+ qpsolve
+
optim
+
+ The contributed toolbox "quapro" may also be of interest, in
+ particular for singular Q.
+
Authors
+
K.Schittkowski
+
, University of Bayreuth, Germany
+
 A.L. Tits and J.L. Zhou
+ A.L. Tits and J.L. Zhou
+
 , University of Maryland
+ , University of Maryland
+
Used Functions
 ql0001.f in routines/optim directory
+
+ ql0001.f in modules/optimization/src/fortran/ql0001.f
diff git a/scilab/modules/optimization/help/en_US/qp_solve.xml b/scilab/modules/optimization/help/en_US/qp_solve.xml
index a917320..a5b975f 100644
 a/scilab/modules/optimization/help/en_US/qp_solve.xml
+++ b/scilab/modules/optimization/help/en_US/qp_solve.xml
@@ 1,26 +1,133 @@
March 2008qp_solve linear quadratic programming solver builtin





 Calling Sequence[x [,iact [,iter [,f]]]]=qp_solve(Q,p1,C1,b,me)
 ParametersQreal positive definite symmetric matrix (dimension n x n).preal (column) vector (dimension n)Creal matrix (dimension (me + md) x
 n). This matrix may be stored as either a dense
 matrix either a sparse one. bRHS column vector (dimension (me + md))menumber of equality constraints (i.e. x'*C(:,1:me) = b(1:me)')xoptimal solution found.iactvector, indicator of active constraints. The first non
 zero entries give the index of the active constraintsiter. 2x1 vector, first component gives the number of "main"
 iterations, the second one says how many constraints were
 deleted after they became active.
 DescriptionMinimize 0.5*x'*Q*x  p'*xunder the constraints
+
+
+ March 2008
+
+
+
+ qp_solve
+
+ linear quadratic programming solver builtin
+
+
+
+ Calling Sequence
+
+ [x [,iact [,iter [,f]]]]=qp_solve(Q,p1,C1,b,me)
+
+
+
+ Parameters
+
+
+
+ Q
+
+
+ real positive definite symmetric matrix (dimension n
+ x n).
+
+
+
+
+ p
+
+
+ real (column) vector (dimension n)
+
+
+
+
+ C
+
+
+ real matrix (dimension (me + md) x n).
+ This matrix may be stored as either a dense matrix either a sparse
+ one.
+
+
+
+
+ b
+
+
+ RHS column vector (dimension (me +
+ md))
+
+
+
+
+ me
+
+
+ number of equality constraints (i.e. x'*C(:,1:me) =
+ b(1:me)')
+
+
+
+
+ x
+
+
+ optimal solution found.
+
+
+
+
+ iact
+
+
+ vector, indicator of active constraints. The first non zero
+ entries give the index of the active constraints
+
+
+
+
+ iter
+
+
+ . 2x1 vector, first component gives the number of "main"
+ iterations, the second one says how many constraints were deleted
+ after they became active.
+
+
+
+
+
+
+ Description
+
+ Minimize 0.5*x'*Q*x  p'*x
+
+ under the constraints
+
+
x' C(:,j) = b(j), j=1,...,me
 x' C(:,j) >= b(j), j=me+1,...,me+md
+ x' C(:,j) >= b(j), j=me+1,...,me+md
 ]]>This function requires Q to be positive definite, if it is
 not the case, one may use the quapro function.This is a builtin associated with the Berwin A. Turlach
 code. Use preferabily the qpgen function built on it which handles
 variable boundaries and match the quapro problem definition
 Examples
+
+ This function requires Q to be positive definite,
+ if it is not the case, one may use the contributed quapro toolbox.
+
+ This is a builtin associated with the Berwin A. Turlach code. Use
+ preferabily the qpgen function built on it
+ which handles variable boundaries and match the quapro problem definition
+
+
+
+ Examples
+
+
//Find x in R^6 such that:
//x'*C1 = b1 (3 equality constraints i.e me=3)
@@ 32,7 +139,7 @@ C1= [ 1,1, 2;
1, 6, 0];
b1=[1;2;3];
//x'*C2 >= b2 (2 inequality constraints)
+//x'*C2 >= b2 (2 inequality constraints)
C2= [ 0 ,1;
1, 0;
0,2;
@@ 48,18 +155,49 @@ me=3;
[x,iact,iter,f]=qp_solve(Q,p,[C1 C2],[b1;b2],me)
//Only linear constraints (1 to 4) are active
 ]]>
 See Also

 quapro


 optim


 AuthorsS. Steer, INRIA (Scilab interface)Berwin A. Turlach,School of Mathematics and
 Statistics (M019), The University of Western Australia, Crawley,
 AUSTRALIA (solver code)
 Used Functionsqpgen2.f and >qpgen1.f (also named QP.solve.f) developped by Berwin A. Turlach according to the Goldfarb/Idnani algorithm
+
+
+
+
+ See Also
+
+
+ optim
+
+ qld
+
+
+ The contributed toolbox "quapro" may also be of interest, in
+ particular for singular Q.
+
+
+
+ Authors
+
+
+
+ S. Steer
+
+
+ , INRIA (Scilab interface)
+
+
+
+
+ Berwin A. Turlach
+
+
+ ,School of Mathematics and Statistics (M019), The University
+ of Western Australia, Crawley, AUSTRALIA (solver code)
+
+
+
+
+
+
+ Used Functions
+ qpgen2.f and >qpgen1.f (also named QP.solve.f) developped by
+ Berwin A. Turlach according to the Goldfarb/Idnani algorithm
+
\ No newline at end of file
diff git a/scilab/modules/optimization/help/en_US/qpsolve.xml b/scilab/modules/optimization/help/en_US/qpsolve.xml
index 9cbca5b..9ee5c15 100644
 a/scilab/modules/optimization/help/en_US/qpsolve.xml
+++ b/scilab/modules/optimization/help/en_US/qpsolve.xml
@@ 1,30 +1,151 @@
March 2008qpsolve linear quadratic programming solver





 Calling Sequence[x [,iact [,iter [,f]]]]=qpsolve(Q,p,C,b,ci,cs,me)
 ParametersQreal positive definite symmetric matrix (dimension n x n).preal (column) vector (dimension n)Creal matrix (dimension (me + md) x
 n). This matrix may be stored as either a dense
 matrix either a sparse one. bRHS column vector (dimension (me + md))cicolumn vector of lowerbounds (dimension n). If
 there are no lower bound constraints, put ci = []. If
 some components of x are bounded from below, set the
 other (unconstrained) values of ci to a very large
 negative number (e.g. ci(j) =
 number_properties('huge').cscolumn vector of upperbounds. (Same remarks as above).menumber of equality constraints (i.e. C(1:me,:)*x = b(1:me))xoptimal solution found.iactvector, indicator of active constraints. The first non
 zero entries give the index of the active constraintsiter. 2x1 vector, first component gives the number of "main"
 iterations, the second one says how many constraints were
 deleted after they became active.
 DescriptionMinimize 0.5*x'*Q*x + p'*xunder the constraints
+
+
+ March 2008
+
+
+
+ qpsolve
+
+ linear quadratic programming solver
+
+
+
+ Calling Sequence
+
+ [x [,iact [,iter [,f]]]]=qpsolve(Q,p,C,b,ci,cs,me)
+
+
+
+ Parameters
+
+
+
+ Q
+
+
+ real positive definite symmetric matrix (dimension n
+ x n).
+
+
+
+
+ p
+
+
+ real (column) vector (dimension n)
+
+
+
+
+ C
+
+
+ real matrix (dimension (me + md) x n).
+ This matrix may be stored as either a dense matrix either a sparse
+ one.
+
+
+
+
+ b
+
+
+ RHS column vector (dimension (me +
+ md))
+
+
+
+
+ ci
+
+
+ column vector of lowerbounds (dimension
+ n). If there are no lower bound constraints, put
+ ci = []. If some components of
+ x are bounded from below, set the other
+ (unconstrained) values of ci to a very large
+ negative number (e.g. ci(j) =
+ number_properties('huge').
+
+
+
+
+ cs
+
+
+ column vector of upperbounds. (Same remarks as above).
+
+
+
+
+ me
+
+
+ number of equality constraints (i.e. C(1:me,:)*x =
+ b(1:me))
+
+
+
+
+ x
+
+
+ optimal solution found.
+
+
+
+
+ iact
+
+
+ vector, indicator of active constraints. The first non zero
+ entries give the index of the active constraints
+
+
+
+
+ iter
+
+
+ . 2x1 vector, first component gives the number of "main"
+ iterations, the second one says how many constraints were deleted
+ after they became active.
+
+
+
+
+
+
+ Description
+
+ Minimize 0.5*x'*Q*x + p'*x
+
+ under the constraints
+
+
C(j,:) x = b(j), j=1,...,me
 C(j,:) x <= b(j), j=me+1,...,me+md
 ci <= x <= cs
+ C(j,:) x <= b(j), j=me+1,...,me+md
+ ci <= x <= cs
 ]]>This function requires Q to be positive definite, if it is
 not the case, one may use the quapro function.
 Examples
+
+ This function requires Q to be positive definite,
+ if it is not the case, one may use the quapro function.
+
+
+
+ Examples
+
+
//Find x in R^6 such that:
//C1*x = b1 (3 equality constraints i.e me=3)
@@ 32,7 +153,7 @@ 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*x <= b2 (2 inequality constraints)
C2=[0,1,0,1,2,1;
1,0,2,1,1,0];
b2=[1;2.5];
@@ 47,21 +168,48 @@ me=3;
[x,iact,iter,f]=qpsolve(Q,p,C,b,ci,cs,me)
//Only linear constraints (1 to 4) are active
 ]]>
 See Also

 quapro


 optim


 qp_solve


 AuthorsS. Steer, INRIA (Scilab interface)Berwin A. Turlach,School of Mathematics and
 Statistics (M019), The University of Western Australia, Crawley,
 AUSTRALIA (solver code)
 Used Functionsqpgen1.f (also named QP.solve.f) developped by Berwin A. Turlach according to the Goldfarb/Idnani algorithm


\ No newline at end of file
+
+
+
+
+ See Also
+
+
+ optim
+ qp_solve
+ qld
+
+ The contributed toolbox "quapro" may also be of interest, in
+ particular for singular Q.
+
+
+
+ Authors
+
+
+
+ S. Steer
+
+
+ , INRIA (Scilab interface)
+
+
+
+
+ Berwin A. Turlach
+
+
+ ,School of Mathematics and Statistics (M019), The University
+ of Western Australia, Crawley, AUSTRALIA (solver code)
+
+
+
+
+
+
+ Used Functions
+
+ qpgen1.f (also named QP.solve.f) developped by Berwin A. Turlach
+ according to the Goldfarb/Idnani algorithm
+
+

1.7.9.5