Skip to content

Use PDDL to model an emergency services logistics problem and solve it using different planners.

Notifications You must be signed in to change notification settings

edoardobarba/Automated_Planning_project

Repository files navigation

Automated_Planning_project

This repository is a student project developed by Edoardo Barba and Mostafa Haggag for the "Automated Planning: Theory and Practical" course of the Master in Artificial Intelligent Systems at the University of Trento, a.y. 2022-2023.

Format

In this section we describe how the files are organised for the repository. Please find the tree below.

Automated_Planning_project/
├── assignment.pdf
├── plansys2_problem5
│   ├── CMakeLists.txt
│   ├── launch
│   │   ├── example_1
│   │   ├── example_2
│   │   └── plansys2_problem5_launch.py
│   ├── package.xml
│   ├── pddl
│   │   └── domain4.pddl
│   └── src
│       ├── load_box_action_node.cpp
│       ├── move_robot_action_node.cpp
│       ├── pickdown_food_action_node.cpp
│       ├── pickdown_medicine_action_node.cpp
│       ├── pickdown_tool_action_node.cpp
│       ├── pick_item_from_box_action_node.cpp
│       ├── pick_up_item_from_location_action_node.cpp
│       ├── put_item_in_box_action_node.cpp
│       └── unload_box_action_node.cpp
├── problem1
│   ├── domain1.pddl
│   ├── problem1_instance1.pddl
│   ├── problem1_instance1_results.md
│   ├── problem1_instance2.pddl
│   ├── problem1_instance2_results.md
├── problem2
│   ├── domain2.pddl
│   ├── problem2_instance1.pddl
│   ├── problem2_instance1_results.md
│   ├── problem2_instance2.pddl
│   └── problem2_instance2_results.md
├── problem3
│   ├── domain3.hddl
│   ├── example_1.hddl
│   ├── example_1.txt
│   ├── example_1_unor.hddl
│   ├── example_1_unor.txt
│   ├── example_2.hddl
│   ├── example_2.txt
│   ├── example_2_unor.hddl
│   └── example_2_unor.txt
├── problem4
│   ├── domain4.pddl
│   ├── example_1_p1.txt
│   ├── example_1_p2.txt
│   ├── example_1_p3.txt
│   ├── example_1.pddl
│   ├── example_2_p1.txt
│   ├── example_2_p2.txt
│   ├── example_2_p3.txt
│   └── example_2.pddl
├── README.md
└── report.pdf

8 directories, 47 files

Problem 1 Commands

Instance 1

  • We used planutils and downward.
planutils run ff domain1.pddl problem1_instance1.pddl 
planutils run lama domain1.pddl problem1_instance1.pddl 
planutils run lama-first domain1.pddl problem1_instance1.pddl 
./DOWNWARD/fast-downward.py /domain1.pddl /problem1_instance1.pddl --search "astar(goalcount)"

Instance 2

  • Put the planner DOWNWARD in the directory of problem 1.
  • Run these commands.
planutils run ff domain1.pddl problem1_instance2.pddl 
planutils run lama domain1.pddl problem1_instance2.pddl 
planutils run lama-first domain1.pddl problem1_instance2.pddl 
./DOWNWARD/fast-downward.py /domain1.pddl /problem1_instance2.pddl --search "astar(goalcount)"

Problem 2 Commands

  • Put the planner ENHSP in the directory of problem 1.
  • Run these commands.

Instance 1

java -jar ../ENHSP-Public-enhsp-20/enhsp-dist/enhsp.jar -o domain2.pddl -f problem2_instance1.pddl -planner sat-hadd
java -jar ../ENHSP-Public-enhsp-20/enhsp-dist/enhsp.jar -o domain2.pddl -f problem2_instance1.pddl -planner opt-blind
java -jar ../ENHSP-Public-enhsp-20/enhsp-dist/enhsp.jar -o domain2.pddl -f problem2_instance1.pddl -planner opt-hmax

Instance 2

java -jar ../ENHSP-Public-enhsp-20/enhsp-dist/enhsp.jar -o domain2.pddl -f problem2_instance2.pddl -planner sat-hadd
java -jar ../ENHSP-Public-enhsp-20/enhsp-dist/enhsp.jar -o domain2.pddl -f problem2_instance2.pddl -planner opt-blind
java -jar ../ENHSP-Public-enhsp-20/enhsp-dist/enhsp.jar -o domain2.pddl -f problem2_instance2.pddl -planner opt-hmax

Problem 3 Commands

  • Put the planner PANADAS in the directory of problem 3.
  • Run these commands.
java -jar PANDA.jar -parser hddl domain3.hddl example_1.hddl 
java -jar PANDA.jar -parser hddl domain3.hddl example_1_unor.hddl
java -jar PANDA.jar -parser hddl domain3.hddl example_2.hddl 
java -jar PANDA.jar -parser hddl domain3.hddl example_2_unor.hddl 

Problem 4 Commands

Command 1

planutils run optic "-N  domain4.pddl example_1.pddl" >> example_1_p1.txt
planutils run optic "-N  domain4.pddl example_2.pddl" >> example_2_p1.txt

Command 2

planutils run optic "-N -W1,1 domain4.pddl example_1.pddl" >> example_1_p2.txt
planutils run optic "-N -W1,1 domain4.pddl example_2.pddl" >> example_2_p2.txt

Command 3

planutils run optic "-N -E -W1,1 domain4.pddl example_1.pddl" >> example_1_p3.txt
planutils run optic "-N -E -W1,1 domain4.pddl example_2.pddl" >> example_2_p3.txt

Problem 5 Commands

  • Open 2 terminals
  • Change the directory /Automated_Planning_project/plansys2_problem5 in both of them.
  • Run the following commands to source plansys2 and ros2 and build the problem 5 package:
source /opt/ros/humble/setup.bash
source plansys2_ws/install/setup.bash
colcon build --packages-select plansys2_problem5
source install/setup.bash
  • Run in the first terminal this command to run the Python node:
ros2 launch plansys2_problem5 plansys2_problem5_launch.py
  • Run in the second terminal this command to run Plansys2 terminal
ros2 run plansys2_terminal plansys2_terminal
  • In plansys2 terminal, run the following commands to run example 1:
source launch/example_1
get plan
run
  • In plansys2 terminal, run the following commands to run example 2:
source launch/example_2
get plan
run

About

Use PDDL to model an emergency services logistics problem and solve it using different planners.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published