Пример #1
0
        public void Insert(IPlanStep newStep)
        {
            steps.Add(newStep);
            orderings.Insert(InitialStep, newStep);
            orderings.Insert(newStep, GoalStep);

            // Add new flaws
            foreach (var pre in newStep.OpenConditions)
            {
                Flaws.Add(this, new OpenCondition(pre, newStep));
            }
        }
Пример #2
0
        public void InsertPrimitive(IPlanStep newStep)
        {
            steps.Add(newStep);
            orderings.Insert(InitialStep, newStep);
            orderings.Insert(newStep, GoalStep);

            // Add new flaws
            foreach (var pre in newStep.OpenConditions)
            {
                Flaws.Add(this, new OpenCondition(pre, newStep));
            }

            //Flaws.UpdateFlaws(this, newStep);
            // Don't update open conditions until this newStep has ordering wrt s_{need}

            // Don't check for threats when inserting.
        }