|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jopt.csp.spi.search.tree.DeltaStateManager
State manager that records state of search tree using deltas within choicepoint stack.
Design Notes
The original implementation of this search was based upon a class named
SearchNodeLight
which only stored the delta of the changes
from the parent node that was contained in the choicepoint stack. Upon
returning to this child, the delta could be pushed back onto the stack.
This was considered to be a better solution than storing the entire
state of the problem, but still had the disadvantage of using a lot
of memory when the problem was quit large. Because of this limitation,
much thought was put into creating the RecalculatingStateManager
which uses a minimal amount of memory, but has extra overhead required
to perform the same work as done before if we wanted to move to another
node.
This type of state management requires that a search tree be crawled
from parent to child and child to parent; it does not allow for a jump
directly from one node to another. This state manager can only be used with
the CrawlingSearchTree
.
ProblemStateManager
,
RecalculatingStateManager
,
CrawlingSearchTree
Constructor Summary | |
DeltaStateManager(ConstraintStore store)
Basic constructor |
Method Summary | |
void |
ascendedToClosedNode(TreeNode previous,
TreeNode current)
Called by search tree when the current node is changed to a parent node of existing current node Node must have previously been activated. |
void |
descendedToClosedNode(TreeNode previous,
TreeNode current)
Called by search tree when the current node is changed to a child node of existing current node. |
void |
descendedToOpenNode(TreeNode previous,
TreeNode current)
Called by search tree when the node that is being moved to is a node that has not yet been activated |
void |
jumpedToClosedNode(TreeNode previous,
TreeNode current)
Called by search tree when the current node in the tree has changed from one node to another and no direct relationship between the two nodes may exist Node must have previously been activated. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DeltaStateManager(ConstraintStore store)
store
- the ConstraintStore
associated with this problemMethod Detail |
public void descendedToClosedNode(TreeNode previous, TreeNode current)
TreeStateManager
descendedToClosedNode
in interface TreeStateManager
previous
- Node that was current in treecurrent
- Node that is now current in treepublic void ascendedToClosedNode(TreeNode previous, TreeNode current)
TreeStateManager
ascendedToClosedNode
in interface TreeStateManager
previous
- Node that was current in treecurrent
- Node that is now current in treepublic void descendedToOpenNode(TreeNode previous, TreeNode current)
TreeStateManager
descendedToOpenNode
in interface TreeStateManager
previous
- Node that was current in treecurrent
- Node that is now current in treepublic void jumpedToClosedNode(TreeNode previous, TreeNode current)
TreeStateManager
jumpedToClosedNode
in interface TreeStateManager
previous
- Node that was current in treecurrent
- Node that is now current in tree
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |