VariableHeuristic

org.ddolibscala.tools.ddo.heuristics.variables.VariableHeuristic
trait VariableHeuristic[T] extends VariableHeuristic[T]

Defines a strategy for selecting the next decision variable to branch on during the construction or exploration of a decision diagram.

A VariableHeuristic is responsible for determining, at each expansion step, which variable should be fixed next among the remaining unassigned ones. It can use information from the current layer’s states to guide this choice.

Heuristics of this kind are essential in dynamic programming, search trees, and decision diagrams, as they influence the structure of the diagram and the efficiency of the exploration process. A well-chosen variable ordering can drastically reduce the diagram width and computation time.

Type parameters

T

the type representing the problem state

Attributes

Graph
Supertypes
trait VariableHeuristic[T]
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def next(variables: Iterable[Int], states: Iterable[T]): Int

Selects the next variable to branch on given the current set of unassigned variables and the states of the next layer.

Selects the next variable to branch on given the current set of unassigned variables and the states of the next layer.

The heuristic can analyze the provided states to estimate which variable will best separate or discriminate the search space, improving pruning or convergence. If no meaningful decision can be made, null may be returned to indicate that the choice should be deferred or decided by a default mechanism.

Value parameters

states

an iterator over the current states in the next layer

variables

the set of variable indices that are still unassigned

Attributes

Returns

the index of the next variable to branch on, or null if no decision can be made at this point

Concrete methods

final override def nextVariable(variables: Set[Integer], states: Iterator[T]): Integer

Used by the solver. Converts the input and output of next from Java to Scala and vice versa.

Used by the solver. Converts the input and output of next from Java to Scala and vice versa.

Attributes

Definition Classes
VariableHeuristic