Ejemplo n.º 1
0
        private void RunTest(string ProblemPath)
        {
            string             main_path       = ProblemPath;
            string             filePathProblem = main_path + "p.pddl";
            string             filePathDomain  = main_path + "d.pddl";
            Domain             d          = Parser.ParseDomain(filePathDomain, "rover");
            Problem            p          = Parser.ParseProblem(filePathProblem, d);
            IterativeMAPlanner ma_planner = new IterativeMAPlanner(d, p, SDRPlanner.Planners.FF);
            var result = ma_planner.Plan();

            foreach (var res in result)
            {
                string plan = PlanTreePrinter.Print(res.Value.Plan);
                File.WriteAllText(main_path + "plan_" + res.Key.Name + ".txt", plan);
            }
            bool isValid = CheckMAPlan.IsValid(result);

            Console.WriteLine("Is valid? " + isValid);
            Console.WriteLine("Done");
        }
Ejemplo n.º 2
0
        public void RunPP_TableMoving_TestT2()
        {
            string             main_path       = Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.Parent.FullName + @"\PlanningProblems\TableMoving\T2\";
            string             filePathProblem = main_path + "p.pddl";
            string             filePathDomain  = main_path + "d.pddl";
            Domain             d          = Parser.ParseDomain(filePathDomain, "agent");
            Problem            p          = Parser.ParseProblem(filePathProblem, d);
            IterativeMAPlanner ma_planner = new IterativeMAPlanner(d, p, SDRPlanner.Planners.FF);
            var result = ma_planner.Plan();

            foreach (var res in result)
            {
                string plan = PlanTreePrinter.Print(res.Value.Plan);
                File.WriteAllText(main_path + "plan_" + res.Key.Name + ".txt", plan);
            }
            bool isValid = CheckMAPlan.IsValid(result);

            Console.WriteLine("Is valid? " + isValid);
            Console.WriteLine("Done");
        }