Package org.ddolib.acs.core.solver
Class ACSSolver<T>
java.lang.Object
org.ddolib.acs.core.solver.ACSSolver<T>
- Type Parameters:
T- The type representing a state in the problem.
- All Implemented Interfaces:
Solver
Implementation of an Anytime Column Search (ACS) solver for decision diagram-based optimization problems.
The solver uses a combination of a lower bound, dominance rules, and variable heuristics to explore the search space efficiently. It maintains open and closed lists of subproblems organized by depth (columns) and attempts to minimize the objective function while keeping track of the best known solution (incumbent).
Features:
- Maintains a frontier of subproblems using a priority queue at each column.
- Applies a
FastLowerBoundto prune subproblems unlikely to improve the incumbent. - Optionally uses
DominanceCheckerto avoid exploring dominated states. - Supports variable selection heuristics through
VariableHeuristic. - Can report search statistics and provide the best solution found at any time.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the set of decisions corresponding to the best solution found, if any.Returns the value of the best solution found, if any.minimize(Predicate<SearchStatistics> limit, BiConsumer<int[], SearchStatistics> onSolution) Minimizes the problem using the ACS strategy.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ddolib.common.solver.Solver
constructSolution
-
Constructor Details
-
ACSSolver
Constructs an ACS solver with all required and optional components provided via anAcsModel.Mandatory parameters:
ProblemimplementationFastLowerBoundimplementationVariableHeuristicimplementation
DominanceCheckerimplementationVerbosityLevelfor debug/logging
- Parameters:
model- Provides all parameters needed to configure the solver
-
-
Method Details
-
minimize
public Solution minimize(Predicate<SearchStatistics> limit, BiConsumer<int[], SearchStatistics> onSolution) Minimizes the problem using the ACS strategy.- Specified by:
minimizein interfaceSolver- Parameters:
limit- a predicate to stop the search based on currentSearchStatisticsonSolution- a consumer invoked on each new solution found (solution array and statistics)- Returns:
- final
SearchStatisticsof the search
-
bestValue
Returns the value of the best solution found, if any. -
bestSolution
Returns the set of decisions corresponding to the best solution found, if any.- Specified by:
bestSolutionin interfaceSolver- Returns:
Optionalcontaining the set ofDecisionobjects or empty if none found
-