Class MoveBinaryLDS
- java.lang.Object
-
- org.chocosolver.solver.search.loop.move.MoveBinaryDFS
-
- org.chocosolver.solver.search.loop.move.MoveBinaryLDS
-
- All Implemented Interfaces:
Move
- Direct Known Subclasses:
MoveBinaryDDS
public class MoveBinaryLDS extends MoveBinaryDFS
A move dedicated to run an Limited Discrepancy Search[1] (LDS) with binary decisions.[1]:W.D. Harvey and M.L.Ginsberg, Limited Discrepancy Search, IJCAI-95.
Created by cprudhom on 07/10/15. Project: choco.
- Since:
- 07/10/15
- Author:
- Charles Prud'homme
-
-
Field Summary
Fields Modifier and Type Field Description protected IStateIntdiscurrent discrepancy, maintained incrementallyprotected intDISmax discrepancy allowed-
Fields inherited from class org.chocosolver.solver.search.loop.move.MoveBinaryDFS
strategy, topDecisionPosition
-
-
Constructor Summary
Constructors Constructor Description MoveBinaryLDS(AbstractStrategy strategy, int discrepancy, IEnvironment environment)Create a DFS with binary decisions
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleaninit()Called before the search starts.booleanrepair(Solver solver)Performs a move when the CSP associated to the current node of the search space is proven to be not consistent.protected booleanrewind(Solver solver)Go back in the search tree.-
Methods inherited from class org.chocosolver.solver.search.loop.move.MoveBinaryDFS
extend, getChildMoves, getStrategy, prevDecision, setChildMoves, setStrategy, setTopDecisionPosition
-
-
-
-
Field Detail
-
dis
protected IStateInt dis
current discrepancy, maintained incrementally
-
DIS
protected int DIS
max discrepancy allowed
-
-
Constructor Detail
-
MoveBinaryLDS
public MoveBinaryLDS(AbstractStrategy strategy, int discrepancy, IEnvironment environment)
Create a DFS with binary decisions- Parameters:
strategy- how (binary) decisions are selecteddiscrepancy- maximum discrepancyenvironment- backtracking environment
-
-
Method Detail
-
init
public boolean init()
Description copied from interface:MoveCalled before the search starts. Also initializes the search strategy.- Specified by:
initin interfaceMove- Overrides:
initin classMoveBinaryDFS- Returns:
- false if something goes wrong, true otherwise
-
repair
public boolean repair(Solver solver)
Description copied from interface:MovePerforms a move when the CSP associated to the current node of the search space is proven to be not consistent.- Specified by:
repairin interfaceMove- Overrides:
repairin classMoveBinaryDFS- Parameters:
solver- reference the solver- Returns:
trueif a reparation can be done,falsewhen no more reparation is possible.
-
rewind
protected boolean rewind(Solver solver)
Description copied from class:MoveBinaryDFSGo back in the search tree. Either refute a decision, or backtrack.- Overrides:
rewindin classMoveBinaryDFS- Parameters:
solver- reference to the solver- Returns:
trueif a reparation has been found
-
-