Class Measures
- 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 longbacktrackCountCounts the number of backtracks done so far.protected IBoundsManagerboundsManagerReference to the bound managerprotected longdepthStores the current depthprotected longfailCountCounts the number of failures encountered so far.protected longmaxDepthStores the overall maximum depthprotected StringmodelNameName of the model observed -- no reference to the model should be done in this classprotected longnodeCountCounts the number of nodes opened so far.protected booleanobjectiveOptimalIndicates if the optimal value has been proven for the objective (set to true).protected longreadingTimeCountCounts the time spent into reading the modelprotected longrestartCountCounts the number of restarts done so far.protected longsolutionCountCounts the number of solutions found so far.protected SearchStatestateSearch stateprotected longtimeCountCounts the time spent so far, starting from solver construction call.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetBackTrackCount()NumbergetBestSolutionValue()IBoundsManagergetBoundsManager()longgetCurrentDepth()longgetDecisionCount()longgetFailCount()longgetMaxDepth()StringgetModelName()longgetNodeCount()longgetReadingTimeCountInNanoSeconds()longgetRestartCount()SearchStategetSearchState()longgetSolutionCount()longgetTimeCountInNanoSeconds()longgetTimestamp()booleanhasObjective()booleanisObjectiveOptimal()StringtoString()-
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
-
-
Method Detail
-
getBackTrackCount
public final long getBackTrackCount()
- Specified by:
getBackTrackCountin interfaceIMeasures- Returns:
- the backtrack count
-
getFailCount
public final long getFailCount()
- Specified by:
getFailCountin interfaceIMeasures- Returns:
- the fail count
-
getNodeCount
public final long getNodeCount()
- Specified by:
getNodeCountin interfaceIMeasures- Returns:
- the node count
-
getTimeCountInNanoSeconds
public long getTimeCountInNanoSeconds()
- Specified by:
getTimeCountInNanoSecondsin interfaceIMeasures- Returns:
- the time count (in nano seconds), including initial propagation time count
-
getReadingTimeCountInNanoSeconds
public long getReadingTimeCountInNanoSeconds()
- Specified by:
getReadingTimeCountInNanoSecondsin interfaceIMeasures- Returns:
- the reading time count (in nano seconds).
-
getRestartCount
public final long getRestartCount()
- Specified by:
getRestartCountin interfaceIMeasures- Returns:
- the restart count
-
getMaxDepth
public final long getMaxDepth()
- Specified by:
getMaxDepthin interfaceIMeasures- Returns:
- the maximum depth of the search tree
-
getCurrentDepth
public final long getCurrentDepth()
- Specified by:
getCurrentDepthin interfaceIMeasures- Returns:
- the current depth in the search tree
-
isObjectiveOptimal
public final boolean isObjectiveOptimal()
- Specified by:
isObjectiveOptimalin interfaceIMeasures- Returns:
- true iff the optimum has been found and proved
-
hasObjective
public final boolean hasObjective()
- Specified by:
hasObjectivein interfaceIMeasures- Returns:
- true iff the problem has an objective variable (i.e. optimization problem)
-
getBestSolutionValue
public final Number getBestSolutionValue()
- Specified by:
getBestSolutionValuein interfaceIMeasures- Returns:
- the objective value of the best solution found (can be Integer or Double)
-
getSearchState
public final SearchState getSearchState()
- Specified by:
getSearchStatein interfaceIMeasures- Returns:
- the search state
-
getModelName
public final String getModelName()
- Specified by:
getModelNamein interfaceIMeasures- Returns:
- name of the model/solver observed
-
getTimestamp
public long getTimestamp()
- Specified by:
getTimestampin interfaceIMeasures- Returns:
- the current world unique id
-
getBoundsManager
public final IBoundsManager getBoundsManager()
- Specified by:
getBoundsManagerin interfaceIMeasures- Returns:
- current bound manager
-
getSolutionCount
public final long getSolutionCount()
- Specified by:
getSolutionCountin interfaceIMeasures- Returns:
- the solution count of the measure
-
getDecisionCount
public long getDecisionCount()
- Specified by:
getDecisionCountin interfaceIMeasures- Returns:
- the decision count
-
-