- 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 void
add(ISearchMonitor sm)
Adds a search monitor to this listvoid
afterClose()
Actions to execute after closing the searchvoid
afterDownBranch(boolean left)
Action to perform after going down in the tree searchvoid
afterInitialize(boolean correct)
Actions to execute after initialisation of the solvervoid
afterOpenNode()
Actions to execute after opening a nodevoid
afterRestart()
Actions to execute after restarting the searchvoid
afterUpBranch()
Actions to execute after going up in the tree searchvoid
beforeClose()
Actions to execute before closing the searchvoid
beforeDownBranch(boolean left)
Action to perform before going down in the tree searchvoid
beforeInitialize()
Actions to execute before initialisation of the solvervoid
beforeOpenNode()
Actions to execute before opening a nodevoid
beforeRestart()
Actions to execute before restarting the searchvoid
beforeUpBranch()
Actions to execute before going up in the tree searchboolean
contains(ISearchMonitor sm)
Checks if this list contains a search monitor.void
onContradiction(ContradictionException cex)
void
onSolution()
void
remove(ISearchMonitor sm)
Removes a search monitor for this list.void
reset()
Clears all internal lists of search monitors.
-
-
-
Method Detail
-
beforeInitialize
public void beforeInitialize()
Description copied from interface:IMonitorInitialize
Actions to execute before initialisation of the solver- Specified by:
beforeInitialize
in interfaceIMonitorInitialize
-
afterInitialize
public void afterInitialize(boolean correct)
Description copied from interface:IMonitorInitialize
Actions to execute after initialisation of the solver- Specified by:
afterInitialize
in interfaceIMonitorInitialize
- Parameters:
correct
- equals false if initialization failed, true otherwise.
-
beforeOpenNode
public void beforeOpenNode()
Description copied from interface:IMonitorOpenNode
Actions to execute before opening a node- Specified by:
beforeOpenNode
in interfaceIMonitorOpenNode
-
afterOpenNode
public void afterOpenNode()
Description copied from interface:IMonitorOpenNode
Actions to execute after opening a node- Specified by:
afterOpenNode
in interfaceIMonitorOpenNode
-
onSolution
public void onSolution()
- Specified by:
onSolution
in interfaceIMonitorSolution
-
beforeDownBranch
public void beforeDownBranch(boolean left)
Description copied from interface:IMonitorDownBranch
Action to perform before going down in the tree search- Specified by:
beforeDownBranch
in interfaceIMonitorDownBranch
- Parameters:
left
- set to true to specify that this is a left branch
-
afterDownBranch
public void afterDownBranch(boolean left)
Description copied from interface:IMonitorDownBranch
Action to perform after going down in the tree search- Specified by:
afterDownBranch
in interfaceIMonitorDownBranch
- Parameters:
left
- set to true to specify that this is a left branch
-
beforeUpBranch
public void beforeUpBranch()
Description copied from interface:IMonitorUpBranch
Actions to execute before going up in the tree search- Specified by:
beforeUpBranch
in interfaceIMonitorUpBranch
-
afterUpBranch
public void afterUpBranch()
Description copied from interface:IMonitorUpBranch
Actions to execute after going up in the tree search- Specified by:
afterUpBranch
in interfaceIMonitorUpBranch
-
onContradiction
public void onContradiction(ContradictionException cex)
- Specified by:
onContradiction
in interfaceIMonitorContradiction
-
beforeRestart
public void beforeRestart()
Description copied from interface:IMonitorRestart
Actions to execute before restarting the search- Specified by:
beforeRestart
in interfaceIMonitorRestart
-
afterRestart
public void afterRestart()
Description copied from interface:IMonitorRestart
Actions to execute after restarting the search- Specified by:
afterRestart
in interfaceIMonitorRestart
-
beforeClose
public void beforeClose()
Description copied from interface:IMonitorClose
Actions to execute before closing the search- Specified by:
beforeClose
in interfaceIMonitorClose
-
afterClose
public void afterClose()
Description copied from interface:IMonitorClose
Actions to execute after closing the search- Specified by:
afterClose
in 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.
-
-