ApCoCoA-1:Latte.Minimize: Difference between revisions
From ApCoCoAWiki
No edit summary |
No edit summary |
||
Line 18: | Line 18: | ||
<example> | <example> | ||
Use S ::= QQ[x,y | Use S ::= QQ[x,y]; | ||
Equations := []; | Equations := []; | ||
LesserEq := [x- | LesserEq := [-x-2, x-y-24]; | ||
GreaterEq := [x,y]; | GreaterEq := [-x,-y]; | ||
ObjectiveF := x | ObjectiveF := x-2y; | ||
Latte.Minimize(Equations, LesserEq, GreaterEq, ObjectiveF); | Latte.Minimize(Equations, LesserEq, GreaterEq, ObjectiveF); | ||
[[0], | [[-2, 0], -2, [1, -2]] | ||
------------------------------- | ------------------------------- | ||
</example> | </example> |
Revision as of 15:02, 29 April 2009
Latte.Minimize
Minimizes the objective function over a polyhedral P given by a number of linear constraints.
Syntax
Latte.Minimize(Equations: LIST, LesserEq: LIST, GreaterEq: LIST, ObjectiveF: POLY):INT
Description
Please note: The function(s) explained on this page is/are using the ApCoCoAServer. You will have to start the ApCoCoAServer in order to use it/them.
@param Equations: A list of linear polynomials, which are equivalent to the equality-part of the polyhedral constraints
@param LesserEq: A list of linear polynomials, which are equivalent to the lower or equal-part of the polyhedral constraints
@param GreaterEq: A list of linear polynomials, which are equivalent to the greater or equal-part of the polyhedral constraints
@param ObjectiveF: A linear Polynomial
@return The optimal value of the objective function
Example
Use S ::= QQ[x,y]; Equations := []; LesserEq := [-x-2, x-y-24]; GreaterEq := [-x,-y]; ObjectiveF := x-2y; Latte.Minimize(Equations, LesserEq, GreaterEq, ObjectiveF); [[-2, 0], -2, [1, -2]] -------------------------------