Class MoveBinaryHBFS
- java.lang.Object
-
- org.chocosolver.solver.search.loop.move.MoveBinaryDFS
-
- org.chocosolver.solver.search.loop.move.MoveBinaryHBFS
-
- All Implemented Interfaces:
Move
public class MoveBinaryHBFS extends MoveBinaryDFS
A move dedicated to run an Hybrid Best-First Search[1] (HBFS) with binary decisions.[1]:D. Allouche, S. de Givry, G. Katsirelos, T. Schiex, M. Zytnicki, Anytime Hybrid Best-First Search with Tree Decomposition for Weighted CSP, CP-2015.
It restarts anytime a backtrack limit is reached and a new open right branch needs to be selected.
Created by cprudhom on 02/11/2015. Project: choco.
- Since:
- 02/11/2015.
- Author:
- Charles Prud'homme
-
-
Field Summary
-
Fields inherited from class org.chocosolver.solver.search.loop.move.MoveBinaryDFS
strategy, topDecisionPosition
-
-
Constructor Summary
Constructors Constructor Description MoveBinaryHBFS(Model model, AbstractStrategy strategy, double a, double b, long N)
Create a move dedicated to run an Hybrid Best-First Search[1] (HBFS) with binary decisions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
extend(Solver solver)
Performs a move when the CSP associated to the current node of the search space is not proven to be not consistent.protected void
extractOpenRightBranches(Solver solver)
This methods extracts and stores all open right branches for future explorationboolean
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.-
Methods inherited from class org.chocosolver.solver.search.loop.move.MoveBinaryDFS
getChildMoves, getStrategy, prevDecision, rewind, setChildMoves, setStrategy, setTopDecisionPosition
-
-
-
-
Constructor Detail
-
MoveBinaryHBFS
public MoveBinaryHBFS(Model model, AbstractStrategy strategy, double a, double b, long N)
Create a move dedicated to run an Hybrid Best-First Search[1] (HBFS) with binary decisions.- Parameters:
model
- a modelstrategy
- the search strategy to usea
- lower bound to limit the rate of redundantly propagated decisions.b
- upper bound to limit the rate of redundantly propagated decisions.N
- maximum number of backtracks to not exceed when updating node recomputation parameters.
-
-
Method Detail
-
init
public boolean init()
Description copied from interface:Move
Called before the search starts. Also initializes the search strategy.- Specified by:
init
in interfaceMove
- Overrides:
init
in classMoveBinaryDFS
- Returns:
- false if something goes wrong, true otherwise
-
extend
public boolean extend(Solver solver)
Description copied from interface:Move
Performs a move when the CSP associated to the current node of the search space is not proven to be not consistent.- Specified by:
extend
in interfaceMove
- Overrides:
extend
in classMoveBinaryDFS
- Parameters:
solver
- reference the solver- Returns:
true
if an extension can be done,false
when no more extension is possible.
-
repair
public boolean repair(Solver solver)
Description copied from interface:Move
Performs a move when the CSP associated to the current node of the search space is proven to be not consistent.- Specified by:
repair
in interfaceMove
- Overrides:
repair
in classMoveBinaryDFS
- Parameters:
solver
- reference the solver- Returns:
true
if a reparation can be done,false
when no more reparation is possible.
-
extractOpenRightBranches
protected void extractOpenRightBranches(Solver solver)
This methods extracts and stores all open right branches for future exploration- Parameters:
solver
- reference to the solver
-
-