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.

What Are Logical Constraints?For <strong>ILOG</strong> <strong>CPLEX</strong>, a logical constraint combines linear constraints by means of logicaloperators, such as logical-and, logical-or, negation (that is, not), conditional statements (thatis, if ... then ...) to express complex relations between linear constraints. <strong>ILOG</strong> <strong>CPLEX</strong> canalso handle certain logical expressions appearing within a linear constraint. One such logicalexpression is the minimum of a set of variables. Another such logical expression is theabsolute value of a variable. There’s more about logical expressions in Which NonlinearExpressions Can Be Extracted? on page 352.What Can Be Extracted from a Model with Logical Constraints?Much the same logical constraints are available in these APIs of <strong>ILOG</strong> <strong>CPLEX</strong>.◆ Logical Constraints in the C++ API on page 350◆ Logical Constraints in the Java API on page 351◆ Logical Constraints in the .NET API on page 351For similar facilities in the Callable Library, see Using Indicator Constraints on page 355.Logical Constraints in the C++ APIIn C++ applications, the class IloCplex can extract modeling objects to solve a widevariety of MIPs, as you see in Solving the Model on page 50, summarized in Table 1.1 onpage 51. In fact, the C++ class IloCplex can extract logical constraints as well as somelogical expressions. The logical constraints that IloCplex can extract are these:◆◆◆◆◆IloAndIloOrIloNotIloIfThenIloDiff◆ == that is, the equivalence relationAmong those extractable objects, IloAnd IloOr, IloNot, and IloDiff can also berepresented in your application by means of the overloaded C++ operators:◆◆◆|| (for IloOr)&& (for IloAnd)! (for IloNot)350 <strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL

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

Saved successfully!

Ooh no, something went wrong!