Module org.maxicp

Interface CPSolver

All Superinterfaces:
StateManaged
All Known Implementing Classes:
MaxiCP

public interface CPSolver extends StateManaged
  • Method Details

    • post

      void post(CPConstraint c)
      Posts the constraint, that is call CPConstraint.post() and computes the fix-point. A InconsistencyException is thrown if by posting the constraint it is proven that there is no solution.
      Parameters:
      c - the constraint to be posted
    • schedule

      void schedule(CPConstraint c)
      Schedules the constraint to be propagated by the fix-point.
      Parameters:
      c - the constraint to be scheduled
    • post

      void post(CPConstraint c, boolean enforceFixPoint)
      Posts the constraint that is call CPConstraint.post() and optionally computes the fix-point. A InconsistencyException is thrown if by posting the constraint it is proven that there is no solution.
      Parameters:
      c - the constraint to be posted
      enforceFixPoint - is one wants to compute the fix-point after
    • fixPoint

      void fixPoint()
      Computes the fix-point with all the scheduled constraints.
    • onFixPoint

      void onFixPoint(Runnable listener)
      Adds a listener called whenever the fix-point.
      Parameters:
      listener - the listener that is called whenever the fix-point is started
    • minimize

      IntObjective minimize(CPIntVar x)
      Creates a minimization objective on the given variable.
      Parameters:
      x - the variable to minimize
      Returns:
      an objective that can minimize x
      See Also:
    • maximize

      IntObjective maximize(CPIntVar x)
      Creates a maximization objective on the given variable.
      Parameters:
      x - the variable to maximize
      Returns:
      an objective that can maximize x
      See Also:
    • post

      void post(CPBoolVar b)
      Forces the boolean variable to be true and then computes the fix-point.
      Parameters:
      b - the variable that must be set to true
    • getModelProxy

      ModelProxy getModelProxy()
      Gives the ModelProxy associated with this CPSolver, if any