IBM Support

Adding a constraint into the Lazy Constraint pool using OPL Script

Question & Answer


Question

How do you add a constraint into the Lazy Constraint pool using OPL Script?

Answer

There is no direct method to add lazy constraints from OPL Script.
You should use extending script functionality by using external Java calls.

From the Concert APIs you can also use IloCplex::LazyConstraintCallbackI/IloCplex::CutCallbackI (C++) or IloCplex.CutCallback (JAVA), or Cplex.CutCallback (.NET) to implement lazy constraints.

You will find more information and examples of implementing callbacks in our documentation.

[{"Product":{"code":"SSSA5P","label":"IBM ILOG CPLEX Optimization Studio"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Area:ILOG Script for OPL\/OPL Script","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF014","label":"iOS"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"12.6.2;12.6.1;12.6.0.1;12.6","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21681643