Skip to main content
FRAMES NO FRAMES

IlcCustomConstraint

public IlcConstraint IlcCustomConstraint(IloCPEngine solver, IloPropagatorI * prop)
Definition file: ilcp/cpext.h
Include file: <ilcp/cpext.h>
Creates a constraint from a propagator.

This function creates a constraint from a propagator. You can then add this constraint to a IloCPEngine instance during search in a user-defined goal. For example, using the propagator defined in the IloPropagatorI documentation:

       // Code to be executed inside a goal!
       IloPropagatorI * prop = new (env) SignI(x, sgn);
       IlcConstraint signCt = IlcCustomConstraint(solver, prop);
       cp.add(signCt);
     

See Also: