Class SearchMonitorList
- java.lang.Object
-
- org.chocosolver.solver.search.loop.monitors.SearchMonitorList
-
- All Implemented Interfaces:
IMonitorClose,IMonitorContradiction,IMonitorDownBranch,IMonitorInitialize,IMonitorOpenNode,IMonitorRestart,IMonitorSolution,IMonitorUpBranch,ISearchMonitor
public final class SearchMonitorList extends Object implements IMonitorClose, IMonitorContradiction, IMonitorDownBranch, IMonitorInitialize, IMonitorOpenNode, IMonitorRestart, IMonitorSolution, IMonitorUpBranch
- Since:
- 09/05/11
- Author:
- Charles Prud'homme
-
-
Constructor Summary
Constructors Constructor Description SearchMonitorList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(ISearchMonitor sm)Adds a search monitor to this listvoidafterClose()Actions to execute after closing the searchvoidafterDownBranch(boolean left)Action to perform after going down in the tree searchvoidafterInitialize(boolean correct)Actions to execute after initialisation of the solvervoidafterOpenNode()Actions to execute after opening a nodevoidafterRestart()Actions to execute after restarting the searchvoidafterUpBranch()Actions to execute after going up in the tree searchvoidbeforeClose()Actions to execute before closing the searchvoidbeforeDownBranch(boolean left)Action to perform before going down in the tree searchvoidbeforeInitialize()Actions to execute before initialisation of the solvervoidbeforeOpenNode()Actions to execute before opening a nodevoidbeforeRestart()Actions to execute before restarting the searchvoidbeforeUpBranch()Actions to execute before going up in the tree searchbooleancontains(ISearchMonitor sm)Checks if this list contains a search monitor.voidonContradiction(ContradictionException cex)voidonSolution()voidremove(ISearchMonitor sm)Removes a search monitor for this list.voidreset()Clears all internal lists of search monitors.
-
-
-
Method Detail
-
beforeInitialize
public void beforeInitialize()
Description copied from interface:IMonitorInitializeActions to execute before initialisation of the solver- Specified by:
beforeInitializein interfaceIMonitorInitialize
-
afterInitialize
public void afterInitialize(boolean correct)
Description copied from interface:IMonitorInitializeActions to execute after initialisation of the solver- Specified by:
afterInitializein interfaceIMonitorInitialize- Parameters:
correct- equals false if initialization failed, true otherwise.
-
beforeOpenNode
public void beforeOpenNode()
Description copied from interface:IMonitorOpenNodeActions to execute before opening a node- Specified by:
beforeOpenNodein interfaceIMonitorOpenNode
-
afterOpenNode
public void afterOpenNode()
Description copied from interface:IMonitorOpenNodeActions to execute after opening a node- Specified by:
afterOpenNodein interfaceIMonitorOpenNode
-
onSolution
public void onSolution()
- Specified by:
onSolutionin interfaceIMonitorSolution
-
beforeDownBranch
public void beforeDownBranch(boolean left)
Description copied from interface:IMonitorDownBranchAction to perform before going down in the tree search- Specified by:
beforeDownBranchin interfaceIMonitorDownBranch- Parameters:
left- set to true to specify that this is a left branch
-
afterDownBranch
public void afterDownBranch(boolean left)
Description copied from interface:IMonitorDownBranchAction to perform after going down in the tree search- Specified by:
afterDownBranchin interfaceIMonitorDownBranch- Parameters:
left- set to true to specify that this is a left branch
-
beforeUpBranch
public void beforeUpBranch()
Description copied from interface:IMonitorUpBranchActions to execute before going up in the tree search- Specified by:
beforeUpBranchin interfaceIMonitorUpBranch
-
afterUpBranch
public void afterUpBranch()
Description copied from interface:IMonitorUpBranchActions to execute after going up in the tree search- Specified by:
afterUpBranchin interfaceIMonitorUpBranch
-
onContradiction
public void onContradiction(ContradictionException cex)
- Specified by:
onContradictionin interfaceIMonitorContradiction
-
beforeRestart
public void beforeRestart()
Description copied from interface:IMonitorRestartActions to execute before restarting the search- Specified by:
beforeRestartin interfaceIMonitorRestart
-
afterRestart
public void afterRestart()
Description copied from interface:IMonitorRestartActions to execute after restarting the search- Specified by:
afterRestartin interfaceIMonitorRestart
-
beforeClose
public void beforeClose()
Description copied from interface:IMonitorCloseActions to execute before closing the search- Specified by:
beforeClosein interfaceIMonitorClose
-
afterClose
public void afterClose()
Description copied from interface:IMonitorCloseActions to execute after closing the search- Specified by:
afterClosein interfaceIMonitorClose
-
add
public void add(ISearchMonitor sm)
Adds a search monitor to this list- Parameters:
sm- a search monitor
-
contains
public boolean contains(ISearchMonitor sm)
Checks if this list contains a search monitor.- Parameters:
sm- a search monitor- Returns:
- true if this list contains
sm, false otherwise.
-
remove
public void remove(ISearchMonitor sm)
Removes a search monitor for this list.- Parameters:
sm- a search monitor.
-
reset
public void reset()
Clears all internal lists of search monitors.
-
-