Constructor and Description |
---|
MiniCP(StateManager sm) |
Modifier and Type | Method and Description |
---|---|
void |
fixPoint()
Computes the fix-point with all the scheduled constraints.
|
StateManager |
getStateManager()
Returns the state manager in charge of the global
state of the solver.
|
Objective |
maximize(IntVar x)
Creates a maximization objective on the given variable.
|
Objective |
minimize(IntVar x)
Creates a minimization objective on the given variable.
|
void |
onFixPoint(Procedure listener)
Adds a listener called whenever the fix-point.
|
void |
post(BoolVar b)
Forces the boolean variable to be true and then
computes the fix-point.
|
void |
post(Constraint c)
Posts the constraint, that is call
Constraint.post() and
computes the fix-point. |
void |
post(Constraint c,
boolean enforceFixPoint)
Posts the constraint that is call
Constraint.post()
and optionally computes the fix-point. |
void |
schedule(Constraint c)
Schedules the constraint to be propagated by the fix-point.
|
public MiniCP(StateManager sm)
public StateManager getStateManager()
Solver
getStateManager
in interface Solver
public void schedule(Constraint c)
Solver
public void onFixPoint(Procedure listener)
Solver
onFixPoint
in interface Solver
listener
- the listener that is called whenever the fix-point is startedpublic void fixPoint()
Solver
public Objective minimize(IntVar x)
Solver
minimize
in interface Solver
x
- the variable to minimizeDFSearch.optimize(Objective)
public Objective maximize(IntVar x)
Solver
maximize
in interface Solver
x
- the variable to maximizeDFSearch.optimize(Objective)
public void post(Constraint c)
Solver
Constraint.post()
and
computes the fix-point.
A InconsistencyException
is thrown
if by posting the constraint it is proven that there is no solution.public void post(Constraint c, boolean enforceFixPoint)
Solver
Constraint.post()
and optionally computes the fix-point.
A InconsistencyException
is thrown
if by posting the constraint it is proven that there is no solution.Copyright © 2018 Laurent Michel, Pierre Schaus, Pascal Van Hentenryck. All rights reserved.