public class MoveBinaryLDS extends MoveBinaryDFS
[1]:W.D. Harvey and M.L.Ginsberg, Limited Discrepancy Search, IJCAI-95.
Created by cprudhom on 07/10/15. Project: choco.
Modifier and Type | Field and Description |
---|---|
protected IStateInt |
dis
current discrepancy, maintained incrementally
|
protected int |
DIS
max discrepancy allowed
|
strategy, topDecisionPosition
Constructor and Description |
---|
MoveBinaryLDS(AbstractStrategy strategy,
int discrepancy,
IEnvironment environment)
Create a DFS with binary decisions
|
Modifier and Type | Method and Description |
---|---|
boolean |
init()
Called before the search starts.
|
boolean |
repair(Solver solver)
Performs a move when the CSP associated to the current node of the search space is proven to be not consistent.
|
protected boolean |
rewind(Solver solver)
Go back in the search tree.
|
extend, getChildMoves, getStrategy, prevDecision, setChildMoves, setStrategy, setTopDecisionPosition
protected IStateInt dis
protected int DIS
public MoveBinaryLDS(AbstractStrategy strategy, int discrepancy, IEnvironment environment)
strategy
- how (binary) decisions are selecteddiscrepancy
- maximum discrepancyenvironment
- backtracking environmentpublic boolean init()
Move
init
in interface Move
init
in class MoveBinaryDFS
public boolean repair(Solver solver)
Move
repair
in interface Move
repair
in class MoveBinaryDFS
solver
- reference the solvertrue
if a reparation can be done, false
when no more reparation is possible.protected boolean rewind(Solver solver)
MoveBinaryDFS
rewind
in class MoveBinaryDFS
solver
- reference to the solvertrue
if a reparation has been foundCopyright © 2018. All rights reserved.