Class LearnCBJ
- java.lang.Object
-
- org.chocosolver.solver.search.loop.learn.LearnExplained
-
- org.chocosolver.solver.search.loop.learn.LearnCBJ
-
- All Implemented Interfaces:
Learn
- Direct Known Subclasses:
LearnDBT
public class LearnCBJ extends LearnExplained
Conflict-based Backjumping[1] (CBJ) explanation strategy. It backtracks up to most recent decision involved in the explanation, and forget younger decisions.[1]: P. Prosser, Hybrid algorithms for the constraint satisfaction problem, Computational Intelligence (93).
Created by cprudhom on 02/09/15. Project: choco.
- Author:
- Charles Prud'homme, Narendra Jussien
-
-
Field Summary
-
Fields inherited from class org.chocosolver.solver.search.loop.learn.LearnExplained
lastExplanation, mExplainer, mModel
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidforget(Solver solver)Forget some pieces of knowledge.protected voididentifyRefutedDecision(int nworld)Identify the decision to reconsider, and explain its refutation in the explanation data basevoidonFailure(Solver solver)Actions to do when a failure is met.-
Methods inherited from class org.chocosolver.solver.search.loop.learn.LearnExplained
getLastExplanation, onSolution, record
-
-
-
-
Constructor Detail
-
LearnCBJ
public LearnCBJ(Model mModel, boolean nogoodFromConflict, boolean userFeedbackOn)
Create a Conflict-based Backjumping strategy.- Parameters:
mModel- the solver to instrumentnogoodFromConflict- set to true to extract nogoods from explanations.userFeedbackOn- set to true to record causes in explanations (required for user feedback mainly).
-
-
Method Detail
-
identifyRefutedDecision
protected void identifyRefutedDecision(int nworld)
Identify the decision to reconsider, and explain its refutation in the explanation data base- Parameters:
nworld- index of the world to backtrack to
-
onFailure
public void onFailure(Solver solver)
Description copied from class:LearnExplainedActions to do when a failure is met.- Overrides:
onFailurein classLearnExplained
-
-