12.07.2015 Views

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's 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.

◆◆Cplex.NotCplex.IfThenAgain, those extractable .NET objects accept other linear constraints or logical constraints astheir arguments, thus making it possible for you to combine linear constraints with logicalconstraints in expressions in your .NET applications.Which Nonlinear Expressions Can Be Extracted?Some expressions are easily recognized as nonlinear, for example, a function such asx 2 +y 2 ≤ 1. However, other nonlinearities are less obvious, such as absolute value as afunction. In a very real sense, MIP is a class of nonlinearly constrained problems because theintegrality restriction destroys the property of convexity which any linear constraintsotherwise might possess. Because of that characteristic, certain (although not all)nonlinearities are capable of being converted to a MIP formulation, and thus can be solvedby <strong>ILOG</strong> <strong>CPLEX</strong>. In fact, IloCplex can extract the following nonlinear expressions in aC++ application:◆◆◆◆IloMin the minimum of an array of numeric expressions or over a numeric expressionand a constant in C++IloMax the maximum of an array of numeric expressions or over a numeric expressionand a constant in C++IloAbs the absolute value of a numeric expressionIloPiecewiseLinear the piecewise linear combination of a numeric expression,◆ A linear constraint can appear as a term in a logical constraint.For example, given these variables and arrays:IloIntVarArray x(env, 5, 0, 1000);IloNumVar y(env, -1000, 5000);IloNumVar z(env, -1000, 1000);IloCplex in a C++ application recognizes the following constraint as valid and extracts it:IloMin(x) >= IloAbs(y)In fact, ranges containing logical expressions can, in turn, appear in logical constraints. Forexample, the following constraint is valid and extractable by IloCplex:IloIfThen(env, (IloAbs(y)

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

Saved successfully!

Ooh no, something went wrong!