simplex INDEX

SIMPLEX _ _ _ _ _ _ _ _ _ _ _ _ operator

syntax:

simplex(<max/min>,<objective function>, {<linear inequalities>})

<max/min> :- either max or min (signifying maximize and minimize).

<objective function> :- the function you are maximizing or minimizing.

<linear inequalities> :- the constraint inequalities. Each one must be of the form sum of variables ( <=,=,>=) number.

simplexapplies the revised simplex algorithm to find the optimal(either maximum or minimum) value of the <objective function> under the linear inequality constraints.

It returns {optimal value,{ values of variables at this optimal}}.

The algorithm implies that all the variables are non-negative.

examples:



 simplex(max,x+y,{x>=10,y>=20,x+y<=25}); 


   ***** Error in simplex: Problem has no feasible solution



simplex(max,10x+5y+5.5z,{5x+3z<=200,x+0.1y+0.5z<=12,
0.1x+0.2y+0.3z<=9, 30x+10y+50z<=1500}); 


  {525.0,{x=40.0,y=25.0,z=0}}