Package org.ddolib.ddo.core.mdd
Class NodeSubProblem<T>
java.lang.Object
org.ddolib.ddo.core.mdd.NodeSubProblem<T>
- Type Parameters:
T- the type of state associated with the node
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 -
Constructor Summary
ConstructorsConstructorDescriptionNodeSubProblem(T state, double lb, Node node) Creates a new NodeSubProblem associating a state with a node and a lower bound. -
Method Summary
Modifier and TypeMethodDescriptiondoublegetLb()doublegetValue()toString()toSubProblem(Set<Decision> pathToRoot) Converts this node-state association into an actualSubProblem.
-
Field Details
-
state
The state associated with this node. -
node
The actual node from the decision diagram graph. -
lb
public double lbThe lower bound associated with this node (root to terminal node) -
flb
public double flbThe fast lower bound of this node (this node to terminal node)
-
-
Constructor Details
-
NodeSubProblem
Creates a new NodeSubProblem associating a state with a node and a lower bound.- Parameters:
state- the state associated with the nodelb- 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
Converts this node-state association into an actualSubProblem.The resulting
SubProblemincorporates 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
SubProblemrepresenting this node-state association
-
toString
-
getValue
public double getValue() -
getLb
public double getLb()
-