Package org.ddolib.common.solver
Class Solution
java.lang.Object
org.ddolib.common.solver.Solution
Wrapper defining a solution from a set of decisions
-
Constructor Summary
ConstructorsConstructorDescriptionSolution(Optional<Set<Decision>> decisions, SearchStatistics statistics) Constructs a solution given a set of decision andSearchStatisticson this set. -
Method Summary
-
Constructor Details
-
Solution
Constructs a solution given a set of decision andSearchStatisticson this set.- Parameters:
decisions- the set of decision leading to this solutionstatistics- 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 arraytsuch thatt[i]is the assigned value to the decision variablex_i.- Returns:
- an array
tsuch thatt[i]is the assigned value to the decision variablex_i.
-
statistics
Returns the statistics associated to this solution.- Returns:
- the statistics associated to this solution
-
searchTime
-
toString
-