12.07.2015 Views

ILOG OPL Development Studio Language Reference Manual

ILOG OPL Development Studio Language Reference Manual

ILOG OPL Development Studio Language Reference Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Modeling constraintsConstraints passed to the algorithm, and which as such define the optimization problem,usually apply to decision variables; that is, they are Boolean expressions of some decisionvariables. To be taken into account by the solving algorithm, constraints must be stated usingthe optimization instruction:constraintsorsubject toas in Stating constraints by means of an optimization instruction.Stating constraints by means of an optimization instructionminimizesum(p in Products) (insideCost[p]*inside[p] + outsideCost[p]*outside[p]);subject to {forall(r in Resources)sum(p in Products) consumption[p,r] * inside[p] = demand[p];}Note:1.Optimization instructions require an objective function of type integer or float.2. That objective function must be defined before the constraints. Otherwise, a warningmessage is displayed.108I L O G O P L D E V E L O P M E N T S T U D I O L A N G U A G ER E F E R E N C E M A N U A L

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!