From db6720974b9ef145b76c76c7c0e09a9d30add481 Mon Sep 17 00:00:00 2001 From: Mojtaba Elahi Date: Sun, 18 Feb 2024 18:42:52 +0200 Subject: [PATCH 1/4] Add preprocessor: EAS (Enhanced Action Splitter) --- planutils/packages/eas/install | 18 ++++++++++++++++++ planutils/packages/eas/manifest.json | 6 ++++++ planutils/packages/eas/run | 18 ++++++++++++++++++ planutils/packages/eas/uninstall | 3 +++ 4 files changed, 45 insertions(+) create mode 100755 planutils/packages/eas/install create mode 100644 planutils/packages/eas/manifest.json create mode 100755 planutils/packages/eas/run create mode 100755 planutils/packages/eas/uninstall diff --git a/planutils/packages/eas/install b/planutils/packages/eas/install new file mode 100755 index 0000000..a19e901 --- /dev/null +++ b/planutils/packages/eas/install @@ -0,0 +1,18 @@ +#!/bin/bash + +if ! (dpkg-query -s pypy3-dev &>/dev/null) +then + if [ "$UID" -ne 0 ] + then + echo "installation requires root access" + exec sudo "$0" "$@" + exit $? + fi + apt install -y pypy3-dev +fi + +git clone git@github.com:melahi/enhanced-action-splitter.git +cd enhanced-action-splitter +pypy3 -m pip install -r requirements.txt +mv split.py split +mv merge_plan.py merge_plan diff --git a/planutils/packages/eas/manifest.json b/planutils/packages/eas/manifest.json new file mode 100644 index 0000000..d81439c --- /dev/null +++ b/planutils/packages/eas/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "Enhanced Action Splitter (EAS)", + "description": "Enhanced Action Splitter (EAS) efficiently splits PDDL action schemas into smaller actions suitable for grounding. This is particularly helpful when the number of grounded actions for action schemas becomes too large for grounding-based planners to handle, effectively enabling them to solve problems they otherwise couldn't.", + "install-size": "920K", + "dependencies": [] +} diff --git a/planutils/packages/eas/run b/planutils/packages/eas/run new file mode 100755 index 0000000..9de0f2a --- /dev/null +++ b/planutils/packages/eas/run @@ -0,0 +1,18 @@ +#!/bin/bash + + +if [[ "$1" == "" || "$1" == "-h" || "$1" == "--help" || "$1" == "help" ]] +then + echo + echo "eas [help|]" + echo + echo " can be:" + echo " split: Produces the split version of the problem instance." + echo " merge_plan: Merges the plan for the split instance to construct a solution for the original problem" + echo + echo "To get specific help for :" + echo "eas -h" + echo +else + $(dirname "$0")/enhanced-action-splitter/"$1" ${@:2} +fi diff --git a/planutils/packages/eas/uninstall b/planutils/packages/eas/uninstall new file mode 100755 index 0000000..8fe8e46 --- /dev/null +++ b/planutils/packages/eas/uninstall @@ -0,0 +1,3 @@ +#!/bin/bash + +rm -rf enhanced-action-splitter/ From 7984bf4b0fc7ef3d234f8eb26d20dcaac484f294 Mon Sep 17 00:00:00 2001 From: Mojtaba Elahi Date: Sun, 18 Feb 2024 21:06:47 +0200 Subject: [PATCH 2/4] EAS: Fix GitHub URL --- planutils/packages/eas/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planutils/packages/eas/install b/planutils/packages/eas/install index a19e901..f2eec35 100755 --- a/planutils/packages/eas/install +++ b/planutils/packages/eas/install @@ -11,7 +11,7 @@ then apt install -y pypy3-dev fi -git clone git@github.com:melahi/enhanced-action-splitter.git +git clone https://github.com/melahi/enhanced-action-splitter.git cd enhanced-action-splitter pypy3 -m pip install -r requirements.txt mv split.py split From 07ff731e8250ea85a2ce25ea6442719cb9c604aa Mon Sep 17 00:00:00 2001 From: Mojtaba Elahi Date: Sun, 18 Feb 2024 21:19:46 +0200 Subject: [PATCH 3/4] EAS: Fix apt issue in install script --- planutils/packages/eas/install | 1 + 1 file changed, 1 insertion(+) diff --git a/planutils/packages/eas/install b/planutils/packages/eas/install index f2eec35..dd2ca1e 100755 --- a/planutils/packages/eas/install +++ b/planutils/packages/eas/install @@ -8,6 +8,7 @@ then exec sudo "$0" "$@" exit $? fi + apt update apt install -y pypy3-dev fi From 92ce03c3ef2196c6a2d40852b4748c4798207222 Mon Sep 17 00:00:00 2001 From: Mojtaba Elahi Date: Sun, 18 Feb 2024 22:09:12 +0200 Subject: [PATCH 4/4] EAS: Fix issue in installing pandas dependency --- planutils/packages/eas/install | 1 + 1 file changed, 1 insertion(+) diff --git a/planutils/packages/eas/install b/planutils/packages/eas/install index dd2ca1e..3ef2261 100755 --- a/planutils/packages/eas/install +++ b/planutils/packages/eas/install @@ -14,6 +14,7 @@ fi git clone https://github.com/melahi/enhanced-action-splitter.git cd enhanced-action-splitter +pypy3 -m pip install setuptools --upgrade pypy3 -m pip install -r requirements.txt mv split.py split mv merge_plan.py merge_plan