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 Details

    • SolutionStatistics

      public SolutionStatistics​(Metrics m, ReconfigurationPlan plan)
      Make a new statistics.
      Parameters:
      m - the solver metrics at the moment of the solution
      plan - the resulting plan. null indicates the solver stated their is no solution
  • Method Details

    • getReconfigurationPlan

      public ReconfigurationPlan getReconfigurationPlan()
      Return the computed solution.
      Returns:
      a plan that might be null
    • getMetrics

      public Metrics 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

      public String toString()
      Overrides:
      toString in class Object