Logical constraints are available in all APIs of Concert Technology. They are useful for representing certain nonlinear elements in a model, such as absolute value, logical-and, logical-or, negation, equivalence, nonequivalence (difference), conditional logic (if ... then), piecewise linear functions, maximum over a numeric expression or set, minimum over a numeric expression or set, and other such modeling elements.
Similar facilities are available in the Callable Library (C API) through the
routine CPXaddindconstr
,
which enables you to add indicator constraints to your model.
Note: Names of classes, methods, and symbolic constants in the .NET API correspond very closely to those in the Java API with these systematic exceptions:
Ilo
, whereas in .NET they do not.
addCols
,
whereas in the .NET API, the names of methods conventionally
begin with an uppercase (that is, capital) letter, for example,
AddCols
according to Microsoft practice.
Purpose |
Java API |
C++ API |
C API |
---|---|---|---|
Conjunction (logical-and) of two or more constraints as a constraint |
---- |
||
Logical-or of two or more constraints as a constraint |
---- |
||
Logical negation of a constraint |
---- |
||
Absolute value |
---- |
||
Conditional logic; that is, if ... then |
---- |
||
Logical equivalence of two constraints; that is, they must be the same |
---- |
||
Piecewise linear function |
---- |
||
Maximum over a numeric expression or set |
---- |