public Plan(Operator _initial, Operator _goal) { steps = new List <IPlanStep>(); causalLinks = new List <CausalLink <IPlanStep> >(); orderings = new Graph <IPlanStep>(); flaws = new Flawque(); decomplinks = new DecompositionLinks(); initial = new State(_initial.Effects); goal = new State(_goal.Preconditions); initialStep = new PlanStep(_initial); goalStep = new PlanStep(_goal); id = System.Threading.Interlocked.Increment(ref Counter).ToString(); }
// Used when cloning a plan: <S, O, L, D>, F public Plan(List <IPlanStep> steps, IState initial, IState goal, IPlanStep initialStep, IPlanStep goalStep, Graph <IPlanStep> orderings, List <CausalLink <IPlanStep> > causalLinks, DecompositionLinks dlinks, Flawque flaws) { this.steps = steps; this.causalLinks = causalLinks; this.orderings = orderings; this.decomplinks = dlinks; this.flaws = flaws; this.initial = initial; this.goal = goal; this.initialStep = initialStep; this.goalStep = goalStep; id = System.Threading.Interlocked.Increment(ref Counter).ToString(); }
public Plan(IState _initial, IState _goal) { steps = new List <IPlanStep>(); causalLinks = new List <CausalLink <IPlanStep> >(); orderings = new Graph <IPlanStep>(); decomplinks = new DecompositionLinks(); flaws = new Flawque(); initial = _initial; goal = _goal; initialStep = new PlanStep(new Operator("initial", new List <IPredicate>(), initial.Predicates)); goalStep = new PlanStep(new Operator("goal", goal.Predicates, new List <IPredicate>())); id = System.Threading.Interlocked.Increment(ref Counter).ToString(); }
public Plan() { // S steps = new List <IPlanStep>(); // O orderings = new Graph <IPlanStep>(); // L causalLinks = new List <CausalLink <IPlanStep> >(); // D decomplinks = new DecompositionLinks(); // F flaws = new Flawque(); // I initial = new State(); // G goal = new State(); // d_i initialStep = new PlanStep(new Operator("initial", new List <IPredicate>(), initial.Predicates)); // d_g goalStep = new PlanStep(new Operator("goal", goal.Predicates, new List <IPredicate>())); id = System.Threading.Interlocked.Increment(ref Counter).ToString(); }
public PlanSchedule(IPlan plan, List <Tuple <IPlanStep, IPlanStep> > cntgs, List <Tuple <int, int> > mm, DecompositionLinks dlinks) : base(plan.Steps, plan.Initial, plan.Goal, plan.InitialStep, plan.GoalStep, plan.Orderings, plan.CausalLinks, plan.Flaws) { Cntgs = new Schedule(cntgs); MM = new MergeManager(mm); DeLinks = dlinks.Clone(); }
public PlanSchedule(IPlan plan, Schedule cntgs, MergeManager mm, DecompositionLinks dlinks) : base(plan.Steps, plan.Initial, plan.Goal, plan.InitialStep, plan.GoalStep, plan.Orderings, plan.CausalLinks, plan.Flaws) { Cntgs = cntgs; MM = mm; DeLinks = dlinks; }
public PlanSchedule() : base() { Cntgs = new Schedule(); MM = new MergeManager(); DeLinks = new DecompositionLinks(); }