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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Symbol=>!===MeaningImplyDifferent fromEquivalenceAll those constructs accept as their arguments other linear constraints or logical constraints,so you can combine linear constraints with logical constraints in complicated expressions inyour application.Which nonlinear expressions can be extracted?Some expressions are easily recognized as nonlinear, for example, a function such asx^2 + y^2 = 1However, other nonlinearities are less obvious, such as absolute value as a function. In a veryreal sense, MIP is a class of nonlinearly constrained problems because the integrality restrictiondestroys the property of convexity which any linear constraints otherwise might possess.Because of that characteristic, certain (although not all) nonlinearities are capable of beingconverted to a MIP formulation, and thus can be solved by <strong>ILOG</strong> CPLEX. The followingnonlinear expressions are accepted in an <strong>OPL</strong> model:♦min and minl : the minimum of several numeric expressions♦max and maxl : the maximum of several numeric expressions♦abs : the absolute value of a numeric expression♦piecewise : the piecewise linear combination of a numeric expression♦A linear constraint can appear as a term in a logical constraint.In fact, ranges containing logical expressions can, in turn, appear in logical constraints. It isimportant to note here that only linear constraints can appear as arguments of logical constraintsextracted by <strong>ILOG</strong> CPLEX. That is, quadratic constraints are not handled in logical constraints.Similarly, quadratic terms can not appear as arguments of logical expressions such as min,max, abs, and piecewise.Logical constraints for countingIn many cases it is even unnecessary to allocate binary variables explicitly in order to gainthe benefit of linear constraints within logical expressions. For example, optimizing how manyitems appear in a solution is often an issue in practical problems. Questions of counting (howmany?) can be represented formally as cardinality constraints. Suppose that your applicationincludes three variables, each representing a quantity of one of three products, and assumeI 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 L127

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

Saved successfully!

Ooh no, something went wrong!