Class RelaxationSolver<T>
java.lang.Object
org.ddolib.layered.solving.ddo.core.solver.RelaxationSolver<T>
- Type Parameters:
T- the type representing a problem state
A solver that compile one relaxed MDD from the root node.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the set of decisions that lead to the best solution found by this solver, if any.Returns the value of the best solution found so far by this solver, if any.minimize(Predicate<SearchStatistics> limit, BiConsumer<int[], SearchStatistics> onSolution) Solves the model by compiling a single relaxed decision diagram.
-
Constructor Details
-
RelaxationSolver
Creates a fully qualified instance. The parameters of this solver are given via aDdoModel- Parameters:
model- all the parameters needed to configure the solver
-
-
Method Details
-
minimize
public Solution minimize(Predicate<SearchStatistics> limit, BiConsumer<int[], SearchStatistics> onSolution) Solves the model by compiling a single relaxed decision diagram.When the JVM throws an
OutOfMemoryErrorduring the compilation, the search stops and returns the best solution found so far, if any, with the statusSearchStatus.MEMOUT.- Parameters:
limit- a predicate that can limit or stop the search based on current statisticsonSolution- a callback invoked once with the best solution found, if any- Returns:
- the statistics of the search after completion
-
bestValue
Returns the value of the best solution found so far by this solver, if any.- Returns:
- the value of the best solution in the relaxed decision diagram if there is one
-
bestSolution
Returns the set of decisions that lead to the best solution found by this solver, if any.
-