Class Solution

java.lang.Object
org.ddolib.common.solver.Solution

public class Solution extends Object
Wrapper defining a solution from a set of decisions
  • Constructor Details

    • Solution

      public Solution(Optional<Set<Decision>> decisions, SearchStatistics statistics)
      Constructs a solution given a set of decision and SearchStatistics on this set.
      Parameters:
      decisions - the set of decision leading to this solution
      statistics - the statistics related to this solution
  • Method Details

    • value

      public double value()
      Returns the evaluation of the objective value of this solution.
      Returns:
      the evaluation of the objective value of this solution
    • solution

      public int[] solution()
      Returns an array t such that t[i] is the assigned value to the decision variable x_i.
      Returns:
      an array t such that t[i] is the assigned value to the decision variable x_i.
    • statistics

      public SearchStatistics statistics()
      Returns the statistics associated to this solution.
      Returns:
      the statistics associated to this solution
    • searchTime

      public String searchTime()
    • toString

      public String toString()
      Overrides:
      toString in class Object