| OCR Text |
Show 71 modified by constraint satisfaction are not saved in the history except for the 'current' solution. We remember only how a previous solution derived a set of values, not the derived values. A side effect of the depth first search is that the plans are really paths in a tree which represents the search space. Some plans may over1ap so there can be some space savings. 9.2 Algorithms. The rest of this chapter describes the algorithms which can be used to satisfy Constraint Kernels, 9.2.1 FlrstSolutlon FlrstSolutlon is invoked whenever a set of objects is modified or new constraints have been added to the model. flratSolutlon empties the satisfaction phase stack, sets up the initial lists of outdated objects and unsatisfied constraints, and then invokes a function to find a new solution. 1. RootObjectslist is a list of objects requiring recomputation and UnsatisfiedConstraintslist is a list of constraints thought to be unsatisfied. 2. Save RootObjectslist in LastRootObjects so the solution can be reused by redoSolutlon. 3. Invoke ComputeAncestorCount on the objects in RootObjectslist. 4. Empty the satisfaction phase stack. All previous solutions are invalid. 5. Invoke newSolutlon. In lisp: % firatSolution Global LaatRootObjecta; Fluid RootObjecta, SuapectConatrainta; procedure firatSolution( RootObjecta, SuapectConatrainta ); begin end; LaatRootObjecta := RootObjecta; computeAnceatorCount ( RootObjecta ) ; for each Object in RootObjecta do SuapectConatrainta := union( Object->Conatrainta, SuapectConatrainta ); PlanSet :=make PlanSet ( ); newSolution( PlanSet ) |