Module org.maxicp

Class MaxiCP

java.lang.Object
org.maxicp.cp.engine.core.MaxiCP
All Implemented Interfaces:
CPSolver, StateManaged

public class MaxiCP extends Object implements CPSolver
  • Constructor Details

  • Method Details

    • getStateManager

      public StateManager getStateManager()
      Description copied from interface: StateManaged
      Returns the state manager in charge of the global state of the solver.
      Specified by:
      getStateManager in interface StateManaged
      Returns:
      the state manager
    • schedule

      public void schedule(CPConstraint c)
      Description copied from interface: CPSolver
      Schedules the constraint to be propagated by the fix-point.
      Specified by:
      schedule in interface CPSolver
      Parameters:
      c - the constraint to be scheduled
    • onFixPoint

      public void onFixPoint(Runnable listener)
      Description copied from interface: CPSolver
      Adds a listener called whenever the fix-point.
      Specified by:
      onFixPoint in interface CPSolver
      Parameters:
      listener - the listener that is called whenever the fix-point is started
    • fixPoint

      public void fixPoint()
      Description copied from interface: CPSolver
      Computes the fix-point with all the scheduled constraints.
      Specified by:
      fixPoint in interface CPSolver
    • minimize

      public IntObjective minimize(CPIntVar x)
      Description copied from interface: CPSolver
      Creates a minimization objective on the given variable.
      Specified by:
      minimize in interface CPSolver
      Parameters:
      x - the variable to minimize
      Returns:
      an objective that can minimize x
      See Also:
    • maximize

      public IntObjective maximize(CPIntVar x)
      Description copied from interface: CPSolver
      Creates a maximization objective on the given variable.
      Specified by:
      maximize in interface CPSolver
      Parameters:
      x - the variable to maximize
      Returns:
      an objective that can maximize x
      See Also:
    • post

      public void post(CPConstraint c)
      Description copied from interface: CPSolver
      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.
      Specified by:
      post in interface CPSolver
      Parameters:
      c - the constraint to be posted
    • post

      public void post(CPConstraint c, boolean enforceFixPoint)
      Description copied from interface: CPSolver
      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.
      Specified by:
      post in interface CPSolver
      Parameters:
      c - the constraint to be posted
      enforceFixPoint - is one wants to compute the fix-point after
    • post

      public void post(CPBoolVar b)
      Description copied from interface: CPSolver
      Forces the boolean variable to be true and then computes the fix-point.
      Specified by:
      post in interface CPSolver
      Parameters:
      b - the variable that must be set to true
    • getModelProxy

      public ModelProxy getModelProxy()
      Description copied from interface: CPSolver
      Gives the ModelProxy associated with this CPSolver, if any
      Specified by:
      getModelProxy in interface CPSolver
    • toString

      public String toString()
      Overrides:
      toString in class Object