Interface Solver

All Known Implementing Classes:
ACSSolver, AStarSolver, AwAstarSolver, ExactSolver, LNSSolver, SequentialSolver

public interface Solver
Interface representing a generic solver for 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

      Solution minimize(Predicate<SearchStatistics> limit, BiConsumer<int[],SearchStatistics> onSolution)
      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 in this decision diagram if there is one
    • bestSolution

      Optional<Set<Decision>> bestSolution()
      Returns the set of decisions that lead to the best solution found by this solver, if any.
      Returns:
      an Optional containing the set of Decision objects representing the best solution, or empty if no solution exists
    • constructSolution

      default int[] constructSolution(Set<Decision> decisions)
      Constructs an array representing the values assigned to each variable from a set of decisions.
      Parameters:
      decisions - a set of Decision objects representing variable assignments
      Returns:
      an array t such that t[i] is the assigned value of variable i, or an empty array if the solution does not exist