Minimization of a linear objective function of several variables subject
to linear and positivity constraints.
[xm, cxm]=simplex(a,b,c, ctype)
| A real matrix.|
| A real vector with the same number of elements as the number of rows in |
| A real vector with the same number of elements as the number of columns in |
| A vector of integer elements with values in the set |
(-1,1,0) , with the same number of elements as the number of rows in
| A vector that minimzes the objective function |
c'*x with respect to
x subject to the constraints defined below.
| The estimated minimum, i.e. |
The minimization is subject to the constrints that none of the elements of
xm are less than zero, and that the elements of the vector
p[i]=0 , or
p[i]<=0 depending on whether
ctype[i]=0 , or
ctype[i]=-1 . If
not specified, it is assumed to be a vector of ones, i.e. the constraint
a*xm>=b is satisfied.
> Maximize x1+x2+3x-.5x4
> subject to
> x1+2x2 <=740
> x2-7x4 <=0
> x2-x3+2x4 >=.5
> x1+x2+x3+x4 =9
>>c=-[1 1 3,-.5]'
>>a=[1 0 2 0 ; 0,2,0,-7;0,1,-1,2;1 1 1 1 ]