linpro - linear programming solver
[x,lagr,f]=linpro(p,C,b [,x0]) Minimize p'*x under the constraints C*x <= b
[x,lagr,f]=linpro(p,C,b,ci,cs [,x0]) Minimize p'*x under the constraints C*x <= b , ci <= x <= cs
[x,lagr,f]=linpro(p,C,b,ci,cs,me [,x0]) Minimize 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
If no initial point is given the program computes a feasible initial point which is a vertex of the region of feasible points if x0='v' .
If x0='g' , the program computes a feasible initial point which is not necessarily a vertex. This mode is advisable when the quadratic form is positive definite and there are a few constraints in the problem or when there are large bounds on the variables that are security bounds and very likely not active at the optimal solution.
//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 p'*x with p=[1;2;3;4;5;6] //No initial point is given: x0='v'; C=[C1;C2]; b=[b1;b2] ; me=3; x0='v'; [x,lagr,f]=linpro(p,C,b,ci,cs,me,x0) // Lower bound constraints 3 and 4 are active and upper bound // constraint 5 is active --> lagr(3:4) < 0 and lagr(5) > 0. // Linear (equality) constraints 1 to 3 are active --> lagr(7:9) <> 0
quapro ,
in routines/optim directory (authors E.Casas, C. Pola Mendez):
anfm01.f anfm03.f anfm05.f anrs01.f auxo01.f dimp03.f dnrm0.f optr03.f pasr03.f zthz.f anfm02.f anfm04.f anfm06.f anrs02.f desr03.f dipvtf.f optr01.f opvf03.f plcbas.f
From BLAS library
daxpy.f dcopy.f ddot.f dnrm2.f dscal.f dswap.f idamax.f
in routines/calelm directory (authors INRIA):
add.f ddif.f dmmul.f
From LAPACK library : dlamch.f