1
.TH linpro 1 "April 1993" "Scilab Group" "Scilab Function"
4
linpro - linear programming solver
7
[x,lagr,f]=linpro(p,C,b [,x0])
8
[x,lagr,f]=linpro(p,C,b,ci,cs [,x0])
9
[x,lagr,f]=linpro(p,C,b,ci,cs,me [,x0])
10
[x,lagr,f]=linpro(p,C,b,ci,cs,me,x0 [,imp])
15
: real column vector (dimension \fV n\fR)
18
: real matrix (dimension \fV (me + md) x n\fR)
19
(If no constraints are given, you can set \fVC = []\fR)
22
: RHS column vector (dimension \fV(me + md)\fR)
23
(If no constraints are given, you can set \fVb = []\fR)
27
: column vector of lower-bounds (dimension \fV n\fR).
28
If there are no lower bound constraints, put \fVci = []\fR.
29
If some components of \fVx\fR are bounded from below,
30
set the other (unconstrained) values of \fVci\fR to a very
31
large negative number (e.g. \fVci(j) = -(% eps)^(-1)\fR.
34
: column vector of upper-bounds. (Same remarks as above).
37
: number of equality constraints (i.e. \fVC(1:me,:)*x = b(1:me)\fR)
40
: either an initial guess for \fVx\fR
41
or one of the character strings \fV'v'\fR or \fV'g'\fR.
42
If \fVx0='v'\fR the calculated initial feasible point is a vertex.
43
If \fVx0='g'\fR the calculated initial feasible point is arbitrary.
46
: verbose option (optional parameter) (Try \fVimp=7,8,...\fR)
47
warning the message are output in the window where scilab has been
51
: optimal solution found.
54
: optimal value of the cost function (i.e. \fVf=p'*x\fR).
57
: vector of Lagrange multipliers.
58
If lower and upper-bounds \fVci,cs\fR are provided, \fVlagr\fR has
59
\fVn + me + md\fR components and \fVlagr(1:n)\fR is the Lagrange
60
vector associated with the bound constraints and
61
\fVlagr (n+1 : n + me + md)\fR is the Lagrange vector associated
62
with the linear constraints.
63
(If an upper-bound (resp. lower-bound) constraint \fVi\fR is active
64
\fVlagr(i)\fR is > 0 (resp. <0).
65
If no bounds are provided, \fVlagr\fR has only \fVme + md\fR components.
67
.Vb [x,lagr,f]=linpro(p,C,b [,x0])
70
under the constraints \fVC*x <= b\fR
73
.Vb [x,lagr,f]=linpro(p,C,b,ci,cs [,x0])
75
Minimize \fVp'*x\fR under the constraints \fVC*x <= b \fR, \fVci <= x <= cs\fR
77
.Vb [x,lagr,f]=linpro(p,C,b,ci,cs,me [,x0])
82
C(j,:) x = b(j), j=1,...,me
83
C(j,:) x <= b(j), j=me+1,...,me+md
87
If no initial point is given the
88
program computes a feasible initial point
89
which is a vertex of the region of feasible points if
92
If \fVx0='g'\fR, the program computes a feasible initial
93
point which is not necessarily a vertex. This mode is
94
advisable when the quadratic form is positive
95
definite and there are a few constraints in
96
the problem or when there are large bounds
97
on the variables that are security bounds and
98
very likely not active at the optimal solution.
101
//Find x in R^6 such that:
102
//C1*x = b1 (3 equality constraints i.e me=3)
107
//C2*x <= b2 (2 inequality constraints)
111
//with x between ci and cs:
112
ci=[-1000;-10000;0;-1000;-1000;-1000];cs=[10000;100;1.5;100;100;1000];
113
//and minimize p'*x with
115
//No initial point is given: x0='v';
116
C=[C1;C2]; b=[b1;b2] ; me=3; x0='v';
117
[x,lagr,f]=linpro(p,C,b,ci,cs,me,x0)
118
// Lower bound constraints 3 and 4 are active and upper bound
119
// constraint 5 is active --> lagr(3:4) < 0 and lagr(5) > 0.
120
// Linear (equality) constraints 1 to 3 are active --> lagr(7:9) <> 0
125
E. Casas, C. Pola Mendez