Class SolutionStatistics
java.lang.Object
org.btrplace.scheduler.choco.runner.SolutionStatistics
public class SolutionStatistics extends Object
Store statistics about a solution.
- Author:
- Fabien Hermenier
-
Constructor Summary
Constructors Constructor Description SolutionStatistics(Metrics m, ReconfigurationPlan plan)
Make a new statistics. -
Method Summary
Modifier and Type Method Description Metrics
getMetrics()
Return the solver metrics at the moment the solution was computed.ReconfigurationPlan
getReconfigurationPlan()
Return the computed solution.boolean
hasObjective()
Indicates if an objective is attached to the solutionint
objective()
Get the objective value for that solution.void
setObjective(int v)
Set the objective value associated to the solutionString
toString()
-
Constructor Details
-
SolutionStatistics
Make a new statistics.- Parameters:
m
- the solver metrics at the moment of the solutionplan
- the resulting plan.null
indicates the solver stated their is no solution
-
-
Method Details
-
getReconfigurationPlan
Return the computed solution.- Returns:
- a plan that might be null
-
getMetrics
Return the solver metrics at the moment the solution was computed.- Returns:
- solver measurement
-
setObjective
public void setObjective(int v)Set the objective value associated to the solution- Parameters:
v
- the value
-
hasObjective
public boolean hasObjective()Indicates if an objective is attached to the solution- Returns:
true
iff there is an attached objective
-
objective
public int objective()Get the objective value for that solution. The value is meaningful iff there is an objective.- Returns:
- a number
-
toString
-