Interface Solver

All Known Implementing Classes:
AcsSolver, AStarSolver, AwAstarSolver, DdoSolver

public interface Solver
Interface representing a generic solver for no-layered decision diagram based optimization problems.

A solver explores the search space defined by a decision diagram, applies bounds and relaxations, and can return the best solution found along with its value.

Implementations of this interface typically provide algorithms such as:

  • Dynamic programming on decision diagrams
  • A* search
  • Branch-and-bound or anytime search strategies
See Also:
  • Method Details

    • minimize

      Minimizes the objective function according to the solver strategy.
      Parameters:
      limit - a Predicate that can limit or stop the search based on current SearchStatistics
      onSolution - a BiConsumer invoked on each new solution found; receives the solution array and current statistics
      Returns:
      the statistics of the search after completion
    • bestValue

      Optional<Double> bestValue()
      Returns the value of the best solution found so far by this solver, if any.
      Returns:
      the value of the best solution in this decision diagram if there is one
    • bestSolution

      List<Integer> bestSolution()
      Returns the ordered list of labels leading to the best solution from the initial state.
      Returns:
      the ordered list of labels leading to the best solution from the initial state
    • initialSolution

      static Optional<Solution> initialSolution(Model<?> model)
      Returns the initial solution of a model, if it provides a non-empty one.

      Its value is trusted. When the debug mode is enabled, it is checked against Problem.evaluate(List).

      Parameters:
      model - the model providing the initial solution
      Returns:
      the initial solution, or an empty Optional if the model has none
      Throws:
      IllegalArgumentException - in debug mode, if the initial solution is invalid or if its value does not match its evaluation