• 1 reply
  • Latest Post - ‏2013-02-05T10:51:35Z by SystemAdmin
4 Posts

Pinned topic equivalent of CPLEX CallBack in CP?

‏2013-02-04T21:16:26Z |
Is there an equivalent of CPLEX callbacks in CP?

I want to enforce the equivalent of subtour elimination constraints in a routing problem. I have the callbacks written for CPLEX (LazyConstraintCallback and UseCutCallback) but can't find a way to add then to CP.

Is there an alternative?

Updated on 2013-02-05T10:51:35Z at 2013-02-05T10:51:35Z by SystemAdmin
  • SystemAdmin
    554 Posts

    Re: equivalent of CPLEX CallBack in CP?

    There is no callback to achieve this in CPO. The way to introduce new inferences in the solver is to define your own constraint that eliminate subtours. Look at the documentation about how to define custom constraints (an instance of IlcConstraintI) in CP Optimizer Extensions User’s Manual > Writing complex custom constraints.

    Note that posting linear subtour elimination constraints when propagating an IlcConstraints does not do the job because they will be added localy and will be removed when backtracking. For going deeper about the implementation of such a constraint, you can have a look at this paper: