Logical constraints in the Java API

Describes logical constraints in the Java API.

Of course, because the Java programming language does not support the overloading of operators as C++ does, overloaded logical operators are not supported in the Java API of Concert Technology. However, the Java class IloCplexModeler offers logical modeling facilities through methods, such as:

  • IloCplexModeler.and

  • IloCplexModeler.or

  • IloCplexModeler.not

  • IloCplexModeler.ifThen

Moreover, like their C++ counterparts, those extractable Java objects accept as their arguments other linear constraints or logical constraints, so you can combine linear constraints with logical constraints in complicated expressions in your Java application.