~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to man/nonlinear/linpro.man

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH linpro 1 "April 1993" "Scilab Group" "Scilab Function"
 
2
.so ../sci.an 
 
3
.SH NAME
 
4
linpro - linear programming solver
 
5
.SH CALLING SEQUENCE
 
6
.nf
 
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])
 
11
.fi
 
12
.SH PARAMETERS
 
13
.TP 10
 
14
 
15
: real column vector (dimension \fV n\fR)
 
16
.TP
 
17
 
18
: real matrix (dimension \fV (me + md) x n\fR)
 
19
(If no constraints are given, you can set \fVC = []\fR)
 
20
.TP
 
21
 
22
: RHS column vector (dimension \fV(me + md)\fR)
 
23
(If no constraints are given, you can set \fVb = []\fR)
 
24
 
 
25
.TP
 
26
ci 
 
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.
 
32
.TP
 
33
cs 
 
34
: column vector of upper-bounds. (Same remarks as above).
 
35
.TP
 
36
me 
 
37
: number of equality constraints (i.e. \fVC(1:me,:)*x = b(1:me)\fR)
 
38
.TP
 
39
x0 
 
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.
 
44
.TP
 
45
imp 
 
46
: verbose option (optional parameter)  (Try \fVimp=7,8,...\fR)
 
47
warning the message are output in the window where scilab has been
 
48
started.
 
49
.TP
 
50
 
51
: optimal solution found.
 
52
.TP
 
53
 
54
: optimal value of the cost function (i.e. \fVf=p'*x\fR).
 
55
.TP
 
56
lagr 
 
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.
 
66
.SH DESCRIPTION
 
67
.Vb [x,lagr,f]=linpro(p,C,b [,x0])
 
68
.LP
 
69
Minimize \fVp'*x\fR
 
70
under the constraints  \fVC*x <= b\fR
 
71
 
 
72
.LP
 
73
.Vb [x,lagr,f]=linpro(p,C,b,ci,cs [,x0])
 
74
.LP
 
75
Minimize \fVp'*x\fR under the constraints  \fVC*x <= b \fR, \fVci <= x <= cs\fR
 
76
.LP
 
77
.Vb [x,lagr,f]=linpro(p,C,b,ci,cs,me [,x0])
 
78
.LP
 
79
Minimize \fVp'*x\fR
 
80
under the constraints 
 
81
.nf
 
82
 C(j,:) x = b(j),  j=1,...,me
 
83
 C(j,:) x <= b(j), j=me+1,...,me+md
 
84
 ci <= x <= cs
 
85
.fi
 
86
.LP 
 
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
 
90
\fVx0='v'\fR.
 
91
.LP
 
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.
 
99
.SH EXAMPLE
 
100
.nf
 
101
//Find x in R^6 such that:
 
102
//C1*x = b1  (3 equality constraints i.e me=3)
 
103
C1= [1,-1,1,0,3,1;
 
104
    -1,0,-3,-4,5,6;
 
105
     2,5,3,0,1,0];
 
106
b1=[1;2;3];
 
107
//C2*x <= b2  (2 inequality constraints)
 
108
C2=[0,1,0,1,2,-1;
 
109
    -1,0,2,1,1,0];
 
110
b2=[-1;2.5];
 
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
 
114
p=[1;2;3;4;5;6]
 
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
 
121
.fi
 
122
.SH SEE ALSO
 
123
quapro
 
124
.SH AUTHOR
 
125
E. Casas, C. Pola Mendez
 
126