Class AcsSolver<T>
java.lang.Object
org.ddolib.nolayer.solving.acs.core.solver.AcsSolver<T>
- Type Parameters:
T- the type of states handled by the model
- All Implemented Interfaces:
Solver
Implementation of an Anytime Column Search (ACS) solver for no-layer decision diagram-based
optimization problems.
The solver uses a lower bound and dominance rules 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).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the ordered list of labels leading to the best solution from the initial state.Returns the value of the best solution found so far by this solver, if any.minimize(Predicate<SearchStatistics> limit, BiConsumer<List<Integer>, SearchStatistics> onSolution) Minimizes the objective function according to the solver strategy.
-
Constructor Details
-
AcsSolver
Creates a new ACS solver for the given model.- Parameters:
model- the model to solve
-
-
Method Details
-
minimize
public Solution minimize(Predicate<SearchStatistics> limit, BiConsumer<List<Integer>, SearchStatistics> onSolution) Minimizes the objective function according to the solver strategy.When the memory runs out, either because the JVM throws an
OutOfMemoryErroror because the frontier reaches the size given toStopCriterion.maxFrontierSize(int), the search stops and returns the best solution found so far with the statusSearchStatus.MEMOUT.- Specified by:
minimizein interfaceSolver- Parameters:
limit- aPredicatethat can limit or stop the search based on currentSearchStatisticsonSolution- aBiConsumerinvoked on each new solution found; receives the solution array and current statistics- Returns:
- the statistics of the search after completion
-
bestValue
Description copied from interface:SolverReturns the value of the best solution found so far by this solver, if any. -
bestSolution
Description copied from interface:SolverReturns the ordered list of labels leading to the best solution from the initial state.- Specified by:
bestSolutionin interfaceSolver- Returns:
- the ordered list of labels leading to the best solution from the initial state
-