ix.iplan
Class PlanModelComparer
java.lang.Object
ix.iplan.PlanModelComparer
public class PlanModelComparer
- extends java.lang.Object
Compares plans in-place: in their model-managers. Some differences
are allowed on the assumption that the 'original' plan was produced
directly by the automatic planner while the 'copy' was converted
to a Plan object and then loaded into a new model. This class is
intended primarily as a bug-finding aid.
- See Also:
okMissingSuccessor(PNodeEnd, PNodeEnd)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
originalMM
Ip2ModelManager originalMM
copyMM
Ip2ModelManager copyMM
nodeMap
java.util.Map<ActivityItem,ActivityItem> nodeMap
PlanModelComparer
public PlanModelComparer(Ip2ModelManager original,
Ip2ModelManager copy)
compare
public void compare()
throws PlanModelComparer.PlanDifferenceException
- Throws:
PlanModelComparer.PlanDifferenceException
okMissingSuccessor
protected boolean okMissingSuccessor(PNodeEnd copy,
PNodeEnd missing)
- Decides whether it's ok for a node-end to be missing a successor
in the copy. The idea here is (1) that in the original, a node was
expanded, then ensureChildrenLinkedToParent was called, and then
some planning was done, which could add more links which, if they'd
beed there originally -- as they will be in the copy -- would have
let ensureChildrenLinkedToParent add fewer links. So when
ensureChildrenLinkedToParent is called by the PlanInstaller,
it does in fact add fewer links. And (2) that begin_of parent
--> end_of child links can be added because a precondition
of the parent was affected by an effect of the child, or a
begin_of child --> end_of parent might have been added because
a precondition of the child was affected by one of the parent's
effects, but those links are implied by the ensureChildrenLinkedToParent
ones.