Пример #1
0
        public static IPlan CreateInitialPlan(List <IPredicate> Initial, List <IPredicate> Goal)
        {
            var initialPlan = new PlanSchedule(new Plan(new State(Initial) as IState, new State(Goal) as IState), new List <Tuple <IPlanStep, IPlanStep> >(), new List <Tuple <int, int> >(), new DecompositionLinks());

            foreach (var goal in Goal)
            {
                initialPlan.Flaws.Add(initialPlan, new OpenCondition(goal, initialPlan.GoalStep as IPlanStep));
            }
            initialPlan.Orderings.Insert(initialPlan.InitialStep, initialPlan.GoalStep);
            return(initialPlan);
        }
Пример #2
0
        public new System.Object Clone()
        {
            var basePlanClone = base.Clone() as Plan;
            var newPlan       = new PlanSchedule(basePlanClone, new HashSet <Tuple <IPlanStep, IPlanStep> >(Cntgs.edges), new HashSet <Tuple <int, int> >(MM.Merges), DeLinks.Clone())
            {
                Hdepth  = hdepth,
                Decomps = Decomps
            };

            newPlan.id = id + newPlan.id;
            return(newPlan);
        }