- java.lang.Object
-
- org.chocosolver.solver.search.measure.Measures
-
- All Implemented Interfaces:
Serializable
,Cloneable
,IMeasures
- Direct Known Subclasses:
MeasuresRecorder
public class Measures extends Object implements IMeasures, Cloneable
Object which stores resolution information to get statistics- Author:
- Charles Prud'Homme, Arnaud Malapert
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected long
backjumpCount
Counts the number of non chronological backtracks done so far.protected long
backtrackCount
Counts the number of backtracks done so far.protected IBoundsManager
boundsManager
Reference to the bound managerprotected long
depth
Stores the current depthprotected long
failCount
Counts the number of failures encountered so far.protected long
fixpointCount
Stores the number of fixpointsprotected long
maxDepth
Stores the overall maximum depthprotected String
modelName
Name of the model observed -- no reference to the model should be done in this classprotected long
nodeCount
Counts the number of nodes opened so far.protected boolean
objectiveOptimal
Indicates if the optimal value has been proven for the objective (set to true).protected long
readingTimeCount
Counts the time spent into reading the modelprotected long
restartCount
Counts the number of restarts done so far.protected long
solutionCount
Counts the number of solutions found so far.protected SearchState
state
Search stateprotected long
timeCount
Counts the time spent so far, starting from solver construction call.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getBackjumpCount()
long
getBackTrackCount()
Number
getBestSolutionValue()
IBoundsManager
getBoundsManager()
long
getCurrentDepth()
long
getDecisionCount()
long
getFailCount()
long
getFixpointCount()
long
getMaxDepth()
String
getModelName()
long
getNodeCount()
long
getReadingTimeCountInNanoSeconds()
long
getRestartCount()
SearchState
getSearchState()
long
getSolutionCount()
long
getTimeCountInNanoSeconds()
long
getTimestamp()
boolean
hasObjective()
boolean
isObjectiveOptimal()
String
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
-
-
-
-
Field Detail
-
modelName
protected String modelName
Name of the model observed -- no reference to the model should be done in this class
-
state
protected SearchState state
Search state
-
boundsManager
protected IBoundsManager boundsManager
Reference to the bound manager
-
objectiveOptimal
protected boolean objectiveOptimal
Indicates if the optimal value has been proven for the objective (set to true).
-
solutionCount
protected long solutionCount
Counts the number of solutions found so far.
-
timeCount
protected long timeCount
Counts the time spent so far, starting from solver construction call.
-
readingTimeCount
protected long readingTimeCount
Counts the time spent into reading the model
-
nodeCount
protected long nodeCount
Counts the number of nodes opened so far.
-
backtrackCount
protected long backtrackCount
Counts the number of backtracks done so far.
-
failCount
protected long failCount
Counts the number of failures encountered so far.
-
restartCount
protected long restartCount
Counts the number of restarts done so far.
-
maxDepth
protected long maxDepth
Stores the overall maximum depth
-
depth
protected long depth
Stores the current depth
-
fixpointCount
protected long fixpointCount
Stores the number of fixpoints
-
backjumpCount
protected long backjumpCount
Counts the number of non chronological backtracks done so far.
-
-
Method Detail
-
getBackTrackCount
public final long getBackTrackCount()
- Specified by:
getBackTrackCount
in interfaceIMeasures
- Returns:
- the backtrack count
-
getFailCount
public final long getFailCount()
- Specified by:
getFailCount
in interfaceIMeasures
- Returns:
- the fail count
-
getFixpointCount
public final long getFixpointCount()
- Specified by:
getFixpointCount
in interfaceIMeasures
- Returns:
- the fixpoint count
-
getBackjumpCount
public long getBackjumpCount()
- Specified by:
getBackjumpCount
in interfaceIMeasures
- Returns:
- the non chronological backtracks count
-
getNodeCount
public final long getNodeCount()
- Specified by:
getNodeCount
in interfaceIMeasures
- Returns:
- the node count
-
getTimeCountInNanoSeconds
public long getTimeCountInNanoSeconds()
- Specified by:
getTimeCountInNanoSeconds
in interfaceIMeasures
- Returns:
- the time count (in nano seconds), including initial propagation time count
-
getReadingTimeCountInNanoSeconds
public long getReadingTimeCountInNanoSeconds()
- Specified by:
getReadingTimeCountInNanoSeconds
in interfaceIMeasures
- Returns:
- the reading time count (in nano seconds).
-
getRestartCount
public final long getRestartCount()
- Specified by:
getRestartCount
in interfaceIMeasures
- Returns:
- the restart count
-
getMaxDepth
public final long getMaxDepth()
- Specified by:
getMaxDepth
in interfaceIMeasures
- Returns:
- the maximum depth of the search tree
-
getCurrentDepth
public final long getCurrentDepth()
- Specified by:
getCurrentDepth
in interfaceIMeasures
- Returns:
- the current depth in the search tree
-
isObjectiveOptimal
public final boolean isObjectiveOptimal()
- Specified by:
isObjectiveOptimal
in interfaceIMeasures
- Returns:
- true iff the optimum has been found and proved
-
hasObjective
public final boolean hasObjective()
- Specified by:
hasObjective
in interfaceIMeasures
- Returns:
- true iff the problem has an objective variable (i.e. optimization problem)
-
getBestSolutionValue
public final Number getBestSolutionValue()
- Specified by:
getBestSolutionValue
in interfaceIMeasures
- Returns:
- the objective value of the best solution found (can be Integer or Double)
-
getSearchState
public final SearchState getSearchState()
- Specified by:
getSearchState
in interfaceIMeasures
- Returns:
- the search state
-
getModelName
public final String getModelName()
- Specified by:
getModelName
in interfaceIMeasures
- Returns:
- name of the model/solver observed
-
getTimestamp
public long getTimestamp()
- Specified by:
getTimestamp
in interfaceIMeasures
- Returns:
- the current world unique id
-
getBoundsManager
public final IBoundsManager getBoundsManager()
- Specified by:
getBoundsManager
in interfaceIMeasures
- Returns:
- current bound manager
-
getSolutionCount
public final long getSolutionCount()
- Specified by:
getSolutionCount
in interfaceIMeasures
- Returns:
- the solution count of the measure
-
getDecisionCount
public long getDecisionCount()
- Specified by:
getDecisionCount
in interfaceIMeasures
- Returns:
- the decision count
-
-