<A NAME=simplex>
<TITLE>simplex</TITLE></A>
<b><a href=r37_idx.html>INDEX</a></b><p><p>
<B>SIMPLEX</B> _ _ _ _ _ _ _ _ _ _ _ _ <B>operator</B><P>
<P>
<P>
<P>
<P> <H3>
syntax: </H3>
<em>simplex</em>(<max/min>,<objective function>,
{<linear inequalities>})
<P>
<P>
<P>
<max/min> :- either max or min (signifying maximize and
minimize).
<P>
<P>
<objective function> :- the function you are maximizing or
minimizing.
<P>
<P>
<linear inequalities> :- the constraint inequalities. Each one must
be of the form sum of variables (
<=,=,>=) number.
<P>
<P>
<em>simplex</em>applies the revised simplex algorithm to find the
optimal(either maximum or minimum) value of the
<objective function> under the linear inequality constraints.
<P>
<P>
It returns {optimal value,{ values of variables at this optimal}}.
<P>
<P>
The algorithm implies that all the variables are non-negative.
<P>
<P>
<P> <H3>
examples: </H3>
<P><PRE><TT>
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}}
</TT></PRE><P>