- java.lang.Object
-
- org.chocosolver.solver.search.measure.Measures
-
- org.chocosolver.solver.search.measure.MeasuresRecorder
-
- All Implemented Interfaces:
Serializable
,Cloneable
,IMeasures
public final class MeasuresRecorder extends Measures
Object which stores resolution information to get statistics- Since:
- 3.0.0
- Author:
- Charles Prud'Homme, Arnaud Malapert
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.chocosolver.solver.search.measure.Measures
backjumpCount, backtrackCount, boundsManager, depth, failCount, fixpointCount, maxDepth, modelName, nodeCount, objectiveOptimal, readingTimeCount, restartCount, solutionCount, state, timeCount
-
-
Constructor Summary
Constructors Constructor Description MeasuresRecorder(String modelName)
Create a measures recorder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
decDepth()
Decrements current depthlong
getTimeCountInNanoSeconds()
void
incBackjumpCount()
increment backtrack countervoid
incBackTrackCount()
increment backtrack countervoid
incDepth()
Increments current depthvoid
incFailCount()
increment fail countervoid
incFixpointCount()
increment fail countervoid
incNodeCount()
increment node countervoid
incRestartCount()
increment restart countervoid
incSolutionCount()
increment solution countervoid
reset()
Reset every measure to its default value (mostly 0)void
setBoundsManager(IBoundsManager boundsManager)
Update the bounds managedvoid
setObjectiveOptimal(boolean objectiveOptimal)
indicates whether or not the optimum has been found and provedvoid
setReadingTimeCount(long readingTimeCount)
void
setSearchState(SearchState state)
Update the current search statevoid
startStopwatch()
Start the stopwatch, to compute resolution timevoid
stopStopwatch()
Stop the stopwatch, the resolution time is fixed.-
Methods inherited from class org.chocosolver.solver.search.measure.Measures
getBackjumpCount, getBackTrackCount, getBestSolutionValue, getBoundsManager, getCurrentDepth, getDecisionCount, getFailCount, getFixpointCount, getMaxDepth, getModelName, getNodeCount, getReadingTimeCountInNanoSeconds, getRestartCount, getSearchState, getSolutionCount, getTimestamp, hasObjective, isObjectiveOptimal, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.chocosolver.solver.search.measure.IMeasures
getReadingTimeCount, getTimeCount, toArray, toCSV, toDimacsString, toMultiLineString, toOneLineString
-
-
-
-
Constructor Detail
-
MeasuresRecorder
public MeasuresRecorder(String modelName)
Create a measures recorder
-
-
Method Detail
-
getTimeCountInNanoSeconds
public long getTimeCountInNanoSeconds()
- Specified by:
getTimeCountInNanoSeconds
in interfaceIMeasures
- Overrides:
getTimeCountInNanoSeconds
in classMeasures
- Returns:
- the time count (in nano seconds), including initial propagation time count
-
startStopwatch
public void startStopwatch()
Start the stopwatch, to compute resolution time
-
stopStopwatch
public void stopStopwatch()
Stop the stopwatch, the resolution time is fixed.
-
setObjectiveOptimal
public final void setObjectiveOptimal(boolean objectiveOptimal)
indicates whether or not the optimum has been found and proved- Parameters:
objectiveOptimal
- true if the objective is proven to be optimal
-
reset
public void reset()
Reset every measure to its default value (mostly 0)
-
incNodeCount
public final void incNodeCount()
increment node counter
-
incBackTrackCount
public final void incBackTrackCount()
increment backtrack counter
-
incBackjumpCount
public final void incBackjumpCount()
increment backtrack counter
-
incFailCount
public final void incFailCount()
increment fail counter
-
incFixpointCount
public final void incFixpointCount()
increment fail counter
-
incRestartCount
public final void incRestartCount()
increment restart counter
-
incSolutionCount
public final void incSolutionCount()
increment solution counter
-
incDepth
public final void incDepth()
Increments current depth
-
decDepth
public final void decDepth()
Decrements current depth
-
setSearchState
public final void setSearchState(SearchState state)
Update the current search state- Parameters:
state
- new search state
-
setBoundsManager
public final void setBoundsManager(IBoundsManager boundsManager)
Update the bounds managed- Parameters:
boundsManager
- new bound manager
-
setReadingTimeCount
public final void setReadingTimeCount(long readingTimeCount)
-
-