Class NodeSubProblem<T>

java.lang.Object
org.ddolib.ddo.core.mdd.NodeSubProblem<T>
Type Parameters:
T - the type of state associated with the node

public final class NodeSubProblem<T> extends Object
Encapsulates the association of a node in a decision diagram with its corresponding state and an associated rough lower bound.

This class serves two main purposes:

  • Associates a node with a state during decision diagram compilation, allowing the state to be discarded afterward to save memory.
  • Converts an exact MDD node into a SubProblem, which can then be used in the API for search or optimization.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    double
    The fast lower bound of this node (this node to terminal node)
    double
    The lower bound associated with this node (root to terminal node)
    final Node
    The actual node from the decision diagram graph.
    final T
    The state associated with this node.
  • Constructor Summary

    Constructors
    Constructor
    Description
    NodeSubProblem(T state, double lb, Node node)
    Creates a new NodeSubProblem associating a state with a node and a lower bound.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
     
    double
     
     
    toSubProblem(Set<Decision> pathToRoot)
    Converts this node-state association into an actual SubProblem.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • state

      public final T state
      The state associated with this node.
    • node

      public final Node node
      The actual node from the decision diagram graph.
    • lb

      public double lb
      The lower bound associated with this node (root to terminal node)
    • flb

      public double flb
      The fast lower bound of this node (this node to terminal node)
  • Constructor Details

    • NodeSubProblem

      public NodeSubProblem(T state, double lb, Node node)
      Creates a new NodeSubProblem associating a state with a node and a lower bound.
      Parameters:
      state - the state associated with the node
      lb - the rough lower bound associated with the state-node pair (g cost + fast lower bound)
      node - the node in the decision diagram
  • Method Details

    • toSubProblem

      public SubProblem<T> toSubProblem(Set<Decision> pathToRoot)
      Converts this node-state association into an actual SubProblem.

      The resulting SubProblem incorporates the path of decisions from the root to this node, updates the lower bound based on the node's value and suffix, and can be used directly in search or optimization routines.

      Parameters:
      pathToRoot - the set of decisions forming the path from the root to this node
      Returns:
      a SubProblem representing this node-state association
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getValue

      public double getValue()
    • getLb

      public double getLb()