diff --git a/.gitignore b/.gitignore index b6e4761..2838506 100644 --- a/.gitignore +++ b/.gitignore @@ -1,129 +1,134 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -pip-wheel-metadata/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -.python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +.ipynb_checkpoints +unified-planning +build +*.egg-info \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..13a45af --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.linting.enabled": false +} \ No newline at end of file diff --git a/Notebooks/debugger.ipynb b/Notebooks/debugger.ipynb new file mode 100644 index 0000000..90e9c72 --- /dev/null +++ b/Notebooks/debugger.ipynb @@ -0,0 +1,2083 @@ +{ + "cells": [ + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Debugging a planning process with SIADEX\n", + "\n", + "SIADEX is an Hierarchical Task Network (HTN) planner with its own planning language (HPDL), but its integration with UPF supports also domains and problem written in HDDL and with the UPF framework.\n", + "\n", + "The [SIADEX planner](https://github.com/IgnacioVellido/HPDL-Planner) has an especial operation mode that works like a debugger, where users can control the planning process, evaluate conditions, watch/alter the planning live state and attach breakpoints. In this notebook we will show the interactive debugging mode that is provided by the SIADEX UPF integration.\n", + "\n", + "In case you are not familiar with what SIADEX or hierarchical planning is, take a look at the [SIADEX](siadex.ipynb) notebook or the [Wikipedia page](https://en.wikipedia.org/wiki/Hierarchical_task_network)." + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "First, we will need to install SIADEX and register it as an UPF engine" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [], + "source": [ + "%%capture\n", + "# Install UPF\n", + "!pip install ../unified-planning" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [], + "source": [ + "%%capture\n", + "# Install SIADEX integration\n", + "!pip install ..\n", + "\n", + "# TODO: Change for pip link\n", + "# !pip install up-siadex" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": {}, + "outputs": [], + "source": [ + "from up_siadex import SIADEXEngine\n", + "\n", + "import unified_planning as up\n", + "from unified_planning.shortcuts import *\n", + "from unified_planning.model.htn.hierarchical_problem import HierarchicalProblem, Task, Method\n", + "from unified_planning.io import PDDLReader\n", + "from unified_planning.io import PDDLWriter\n", + "from unified_planning.io.hpdl.hpdl_reader import HPDLReader\n", + "from unified_planning.io.hpdl.hpdl_writer import HPDLWriter\n", + "from unified_planning.engines.results import PlanGenerationResultStatus\n", + "\n", + "# Register SIADEX\n", + "env = up.environment.get_env()\n", + "env.factory.add_engine('siadex', __name__, \"SIADEXEngine\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Creating a planning problem\n", + "\n", + "First we need to create a UPF Problem instance that we want to solve. In this case, we will read the HDDL __HTN-transport__ domain, which describes how a fleet of trucks should move packages across multiple cities" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": {}, + "outputs": [], + "source": [ + "reader = PDDLReader()\n", + "problem = reader.parse_problem(\"../unified-planning/unified_planning/test/pddl/htn-transport/domain.hddl\",\n", + " \"../unified-planning/unified_planning/test/pddl/htn-transport/problem.hddl\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "For this specific instance, we have vehicles and locations. The goal is to move package-0 to city-loc-0 and package-1 to city-loc-2 using the vehicles.\n", + "\n", + "We can see the goal via the __task_network__ attribute of our problem instance." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "task network {\n", + " subtasks = [\n", + " _t11: deliver(package-0, city-loc-0)\n", + " time_constraints = [\n", + " ]\n", + " _t12: deliver(package-1, city-loc-2)\n", + " time_constraints = [\n", + " ]\n", + " ]\n", + "}" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "problem.task_network" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Debugging\n", + "\n", + "Now we are ready to plan. To start our debugging mode, we create an instance of the SIADEX planner using the OneShotPlanner interface and call the __debugger__ method.\n", + "This will return an class instance with methods that will work as an interface between the user and the SIADEX internal debugger." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[96m\u001b[1mNOTE: To disable printing of planning engine credits, add this line to your code: `up.shortcuts.get_env().credits_stream = None`\n", + "\u001b[0m\u001b[96m *** Credits ***\n", + "\u001b[0m\u001b[96m * In operation mode `OneshotPlanner` at line 1 of `/tmp/ipykernel_395/182887877.py`, \u001b[0m\u001b[96myou are using the following planning engine:\n", + "\u001b[0m\u001b[96m * Engine name: SIADEX\n", + " * Developers: UGR SIADEX Team\n", + "\u001b[0m\u001b[96m * Description: \u001b[0m\u001b[96mSIADEX ENGINE\u001b[0m\u001b[96m\n", + "\u001b[0m\u001b[96m\n", + "\u001b[0mdebug:> break (siadex_debugger_stop )\n", + "__________________________________________________\n", + "\n", + "(*** 1 ***) Initializating planning process...\n", + "(*** 1 ***) Initializating python...\n", + "(*** 1 ***) Depth: 1\n", + "(*** 1 ***) Selecting task to expand from agenda.\n" + ] + } + ], + "source": [ + "siadex = OneshotPlanner(name='siadex')\n", + "debugger = siadex.debugger()\n", + "debugger.debug(problem)" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To start the debugging process, we call the __debug__ method with the UPF problem that we want to solve. Through the rest of this notebook we will show the available commands and the output of each one. \n", + "\n", + "There are three ways of advancing through the planner process. We can use the __next()__ or __nexp()__ methods to move one step or move until the next task is found, respectively; or we can use __continue_run()__ to forward until the next breakpoint or the planning process ends." + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Planner internal state\n", + "\n", + "To get the actual planning state of the debugger we can use the method __state()__. This returns the list of fluents that are currently active and true." + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[road(city-loc-0, city-loc-1),\n", + " road(city-loc-1, city-loc-0),\n", + " road(city-loc-1, city-loc-2),\n", + " road(city-loc-2, city-loc-1),\n", + " at(package-0, city-loc-1),\n", + " at(package-1, city-loc-1),\n", + " at(truck-0, city-loc-2),\n", + " capacity(truck-0, capacity-1),\n", + " capacity-predecessor(capacity-0, capacity-1)]" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "state = debugger.state()\n", + "state" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Planner agenda\n", + "\n", + "The agenda represents the actual process of the debugger expanding nodes. It returns a dict of nodes, where each node has the following information:\n", + "\n", + " - __subtask__: The task/action that is susceptible to be expanded with the instanced object or named variables.\n", + " - __status__: One of the values in ``. A task/action is _closed_ when it has been either decomposed or included in the plan, _pending_ if it is part of a task network that is being decomposed and otherwise is in status _agenda_.\n", + " - __type__: Displays the type of the node, _unexpanded_ refers to compound tasks, and _action_ refers to a primitive action.\n", + " - __successors__: List of children of the current node.\n", + "\n", + "An special breakpoint and action __(siadex_debugger_stop)__ have been automatically added. This is needed for the correct operation of the debugger. The breakpoint and action does not interfere with the original problem and solution and can be ignored. " + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{0: 0: (root ) \n", + " status: root, expanded: root, \n", + " successors: [1, 2, 3],\n", + " 1: 1: (deliver [package-0, city-loc-0]) \n", + " status: agenda, expanded: unexpanded, \n", + " successors: [],\n", + " 2: 2: (deliver [package-1, city-loc-2]) \n", + " status: agenda, expanded: unexpanded, \n", + " successors: [],\n", + " 3: 3: (siadex_debugger_stop []) \n", + " status: agenda, expanded: unexpanded, \n", + " successors: []}" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "nodes = debugger.agenda()\n", + "nodes" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "_t14: deliver(package-0, city-loc-0)\n", + " time_constraints = [\n", + " ]" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "nodes[1].subtask" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "With agenda_tree() we can take a look to the agenda in a more comfortable way." + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0: (root ) status: root, expanded: root\n", + " 1: (deliver [package-0, city-loc-0]) status: agenda, expanded: unexpanded\n", + " 2: (deliver [package-1, city-loc-2]) status: agenda, expanded: unexpanded\n", + " 3: (siadex_debugger_stop []) status: agenda, expanded: unexpanded\n" + ] + } + ], + "source": [ + "debugger.agenda_tree()" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Advance one step in the debug process. " + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "debug:> nexp\n", + "__________________________________________________\n", + "(*** 1 ***) Expanding: [0] (deliver package_0 city_loc_0)\n", + "\n", + "(*** 1 ***) Selecting a candidate task.\n", + "(*** 1 ***) Found: 1 candidates (left).\n", + " [0] :task (deliver ?p ?l)\n" + ] + } + ], + "source": [ + "debugger.nexp()" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Adding breakpoints\n", + "\n", + "Breakpoints lets us set points where we want the debugger to stop, and then use the continue_run(), next() or nexp() methods to go quickly towards them.\n", + "We can add breakpoints to a fluent, expressions, actions and tasks. \n", + "\n", + "First we get a fluent and objects from the original problem to work with them." + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(bool road[l1=location, l2=location],\n", + " city-loc-0,\n", + " city-loc-1,\n", + " action drive(vehicle - locatable v, location l1, location l2) {\n", + " preconditions = [\n", + " (at(v, l1) and road(l1, l2))\n", + " ]\n", + " effects = [\n", + " at(v, l1) := false\n", + " at(v, l2) := true\n", + " ]\n", + " simulated effect = None\n", + " })" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "drive = problem.action(\"drive\")\n", + "road = problem.fluent(\"road\")\n", + "city_0 = problem.object(\"city-loc-0\")\n", + "city_1 = problem.object(\"city-loc-1\")\n", + "road, city_0, city_1, drive" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(bool road[l1=location, l2=location], city-loc-0, city-loc-1, city-loc-2)" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "road = problem.fluent(\"road\")\n", + "city_0 = problem.object(\"city-loc-0\")\n", + "city_1 = problem.object(\"city-loc-1\")\n", + "city_2 = problem.object(\"city-loc-2\")\n", + "road, city_0, city_1, city_2" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "With add_break we can define breakpoints where the debugger will stop when exploring" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "debug:> break (road ?l1 ?l2)\n", + "__________________________________________________\n" + ] + }, + { + "data": { + "text/plain": [ + "{0: {'id': 0, 'enabled': True, 'node': '(siadex_debugger_stop)'},\n", + " 1: {'id': 1, 'enabled': True, 'node': '(road ?l1 ?l2)'}}" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "debugger.add_break(road)" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "debug:> break (drive ?v ?l1 ?l2)\n", + "__________________________________________________\n" + ] + }, + { + "data": { + "text/plain": [ + "{0: {'id': 0, 'enabled': True, 'node': '(siadex_debugger_stop)'},\n", + " 1: {'id': 1, 'enabled': True, 'node': '(road ?l1 ?l2)'},\n", + " 2: {'id': 2, 'enabled': True, 'node': '(drive ?v ?l1 ?l2)'}}" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "debugger.add_break(drive)" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "And with enable_break and disable_break, we can enable a disable breakpoints" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{0: {'id': 0, 'enabled': True, 'node': '(siadex_debugger_stop)'},\n", + " 1: {'id': 1, 'enabled': False, 'node': '(road ?l1 ?l2)'},\n", + " 2: {'id': 2, 'enabled': True, 'node': '(drive ?v ?l1 ?l2)'}}" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "debugger.disable_break(1)" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{0: {'id': 0, 'enabled': True, 'node': '(siadex_debugger_stop)'},\n", + " 1: {'id': 1, 'enabled': True, 'node': '(road ?l1 ?l2)'},\n", + " 2: {'id': 2, 'enabled': True, 'node': '(drive ?v ?l1 ?l2)'}}" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "debugger.enable_break(1)" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{0: {'id': 0, 'enabled': True, 'node': '(siadex_debugger_stop)'},\n", + " 1: {'id': 1, 'enabled': True, 'node': '(road ?l1 ?l2)'},\n", + " 2: {'id': 2, 'enabled': True, 'node': '(drive ?v ?l1 ?l2)'}}" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "debugger.list_break()" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Modifying the planner state\n", + "\n", + "The planner state is the set of predicates and fluents that are currently true.\n", + "\n", + "With an expression we can alter the live state of the debugger " + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(not road(city-loc-0, city-loc-1))" + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "f_road = road(city_0, city_1)\n", + "f_road.Not()" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[road(city-loc-0, city-loc-1),\n", + " road(city-loc-1, city-loc-0),\n", + " road(city-loc-1, city-loc-2),\n", + " road(city-loc-2, city-loc-1),\n", + " at(package-0, city-loc-1),\n", + " at(package-1, city-loc-1),\n", + " at(truck-0, city-loc-2),\n", + " capacity(truck-0, capacity-1),\n", + " capacity-predecessor(capacity-0, capacity-1)]" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Actual state\n", + "debugger.state()\n", + "# We can see road(city-loc-0, city-loc-1) on the state" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "With a fluent and the method __apply_effect()__ we can add new clauses or deny from the state " + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[road(city-loc-1, city-loc-0),\n", + " road(city-loc-1, city-loc-2),\n", + " road(city-loc-2, city-loc-1),\n", + " at(package-0, city-loc-1),\n", + " at(package-1, city-loc-1),\n", + " at(truck-0, city-loc-2),\n", + " capacity(truck-0, capacity-1),\n", + " capacity-predecessor(capacity-0, capacity-1)]" + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "debugger.apply_effect(f_road.Not())\n", + "# Deny (road(city-loc-0, city-loc-1))" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[road(city-loc-1, city-loc-0),\n", + " road(city-loc-0, city-loc-1),\n", + " road(city-loc-1, city-loc-2),\n", + " road(city-loc-2, city-loc-1),\n", + " at(package-0, city-loc-1),\n", + " at(package-1, city-loc-1),\n", + " at(truck-0, city-loc-2),\n", + " capacity(truck-0, capacity-1),\n", + " capacity-predecessor(capacity-0, capacity-1)]" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "debugger.apply_effect(f_road)\n", + "# Add (road(city-loc-0, city-loc-1))" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Evaluate preconditions\n", + "\n", + "With the method eval_preconditions() we can evaluate on the actual state the preconditions of an action or fluents. It returns a list of valid parameters for that expression. " + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[{'l1': city-loc-2, 'l2': city-loc-1},\n", + " {'l1': city-loc-1, 'l2': city-loc-2},\n", + " {'l1': city-loc-0, 'l2': city-loc-1},\n", + " {'l1': city-loc-1, 'l2': city-loc-0}]" + ] + }, + "execution_count": 27, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "debugger.eval_preconditions(road)" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[{vehicle - locatable v: truck-0,\n", + " location l1: city-loc-2,\n", + " location l2: city-loc-1}]" + ] + }, + "execution_count": 28, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "debugger.eval_preconditions(drive)" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Avance 10 tasks in the planning process" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "debug:> nexp\n", + "__________________________________________________\n", + "(*** 1 ***) Selecting a method to expand from compound task.\n", + " :task (deliver ?p ?l)\n", + "(*** 1 ***) Found: 1 methods to expand (left).\n", + " [0] \n", + " (:method m_deliver\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (get_to ?v ?l1)\n", + " (load ?v ?l1 ?p)\n", + " (get_to ?v ?l2)\n", + " (unload ?v ?l2 ?p)\n", + " )\n", + " )\n", + "Breakpoint 1 reached.\n", + "debug:> nexp\n", + "__________________________________________________\n", + "(*** 1 ***) Expanding method: m_deliver\n", + "(*** 1 ***) Working in task:\n", + "(:task deliver\n", + " :parameters ( ?p - package ?l - location)\n", + " (:method m_deliver\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (get_to ?v ?l1)\n", + " (load ?v ?l1 package_0)\n", + " (get_to ?v ?l2)\n", + " (unload ?v ?l2 package_0)\n", + " )\n", + " )\n", + ")\n", + "\n", + "(*** 1 ***) Using method: m_deliver\n", + "(*** 1 ***) No preconditions.\n", + "Selecting unification: \n", + "(*** 2 ***) Depth: 2\n", + "(*** 2 ***) Selecting task to expand from agenda.\n", + "Breakpoint 1 reached.\n", + "debug:> nexp\n", + "__________________________________________________\n", + "(*** 2 ***) Expanding: [3] (get_to ?v ?l1)\n", + "\n", + "(*** 2 ***) Selecting a candidate task.\n", + "(*** 2 ***) Found: 1 candidates (left).\n", + " [0] :task (get_to ?v ?l)\n", + "debug:> nexp\n", + "__________________________________________________\n", + "(*** 2 ***) Selecting a method to expand from compound task.\n", + " :task (get_to ?v ?l)\n", + "(*** 2 ***) Found: 3 methods to expand (left).\n", + " [0] \n", + " (:method m_drive_to\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (drive ?v ?l1 ?l2)\n", + " )\n", + " )\n", + " [1] \n", + " (:method m_drive_to_via\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (get_to ?v ?l2)\n", + " (drive ?v ?l2 ?l3)\n", + " )\n", + " )\n", + " [2] \n", + " (:method m_i_am_there\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (noop ?v ?l)\n", + " )\n", + " )\n", + "Breakpoint 1 reached.\n", + "debug:> nexp\n", + "__________________________________________________\n", + "(*** 2 ***) Expanding method: m_drive_to\n", + "(*** 2 ***) Working in task:\n", + "(:task get_to\n", + " :parameters ( ?v - vehicle ?l - location)\n", + " (:method m_drive_to\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (drive ?v ?l1 ?l2)\n", + " )\n", + " )\n", + " (:method m_drive_to_via\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (get_to ?v ?l2)\n", + " (drive ?v ?l2 ?l3)\n", + " )\n", + " )\n", + " (:method m_i_am_there\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (noop ?v ?l)\n", + " )\n", + " )\n", + ")\n", + "\n", + "(*** 2 ***) Using method: m_drive_to\n", + "(*** 2 ***) No preconditions.\n", + "Selecting unification: \n", + "(*** 3 ***) Depth: 3\n", + "(*** 3 ***) Selecting task to expand from agenda.\n", + "Breakpoint 1 reached.\n", + "debug:> nexp\n", + "__________________________________________________\n", + "(*** 3 ***) Expanding: [7] (drive ?v ?l1 ?l2)\n", + "\n", + "(*** 3 ***) Selecting a candidate task.\n", + "(*** 3 ***) Found: 1 candidates (left).\n", + " [0] :action (drive ?v ?l1 ?l2)\n", + "debug:> nexp\n", + "__________________________________________________\n", + "(*** 3 ***) Solving action:\n", + "(:action drive\n", + " :parameters ( ?v - vehicle ?l1 - location ?l2 - location)\n", + " :precondition\n", + " (and\n", + " (and\n", + " (at_ ?v ?l1)\n", + " (road ?l1 ?l2)\n", + " )\n", + "\n", + " )\n", + "\n", + " :effect\n", + " (and\n", + " (not (at_ ?v ?l1))\n", + " (at_ ?v ?l2)\n", + " )\n", + "\n", + ")\n", + "(*** 3 ***) working in action:\n", + "(:action drive\n", + " :parameters ( ?v - vehicle ?l1 - location ?l2 - location)\n", + " :precondition\n", + " (and\n", + " (and\n", + " (at_ ?v ?l1)\n", + " (road ?l1 ?l2)\n", + " )\n", + "\n", + " )\n", + "\n", + " :effect\n", + " (and\n", + " (not (at_ ?v ?l1))\n", + " (at_ ?v ?l2)\n", + " )\n", + "\n", + ")\n", + "\n", + "(*** 3 ***) Found: 1 unification(s) (left). \n", + "Unification [0]:\n", + "?l2 <- city_loc_1\n", + "?l1 <- city_loc_2\n", + "?v <- truck_0\n", + "3 variable subtition(s).\n", + "\n", + "Selecting unification: \n", + "Breakpoint 1 reached.\n", + "debug:> nexp\n", + "__________________________________________________\n", + "(ccc) Performing unification: \n", + "?l2 <- city_loc_1\n", + "?l1 <- city_loc_2\n", + "?v <- truck_0\n", + "3 variable subtition(s).\n", + "\n", + "(ccc) Deleted from state: (at_ truck_0 city_loc_2)\n", + "(ccc) Added to state: (at_ truck_0 city_loc_1)\n", + "(*** 4 ***) Depth: 4\n", + "(*** 4 ***) Selecting task to expand from agenda.\n", + "Breakpoint 1 reached.\n", + "debug:> nexp\n", + "__________________________________________________\n", + "(*** 4 ***) Expanding: [4] (load truck_0 ?l1 package_0)\n", + "\n", + "(*** 4 ***) Selecting a candidate task.\n", + "(*** 4 ***) Found: 1 candidates (left).\n", + " [0] :task (load ?v ?l ?p)\n", + "debug:> nexp\n", + "__________________________________________________\n", + "(*** 4 ***) Selecting a method to expand from compound task.\n", + " :task (load ?v ?l ?p)\n", + "(*** 4 ***) Found: 1 methods to expand (left).\n", + " [0] \n", + " (:method m_load\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (pick_up ?v ?l ?p ?s1 ?s2)\n", + " )\n", + " )\n", + "Breakpoint 1 reached.\n" + ] + } + ], + "source": [ + "debugger.nexp(10)" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "With plan() we can obtain the result plan that has been already discovered " + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[drive(truck-0, city-loc-2, city-loc-1)]" + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "debugger.plan()" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0: (root ) status: root, expanded: root\n", + " 2: (deliver [package-1, city-loc-2]) status: agenda, expanded: unexpanded\n", + " 3: (siadex_debugger_stop []) status: agenda, expanded: unexpanded\n", + " 9: (drive [truck-0, city-loc-2, city-loc-1]) status: pending, expanded: action\n", + " 5: (load [truck-0, l, package-0]) status: pending, expanded: unexpanded\n", + " 6: (get-to [truck-0, l]) status: pending, expanded: unexpanded\n", + " 7: (unload [truck-0, l, package-0]) status: pending, expanded: unexpanded\n" + ] + } + ], + "source": [ + "debugger.agenda_tree()" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "debug:> print agenda\n", + "__________________________________________________\n", + "Succesors:\n", + "[0] 2 3 9 \n", + "[1] 0 \n", + "[2] 0 \n", + "[3] 0 \n", + "[4] 5 \n", + "[5] 6 \n", + "[6] 7 \n", + "[7] 0 \n", + "[8] 5 \n", + "[9] 5 \n", + "Task list: \n", + "[1] (closed) :unexpanded (deliver package_0 city_loc_0)\n", + "[2] (agenda) :unexpanded (deliver package_1 city_loc_2)\n", + "[3] (agenda) :unexpanded (siadex_debugger_stop)\n", + "[4] (closed) :unexpanded (get_to truck_0 ?l1)\n", + "[5] (pending) :unexpanded (load truck_0 ?l1 package_0)\n", + "[6] (pending) :unexpanded (get_to truck_0 ?l2)\n", + "[7] (pending) :unexpanded (unload truck_0 ?l2 package_0)\n", + "[8] (closed) :unexpanded (drive truck_0 city_loc_2 city_loc_1)\n", + "[9] (pending) :action (drive truck_0 city_loc_2 city_loc_1)\n", + "===========\n", + "\n", + "Not explored (2): 2 1\n" + ] + } + ], + "source": [ + "debugger.force_run(\"print agenda\")" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "With __force_run()__ we can directly interact with the debugger using string commands" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "debug:> help break\n", + "__________________________________________________\n", + "Command: `break'. Shortcut `b'\n", + "\n", + "Description: Manages the stablished breakpoints.\n", + "\t`break':\tLists all defined breakpoints.\n", + "\t`break ':\tPrints breakpoint whith given id.\n", + "\t`break ':\tDefines a new breakpoint. can be a task definition or a simple predicate.\n", + "See also: `watch', `disable', `enable'.\n" + ] + } + ], + "source": [ + "debugger.force_run(\"help break\")" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{0: {'id': 0, 'enabled': True, 'node': '(siadex_debugger_stop)'},\n", + " 1: {'id': 1, 'enabled': True, 'node': '(road ?l1 ?l2)'},\n", + " 2: {'id': 2, 'enabled': True, 'node': '(drive ?v ?l1 ?l2)'},\n", + " 3: {'id': 3, 'enabled': True, 'node': '(drive ?v ?l1 ?l2)'}}" + ] + }, + "execution_count": 37, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "debugger.list_break()" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let's disable all the breakpoints" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": {}, + "outputs": [], + "source": [ + "for i,_ in debugger.list_break().items():\n", + " debugger.disable_break(i)" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "With __continue_run()__ we can advance until the next breakpoint or goal is reached" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "debug:> continue\n", + "__________________________________________________\n", + "(*** 5 ***) Expanding: [9] (pick_up truck_0 ?l1 package_0 ?s1 ?s2)\n", + "\n", + "(*** 5 ***) Selecting a candidate task.\n", + "(*** 5 ***) Found: 1 candidates (left).\n", + " [0] :action (pick_up truck_0 ?l1 package_0 ?s1 ?s2)\n", + "(*** 5 ***) Solving action:\n", + "(:action pick_up\n", + " :parameters ( truck_0 ?l1 - location package_0 ?s1 - capacity_number ?s2 - capacity_number)\n", + " :precondition\n", + " (and\n", + " (and\n", + " (at_ truck_0 ?l1)\n", + " (at_ package_0 ?l1)\n", + " (capacity_predecessor ?s1 ?s2)\n", + " (capacity truck_0 ?s2)\n", + " )\n", + "\n", + " )\n", + "\n", + " :effect\n", + " (and\n", + " (not (at_ package_0 ?l1))\n", + " (in package_0 truck_0)\n", + " (capacity truck_0 ?s1)\n", + " (not (capacity truck_0 ?s2))\n", + " )\n", + "\n", + ")\n", + "(*** 5 ***) working in action:\n", + "(:action pick_up\n", + " :parameters ( truck_0 ?l1 - location package_0 ?s1 - capacity_number ?s2 - capacity_number)\n", + " :precondition\n", + " (and\n", + " (and\n", + " (at_ truck_0 ?l1)\n", + " (at_ package_0 ?l1)\n", + " (capacity_predecessor ?s1 ?s2)\n", + " (capacity truck_0 ?s2)\n", + " )\n", + "\n", + " )\n", + "\n", + " :effect\n", + " (and\n", + " (not (at_ package_0 ?l1))\n", + " (in package_0 truck_0)\n", + " (capacity truck_0 ?s1)\n", + " (not (capacity truck_0 ?s2))\n", + " )\n", + "\n", + ")\n", + "\n", + "(*** 5 ***) Found: 1 unification(s) (left). \n", + "Unification [0]:\n", + "?s2 <- capacity_1\n", + "?s1 <- capacity_0\n", + "?l1 <- city_loc_1\n", + "3 variable subtition(s).\n", + "\n", + "Selecting unification: \n", + "(ccc) Performing unification: \n", + "?s2 <- capacity_1\n", + "?s1 <- capacity_0\n", + "?l1 <- city_loc_1\n", + "3 variable subtition(s).\n", + "\n", + "(ccc) Deleted from state: (at_ package_0 city_loc_1)\n", + "(ccc) Added to state: (in package_0 truck_0)\n", + "(ccc) Added to state: (capacity truck_0 capacity_0)\n", + "(ccc) Deleted from state: (capacity truck_0 capacity_1)\n", + "(*** 6 ***) Depth: 6\n", + "(*** 6 ***) Selecting task to expand from agenda.\n", + "(*** 6 ***) Expanding: [5] (get_to truck_0 ?l2)\n", + "\n", + "(*** 6 ***) Selecting a candidate task.\n", + "(*** 6 ***) Found: 1 candidates (left).\n", + " [0] :task (get_to ?v ?l)\n", + "(*** 6 ***) Selecting a method to expand from compound task.\n", + " :task (get_to ?v ?l)\n", + "(*** 6 ***) Found: 3 methods to expand (left).\n", + " [0] \n", + " (:method m_drive_to\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (drive ?v ?l1 ?l2)\n", + " )\n", + " )\n", + " [1] \n", + " (:method m_drive_to_via\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (get_to ?v ?l2)\n", + " (drive ?v ?l2 ?l3)\n", + " )\n", + " )\n", + " [2] \n", + " (:method m_i_am_there\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (noop ?v ?l)\n", + " )\n", + " )\n", + "(*** 6 ***) Expanding method: m_drive_to\n", + "(*** 6 ***) Working in task:\n", + "(:task get_to\n", + " :parameters ( ?v - vehicle ?l - location)\n", + " (:method m_drive_to\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (drive truck_0 ?l1 ?l2)\n", + " )\n", + " )\n", + " (:method m_drive_to_via\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (get_to ?v ?l2)\n", + " (drive ?v ?l2 ?l3)\n", + " )\n", + " )\n", + " (:method m_i_am_there\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (noop ?v ?l)\n", + " )\n", + " )\n", + ")\n", + "\n", + "(*** 6 ***) Using method: m_drive_to\n", + "(*** 6 ***) No preconditions.\n", + "Selecting unification: \n", + "(*** 7 ***) Depth: 7\n", + "(*** 7 ***) Selecting task to expand from agenda.\n", + "(*** 7 ***) Expanding: [11] (drive truck_0 ?l1 ?l2)\n", + "\n", + "(*** 7 ***) Selecting a candidate task.\n", + "(*** 7 ***) Found: 1 candidates (left).\n", + " [0] :action (drive truck_0 ?l1 ?l2)\n", + "(*** 7 ***) Solving action:\n", + "(:action drive\n", + " :parameters ( truck_0 ?l1 - location ?l2 - location)\n", + " :precondition\n", + " (and\n", + " (and\n", + " (at_ truck_0 ?l1)\n", + " (road ?l1 ?l2)\n", + " )\n", + "\n", + " )\n", + "\n", + " :effect\n", + " (and\n", + " (not (at_ truck_0 ?l1))\n", + " (at_ truck_0 ?l2)\n", + " )\n", + "\n", + ")\n", + "(*** 7 ***) working in action:\n", + "(:action drive\n", + " :parameters ( truck_0 ?l1 - location ?l2 - location)\n", + " :precondition\n", + " (and\n", + " (and\n", + " (at_ truck_0 ?l1)\n", + " (road ?l1 ?l2)\n", + " )\n", + "\n", + " )\n", + "\n", + " :effect\n", + " (and\n", + " (not (at_ truck_0 ?l1))\n", + " (at_ truck_0 ?l2)\n", + " )\n", + "\n", + ")\n", + "\n", + "(*** 7 ***) Found: 2 unification(s) (left). \n", + "Unification [0]:\n", + "?l2 <- city_loc_0\n", + "?l1 <- city_loc_1\n", + "2 variable subtition(s).\n", + "\n", + "Unification [1]:\n", + "?l2 <- city_loc_2\n", + "?l1 <- city_loc_1\n", + "2 variable subtition(s).\n", + "\n", + "Selecting unification: \n", + "(ccc) Performing unification: \n", + "?l2 <- city_loc_0\n", + "?l1 <- city_loc_1\n", + "2 variable subtition(s).\n", + "\n", + "(ccc) Deleted from state: (at_ truck_0 city_loc_1)\n", + "(ccc) Added to state: (at_ truck_0 city_loc_0)\n", + "(*** 8 ***) Depth: 8\n", + "(*** 8 ***) Selecting task to expand from agenda.\n", + "(*** 8 ***) Expanding: [6] (unload truck_0 ?l2 package_0)\n", + "\n", + "(*** 8 ***) Selecting a candidate task.\n", + "(*** 8 ***) Found: 1 candidates (left).\n", + " [0] :task (unload ?v ?l ?p)\n", + "(*** 8 ***) Selecting a method to expand from compound task.\n", + " :task (unload ?v ?l ?p)\n", + "(*** 8 ***) Found: 1 methods to expand (left).\n", + " [0] \n", + " (:method m_unload\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (drop ?v ?l ?p ?s1 ?s2)\n", + " )\n", + " )\n", + "(*** 8 ***) Expanding method: m_unload\n", + "(*** 8 ***) Working in task:\n", + "(:task unload\n", + " :parameters ( ?v - vehicle ?l - location ?p - package)\n", + " (:method m_unload\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (drop truck_0 ?l2 package_0 ?s1 ?s2)\n", + " )\n", + " )\n", + ")\n", + "\n", + "(*** 8 ***) Using method: m_unload\n", + "(*** 8 ***) No preconditions.\n", + "Selecting unification: \n", + "(*** 9 ***) Depth: 9\n", + "(*** 9 ***) Selecting task to expand from agenda.\n", + "(*** 9 ***) Expanding: [13] (drop truck_0 ?l2 package_0 ?s1 ?s2)\n", + "\n", + "(*** 9 ***) Selecting a candidate task.\n", + "(*** 9 ***) Found: 1 candidates (left).\n", + " [0] :action (drop truck_0 ?l2 package_0 ?s1 ?s2)\n", + "(*** 9 ***) Solving action:\n", + "(:action drop\n", + " :parameters ( truck_0 ?l2 - location package_0 ?s1 - capacity_number ?s2 - capacity_number)\n", + " :precondition\n", + " (and\n", + " (and\n", + " (at_ truck_0 ?l2)\n", + " (in package_0 truck_0)\n", + " (capacity_predecessor ?s1 ?s2)\n", + " (capacity truck_0 ?s1)\n", + " )\n", + "\n", + " )\n", + "\n", + " :effect\n", + " (and\n", + " (not (in package_0 truck_0))\n", + " (at_ package_0 ?l2)\n", + " (capacity truck_0 ?s2)\n", + " (not (capacity truck_0 ?s1))\n", + " )\n", + "\n", + ")\n", + "(*** 9 ***) working in action:\n", + "(:action drop\n", + " :parameters ( truck_0 ?l2 - location package_0 ?s1 - capacity_number ?s2 - capacity_number)\n", + " :precondition\n", + " (and\n", + " (and\n", + " (at_ truck_0 ?l2)\n", + " (in package_0 truck_0)\n", + " (capacity_predecessor ?s1 ?s2)\n", + " (capacity truck_0 ?s1)\n", + " )\n", + "\n", + " )\n", + "\n", + " :effect\n", + " (and\n", + " (not (in package_0 truck_0))\n", + " (at_ package_0 ?l2)\n", + " (capacity truck_0 ?s2)\n", + " (not (capacity truck_0 ?s1))\n", + " )\n", + "\n", + ")\n", + "\n", + "(*** 9 ***) Found: 1 unification(s) (left). \n", + "Unification [0]:\n", + "?s2 <- capacity_1\n", + "?s1 <- capacity_0\n", + "?l2 <- city_loc_0\n", + "3 variable subtition(s).\n", + "\n", + "Selecting unification: \n", + "(ccc) Performing unification: \n", + "?s2 <- capacity_1\n", + "?s1 <- capacity_0\n", + "?l2 <- city_loc_0\n", + "3 variable subtition(s).\n", + "\n", + "(ccc) Deleted from state: (in package_0 truck_0)\n", + "(ccc) Added to state: (at_ package_0 city_loc_0)\n", + "(ccc) Added to state: (capacity truck_0 capacity_1)\n", + "(ccc) Deleted from state: (capacity truck_0 capacity_0)\n", + "(*** 10 ***) Depth: 10\n", + "(*** 10 ***) Selecting task to expand from agenda.\n", + "(*** 10 ***) Expanding: [1] (deliver package_1 city_loc_2)\n", + "\n", + "(*** 10 ***) Selecting a candidate task.\n", + "(*** 10 ***) Found: 1 candidates (left).\n", + " [0] :task (deliver ?p ?l)\n", + "(*** 10 ***) Selecting a method to expand from compound task.\n", + " :task (deliver ?p ?l)\n", + "(*** 10 ***) Found: 1 methods to expand (left).\n", + " [0] \n", + " (:method m_deliver\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (get_to ?v ?l1)\n", + " (load ?v ?l1 ?p)\n", + " (get_to ?v ?l2)\n", + " (unload ?v ?l2 ?p)\n", + " )\n", + " )\n", + "(*** 10 ***) Expanding method: m_deliver\n", + "(*** 10 ***) Working in task:\n", + "(:task deliver\n", + " :parameters ( ?p - package ?l - location)\n", + " (:method m_deliver\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (get_to ?v ?l1)\n", + " (load ?v ?l1 package_1)\n", + " (get_to ?v ?l2)\n", + " (unload ?v ?l2 package_1)\n", + " )\n", + " )\n", + ")\n", + "\n", + "(*** 10 ***) Using method: m_deliver\n", + "(*** 10 ***) No preconditions.\n", + "Selecting unification: \n", + "(*** 11 ***) Depth: 11\n", + "(*** 11 ***) Selecting task to expand from agenda.\n", + "(*** 11 ***) Expanding: [15] (get_to ?v ?l1)\n", + "\n", + "(*** 11 ***) Selecting a candidate task.\n", + "(*** 11 ***) Found: 1 candidates (left).\n", + " [0] :task (get_to ?v ?l)\n", + "(*** 11 ***) Selecting a method to expand from compound task.\n", + " :task (get_to ?v ?l)\n", + "(*** 11 ***) Found: 3 methods to expand (left).\n", + " [0] \n", + " (:method m_drive_to\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (drive ?v ?l1 ?l2)\n", + " )\n", + " )\n", + " [1] \n", + " (:method m_drive_to_via\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (get_to ?v ?l2)\n", + " (drive ?v ?l2 ?l3)\n", + " )\n", + " )\n", + " [2] \n", + " (:method m_i_am_there\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (noop ?v ?l)\n", + " )\n", + " )\n", + "(*** 11 ***) Expanding method: m_drive_to\n", + "(*** 11 ***) Working in task:\n", + "(:task get_to\n", + " :parameters ( ?v - vehicle ?l - location)\n", + " (:method m_drive_to\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (drive ?v ?l1 ?l2)\n", + " )\n", + " )\n", + " (:method m_drive_to_via\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (get_to ?v ?l2)\n", + " (drive ?v ?l2 ?l3)\n", + " )\n", + " )\n", + " (:method m_i_am_there\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (noop ?v ?l)\n", + " )\n", + " )\n", + ")\n", + "\n", + "(*** 11 ***) Using method: m_drive_to\n", + "(*** 11 ***) No preconditions.\n", + "Selecting unification: \n", + "(*** 12 ***) Depth: 12\n", + "(*** 12 ***) Selecting task to expand from agenda.\n", + "(*** 12 ***) Expanding: [19] (drive ?v ?l1 ?l2)\n", + "\n", + "(*** 12 ***) Selecting a candidate task.\n", + "(*** 12 ***) Found: 1 candidates (left).\n", + " [0] :action (drive ?v ?l1 ?l2)\n", + "(*** 12 ***) Solving action:\n", + "(:action drive\n", + " :parameters ( ?v - vehicle ?l1 - location ?l2 - location)\n", + " :precondition\n", + " (and\n", + " (and\n", + " (at_ ?v ?l1)\n", + " (road ?l1 ?l2)\n", + " )\n", + "\n", + " )\n", + "\n", + " :effect\n", + " (and\n", + " (not (at_ ?v ?l1))\n", + " (at_ ?v ?l2)\n", + " )\n", + "\n", + ")\n", + "(*** 12 ***) working in action:\n", + "(:action drive\n", + " :parameters ( ?v - vehicle ?l1 - location ?l2 - location)\n", + " :precondition\n", + " (and\n", + " (and\n", + " (at_ ?v ?l1)\n", + " (road ?l1 ?l2)\n", + " )\n", + "\n", + " )\n", + "\n", + " :effect\n", + " (and\n", + " (not (at_ ?v ?l1))\n", + " (at_ ?v ?l2)\n", + " )\n", + "\n", + ")\n", + "\n", + "(*** 12 ***) Found: 1 unification(s) (left). \n", + "Unification [0]:\n", + "?l2 <- city_loc_1\n", + "?l1 <- city_loc_0\n", + "?v <- truck_0\n", + "3 variable subtition(s).\n", + "\n", + "Selecting unification: \n", + "(ccc) Performing unification: \n", + "?l2 <- city_loc_1\n", + "?l1 <- city_loc_0\n", + "?v <- truck_0\n", + "3 variable subtition(s).\n", + "\n", + "(ccc) Deleted from state: (at_ truck_0 city_loc_0)\n", + "(ccc) Added to state: (at_ truck_0 city_loc_1)\n", + "(*** 13 ***) Depth: 13\n", + "(*** 13 ***) Selecting task to expand from agenda.\n", + "(*** 13 ***) Expanding: [16] (load truck_0 ?l1 package_1)\n", + "\n", + "(*** 13 ***) Selecting a candidate task.\n", + "(*** 13 ***) Found: 1 candidates (left).\n", + " [0] :task (load ?v ?l ?p)\n", + "(*** 13 ***) Selecting a method to expand from compound task.\n", + " :task (load ?v ?l ?p)\n", + "(*** 13 ***) Found: 1 methods to expand (left).\n", + " [0] \n", + " (:method m_load\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (pick_up ?v ?l ?p ?s1 ?s2)\n", + " )\n", + " )\n", + "(*** 13 ***) Expanding method: m_load\n", + "(*** 13 ***) Working in task:\n", + "(:task load\n", + " :parameters ( ?v - vehicle ?l - location ?p - package)\n", + " (:method m_load\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (pick_up truck_0 ?l1 package_1 ?s1 ?s2)\n", + " )\n", + " )\n", + ")\n", + "\n", + "(*** 13 ***) Using method: m_load\n", + "(*** 13 ***) No preconditions.\n", + "Selecting unification: \n", + "(*** 14 ***) Depth: 14\n", + "(*** 14 ***) Selecting task to expand from agenda.\n", + "(*** 14 ***) Expanding: [21] (pick_up truck_0 ?l1 package_1 ?s1 ?s2)\n", + "\n", + "(*** 14 ***) Selecting a candidate task.\n", + "(*** 14 ***) Found: 1 candidates (left).\n", + " [0] :action (pick_up truck_0 ?l1 package_1 ?s1 ?s2)\n", + "(*** 14 ***) Solving action:\n", + "(:action pick_up\n", + " :parameters ( truck_0 ?l1 - location package_1 ?s1 - capacity_number ?s2 - capacity_number)\n", + " :precondition\n", + " (and\n", + " (and\n", + " (at_ truck_0 ?l1)\n", + " (at_ package_1 ?l1)\n", + " (capacity_predecessor ?s1 ?s2)\n", + " (capacity truck_0 ?s2)\n", + " )\n", + "\n", + " )\n", + "\n", + " :effect\n", + " (and\n", + " (not (at_ package_1 ?l1))\n", + " (in package_1 truck_0)\n", + " (capacity truck_0 ?s1)\n", + " (not (capacity truck_0 ?s2))\n", + " )\n", + "\n", + ")\n", + "(*** 14 ***) working in action:\n", + "(:action pick_up\n", + " :parameters ( truck_0 ?l1 - location package_1 ?s1 - capacity_number ?s2 - capacity_number)\n", + " :precondition\n", + " (and\n", + " (and\n", + " (at_ truck_0 ?l1)\n", + " (at_ package_1 ?l1)\n", + " (capacity_predecessor ?s1 ?s2)\n", + " (capacity truck_0 ?s2)\n", + " )\n", + "\n", + " )\n", + "\n", + " :effect\n", + " (and\n", + " (not (at_ package_1 ?l1))\n", + " (in package_1 truck_0)\n", + " (capacity truck_0 ?s1)\n", + " (not (capacity truck_0 ?s2))\n", + " )\n", + "\n", + ")\n", + "\n", + "(*** 14 ***) Found: 1 unification(s) (left). \n", + "Unification [0]:\n", + "?s2 <- capacity_1\n", + "?s1 <- capacity_0\n", + "?l1 <- city_loc_1\n", + "3 variable subtition(s).\n", + "\n", + "Selecting unification: \n", + "(ccc) Performing unification: \n", + "?s2 <- capacity_1\n", + "?s1 <- capacity_0\n", + "?l1 <- city_loc_1\n", + "3 variable subtition(s).\n", + "\n", + "(ccc) Deleted from state: (at_ package_1 city_loc_1)\n", + "(ccc) Added to state: (in package_1 truck_0)\n", + "(ccc) Added to state: (capacity truck_0 capacity_0)\n", + "(ccc) Deleted from state: (capacity truck_0 capacity_1)\n", + "(*** 15 ***) Depth: 15\n", + "(*** 15 ***) Selecting task to expand from agenda.\n", + "(*** 15 ***) Expanding: [17] (get_to truck_0 ?l2)\n", + "\n", + "(*** 15 ***) Selecting a candidate task.\n", + "(*** 15 ***) Found: 1 candidates (left).\n", + " [0] :task (get_to ?v ?l)\n", + "(*** 15 ***) Selecting a method to expand from compound task.\n", + " :task (get_to ?v ?l)\n", + "(*** 15 ***) Found: 3 methods to expand (left).\n", + " [0] \n", + " (:method m_drive_to\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (drive ?v ?l1 ?l2)\n", + " )\n", + " )\n", + " [1] \n", + " (:method m_drive_to_via\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (get_to ?v ?l2)\n", + " (drive ?v ?l2 ?l3)\n", + " )\n", + " )\n", + " [2] \n", + " (:method m_i_am_there\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (noop ?v ?l)\n", + " )\n", + " )\n", + "(*** 15 ***) Expanding method: m_drive_to\n", + "(*** 15 ***) Working in task:\n", + "(:task get_to\n", + " :parameters ( ?v - vehicle ?l - location)\n", + " (:method m_drive_to\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (drive truck_0 ?l1 ?l2)\n", + " )\n", + " )\n", + " (:method m_drive_to_via\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (get_to ?v ?l2)\n", + " (drive ?v ?l2 ?l3)\n", + " )\n", + " )\n", + " (:method m_i_am_there\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (noop ?v ?l)\n", + " )\n", + " )\n", + ")\n", + "\n", + "(*** 15 ***) Using method: m_drive_to\n", + "(*** 15 ***) No preconditions.\n", + "Selecting unification: \n", + "(*** 16 ***) Depth: 16\n", + "(*** 16 ***) Selecting task to expand from agenda.\n", + "(*** 16 ***) Expanding: [23] (drive truck_0 ?l1 ?l2)\n", + "\n", + "(*** 16 ***) Selecting a candidate task.\n", + "(*** 16 ***) Found: 1 candidates (left).\n", + " [0] :action (drive truck_0 ?l1 ?l2)\n", + "(*** 16 ***) Solving action:\n", + "(:action drive\n", + " :parameters ( truck_0 ?l1 - location ?l2 - location)\n", + " :precondition\n", + " (and\n", + " (and\n", + " (at_ truck_0 ?l1)\n", + " (road ?l1 ?l2)\n", + " )\n", + "\n", + " )\n", + "\n", + " :effect\n", + " (and\n", + " (not (at_ truck_0 ?l1))\n", + " (at_ truck_0 ?l2)\n", + " )\n", + "\n", + ")\n", + "(*** 16 ***) working in action:\n", + "(:action drive\n", + " :parameters ( truck_0 ?l1 - location ?l2 - location)\n", + " :precondition\n", + " (and\n", + " (and\n", + " (at_ truck_0 ?l1)\n", + " (road ?l1 ?l2)\n", + " )\n", + "\n", + " )\n", + "\n", + " :effect\n", + " (and\n", + " (not (at_ truck_0 ?l1))\n", + " (at_ truck_0 ?l2)\n", + " )\n", + "\n", + ")\n", + "\n", + "(*** 16 ***) Found: 2 unification(s) (left). \n", + "Unification [0]:\n", + "?l2 <- city_loc_0\n", + "?l1 <- city_loc_1\n", + "2 variable subtition(s).\n", + "\n", + "Unification [1]:\n", + "?l2 <- city_loc_2\n", + "?l1 <- city_loc_1\n", + "2 variable subtition(s).\n", + "\n", + "Selecting unification: \n", + "(ccc) Performing unification: \n", + "?l2 <- city_loc_0\n", + "?l1 <- city_loc_1\n", + "2 variable subtition(s).\n", + "\n", + "(ccc) Deleted from state: (at_ truck_0 city_loc_1)\n", + "(ccc) Added to state: (at_ truck_0 city_loc_0)\n", + "(*** 17 ***) Depth: 17\n", + "(*** 17 ***) Selecting task to expand from agenda.\n", + "(*** 17 ***) Expanding: [18] (unload truck_0 ?l2 package_1)\n", + "\n", + "(*** 17 ***) Selecting a candidate task.\n", + "(*** 17 ***) Found: 1 candidates (left).\n", + " [0] :task (unload ?v ?l ?p)\n", + "(*** 17 ***) Selecting a method to expand from compound task.\n", + " :task (unload ?v ?l ?p)\n", + "(*** 17 ***) Found: 1 methods to expand (left).\n", + " [0] \n", + " (:method m_unload\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (drop ?v ?l ?p ?s1 ?s2)\n", + " )\n", + " )\n", + "(*** 17 ***) Expanding method: m_unload\n", + "(*** 17 ***) Working in task:\n", + "(:task unload\n", + " :parameters ( ?v - vehicle ?l - location ?p - package)\n", + " (:method m_unload\n", + " :precondition\n", + " ( )\n", + " :tasks (\n", + " (drop truck_0 ?l2 package_1 ?s1 ?s2)\n", + " )\n", + " )\n", + ")\n", + "\n", + "(*** 17 ***) Using method: m_unload\n", + "(*** 17 ***) No preconditions.\n", + "Selecting unification: \n", + "(*** 18 ***) Depth: 18\n", + "(*** 18 ***) Selecting task to expand from agenda.\n", + "(*** 18 ***) Expanding: [25] (drop truck_0 ?l2 package_1 ?s1 ?s2)\n", + "\n", + "(*** 18 ***) Selecting a candidate task.\n", + "(*** 18 ***) Found: 1 candidates (left).\n", + " [0] :action (drop truck_0 ?l2 package_1 ?s1 ?s2)\n", + "(*** 18 ***) Solving action:\n", + "(:action drop\n", + " :parameters ( truck_0 ?l2 - location package_1 ?s1 - capacity_number ?s2 - capacity_number)\n", + " :precondition\n", + " (and\n", + " (and\n", + " (at_ truck_0 ?l2)\n", + " (in package_1 truck_0)\n", + " (capacity_predecessor ?s1 ?s2)\n", + " (capacity truck_0 ?s1)\n", + " )\n", + "\n", + " )\n", + "\n", + " :effect\n", + " (and\n", + " (not (in package_1 truck_0))\n", + " (at_ package_1 ?l2)\n", + " (capacity truck_0 ?s2)\n", + " (not (capacity truck_0 ?s1))\n", + " )\n", + "\n", + ")\n", + "(*** 18 ***) working in action:\n", + "(:action drop\n", + " :parameters ( truck_0 ?l2 - location package_1 ?s1 - capacity_number ?s2 - capacity_number)\n", + " :precondition\n", + " (and\n", + " (and\n", + " (at_ truck_0 ?l2)\n", + " (in package_1 truck_0)\n", + " (capacity_predecessor ?s1 ?s2)\n", + " (capacity truck_0 ?s1)\n", + " )\n", + "\n", + " )\n", + "\n", + " :effect\n", + " (and\n", + " (not (in package_1 truck_0))\n", + " (at_ package_1 ?l2)\n", + " (capacity truck_0 ?s2)\n", + " (not (capacity truck_0 ?s1))\n", + " )\n", + "\n", + ")\n", + "\n", + "(*** 18 ***) Found: 1 unification(s) (left). \n", + "Unification [0]:\n", + "?s2 <- capacity_1\n", + "?s1 <- capacity_0\n", + "?l2 <- city_loc_0\n", + "3 variable subtition(s).\n", + "\n", + "Selecting unification: \n", + "(ccc) Performing unification: \n", + "?s2 <- capacity_1\n", + "?s1 <- capacity_0\n", + "?l2 <- city_loc_0\n", + "3 variable subtition(s).\n", + "\n", + "(ccc) Deleted from state: (in package_1 truck_0)\n", + "(ccc) Added to state: (at_ package_1 city_loc_0)\n", + "(ccc) Added to state: (capacity truck_0 capacity_1)\n", + "(ccc) Deleted from state: (capacity truck_0 capacity_0)\n", + "(*** 19 ***) Depth: 19\n", + "(*** 19 ***) Selecting task to expand from agenda.\n", + "(*** 19 ***) Expanding: [2] (siadex_debugger_stop)\n", + "\n", + "(*** 19 ***) Selecting a candidate task.\n", + "(*** 19 ***) Found: 1 candidates (left).\n", + " [0] :action (siadex_debugger_stop)\n", + "Breakpoint 0 reached.\n" + ] + } + ], + "source": [ + "debugger.continue_run()" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Stopping the debugger\n", + "The debugger has ended when it stops on the breakpoint 0.\n", + "\n", + "With __plan()__ we can obtain the final plan." + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[drive(truck-0, city-loc-2, city-loc-1), pick-up(truck-0, city-loc-1, package-0, capacity-0, capacity-1), drive(truck-0, city-loc-1, city-loc-0), drop(truck-0, city-loc-0, package-0, capacity-0, capacity-1), drive(truck-0, city-loc-0, city-loc-1), pick-up(truck-0, city-loc-1, package-1, capacity-0, capacity-1), drive(truck-0, city-loc-1, city-loc-0), drop(truck-0, city-loc-0, package-1, capacity-0, capacity-1)]" + ] + }, + "execution_count": 40, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "debugger.plan()" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "With __stop()__ we can stop the debugger at any moment." + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Debugger stopped\n" + ] + } + ], + "source": [ + "debugger.stop()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.6" + }, + "vscode": { + "interpreter": { + "hash": "e7370f93d1d0cde622a1f8e1c04877d8463912d04d973331ad4851f04de6915a" + } + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Notebooks/siadex.ipynb b/Notebooks/siadex.ipynb index a57dc1e..c85b784 100644 --- a/Notebooks/siadex.ipynb +++ b/Notebooks/siadex.ipynb @@ -19,12 +19,13 @@ "name": "stdout", "output_type": "stream", "text": [ - "Processing /workspaces/up-siadex\n", + "Defaulting to user installation because normal site-packages is not writeable\n", + "Processing /mnt/e/newDesktop/void/projects/siadex/up-siadex\n", " Preparing metadata (setup.py) ... \u001b[?25ldone\n", "\u001b[?25hBuilding wheels for collected packages: up-siadex\n", " Building wheel for up-siadex (setup.py) ... \u001b[?25ldone\n", - "\u001b[?25h Created wheel for up-siadex: filename=up_siadex-0.0.1-py3-none-any.whl size=8662148 sha256=039974450b5b6e2ec2941583c04e62423ede6a41d80c64e2cd798a171fdd92c6\n", - " Stored in directory: /home/codespace/.cache/pip/wheels/63/55/a1/26a2eb3a61793baa41bdcf5daf2fa5975374c48f8639a70b08\n", + "\u001b[?25h Created wheel for up-siadex: filename=up_siadex-0.0.1-py3-none-any.whl size=8667670 sha256=2c6c48be4db713d4f3169a03ed63fa0a8bee90b961dadfeb490e14312fb22334\n", + " Stored in directory: /home/gorgue/.cache/pip/wheels/f5/68/44/88e2b79f736c596547038a3376e427061bae2bfda13b9591d5\n", "Successfully built up-siadex\n", "Installing collected packages: up-siadex\n", " Attempting uninstall: up-siadex\n", @@ -32,14 +33,15 @@ " Uninstalling up-siadex-0.0.1:\n", " Successfully uninstalled up-siadex-0.0.1\n", "Successfully installed up-siadex-0.0.1\n", - "Processing /workspaces/up-siadex/unified-planning\n", + "Defaulting to user installation because normal site-packages is not writeable\n", + "Processing /mnt/e/newDesktop/void/projects/siadex/up-siadex/unified-planning\n", " Preparing metadata (setup.py) ... \u001b[?25ldone\n", - "\u001b[?25hRequirement already satisfied: pyparsing in /home/codespace/.local/lib/python3.10/site-packages (from unified-planning==0.4.2) (3.0.9)\n", - "Requirement already satisfied: networkx in /usr/local/python/3.10.4/lib/python3.10/site-packages (from unified-planning==0.4.2) (2.8.8)\n", + "\u001b[?25hRequirement already satisfied: networkx in /home/gorgue/.local/lib/python3.10/site-packages (from unified-planning==0.4.2) (2.8.6)\n", + "Requirement already satisfied: pyparsing in /usr/lib/python3/dist-packages (from unified-planning==0.4.2) (2.4.7)\n", "Building wheels for collected packages: unified-planning\n", " Building wheel for unified-planning (setup.py) ... \u001b[?25ldone\n", - "\u001b[?25h Created wheel for unified-planning: filename=unified_planning-0.4.2-py3-none-any.whl size=352562 sha256=e2c8c6f100d80e27624d8b46dd807f1ff2ee2e456827d17ee88c75be01371690\n", - " Stored in directory: /home/codespace/.cache/pip/wheels/c4/05/f2/821c8767d2971ed17287b1008afb0607f41dad844571a5b40f\n", + "\u001b[?25h Created wheel for unified-planning: filename=unified_planning-0.4.2-py3-none-any.whl size=357569 sha256=ab594f7a803747967b2514fbe99d50741129f6b3fdbd4bf19ae98c4847fee4ab\n", + " Stored in directory: /home/gorgue/.cache/pip/wheels/56/29/6e/648f61aba4a4e80be3b294d05c095888aa7200cee31755b7bb\n", "Successfully built unified-planning\n", "Installing collected packages: unified-planning\n", " Attempting uninstall: unified-planning\n", @@ -130,7 +132,7 @@ "text": [ "\u001b[96m\u001b[1mNOTE: To disable printing of planning engine credits, add this line to your code: `up.shortcuts.get_env().credits_stream = None`\n", "\u001b[0m\u001b[96m *** Credits ***\n", - "\u001b[0m\u001b[96m * In operation mode `OneshotPlanner` at line 1 of `/tmp/ipykernel_3155/3527194102.py`, \u001b[0m\u001b[96myou are using the following planning engine:\n", + "\u001b[0m\u001b[96m * In operation mode `OneshotPlanner` at line 1 of `/tmp/ipykernel_2931/3527194102.py`, \u001b[0m\u001b[96myou are using the following planning engine:\n", "\u001b[0m\u001b[96m * Engine name: SIADEX\n", " * Developers: UGR SIADEX Team\n", "\u001b[0m\u001b[96m * Description: \u001b[0m\u001b[96mSIADEX ENGINE\u001b[0m\u001b[96m\n", @@ -152,7 +154,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "/home/codespace/.python/current/lib/python3.10/site-packages/unified_planning/engines/mixins/oneshot_planner.py:73: UserWarning: cannot solve this kind of problem!\n", + "/home/gorgue/.local/lib/python3.10/site-packages/unified_planning/engines/mixins/oneshot_planner.py:73: UserWarning: cannot solve this kind of problem!\n", " warn(msg)\n" ] } @@ -283,7 +285,7 @@ "output_type": "stream", "text": [ "\u001b[96m *** Credits ***\n", - "\u001b[0m\u001b[96m * In operation mode `OneshotPlanner` at line 2 of `/tmp/ipykernel_3155/937920758.py`, \u001b[0m\u001b[96myou are using the following planning engine:\n", + "\u001b[0m\u001b[96m * In operation mode `OneshotPlanner` at line 2 of `/tmp/ipykernel_2931/937920758.py`, \u001b[0m\u001b[96myou are using the following planning engine:\n", "\u001b[0m\u001b[96m * Engine name: SIADEX\n", " * Developers: UGR SIADEX Team\n", "\u001b[0m\u001b[96m * Description: \u001b[0m\u001b[96mSIADEX ENGINE\u001b[0m\u001b[96m\n", @@ -322,23 +324,41 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 13, "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "FileNotFoundError", + "evalue": "[Errno 2] No such file or directory: '../examples/ipc/Miconic/domain.hpdl'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", + "File \u001b[0;32m/usr/lib/python3/dist-packages/pyparsing.py:2572\u001b[0m, in \u001b[0;36mParserElement.parseFile\u001b[0;34m(self, file_or_filename, parseAll)\u001b[0m\n\u001b[1;32m 2571\u001b[0m \u001b[39mtry\u001b[39;00m:\n\u001b[0;32m-> 2572\u001b[0m file_contents \u001b[39m=\u001b[39m file_or_filename\u001b[39m.\u001b[39;49mread()\n\u001b[1;32m 2573\u001b[0m \u001b[39mexcept\u001b[39;00m \u001b[39mAttributeError\u001b[39;00m:\n", + "\u001b[0;31mAttributeError\u001b[0m: 'str' object has no attribute 'read'", + "\nDuring handling of the above exception, another exception occurred:\n", + "\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[13], line 2\u001b[0m\n\u001b[1;32m 1\u001b[0m reader \u001b[39m=\u001b[39m HPDLReader()\n\u001b[0;32m----> 2\u001b[0m miconic \u001b[39m=\u001b[39m reader\u001b[39m.\u001b[39;49mparse_problem(\u001b[39m\"\u001b[39;49m\u001b[39m../examples/ipc/Miconic/domain.hpdl\u001b[39;49m\u001b[39m\"\u001b[39;49m, \u001b[39m\"\u001b[39;49m\u001b[39m../examples/ipc/Miconic/problem.hpdl\u001b[39;49m\u001b[39m\"\u001b[39;49m)\n\u001b[1;32m 3\u001b[0m rover \u001b[39m=\u001b[39m reader\u001b[39m.\u001b[39mparse_problem(\u001b[39m\"\u001b[39m\u001b[39m../examples/ipc/Rover/domain.hpdl\u001b[39m\u001b[39m\"\u001b[39m,\u001b[39m\"\u001b[39m\u001b[39m../examples/ipc/Rover/problem.hpdl\u001b[39m\u001b[39m\"\u001b[39m)\n\u001b[1;32m 4\u001b[0m satellite \u001b[39m=\u001b[39m reader\u001b[39m.\u001b[39mparse_problem(\u001b[39m\"\u001b[39m\u001b[39m../examples/ipc/Satellite/domain.hpdl\u001b[39m\u001b[39m\"\u001b[39m,\u001b[39m\"\u001b[39m\u001b[39m../examples/ipc/Satellite/problem.hpdl\u001b[39m\u001b[39m\"\u001b[39m)\n", + "File \u001b[0;32m~/.local/lib/python3.10/site-packages/unified_planning/io/hpdl/hpdl_reader.py:1197\u001b[0m, in \u001b[0;36mHPDLReader.parse_problem\u001b[0;34m(self, domain_filename, problem_filename)\u001b[0m\n\u001b[1;32m 1183\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mparse_problem\u001b[39m(\n\u001b[1;32m 1184\u001b[0m \u001b[39mself\u001b[39m, domain_filename: \u001b[39mstr\u001b[39m, problem_filename: typing\u001b[39m.\u001b[39mOptional[\u001b[39mstr\u001b[39m] \u001b[39m=\u001b[39m \u001b[39mNone\u001b[39;00m\n\u001b[1;32m 1185\u001b[0m ) \u001b[39m-\u001b[39m\u001b[39m>\u001b[39m \u001b[39m\"\u001b[39m\u001b[39mmodel.Problem\u001b[39m\u001b[39m\"\u001b[39m:\n\u001b[1;32m 1186\u001b[0m \u001b[39m \u001b[39m\u001b[39m\"\"\"\u001b[39;00m\n\u001b[1;32m 1187\u001b[0m \u001b[39m Takes in input a filename containing the `HPDL` domain and optionally a filename\u001b[39;00m\n\u001b[1;32m 1188\u001b[0m \u001b[39m containing the `HPDL` problem and returns the parsed `Problem`.\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 1195\u001b[0m \u001b[39m :return: The `Problem` parsed from the given pddl domain + problem.\u001b[39;00m\n\u001b[1;32m 1196\u001b[0m \u001b[39m \"\"\"\u001b[39;00m\n\u001b[0;32m-> 1197\u001b[0m domain_res \u001b[39m=\u001b[39m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_pp_domain\u001b[39m.\u001b[39;49mparseFile(domain_filename)\n\u001b[1;32m 1199\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mproblem \u001b[39m=\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_build_problem(domain_res[\u001b[39m\"\u001b[39m\u001b[39mname\u001b[39m\u001b[39m\"\u001b[39m], domain_res[\u001b[39m\"\u001b[39m\u001b[39mfeatures\u001b[39m\u001b[39m\"\u001b[39m])\n\u001b[1;32m 1200\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mtypes_map: Dict[\u001b[39mstr\u001b[39m, \u001b[39m\"\u001b[39m\u001b[39mmodel.Type\u001b[39m\u001b[39m\"\u001b[39m] \u001b[39m=\u001b[39m {}\n", + "File \u001b[0;32m/usr/lib/python3/dist-packages/pyparsing.py:2574\u001b[0m, in \u001b[0;36mParserElement.parseFile\u001b[0;34m(self, file_or_filename, parseAll)\u001b[0m\n\u001b[1;32m 2572\u001b[0m file_contents \u001b[39m=\u001b[39m file_or_filename\u001b[39m.\u001b[39mread()\n\u001b[1;32m 2573\u001b[0m \u001b[39mexcept\u001b[39;00m \u001b[39mAttributeError\u001b[39;00m:\n\u001b[0;32m-> 2574\u001b[0m \u001b[39mwith\u001b[39;00m \u001b[39mopen\u001b[39;49m(file_or_filename, \u001b[39m\"\u001b[39;49m\u001b[39mr\u001b[39;49m\u001b[39m\"\u001b[39;49m) \u001b[39mas\u001b[39;00m f:\n\u001b[1;32m 2575\u001b[0m file_contents \u001b[39m=\u001b[39m f\u001b[39m.\u001b[39mread()\n\u001b[1;32m 2576\u001b[0m \u001b[39mtry\u001b[39;00m:\n", + "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '../examples/ipc/Miconic/domain.hpdl'" + ] + } + ], "source": [ "reader = HPDLReader()\n", "miconic = reader.parse_problem(\"../examples/ipc/Miconic/domain.hpdl\", \"../examples/ipc/Miconic/problem.hpdl\")\n", - "# rover = reader.parse_problem(\"../examples/ipc/Rover/domain.hpdl\",\"../examples/ipc/Rover/problem.hpdl\")\n", - "# satellite = reader.parse_problem(\"../examples/ipc/Satellite/domain.hpdl\",\"../examples/ipc/Satellite/problem.hpdl\")\n", + "rover = reader.parse_problem(\"../examples/ipc/Rover/domain.hpdl\",\"../examples/ipc/Rover/problem.hpdl\")\n", + "satellite = reader.parse_problem(\"../examples/ipc/Satellite/domain.hpdl\",\"../examples/ipc/Satellite/problem.hpdl\")\n", "# smartphone = reader.parse_problem(\"../examples/ipc/SmartPhone/domain.hpdl\",\"../examples/ipc/SmartPhone/problem.hpdl\")\n", - "# transport = reader.parse_problem(\"../examples/ipc/Transport/domain.hpdl\",\"../examples/ipc/Transport/problem.hpdl\")\n", + "transport = reader.parse_problem(\"../examples/ipc/Transport/domain.hpdl\",\"../examples/ipc/Transport/problem.hpdl\")\n", "# translog = reader.parse_problem(\"../examples/ipc/UM-Translog/domain.hpdl\",\"../examples/ipc/UM-Translog/problem.hpdl\")\n", - "# zeno = reader.parse_problem(\"../examples/ipc/Zenotravel/domain.hpdl\",\"../examples/ipc/Zenotravel/problem.hpdl\")" + "zeno = reader.parse_problem(\"../examples/ipc/Zenotravel/domain.hpdl\",\"../examples/ipc/Zenotravel/problem.hpdl\")" ] }, { "cell_type": "code", - "execution_count": 16, + "execution_count": null, "metadata": {}, "outputs": [ { @@ -346,56 +366,106 @@ "output_type": "stream", "text": [ "\u001b[96m *** Credits ***\n", - "\u001b[0m\u001b[96m * In operation mode `OneshotPlanner` at line 2 of `/tmp/ipykernel_3155/937920758.py`, \u001b[0m\u001b[96myou are using the following planning engine:\n", + "\u001b[0m\u001b[96m * In operation mode `OneshotPlanner` at line 2 of `/tmp/ipykernel_20228/937920758.py`, \u001b[0m\u001b[96myou are using the following planning engine:\n", "\u001b[0m\u001b[96m * Engine name: SIADEX\n", " * Developers: UGR SIADEX Team\n", "\u001b[0m\u001b[96m * Description: \u001b[0m\u001b[96mSIADEX ENGINE\u001b[0m\u001b[96m\n", "\u001b[0m\u001b[96m\n", - "\u001b[0m[LogMessage(level=, message=''), LogMessage(level=, message='\\n')]\n", + "\u001b[0m[LogMessage(level=, message=''), LogMessage(level=, message='\\n\\n[Error]: Empty stack\\n')]\n", "SIADEX found a valid plan!\n", "The plan is: \n", - "\n", - "0: move_primitive(f0, f0)\n", - "1: board_primitive(p0, f0)\n", - "2: move_primitive(f0, f1)\n", - "3: debark_primitive(p0, f1)\n", - "4: move_primitive(f1, f3)\n", - "5: board_primitive(p2, f3)\n", - "6: move_primitive(f3, f1)\n", - "7: debark_primitive(p2, f1)\n", - "8: move_primitive(f1, f2)\n", - "9: board_primitive(p4, f2)\n", - "10: move_primitive(f2, f1)\n", - "11: debark_primitive(p4, f1)\n", - "12: move_primitive(f1, f0)\n", - "13: board_primitive(p1, f0)\n", - "14: move_primitive(f0, f3)\n", - "15: debark_primitive(p1, f3)\n", - "16: move_primitive(f3, f3)\n", - "17: board_primitive(p3, f3)\n", - "18: move_primitive(f3, f2)\n", - "19: debark_primitive(p3, f2)\n" + "\n" ] }, { "data": { "text/plain": [ - "[move_primitive(f0, f0), board_primitive(p0, f0), move_primitive(f0, f1), debark_primitive(p0, f1), move_primitive(f1, f3), board_primitive(p2, f3), move_primitive(f3, f1), debark_primitive(p2, f1), move_primitive(f1, f2), board_primitive(p4, f2), move_primitive(f2, f1), debark_primitive(p4, f1), move_primitive(f1, f0), board_primitive(p1, f0), move_primitive(f0, f3), debark_primitive(p1, f3), move_primitive(f3, f3), board_primitive(p3, f3), move_primitive(f3, f2), debark_primitive(p3, f2)]" + "[]" ] }, - "execution_count": 16, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], + "source": [ + "solve_with_siadex(rover)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'transport' is not defined", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[10], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m solve_with_siadex(transport)\n", + "\u001b[0;31mNameError\u001b[0m: name 'transport' is not defined" + ] + } + ], + "source": [ + "solve_with_siadex(transport)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'zeno' is not defined", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[11], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m solve_with_siadex(zeno)\n", + "\u001b[0;31mNameError\u001b[0m: name 'zeno' is not defined" + ] + } + ], + "source": [ + "solve_with_siadex(zeno)" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'miconic' is not defined", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[12], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m solve_with_siadex(miconic)\n", + "\u001b[0;31mNameError\u001b[0m: name 'miconic' is not defined" + ] + } + ], "source": [ "solve_with_siadex(miconic)" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { "kernelspec": { - "display_name": "Python 3.10.4 64-bit", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -409,12 +479,12 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.4" + "version": "3.10.6" }, "orig_nbformat": 4, "vscode": { "interpreter": { - "hash": "3ad933181bd8a04b432d3370b9dc3b0662ad032c4dfaa4e4f1596c548f763858" + "hash": "e7370f93d1d0cde622a1f8e1c04877d8463912d04d973331ad4851f04de6915a" } } }, diff --git a/examples/ipc/Miconic/domain.hpdl b/examples/ipc/Miconic/domain.hpdl deleted file mode 100644 index c0c0f33..0000000 --- a/examples/ipc/Miconic/domain.hpdl +++ /dev/null @@ -1,153 +0,0 @@ -(define (domain dom) - (:requirements - :typing - :htn-expansion - :negative-preconditions - :conditional-effects - :universal-preconditions - :disjunctive-preconditions - :equality - :existential-preconditions - ) - (:types - object__compiled - object - floor - object__compiled - person - object__compiled - ) - - (:constants - ) - - (:predicates - (type_member_floor ?var - object) - (type_member_object__compiled ?var - object) - (type_member_person ?var - object) - (boarded ?var0 - person) - (goal ?var0 - person) - (lift_at ?var0 - floor) - (origin ?var0 - person ?var1 - floor) - (destination ?var0 - person ?var1 - floor) - ) - - - (:task move - :parameters (?f1 - object ?f2 - object) - (:method method1 - :precondition (and - (type_member_floor ?f1) - (type_member_floor ?f2) - ) - :tasks ( - (move_primitive ?f1 - floor ?f2 - floor) - ) - ) - ) - - (:task board - :parameters (?p - object ?f - object) - (:method method1 - :precondition (and - (type_member_person ?p) - (type_member_floor ?f) - ) - :tasks ( - (board_primitive ?p - person ?f - floor) - ) - ) - ) - - (:task debark - :parameters (?p - object ?f - object) - (:method method1 - :precondition (and - (type_member_person ?p) - (type_member_floor ?f) - ) - :tasks ( - (debark_primitive ?p - person ?f - floor) - ) - ) - ) - -; ************************************************************ -; ************************************************************ - (:task solve_elevator - :parameters () - (:method m1_abort_ordering_0 - :precondition (and - (forall (?p - person) - (not (goal ?p)) - ) - ) - :tasks () - ) - (:method m1_go_ordering_0 - :precondition (and - (type_member_floor ?d - floor) - (type_member_floor ?f - floor) - (type_member_floor ?o - floor) - (type_member_person ?p - person) - (goal ?p) - (lift_at ?f) - (origin ?p ?o) - (destination ?p ?d) - ) - :tasks ( - (deliver_person ?p ?o ?d) - (solve_elevator) - ) - ) - ) - - (:task deliver_person - :parameters (?p - person ?o - floor ?d - floor) - (:method m2_ordering_0 - :precondition (and - (type_member_floor ?d - floor) - (type_member_floor ?f - floor) - (type_member_floor ?o - floor) - (type_member_person ?p - person) - (lift_at ?f) - ) - :tasks ( - (move ?f ?o) - (board ?p ?o) - (move ?o ?d) - (debark ?p ?d) - ) - ) - ) - - (:action move_primitive - :parameters (?f1 - floor ?f2 - floor) - :precondition (and - (lift_at ?f1) - ) - :effect (and - (not (lift_at ?f1)) - (lift_at ?f2) - ) - ) - - (:action board_primitive - :parameters (?p - person ?f - floor) - :precondition ( - ) - :effect (and - (boarded ?p) - ) - ) - - (:action debark_primitive - :parameters (?p - person ?f - floor) - :precondition (and - (boarded ?p) - (goal ?p) - ) - :effect (and - (not (boarded ?p)) - (not (goal ?p)) - ) - ) - -) diff --git a/examples/ipc/Miconic/problem.hpdl b/examples/ipc/Miconic/problem.hpdl deleted file mode 100644 index ab97a88..0000000 --- a/examples/ipc/Miconic/problem.hpdl +++ /dev/null @@ -1,61 +0,0 @@ -(define (problem prob) (:domain dom) - (:objects - f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 - floor - p0 p1 p2 p3 p4 - person - ) - - (:init - (lift_at f0) - (goal p0) - (goal p1) - (goal p2) - (goal p3) - (goal p4) - (origin p0 f0) - (destination p0 f1) - (origin p1 f0) - (destination p1 f3) - (origin p2 f3) - (destination p2 f1) - (origin p3 f3) - (destination p3 f2) - (origin p4 f2) - (destination p4 f1) - (type_member_floor f0) - (type_member_floor f1) - (type_member_floor f2) - (type_member_floor f3) - (type_member_floor f4) - (type_member_floor f5) - (type_member_floor f6) - (type_member_floor f7) - (type_member_floor f8) - (type_member_floor f9) - (type_member_object__compiled f0) - (type_member_object__compiled f1) - (type_member_object__compiled f2) - (type_member_object__compiled f3) - (type_member_object__compiled f4) - (type_member_object__compiled f5) - (type_member_object__compiled f6) - (type_member_object__compiled f7) - (type_member_object__compiled f8) - (type_member_object__compiled f9) - (type_member_object__compiled p0) - (type_member_object__compiled p1) - (type_member_object__compiled p2) - (type_member_object__compiled p3) - (type_member_object__compiled p4) - (type_member_person p0) - (type_member_person p1) - (type_member_person p2) - (type_member_person p3) - (type_member_person p4) - ) - - (:tasks-goal - :tasks ( - (solve_elevator) - ) - ) -) diff --git a/examples/ipc/Rover/domain.hddl b/examples/ipc/Rover/domain.hddl deleted file mode 100644 index 2399f55..0000000 --- a/examples/ipc/Rover/domain.hddl +++ /dev/null @@ -1,461 +0,0 @@ -(define (domain rover_domain) - (:requirements :negative-preconditions :hierarchy :typing) - (:types - waypoint - object - mode - object - store - object - rover - object - camera - object - lander - object - objective - object - ) - (:predicates - (at ?arg0 - rover ?arg1 - waypoint) - (at_lander ?arg0 - lander ?arg1 - waypoint) - (at_rock_sample ?arg0 - waypoint) - (at_soil_sample ?arg0 - waypoint) - (available ?arg0 - rover) - (calibrated ?arg0 - camera ?arg1 - rover) - (calibration_target ?arg0 - camera ?arg1 - objective) - (can_traverse ?arg0 - rover ?arg1 - waypoint ?arg2 - waypoint) - (channel_free ?arg0 - lander) - (communicated_image_data ?arg0 - objective ?arg1 - mode) - (communicated_rock_data ?arg0 - waypoint) - (communicated_soil_data ?arg0 - waypoint) - (empty ?arg0 - store) - (equipped_for_imaging ?arg0 - rover) - (equipped_for_rock_analysis ?arg0 - rover) - (equipped_for_soil_analysis ?arg0 - rover) - (full ?arg0 - store) - (have_image ?arg0 - rover ?arg1 - objective ?arg2 - mode) - (have_rock_analysis ?arg0 - rover ?arg1 - waypoint) - (have_soil_analysis ?arg0 - rover ?arg1 - waypoint) - (on_board ?arg0 - camera ?arg1 - rover) - (store_of ?arg0 - store ?arg1 - rover) - (supports ?arg0 - camera ?arg1 - mode) - (visible ?arg0 - waypoint ?arg1 - waypoint) - (visible_from ?arg0 - objective ?arg1 - waypoint) - (visited ?arg0 - waypoint) - ) - - (:task calibrate_abs - :parameters (?rover - rover ?camera - camera) - ) - - (:task empty_store - :parameters (?s - store ?rover - rover) - ) - - (:task get_image_data - :parameters (?objective - objective ?mode - mode) - ) - - (:task get_rock_data - :parameters (?waypoint - waypoint) - ) - - (:task get_soil_data - :parameters (?waypoint - waypoint) - ) - - (:task navigate_abs - :parameters (?rover - rover ?to - waypoint) - ) - - (:task send_image_data - :parameters (?rover - rover ?objective - objective ?mode - mode) - ) - - (:task send_rock_data - :parameters (?rover - rover ?waypoint - waypoint) - ) - - (:task send_soil_data - :parameters (?rover - rover ?waypoint - waypoint) - ) - - (:method m_empty_store_1_ordering_0 - :parameters (?rover - rover ?s - store) - :task (empty_store ?s ?rover) - :precondition (and - (empty ?s) - ) - :subtasks (() - ) - ) - - (:method m_empty_store_2_ordering_0 - :parameters (?rover - rover ?s - store) - :task (empty_store ?s ?rover) - :precondition (and - (not (empty ?s)) - ) - :subtasks (and - (task0 (drop ?rover ?s)) - ) - ) - - (:method m_navigate_abs_1_ordering_0 - :parameters (?from - waypoint ?rover - rover ?to - waypoint) - :task (navigate_abs ?rover ?to) - :precondition (and - (at ?rover ?from) - ) - :subtasks (and - (task0 (visit ?from)) - (task1 (navigate ?rover ?from ?to)) - (task2 (unvisit ?from)) - ) - :ordering (and - (< task0 task1) - (< task1 task2) - ) - ) - - (:method m_navigate_abs_2_ordering_0 - :parameters (?rover - rover ?to - waypoint) - :task (navigate_abs ?rover ?to) - :precondition (and - (at ?rover ?to) - ) - :subtasks ( - ) - ) - - (:method m_navigate_abs_3_ordering_0 - :parameters (?from - waypoint ?rover - rover ?to - waypoint) - :task (navigate_abs ?rover ?to) - :precondition (and - (not (at ?rover ?to)) - (can_traverse ?rover ?from ?to) - ) - :subtasks (and - (task0 (navigate ?rover ?from ?to)) - ) - ) - - (:method m_navigate_abs_4_ordering_0 - :parameters (?from - waypoint ?mid - waypoint ?rover - rover ?to - waypoint) - :task (navigate_abs ?rover ?to) - :precondition (and - (not (at ?rover ?to)) - (not (can_traverse ?rover ?from ?to)) - (can_traverse ?rover ?from ?mid) - (not (visited ?mid)) - ) - :subtasks (and - (task0 (navigate ?rover ?from ?mid)) - (task1 (visit ?mid)) - (task2 (navigate ?rover ?mid ?to)) - (task3 (unvisit ?mid)) - ) - :ordering (and - (< task0 task1) - (< task1 task2) - (< task2 task3) - ) - ) - - (:method m_send_soil_data_ordering_0 - :parameters (?l - lander ?rover - rover ?waypoint - waypoint ?x - waypoint ?y - waypoint) - :task (send_soil_data ?rover ?waypoint) - :precondition (and - (at_lander ?l ?y) - (visible ?x ?y) - ) - :subtasks (and - (task0 (navigate_abs ?rover ?x)) - (task1 (communicate_soil_data ?rover ?l ?waypoint ?x ?y)) - ) - :ordering (and - (< task0 task1) - ) - ) - - (:method m_get_soil_data_ordering_0 - :parameters (?rover - rover ?s - store ?waypoint - waypoint) - :task (get_soil_data ?waypoint) - :precondition (and - (store_of ?s ?rover) - (equipped_for_soil_analysis ?rover) - ) - :subtasks (and - (task0 (navigate_abs ?rover ?waypoint)) - (task1 (empty_store ?s ?rover)) - (task2 (sample_soil ?rover ?s ?waypoint)) - (task3 (send_soil_data ?rover ?waypoint)) - ) - :ordering (and - (< task0 task1) - (< task1 task2) - (< task2 task3) - ) - ) - - (:method m_send_rock_data_ordering_0 - :parameters (?l - lander ?rover - rover ?waypoint - waypoint ?x - waypoint ?y - waypoint) - :task (send_rock_data ?rover ?waypoint) - :precondition (and - (at_lander ?l ?y) - (visible ?x ?y) - ) - :subtasks (and - (task0 (navigate_abs ?rover ?x)) - (task1 (communicate_rock_data ?rover ?l ?waypoint ?x ?y)) - ) - :ordering (and - (< task0 task1) - ) - ) - - (:method m_get_rock_data_ordering_0 - :parameters (?rover - rover ?s - store ?waypoint - waypoint) - :task (get_rock_data ?waypoint) - :precondition (and - (equipped_for_rock_analysis ?rover) - (store_of ?s ?rover) - ) - :subtasks (and - (task0 (navigate_abs ?rover ?waypoint)) - (task1 (empty_store ?s ?rover)) - (task2 (sample_rock ?rover ?s ?waypoint)) - (task3 (send_rock_data ?rover ?waypoint)) - ) - :ordering (and - (< task0 task1) - (< task1 task2) - (< task2 task3) - ) - ) - - (:method m_send_image_data_ordering_0 - :parameters (?l - lander ?mode - mode ?objective - objective ?rover - rover ?x - waypoint ?y - waypoint) - :task (send_image_data ?rover ?objective ?mode) - :precondition (and - (at_lander ?l ?y) - (visible ?x ?y) - ) - :subtasks (and - (task0 (navigate_abs ?rover ?x)) - (task1 (communicate_image_data ?rover ?l ?objective ?mode ?x ?y)) - ) - :ordering (and - (< task0 task1) - ) - ) - - (:method m_get_image_data_ordering_0 - :parameters (?camera - camera ?mode - mode ?objective - objective ?rover - rover ?waypoint - waypoint) - :task (get_image_data ?objective ?mode) - :precondition (and - (equipped_for_imaging ?rover) - (on_board ?camera ?rover) - (supports ?camera ?mode) - (visible_from ?objective ?waypoint) - ) - :subtasks (and - (task0 (calibrate_abs ?rover ?camera)) - (task1 (navigate_abs ?rover ?waypoint)) - (task2 (take_image ?rover ?waypoint ?objective ?camera ?mode)) - (task3 (send_image_data ?rover ?objective ?mode)) - ) - :ordering (and - (< task0 task1) - (< task1 task2) - (< task2 task3) - ) - ) - - (:method m_calibrate_abs_ordering_0 - :parameters (?camera - camera ?objective - objective ?rover - rover ?waypoint - waypoint) - :task (calibrate_abs ?rover ?camera) - :precondition (and - (calibration_target ?camera ?objective) - (visible_from ?objective ?waypoint) - ) - :subtasks (and - (task0 (navigate_abs ?rover ?waypoint)) - (task1 (calibrate ?rover ?camera ?objective ?waypoint)) - ) - :ordering (and - (< task0 task1) - ) - ) - - (:action navigate - :parameters (?x - rover ?y - waypoint ?z - waypoint) - :precondition - (and - (can_traverse ?x ?y ?z) - (available ?x) - (at ?x ?y) - (visible ?y ?z) - ) - :effect - (and - (not (at ?x ?y)) - (at ?x ?z) - ) - ) - - (:action sample_soil - :parameters (?x - rover ?s - store ?p - waypoint) - :precondition - (and - (at ?x ?p) - (at_soil_sample ?p) - (equipped_for_soil_analysis ?x) - (store_of ?s ?x) - (empty ?s) - ) - :effect - (and - (not (empty ?s)) - (not (at_soil_sample ?p)) - (full ?s) - (have_soil_analysis ?x ?p) - ) - ) - - (:action sample_rock - :parameters (?x - rover ?s - store ?p - waypoint) - :precondition - (and - (at_rock_sample ?p) - (equipped_for_rock_analysis ?x) - (store_of ?s ?x) - (empty ?s) - ) - :effect - (and - (not (empty ?s)) - (not (at_rock_sample ?p)) - (full ?s) - (have_rock_analysis ?x ?p) - ) - ) - - (:action drop - :parameters (?x - rover ?y - store) - :precondition - (and - (store_of ?y ?x) - (full ?y) - ) - :effect - (and - (not (full ?y)) - (empty ?y) - ) - ) - - (:action calibrate - :parameters (?r - rover ?i - camera ?t - objective ?w - waypoint) - :precondition - (and - (equipped_for_imaging ?r) - (calibration_target ?i ?t) - (at ?r ?w) - (visible_from ?t ?w) - (on_board ?i ?r) - ) - :effect - (and - (calibrated ?i ?r) - ) - ) - - (:action take_image - :parameters (?r - rover ?p - waypoint ?o - objective ?i - camera ?m - mode) - :precondition - (and - (calibrated ?i ?r) - (on_board ?i ?r) - (equipped_for_imaging ?r) - (supports ?i ?m) - (visible_from ?o ?p) - (at ?r ?p) - ) - :effect - (and - (not (calibrated ?i ?r)) - (have_image ?r ?o ?m) - ) - ) - - (:action communicate_soil_data - :parameters (?r - rover ?l - lander ?p - waypoint ?x - waypoint ?y - waypoint) - :precondition - (and - (at ?r ?x) - (at_lander ?l ?y) - (have_soil_analysis ?r ?p) - (visible ?x ?y) - (available ?r) - (channel_free ?l) - ) - :effect - (and - (channel_free ?l) - (communicated_soil_data ?p) - (available ?r) - ) - ) - - (:action communicate_rock_data - :parameters (?r - rover ?l - lander ?p - waypoint ?x - waypoint ?y - waypoint) - :precondition - (and - (at ?r ?x) - (at_lander ?l ?y) - (have_rock_analysis ?r ?p) - (visible ?x ?y) - (available ?r) - (channel_free ?l) - ) - :effect - (and - (channel_free ?l) - (communicated_rock_data ?p) - (available ?r) - ) - ) - - (:action communicate_image_data - :parameters (?r - rover ?l - lander ?o - objective ?m - mode ?x - waypoint ?y - waypoint) - :precondition - (and - (at ?r ?x) - (at_lander ?l ?y) - (have_image ?r ?o ?m) - (visible ?x ?y) - (available ?r) - (channel_free ?l) - ) - :effect - (and - - (channel_free ?l) - (communicated_image_data ?o ?m) - (available ?r) - ) - ) - - (:action visit - :parameters (?waypoint - waypoint) - :precondition () - :effect - (and - (visited ?waypoint) - ) - ) - - (:action unvisit - :parameters (?waypoint - waypoint) - :precondition () - :effect - (and - (not (visited ?waypoint)) - ) - ) -) diff --git a/examples/ipc/Rover/domain.hpdl b/examples/ipc/Rover/domain.hpdl deleted file mode 100644 index ae54578..0000000 --- a/examples/ipc/Rover/domain.hpdl +++ /dev/null @@ -1,603 +0,0 @@ -(define (domain dom) - (:requirements - :typing - :htn-expansion - :negative-preconditions - :conditional-effects - :universal-preconditions - :disjuntive-preconditions - :equality - :existential-preconditions - ) - (:types - object__compiled - object - waypoint - object__compiled - mode - object__compiled - store - object__compiled - rover - object__compiled - camera - object__compiled - lander - object__compiled - objective - object__compiled - ) - - (:constants - ) - - (:predicates - (type_member_camera ?var - object) - (type_member_lander ?var - object) - (type_member_mode ?var - object) - (type_member_object__compiled ?var - object) - (type_member_objective ?var - object) - (type_member_rover ?var - object) - (type_member_store ?var - object) - (type_member_waypoint ?var - object) - (at ?var0 - rover ?var1 - waypoint) - (at_lander ?var0 - lander ?var1 - waypoint) - (at_rock_sample ?var0 - waypoint) - (at_soil_sample ?var0 - waypoint) - (available ?var0 - rover) - (calibrated ?var0 - camera ?var1 - rover) - (calibration_target ?var0 - camera ?var1 - objective) - (can_traverse ?var0 - rover ?var1 - waypoint ?var2 - waypoint) - (channel_free ?var0 - lander) - (communicated_image_data ?var0 - objective ?var1 - mode) - (communicated_rock_data ?var0 - waypoint) - (communicated_soil_data ?var0 - waypoint) - (empty ?var0 - store) - (equipped_for_imaging ?var0 - rover) - (equipped_for_rock_analysis ?var0 - rover) - (equipped_for_soil_analysis ?var0 - rover) - (full ?var0 - store) - (have_image ?var0 - rover ?var1 - objective ?var2 - mode) - (have_rock_analysis ?var0 - rover ?var1 - waypoint) - (have_soil_analysis ?var0 - rover ?var1 - waypoint) - (on_board ?var0 - camera ?var1 - rover) - (store_of ?var0 - store ?var1 - rover) - (supports ?var0 - camera ?var1 - mode) - (visible ?var0 - waypoint ?var1 - waypoint) - (visible_from ?var0 - objective ?var1 - waypoint) - (visited ?var0 - waypoint) - ) - - - (:task navigate - :parameters (?x - object ?y - object ?z - object) - (:method method1 - :precondition (and - (type_member_rover ?x) - (type_member_waypoint ?y) - (type_member_waypoint ?z) - ) - :tasks ( - (navigate_primitive ?x - rover ?y - waypoint ?z - waypoint) - ) - ) - ) - - (:task sample_soil - :parameters (?x - object ?s - object ?p - object) - (:method method1 - :precondition (and - (type_member_rover ?x) - (type_member_store ?s) - (type_member_waypoint ?p) - ) - :tasks ( - (sample_soil_primitive ?x - rover ?s - store ?p - waypoint) - ) - ) - ) - - (:task sample_rock - :parameters (?x - object ?s - object ?p - object) - (:method method1 - :precondition (and - (type_member_rover ?x) - (type_member_store ?s) - (type_member_waypoint ?p) - ) - :tasks ( - (sample_rock_primitive ?x - rover ?s - store ?p - waypoint) - ) - ) - ) - - (:task drop - :parameters (?x - object ?y - object) - (:method method1 - :precondition (and - (type_member_rover ?x) - (type_member_store ?y) - ) - :tasks ( - (drop_primitive ?x - rover ?y - store) - ) - ) - ) - - (:task calibrate - :parameters (?r - object ?i - object ?t - object ?w - object) - (:method method1 - :precondition (and - (type_member_rover ?r) - (type_member_camera ?i) - (type_member_objective ?t) - (type_member_waypoint ?w) - ) - :tasks ( - (calibrate_primitive ?r - rover ?i - camera ?t - objective ?w - waypoint) - ) - ) - ) - - (:task take_image - :parameters (?r - object ?p - object ?o - object ?i - object ?m - object) - (:method method1 - :precondition (and - (type_member_rover ?r) - (type_member_waypoint ?p) - (type_member_objective ?o) - (type_member_camera ?i) - (type_member_mode ?m) - ) - :tasks ( - (take_image_primitive ?r - rover ?p - waypoint ?o - objective ?i - camera ?m - mode) - ) - ) - ) - - (:task communicate_soil_data - :parameters (?r - object ?l - object ?p - object ?x - object ?y - object) - (:method method1 - :precondition (and - (type_member_rover ?r) - (type_member_lander ?l) - (type_member_waypoint ?p) - (type_member_waypoint ?x) - (type_member_waypoint ?y) - ) - :tasks ( - (communicate_soil_data_primitive ?r - rover ?l - lander ?p - waypoint ?x - waypoint ?y - waypoint) - ) - ) - ) - - (:task communicate_rock_data - :parameters (?r - object ?l - object ?p - object ?x - object ?y - object) - (:method method1 - :precondition (and - (type_member_rover ?r) - (type_member_lander ?l) - (type_member_waypoint ?p) - (type_member_waypoint ?x) - (type_member_waypoint ?y) - ) - :tasks ( - (communicate_rock_data_primitive ?r - rover ?l - lander ?p - waypoint ?x - waypoint ?y - waypoint) - ) - ) - ) - - (:task communicate_image_data - :parameters (?r - object ?l - object ?o - object ?m - object ?x - object ?y - object) - (:method method1 - :precondition (and - (type_member_rover ?r) - (type_member_lander ?l) - (type_member_objective ?o) - (type_member_mode ?m) - (type_member_waypoint ?x) - (type_member_waypoint ?y) - ) - :tasks ( - (communicate_image_data_primitive ?r - rover ?l - lander ?o - objective ?m - mode ?x - waypoint ?y - waypoint) - ) - ) - ) - - (:task visit - :parameters (?waypoint - object) - (:method method1 - :precondition (and - (type_member_waypoint ?waypoint) - ) - :tasks ( - (visit_primitive ?waypoint - waypoint) - ) - ) - ) - - (:task unvisit - :parameters (?waypoint - object) - (:method method1 - :precondition (and - (type_member_waypoint ?waypoint) - ) - :tasks ( - (unvisit_primitive ?waypoint - waypoint) - ) - ) - ) - -; ************************************************************ -; ************************************************************ - (:task calibrate_abs - :parameters (?rover - rover ?camera - camera) - (:method m_calibrate_abs_ordering_0 - :precondition (and - (type_member_camera ?camera - camera) - (type_member_objective ?objective - objective) - (type_member_rover ?rover - rover) - (type_member_waypoint ?waypoint - waypoint) - (calibration_target ?camera ?objective) - (visible_from ?objective ?waypoint) - ) - :tasks ( - (navigate_abs ?rover ?waypoint) - (calibrate ?rover ?camera ?objective ?waypoint) - ) - ) - ) - - (:task empty_store - :parameters (?s - store ?rover - rover) - (:method m_empty_store_1_ordering_0 - :precondition (and - (type_member_rover ?rover - rover) - (type_member_store ?s - store) - (empty ?s) - ) - :tasks () - ) - (:method m_empty_store_2_ordering_0 - :precondition (and - (type_member_rover ?rover - rover) - (type_member_store ?s - store) - (not (empty ?s)) - ) - :tasks ( - (drop ?rover ?s) - ) - ) - ) - - (:task get_image_data - :parameters (?objective - objective ?mode - mode) - (:method m_get_image_data_ordering_0 - :precondition (and - (type_member_camera ?camera - camera) - (type_member_mode ?mode - mode) - (type_member_objective ?objective - objective) - (type_member_rover ?rover - rover) - (type_member_waypoint ?waypoint - waypoint) - (equipped_for_imaging ?rover) - (on_board ?camera ?rover) - (supports ?camera ?mode) - (visible_from ?objective ?waypoint) - ) - :tasks ( - (calibrate_abs ?rover ?camera) - (navigate_abs ?rover ?waypoint) - (take_image ?rover ?waypoint ?objective ?camera ?mode) - (send_image_data ?rover ?objective ?mode) - ) - ) - ) - - (:task get_rock_data - :parameters (?waypoint - waypoint) - (:method m_get_rock_data_ordering_0 - :precondition (and - (type_member_rover ?rover - rover) - (type_member_store ?s - store) - (type_member_waypoint ?waypoint - waypoint) - (equipped_for_rock_analysis ?rover) - (store_of ?s ?rover) - ) - :tasks ( - (navigate_abs ?rover ?waypoint) - (empty_store ?s ?rover) - (sample_rock ?rover ?s ?waypoint) - (send_rock_data ?rover ?waypoint) - ) - ) - ) - - (:task get_soil_data - :parameters (?waypoint - waypoint) - (:method m_get_soil_data_ordering_0 - :precondition (and - (type_member_rover ?rover - rover) - (type_member_store ?s - store) - (type_member_waypoint ?waypoint - waypoint) - (store_of ?s ?rover) - (equipped_for_soil_analysis ?rover) - ) - :tasks ( - (navigate_abs ?rover ?waypoint) - (empty_store ?s ?rover) - (sample_soil ?rover ?s ?waypoint) - (send_soil_data ?rover ?waypoint) - ) - ) - ) - - (:task navigate_abs - :parameters (?rover - rover ?to - waypoint) - (:method m_navigate_abs_1_ordering_0 - :precondition (and - (type_member_waypoint ?from - waypoint) - (type_member_rover ?rover - rover) - (type_member_waypoint ?to - waypoint) - (at ?rover ?from) - ) - :tasks ( - (visit ?from) - (navigate ?rover ?from ?to) - (unvisit ?from) - ) - ) - (:method m_navigate_abs_2_ordering_0 - :precondition (and - (type_member_rover ?rover - rover) - (type_member_waypoint ?to - waypoint) - (at ?rover ?to) - ) - :tasks () - ) - (:method m_navigate_abs_3_ordering_0 - :precondition (and - (type_member_waypoint ?from - waypoint) - (type_member_rover ?rover - rover) - (type_member_waypoint ?to - waypoint) - (not (at ?rover ?to)) - (can_traverse ?rover ?from ?to) - ) - :tasks ( - (navigate ?rover ?from ?to) - ) - ) - (:method m_navigate_abs_4_ordering_0 - :precondition (and - (type_member_waypoint ?from - waypoint) - (type_member_waypoint ?mid - waypoint) - (type_member_rover ?rover - rover) - (type_member_waypoint ?to - waypoint) - (not (at ?rover ?to)) - (not (can_traverse ?rover ?from ?to)) - (can_traverse ?rover ?from ?mid) - (not (visited ?mid)) - ) - :tasks ( - (navigate ?rover ?from ?mid) - (visit ?mid) - (navigate ?rover ?mid ?to) - (unvisit ?mid) - ) - ) - ) - - (:task send_image_data - :parameters (?rover - rover ?objective - objective ?mode - mode) - (:method m_send_image_data_ordering_0 - :precondition (and - (type_member_lander ?l - lander) - (type_member_mode ?mode - mode) - (type_member_objective ?objective - objective) - (type_member_rover ?rover - rover) - (type_member_waypoint ?x - waypoint) - (type_member_waypoint ?y - waypoint) - (at_lander ?l ?y) - (visible ?x ?y) - ) - :tasks ( - (navigate_abs ?rover ?x) - (communicate_image_data ?rover ?l ?objective ?mode ?x ?y) - ) - ) - ) - - (:task send_rock_data - :parameters (?rover - rover ?waypoint - waypoint) - (:method m_send_rock_data_ordering_0 - :precondition (and - (type_member_lander ?l - lander) - (type_member_rover ?rover - rover) - (type_member_waypoint ?waypoint - waypoint) - (type_member_waypoint ?x - waypoint) - (type_member_waypoint ?y - waypoint) - (at_lander ?l ?y) - (visible ?x ?y) - ) - :tasks ( - (navigate_abs ?rover ?x) - (communicate_rock_data ?rover ?l ?waypoint ?x ?y) - ) - ) - ) - - (:task send_soil_data - :parameters (?rover - rover ?waypoint - waypoint) - (:method m_send_soil_data_ordering_0 - :precondition (and - (type_member_lander ?l - lander) - (type_member_rover ?rover - rover) - (type_member_waypoint ?waypoint - waypoint) - (type_member_waypoint ?x - waypoint) - (type_member_waypoint ?y - waypoint) - (at_lander ?l ?y) - (visible ?x ?y) - ) - :tasks ( - (navigate_abs ?rover ?x) - (communicate_soil_data ?rover ?l ?waypoint ?x ?y) - ) - ) - ) - - (:action navigate_primitive - :parameters (?x - rover ?y - waypoint ?z - waypoint) - :precondition (and - (can_traverse ?x ?y ?z) - (available ?x) - (at ?x ?y) - (visible ?y ?z) - ) - :effect (and - (not (at ?x ?y)) - (at ?x ?z) - ) - ) - - (:action sample_soil_primitive - :parameters (?x - rover ?s - store ?p - waypoint) - :precondition (and - (at ?x ?p) - (at_soil_sample ?p) - (equipped_for_soil_analysis ?x) - (store_of ?s ?x) - (empty ?s) - ) - :effect (and - (not (empty ?s)) - (not (at_soil_sample ?p)) - (full ?s) - (have_soil_analysis ?x ?p) - ) - ) - - (:action sample_rock_primitive - :parameters (?x - rover ?s - store ?p - waypoint) - :precondition (and - (at_rock_sample ?p) - (equipped_for_rock_analysis ?x) - (store_of ?s ?x) - (empty ?s) - ) - :effect (and - (not (empty ?s)) - (not (at_rock_sample ?p)) - (full ?s) - (have_rock_analysis ?x ?p) - ) - ) - - (:action drop_primitive - :parameters (?x - rover ?y - store) - :precondition (and - (store_of ?y ?x) - (full ?y) - ) - :effect (and - (not (full ?y)) - (empty ?y) - ) - ) - - (:action calibrate_primitive - :parameters (?r - rover ?i - camera ?t - objective ?w - waypoint) - :precondition (and - (equipped_for_imaging ?r) - (calibration_target ?i ?t) - (at ?r ?w) - (visible_from ?t ?w) - (on_board ?i ?r) - ) - :effect (and - (calibrated ?i ?r) - ) - ) - - (:action take_image_primitive - :parameters (?r - rover ?p - waypoint ?o - objective ?i - camera ?m - mode) - :precondition (and - (calibrated ?i ?r) - (on_board ?i ?r) - (equipped_for_imaging ?r) - (supports ?i ?m) - (visible_from ?o ?p) - (at ?r ?p) - ) - :effect (and - (not (calibrated ?i ?r)) - (have_image ?r ?o ?m) - ) - ) - - (:action communicate_soil_data_primitive - :parameters (?r - rover ?l - lander ?p - waypoint ?x - waypoint ?y - waypoint) - :precondition (and - (at ?r ?x) - (at_lander ?l ?y) - (have_soil_analysis ?r ?p) - (visible ?x ?y) - (available ?r) - (channel_free ?l) - ) - :effect (and - (not (available ?r)) - (not (channel_free ?l)) - ; (channel_free ?l) - (communicated_soil_data ?p) - ; (available ?r) - ) - ) - - (:action communicate_rock_data_primitive - :parameters (?r - rover ?l - lander ?p - waypoint ?x - waypoint ?y - waypoint) - :precondition (and - (at ?r ?x) - (at_lander ?l ?y) - (have_rock_analysis ?r ?p) - (visible ?x ?y) - (available ?r) - (channel_free ?l) - ) - :effect (and - (not (available ?r)) - (not (channel_free ?l)) - ; (channel_free ?l) - (communicated_rock_data ?p) - ; (available ?r) - ) - ) - - (:action communicate_image_data_primitive - :parameters (?r - rover ?l - lander ?o - objective ?m - mode ?x - waypoint ?y - waypoint) - :precondition (and - (at ?r ?x) - (at_lander ?l ?y) - (have_image ?r ?o ?m) - (visible ?x ?y) - (available ?r) - (channel_free ?l) - ) - :effect (and - (not (available ?r)) - (not (channel_free ?l)) - ; (channel_free ?l) - (communicated_image_data ?o ?m) - ; (available ?r) - ) - ) - - (:action visit_primitive - :parameters (?waypoint - waypoint) - :precondition ( - ) - :effect (and - (visited ?waypoint) - ) - ) - - (:action unvisit_primitive - :parameters (?waypoint - waypoint) - :precondition ( - ) - :effect (and - (not (visited ?waypoint)) - ) - ) - -) diff --git a/examples/ipc/Rover/problem.hddl b/examples/ipc/Rover/problem.hddl deleted file mode 100644 index f5bfcaf..0000000 --- a/examples/ipc/Rover/problem.hddl +++ /dev/null @@ -1,78 +0,0 @@ -(define - (problem pfile1) - (:domain rover_domain) - (:objects - waypoint0 - waypoint - waypoint1 - waypoint - waypoint2 - waypoint - waypoint3 - waypoint - colour - mode - high_res - mode - low_res - mode - rover0store - store - rover0 - rover - camera0 - camera - general - lander - objective0 - objective - objective1 - objective - ) - (:htn - :parameters () - :subtasks (and - (task0 (get_soil_data waypoint2)) - (task1 (get_rock_data waypoint3)) - (task2 (get_image_data objective1 high_res)) - ) - :ordering (and - (< task2 task0) - (< task0 task1) - ) - ) - (:init - (visible waypoint1 waypoint0) - (visible waypoint0 waypoint1) - (visible waypoint2 waypoint0) - (visible waypoint0 waypoint2) - (visible waypoint2 waypoint1) - (visible waypoint1 waypoint2) - (visible waypoint3 waypoint0) - (visible waypoint0 waypoint3) - (visible waypoint3 waypoint1) - (visible waypoint1 waypoint3) - (visible waypoint3 waypoint2) - (visible waypoint2 waypoint3) - (at_soil_sample waypoint0) - (at_rock_sample waypoint1) - (at_soil_sample waypoint2) - (at_rock_sample waypoint2) - (at_soil_sample waypoint3) - (at_rock_sample waypoint3) - (at_lander general waypoint0) - (channel_free general) - (at rover0 waypoint3) - (available rover0) - (store_of rover0store rover0) - (empty rover0store) - (equipped_for_soil_analysis rover0) - (equipped_for_rock_analysis rover0) - (equipped_for_imaging rover0) - (can_traverse rover0 waypoint3 waypoint0) - (can_traverse rover0 waypoint0 waypoint3) - (can_traverse rover0 waypoint3 waypoint1) - (can_traverse rover0 waypoint1 waypoint3) - (can_traverse rover0 waypoint1 waypoint2) - (can_traverse rover0 waypoint2 waypoint1) - (on_board camera0 rover0) - (calibration_target camera0 objective1) - (supports camera0 colour) - (supports camera0 high_res) - (visible_from objective0 waypoint0) - (visible_from objective0 waypoint1) - (visible_from objective0 waypoint2) - (visible_from objective0 waypoint3) - (visible_from objective1 waypoint0) - (visible_from objective1 waypoint1) - (visible_from objective1 waypoint2) - (visible_from objective1 waypoint3) - ) -) \ No newline at end of file diff --git a/examples/ipc/Rover/problem.hpdl b/examples/ipc/Rover/problem.hpdl deleted file mode 100644 index 1d98a83..0000000 --- a/examples/ipc/Rover/problem.hpdl +++ /dev/null @@ -1,93 +0,0 @@ -(define (problem prob) (:domain dom) - (:objects - camera0 - camera - general - lander - colour high_res low_res - mode - objective0 objective1 - objective - rover0 - rover - rover0store - store - waypoint0 waypoint1 waypoint2 waypoint3 - waypoint - ) - - (:init - (visible waypoint1 waypoint0) - (visible waypoint0 waypoint1) - (visible waypoint2 waypoint0) - (visible waypoint0 waypoint2) - (visible waypoint2 waypoint1) - (visible waypoint1 waypoint2) - (visible waypoint3 waypoint0) - (visible waypoint0 waypoint3) - (visible waypoint3 waypoint1) - (visible waypoint1 waypoint3) - (visible waypoint3 waypoint2) - (visible waypoint2 waypoint3) - (at_soil_sample waypoint0) - (at_rock_sample waypoint1) - (at_soil_sample waypoint2) - (at_rock_sample waypoint2) - (at_soil_sample waypoint3) - (at_rock_sample waypoint3) - (at_lander general waypoint0) - (channel_free general) - (at rover0 waypoint3) - (available rover0) - (store_of rover0store rover0) - (empty rover0store) - (equipped_for_soil_analysis rover0) - (equipped_for_rock_analysis rover0) - (equipped_for_imaging rover0) - (can_traverse rover0 waypoint3 waypoint0) - (can_traverse rover0 waypoint0 waypoint3) - (can_traverse rover0 waypoint3 waypoint1) - (can_traverse rover0 waypoint1 waypoint3) - (can_traverse rover0 waypoint1 waypoint2) - (can_traverse rover0 waypoint2 waypoint1) - (on_board camera0 rover0) - (calibration_target camera0 objective1) - (supports camera0 colour) - (supports camera0 high_res) - (visible_from objective0 waypoint0) - (visible_from objective0 waypoint1) - (visible_from objective0 waypoint2) - (visible_from objective0 waypoint3) - (visible_from objective1 waypoint0) - (visible_from objective1 waypoint1) - (visible_from objective1 waypoint2) - (visible_from objective1 waypoint3) - (type_member_camera camera0) - (type_member_lander general) - (type_member_mode colour) - (type_member_mode high_res) - (type_member_mode low_res) - (type_member_object__compiled camera0) - (type_member_object__compiled colour) - (type_member_object__compiled general) - (type_member_object__compiled high_res) - (type_member_object__compiled low_res) - (type_member_object__compiled objective0) - (type_member_object__compiled objective1) - (type_member_object__compiled rover0) - (type_member_object__compiled rover0store) - (type_member_object__compiled waypoint0) - (type_member_object__compiled waypoint1) - (type_member_object__compiled waypoint2) - (type_member_object__compiled waypoint3) - (type_member_objective objective0) - (type_member_objective objective1) - (type_member_rover rover0) - (type_member_store rover0store) - (type_member_waypoint waypoint0) - (type_member_waypoint waypoint1) - (type_member_waypoint waypoint2) - (type_member_waypoint waypoint3) - ) - - (:tasks-goal - :tasks ( - (get_image_data objective1 high_res) - (get_soil_data waypoint2) - (get_rock_data waypoint3) - ) - ) -) diff --git a/examples/ipc/Satellite/domain.hpdl b/examples/ipc/Satellite/domain.hpdl deleted file mode 100644 index c9b33b9..0000000 --- a/examples/ipc/Satellite/domain.hpdl +++ /dev/null @@ -1,283 +0,0 @@ -(define (domain dom) - (:requirements - :typing - :htn-expansion - :negative-preconditions - :conditional-effects - :universal-preconditions - :disjunctive-preconditions - :equality - :existential-preconditions - ) - (:types - direction instrument mode satellite - object - calib_direction - direction - image_direction - direction - ) - - (:predicates - (type_member_calib_direction ?var - object) - (type_member_direction ?var - object) - (type_member_image_direction ?var - object) - (type_member_instrument ?var - object) - (type_member_mode ?var - object) - (type_member_satellite ?var - object) - (calibrated ?var0 - instrument) - (calibration_target ?var0 - instrument ?var1 - calib_direction) - (have_image ?var0 - image_direction ?var1 - mode) - (on_board ?var0 - instrument ?var1 - satellite) - (pointing ?var0 - satellite ?var1 - direction) - (power_avail ?var0 - satellite) - (power_on ?var0 - instrument) - (supports ?var0 - instrument ?var1 - mode) - ) - - - (:task calibrate - :parameters (?c_s - satellite ?c_i - instrument ?c_d - calib_direction) - (:method method1 - :precondition (and - ; (type_member_satellite ?c_s - satellite) - ; (type_member_instrument ?c_i - instrument) - (type_member_calib_direction ?c_d - calib_direction) - ) - :tasks ( - (calibrate_primitive ?c_s - satellite ?c_i - instrument ?c_d - calib_direction) - ) - ) - ) - - (:task switch_off - :parameters (?sof_i - object ?sof_s - object) - (:method method1 - :precondition (and - (type_member_instrument ?sof_i) - (type_member_satellite ?sof_s) - ) - :tasks ( - (switch_off_primitive ?sof_i - instrument ?sof_s - satellite) - ) - ) - ) - - (:task switch_on - :parameters (?so_i - object ?so_s - object) - (:method method1 - :precondition (and - (type_member_instrument ?so_i) - (type_member_satellite ?so_s) - ) - :tasks ( - (switch_on_primitive ?so_i - instrument ?so_s - satellite) - ) - ) - ) - - (:task take_image - :parameters (?ti_s - object ?ti_d - object ?ti_i - object ?ti_m - object) - (:method method1 - :precondition (and - (type_member_satellite ?ti_s) - (type_member_image_direction ?ti_d) - (type_member_instrument ?ti_i) - (type_member_mode ?ti_m) - ) - :tasks ( - (take_image_primitive ?ti_s - satellite ?ti_d - image_direction ?ti_i - instrument ?ti_m - mode) - ) - ) - ) - - (:task turn_to - :parameters (?t_s - object ?t_d_new - object ?t_d_prev - object) - (:method method1 - :precondition (and - (type_member_satellite ?t_s) - (type_member_direction ?t_d_new) - (type_member_direction ?t_d_prev) - ) - :tasks ( - (turn_to_primitive ?t_s - satellite ?t_d_new - direction ?t_d_prev - direction) - ) - ) - ) - -; ************************************************************ -; ************************************************************ - (:task activate_instrument - :parameters (?ai_s - satellite ?ai_i - instrument) - (:method method4 - :precondition (and - (type_member_satellite ?ai_s - satellite) - (type_member_instrument ?ai_i - instrument) - (type_member_instrument ?switch_off_instance_2_argument_0 - instrument) - (not (= ?switch_off_instance_2_argument_0 ?ai_i)) - ) - :tasks ( - (switch_off ?switch_off_instance_2_argument_0 - instrument ?ai_s - satellite) - (switch_on ?ai_i ?ai_s) - (auto_calibrate ?ai_s ?ai_i) - ) - ) - (:method method5 - :precondition (and - (type_member_satellite ?ai_s - satellite) - (type_member_instrument ?ai_i - instrument) - ) - :tasks ( - (switch_on ?ai_i ?ai_s) - (auto_calibrate ?ai_s ?ai_i) - ) - ) - ) - - (:task auto_calibrate - :parameters (?ac_s - satellite ?ac_i - instrument) - (:method method6 - :precondition (and - (type_member_satellite ?ac_s - satellite) - (type_member_instrument ?ac_i - instrument) - (type_member_calib_direction ?calibrate_instance_3_argument_5 - calib_direction) - (type_member_direction ?turn_to_instance_2_argument_2 - calib_direction) - (type_member_calib_direction ?calibrate_instance_3_argument_5) - (not (= ?calibrate_instance_3_argument_5 ?turn_to_instance_2_argument_2)) - ) - :tasks ( - (turn_to ?ac_s ?calibrate_instance_3_argument_5 ?turn_to_instance_2_argument_2) - (calibrate ?ac_s ?ac_i ?calibrate_instance_3_argument_5) - ) - ) - (:method method7 - :precondition (and - (type_member_satellite ?ac_s - satellite) - (type_member_instrument ?ac_i - instrument) - (type_member_calib_direction ?calibrate_instance_2_argument_2 - calib_direction) - ) - :tasks ( - (calibrate ?ac_s ?ac_i ?calibrate_instance_2_argument_2) - ) - ) - ) - - (:task do_observation - :parameters (?do_d - image_direction ?do_m - mode) - (:method method0 - :precondition (and - (type_member_image_direction ?do_d - image_direction) - (type_member_instrument ?take_image_instance_4_argument_7 - instrument) - (type_member_mode ?do_m - mode) - (type_member_satellite ?turn_to_instance_3_argument_2 - satellite) - (type_member_direction ?turn_to_instance_3_argument_4 - image_direction) - (type_member_image_direction ?do_d) - (not (= ?do_d ?turn_to_instance_3_argument_4)) - ) - :tasks ( - (activate_instrument ?turn_to_instance_3_argument_2 ?take_image_instance_4_argument_7) - (turn_to ?turn_to_instance_3_argument_2 ?do_d ?turn_to_instance_3_argument_4) - (take_image ?turn_to_instance_3_argument_2 ?do_d ?take_image_instance_4_argument_7 ?do_m) - ) - ) - (:method method1 - :precondition (and - (type_member_image_direction ?do_d - image_direction) - (type_member_instrument ?take_image_instance_3_argument_5 - instrument) - (type_member_mode ?do_m - mode) - (type_member_satellite ?turn_to_instance_2_argument_0 - satellite) - (type_member_direction ?turn_to_instance_2_argument_2 - image_direction) - (type_member_image_direction ?do_d) - (not (= ?do_d ?turn_to_instance_2_argument_2)) - ) - :tasks ( - (turn_to ?turn_to_instance_2_argument_0 ?do_d ?turn_to_instance_2_argument_2) - (take_image ?turn_to_instance_2_argument_0 ?do_d ?take_image_instance_3_argument_5 ?do_m) - ) - ) - (:method method2 - :precondition (and - (type_member_satellite ?take_image_instance_3_argument_2 - satellite) - (type_member_image_direction ?do_d - image_direction) - (type_member_instrument ?take_image_instance_3_argument_4 - instrument) - (type_member_mode ?do_m - mode) - ) - :tasks ( - (activate_instrument ?take_image_instance_3_argument_2 ?take_image_instance_3_argument_4) - (take_image ?take_image_instance_3_argument_2 ?do_d ?take_image_instance_3_argument_4 ?do_m) - ) - ) - (:method method3 - :precondition (and - (type_member_satellite ?take_image_instance_2_argument_0 - satellite) - (type_member_image_direction ?do_d - image_direction) - (type_member_instrument ?take_image_instance_2_argument_2 - instrument) - (type_member_mode ?do_m - mode) - ) - :tasks ( - (take_image ?take_image_instance_2_argument_0 ?do_d ?take_image_instance_2_argument_2 ?do_m) - ) - ) - ) - - (:action calibrate_primitive - :parameters (?c_s - satellite ?c_i - instrument ?c_d - calib_direction) - :precondition (and - (on_board ?c_i ?c_s) - (calibration_target ?c_i ?c_d) - (pointing ?c_s ?c_d) - (power_on ?c_i) - ) - :effect (and - (calibrated ?c_i) - ) - ) - - (:action switch_off_primitive - :parameters (?sof_i - instrument ?sof_s - satellite) - :precondition (and - (on_board ?sof_i ?sof_s) - (power_on ?sof_i) - ) - :effect (and - (not (power_on ?sof_i)) - (power_avail ?sof_s) - ) - ) - - (:action switch_on_primitive - :parameters (?so_i - instrument ?so_s - satellite) - :precondition (and - (on_board ?so_i ?so_s) - (power_avail ?so_s) - ) - :effect (and - (power_on ?so_i) - (not (calibrated ?so_i)) - (not (power_avail ?so_s)) - ) - ) - - (:action take_image_primitive - :parameters (?ti_s - satellite ?ti_d - image_direction ?ti_i - instrument ?ti_m - mode) - :precondition (and - (calibrated ?ti_i) - (pointing ?ti_s ?ti_d) - (on_board ?ti_i ?ti_s) - (power_on ?ti_i) - (supports ?ti_i ?ti_m) - ) - :effect (and - (have_image ?ti_d ?ti_m) - ) - ) - - (:action turn_to_primitive - :parameters (?t_s - satellite ?t_d_new - direction ?t_d_prev - direction) - :precondition (and - (pointing ?t_s ?t_d_prev) - ) - :effect (and - (pointing ?t_s ?t_d_new) - (not (pointing ?t_s ?t_d_prev)) - ) - ) - -) diff --git a/examples/ipc/Satellite/problem.hpdl b/examples/ipc/Satellite/problem.hpdl deleted file mode 100644 index 35c882e..0000000 --- a/examples/ipc/Satellite/problem.hpdl +++ /dev/null @@ -1,56 +0,0 @@ -(define (problem prob) (:domain dom) - (:objects - GroundStation0 GroundStation1 - calib_direction - Phenomenon4 Phenomenon6 Phenomenon7 Star5 - image_direction - instrument01 instrument02 instrument11 instrument12 - instrument - thermograph x_ray - mode - satellite0 satellite1 - satellite - ) - - (:init - (on_board instrument01 satellite0) - (supports instrument01 thermograph) - (calibration_target instrument01 GroundStation0) - (on_board instrument02 satellite0) - (supports instrument02 x_ray) - (calibration_target instrument02 GroundStation0) - (power_avail satellite0) - (pointing satellite0 Phenomenon6) - (on_board instrument11 satellite1) - (supports instrument11 thermograph) - (calibration_target instrument11 GroundStation1) - (on_board instrument12 satellite1) - (supports instrument12 x_ray) - (calibration_target instrument12 GroundStation1) - (power_avail satellite1) - (pointing satellite1 Phenomenon7) - (type_member_calib_direction GroundStation0) - (type_member_calib_direction GroundStation1) - (type_member_direction GroundStation0) - (type_member_direction GroundStation1) - (type_member_direction Phenomenon4) - (type_member_direction Phenomenon6) - (type_member_direction Phenomenon7) - (type_member_direction Star5) - (type_member_image_direction Phenomenon4) - (type_member_image_direction Phenomenon6) - (type_member_image_direction Phenomenon7) - (type_member_image_direction Star5) - (type_member_instrument instrument01) - (type_member_instrument instrument02) - (type_member_instrument instrument11) - (type_member_instrument instrument12) - (type_member_mode thermograph) - (type_member_mode x_ray) - (type_member_satellite satellite0) - (type_member_satellite satellite1) - ) - - (:tasks-goal - :tasks ( - (do_observation Star5 x_ray) - (do_observation Phenomenon4 thermograph) - (do_observation Phenomenon6 x_ray) - ) - ) -) diff --git a/examples/ipc/SmartPhone/domain.hpdl b/examples/ipc/SmartPhone/domain.hpdl deleted file mode 100644 index b84a2bc..0000000 --- a/examples/ipc/SmartPhone/domain.hpdl +++ /dev/null @@ -1,3733 +0,0 @@ -(define (domain dom) - (:requirements - :typing - :htn-expansion - :negative-preconditions - :conditional-effects - :universal-preconditions - :disjunctive-preconditions - :equality - :existential-preconditions - ) - (:types - alarm contactable creatable information message selectable - object - regularinformation - information - contactableinformation - information - transferablebysms - information - transferablebycall - information - transferablebyemail - information - transferablebyemailregular - regularinformation - transferablebyemailregular - transferablebyemail - transferablebyemailcontactable - contactableinformation - transferablebyemailcontactable - transferablebyemail - transferablebysmsregular - transferablebysms - transferablebysmsregular - regularinformation - transferablebyphonecontactable - contactableinformation - transferablebyphonecontactable - transferablebycall - transferablebyphoneregular - transferablebycall - transferablebyphoneregular - regularinformation - transferablebysmscontactable - contactableinformation - transferablebysmscontactable - transferablebysms - agenda - transferablebyemailregular - appointment - creatable - appointment - selectable - audio - transferablebyemailregular - call - message - company - contactable - contact - creatable - contact - selectable - date - transferablebyphoneregular - date - transferablebyemailregular - date - transferablebysmsregular - email - message - emailaccount - selectable - emailaddress - transferablebyemailcontactable - emailaddress - transferablebysmscontactable - emailaddress - transferablebyphonecontactable - handout - transferablebyemailregular - location - transferablebyphoneregular - location - transferablebyemailregular - location - transferablebysmsregular - milestone - transferablebyemailregular - numbermobile - transferablebyemailcontactable - numbermobile - transferablebysmscontactable - numbermobile - transferablebyphonecontactable - numberoffice - transferablebyemailcontactable - numberoffice - transferablebysmscontactable - numberoffice - transferablebyphonecontactable - person - contactable - picture - transferablebyemailregular - projectplan - transferablebyemailregular - protocol - transferablebyemailregular - route - transferablebyphoneregular - route - transferablebyemailregular - route - transferablebysmsregular - sms - message - task - creatable - task - selectable - video - transferablebyemailregular - ) - - (:constants - appointmentForMeeting - appointment - call1 - call - email1 - email - dave greg - person - ) - - (:predicates - (type_member_agenda ?var - object) - (type_member_alarm ?var - object) - (type_member_appointment ?var - object) - (type_member_audio ?var - object) - (type_member_call ?var - object) - (type_member_company ?var - object) - (type_member_contact ?var - object) - (type_member_contactable ?var - object) - (type_member_contactableinformation ?var - object) - (type_member_creatable ?var - object) - (type_member_date ?var - object) - (type_member_email ?var - object) - (type_member_emailaccount ?var - object) - (type_member_emailaddress ?var - object) - (type_member_handout ?var - object) - (type_member_information ?var - object) - (type_member_location ?var - object) - (type_member_message ?var - object) - (type_member_milestone ?var - object) - (type_member_numbermobile ?var - object) - (type_member_numberoffice ?var - object) - (type_member_person ?var - object) - (type_member_picture ?var - object) - (type_member_projectplan ?var - object) - (type_member_protocol ?var - object) - (type_member_regularinformation ?var - object) - (type_member_route ?var - object) - (type_member_sms ?var - object) - (type_member_selectable ?var - object) - (type_member_task ?var - object) - (type_member_transferablebycall ?var - object) - (type_member_transferablebyemail ?var - object) - (type_member_transferablebyemailcontactable ?var - object) - (type_member_transferablebyemailregular ?var - object) - (type_member_transferablebyphonecontactable ?var - object) - (type_member_transferablebyphoneregular ?var - object) - (type_member_transferablebysms ?var - object) - (type_member_transferablebysmscontactable ?var - object) - (type_member_transferablebysmsregular ?var - object) - (type_member_video ?var - object) - (active_Alarm ?var0 - alarm) - (associated_Contact ?var0 - contact ?var1 - contactable) - (associated_Picture ?var0 - contact ?var1 - picture) - (attached ?var0 - message ?var1 - information) - (created ?var0 - creatable) - (entered_AnyNumber) - (entered_EMail ?var0 - contactable) - (entered_NumberMobile ?var0 - contactable) - (entered_NumberOffice ?var0 - contactable) - (hasInformation_Contactable ?var0 - contactable ?var1 - contactable ?var2 - contactableinformation) - (hasInformation_Regular ?var0 - contactable ?var1 - regularinformation) - (hasReceived ?var0 - contactable ?var1 - message) - (haveInformation_Contactable ?var0 - contactable ?var1 - contactableinformation) - (haveInformation_Regular ?var0 - regularinformation) - (haveSent ?var0 - message) - (inMode_AccountSelection) - (inMode_Calendar) - (inMode_Calendar_ConfigureAppointment) - (inMode_Clock) - (inMode_Clock_Alarm) - (inMode_Contacts) - (inMode_Contacts_ConfigureContact) - (inMode_Contacts_Details) - (inMode_EMail) - (inMode_EMail_Inbox) - (inMode_EMail_NewEMail) - (inMode_Home) - (inMode_Menu) - (inMode_Messages) - (inMode_NewMessage) - (inMode_People) - (inMode_People_AddFavourite) - (inMode_People_AddFavourite_SelectContact) - (inMode_People_AddFavourite_SelectFavouriteNumber) - (inMode_People_AddFavourite_SelectPicture) - (inMode_People_FavouriteSelected) - (inMode_People_ReadyToAddFavourite) - (inMode_PictureSelection) - (inMode_Programs) - (inMode_Tasks) - (inMode_Tasks_ConfigureTask) - (inMode_Telephone) - (inUse ?var0 - creatable) - (isFavourite ?var0 - contact) - (isSet_Alarm_Days ?var0 - alarm ?var1 - date) - (isSet_Alarm_Description ?var0 - alarm) - (isSet_Alarm_Time ?var0 - alarm ?var1 - date) - (isSet_Appointment_Location ?var0 - appointment ?var1 - location) - (isSet_Appointment_Name ?var0 - appointment) - (isSet_Appointment_Reminder ?var0 - appointment) - (isSet_Appointment_Time ?var0 - appointment ?var1 - date) - (isSet_Contact_EmailAddress ?var0 - contact) - (isSet_Contact_Name ?var0 - contact) - (isSet_Contact_NumberMobile ?var0 - contact) - (isSet_Contact_NumberOffice ?var0 - contact) - (isSet_Contact_Picture ?var0 - contact) - (isSet_Task_Name ?var0 - task) - (isSet_Task_Reminder ?var0 - task) - (isSet_Task_Time ?var0 - task ?var1 - date) - (selected ?var0 - selectable) - (selected_AddAsFavourite ?var0 - contact) - (selected_Favourite ?var0 - contact) - (selected_FavouriteNumber) - ) - - - (:task activate_Alarm - :parameters (?selectAlarm_variable1 - object) - (:method method1 - :precondition (and - (type_member_alarm ?selectAlarm_variable1) - ) - :tasks ( - (activate_Alarm_primitive ?selectAlarm_variable1 - alarm) - ) - ) - ) - - (:task attachContactableInformationToCall - :parameters (?newObj_variable150 - object ?newObj_variable151 - object ?newObj_variable152 - object) - (:method method1 - :precondition (and - (type_member_call ?newObj_variable150) - (type_member_transferablebyphonecontactable ?newObj_variable151) - (type_member_contactable ?newObj_variable152) - ) - :tasks ( - (attachContactableInformationToCall_primitive ?newObj_variable150 - call ?newObj_variable151 - transferablebyphonecontactable ?newObj_variable152 - contactable) - ) - ) - ) - - (:task attachContactableInformationToEMail - :parameters (?newObj_variable153 - object ?newObj_variable154 - object ?newObj_variable155 - object) - (:method method1 - :precondition (and - (type_member_email ?newObj_variable153) - (type_member_transferablebyemailcontactable ?newObj_variable154) - (type_member_contactable ?newObj_variable155) - ) - :tasks ( - (attachContactableInformationToEMail_primitive ?newObj_variable153 - email ?newObj_variable154 - transferablebyemailcontactable ?newObj_variable155 - contactable) - ) - ) - ) - - (:task attachContactableInformationToSMS - :parameters (?newObj_variable156 - object ?newObj_variable157 - object ?newObj_variable158 - object) - (:method method1 - :precondition (and - (type_member_sms ?newObj_variable156) - (type_member_transferablebysmscontactable ?newObj_variable157) - (type_member_contactable ?newObj_variable158) - ) - :tasks ( - (attachContactableInformationToSMS_primitive ?newObj_variable156 - sms ?newObj_variable157 - transferablebysmscontactable ?newObj_variable158 - contactable) - ) - ) - ) - - (:task attachRegularInformationToCall - :parameters (?newObj_variable148 - object ?newObj_variable149 - object) - (:method method1 - :precondition (and - (type_member_call ?newObj_variable148) - (type_member_transferablebyphoneregular ?newObj_variable149) - ) - :tasks ( - (attachRegularInformationToCall_primitive ?newObj_variable148 - call ?newObj_variable149 - transferablebyphoneregular) - ) - ) - ) - - (:task attachRegularInformationToEMail - :parameters (?newObj_variable159 - object ?newObj_variable160 - object) - (:method method1 - :precondition (and - (type_member_email ?newObj_variable159) - (type_member_transferablebyemailregular ?newObj_variable160) - ) - :tasks ( - (attachRegularInformationToEMail_primitive ?newObj_variable159 - email ?newObj_variable160 - transferablebyemailregular) - ) - ) - ) - - (:task attachRegularInformationToSMS - :parameters (?newObj_variable161 - object ?newObj_variable162 - object) - (:method method1 - :precondition (and - (type_member_sms ?newObj_variable161) - (type_member_transferablebysmsregular ?newObj_variable162) - ) - :tasks ( - (attachRegularInformationToSMS_primitive ?newObj_variable161 - sms ?newObj_variable162 - transferablebysmsregular) - ) - ) - ) - - (:task enter_EMailAddress - :parameters (?newObj_variable115 - object ?enter_EMailAddress_variable1 - object) - (:method method1 - :precondition (and - (type_member_contactable ?newObj_variable115) - (type_member_emailaddress ?enter_EMailAddress_variable1) - ) - :tasks ( - (enter_EMailAddress_primitive ?newObj_variable115 - contactable ?enter_EMailAddress_variable1 - emailaddress) - ) - ) - ) - - (:task enter_Number_ForCall_Mobile - :parameters (?newObj_variable60 - object ?enter_Number_ForCall_Mobile_variable1 - object) - (:method method1 - :precondition (and - (type_member_contactable ?newObj_variable60) - (type_member_numbermobile ?enter_Number_ForCall_Mobile_variable1) - ) - :tasks ( - (enter_Number_ForCall_Mobile_primitive ?newObj_variable60 - contactable ?enter_Number_ForCall_Mobile_variable1 - numbermobile) - ) - ) - ) - - (:task enter_Number_ForCall_Office - :parameters (?newObj_variable61 - object ?enter_Number_ForCall_Office_variable1 - object) - (:method method1 - :precondition (and - (type_member_contactable ?newObj_variable61) - (type_member_numberoffice ?enter_Number_ForCall_Office_variable1) - ) - :tasks ( - (enter_Number_ForCall_Office_primitive ?newObj_variable61 - contactable ?enter_Number_ForCall_Office_variable1 - numberoffice) - ) - ) - ) - - (:task enter_Number_ForSMS_Mobile - :parameters (?newObj_variable100 - object ?enter_Number_ForSMS_Mobile_variable1 - object) - (:method method1 - :precondition (and - (type_member_contactable ?newObj_variable100) - (type_member_numbermobile ?enter_Number_ForSMS_Mobile_variable1) - ) - :tasks ( - (enter_Number_ForSMS_Mobile_primitive ?newObj_variable100 - contactable ?enter_Number_ForSMS_Mobile_variable1 - numbermobile) - ) - ) - ) - - (:task enter_Number_ForSMS_Office - :parameters (?newObj_variable101 - object ?enter_Number_ForSMS_Office_variable1 - object) - (:method method1 - :precondition (and - (type_member_contactable ?newObj_variable101) - (type_member_numberoffice ?enter_Number_ForSMS_Office_variable1) - ) - :tasks ( - (enter_Number_ForSMS_Office_primitive ?newObj_variable101 - contactable ?enter_Number_ForSMS_Office_variable1 - numberoffice) - ) - ) - ) - - (:task extractsInformation_Contactable - :parameters (?newObj_variable182 - object ?newObj_variable183 - object ?newObj_variable184 - object ?newObj_variable185 - object) - (:method method1 - :precondition (and - (type_member_contactable ?newObj_variable182) - (type_member_message ?newObj_variable183) - (type_member_contactableinformation ?newObj_variable184) - (type_member_contactable ?newObj_variable185) - ) - :tasks ( - (extractsInformation_Contactable_primitive ?newObj_variable182 - contactable ?newObj_variable183 - message ?newObj_variable184 - contactableinformation ?newObj_variable185 - contactable) - ) - ) - ) - - (:task extractsInformation_Regular - :parameters (?newObj_variable186 - object ?newObj_variable187 - object ?newObj_variable188 - object) - (:method method1 - :precondition (and - (type_member_contactable ?newObj_variable186) - (type_member_message ?newObj_variable187) - (type_member_regularinformation ?newObj_variable188) - ) - :tasks ( - (extractsInformation_Regular_primitive ?newObj_variable186 - contactable ?newObj_variable187 - message ?newObj_variable188 - regularinformation) - ) - ) - ) - - (:task press_Calendar_Menu - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (press_Calendar_Menu_primitive) - ) - ) - ) - - (:task press_Calendar_Menu_NewAppointment - :parameters (?press_Calendar_Menu_NewAppointment_variable1 - object) - (:method method1 - :precondition (and - (type_member_appointment ?press_Calendar_Menu_NewAppointment_variable1) - ) - :tasks ( - (press_Calendar_Menu_NewAppointment_primitive ?press_Calendar_Menu_NewAppointment_variable1 - appointment) - ) - ) - ) - - (:task press_Calendar_NewAppointment_OK - :parameters (?press_Calendar_NewAppointment_OK_variable1 - object ?press_Calendar_NewAppointment_OK_variable2 - object) - (:method method1 - :precondition (and - (type_member_appointment ?press_Calendar_NewAppointment_OK_variable1) - (type_member_date ?press_Calendar_NewAppointment_OK_variable2) - ) - :tasks ( - (press_Calendar_NewAppointment_OK_primitive ?press_Calendar_NewAppointment_OK_variable1 - appointment ?press_Calendar_NewAppointment_OK_variable2 - date) - ) - ) - ) - - (:task press_Clock_Alarm - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (press_Clock_Alarm_primitive) - ) - ) - ) - - (:task press_Contacts_New - :parameters (?press_Contacts_New_variable1 - object ?press_Contacts_New_variable2 - object) - (:method method1 - :precondition (and - (type_member_contact ?press_Contacts_New_variable1) - (type_member_contactable ?press_Contacts_New_variable2) - ) - :tasks ( - (press_Contacts_New_primitive ?press_Contacts_New_variable1 - contact ?press_Contacts_New_variable2 - contactable) - ) - ) - ) - - (:task press_Contacts_NewContact_OK - :parameters (?press_Contacts_NewContact_OK_variable1 - object) - (:method method1 - :precondition (and - (type_member_contact ?press_Contacts_NewContact_OK_variable1) - ) - :tasks ( - (press_Contacts_NewContact_OK_primitive ?press_Contacts_NewContact_OK_variable1 - contact) - ) - ) - ) - - (:task press_Contacts_NewContact_SelectPicture - :parameters (?press_Contacts_NewContact_SelectPicture_variable1 - object) - (:method method1 - :precondition (and - (type_member_contact ?press_Contacts_NewContact_SelectPicture_variable1) - ) - :tasks ( - (press_Contacts_NewContact_SelectPicture_primitive ?press_Contacts_NewContact_SelectPicture_variable1 - contact) - ) - ) - ) - - (:task press_EMail_NewEMail - :parameters (?press_EMail_NewEMail_variable1 - object) - (:method method1 - :precondition (and - (type_member_emailaccount ?press_EMail_NewEMail_variable1) - ) - :tasks ( - (press_EMail_NewEMail_primitive ?press_EMail_NewEMail_variable1 - emailaccount) - ) - ) - ) - - (:task press_EMail_NewEMail_Send - :parameters (?newObj_variable116 - object ?press_EMail_NewEMail_Send_variable1 - object) - (:method method1 - :precondition (and - (type_member_contactable ?newObj_variable116) - (type_member_email ?press_EMail_NewEMail_Send_variable1) - ) - :tasks ( - (press_EMail_NewEMail_Send_primitive ?newObj_variable116 - contactable ?press_EMail_NewEMail_Send_variable1 - email) - ) - ) - ) - - (:task press_Home_Calendar - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (press_Home_Calendar_primitive) - ) - ) - ) - - (:task press_Home_Clock - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (press_Home_Clock_primitive) - ) - ) - ) - - (:task press_Home_EMail - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (press_Home_EMail_primitive) - ) - ) - ) - - (:task press_Home_Messages - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (press_Home_Messages_primitive) - ) - ) - ) - - (:task press_Home_People - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (press_Home_People_primitive) - ) - ) - ) - - (:task press_Home_Programs - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (press_Home_Programs_primitive) - ) - ) - ) - - (:task press_Home_Telephone - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (press_Home_Telephone_primitive) - ) - ) - ) - - (:task press_Home_Default - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (press_Home_Default_primitive) - ) - ) - ) - - (:task press_Home_From_Add_Favourite - :parameters (?newObj_variable69 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable69) - ) - :tasks ( - (press_Home_From_Add_Favourite_primitive ?newObj_variable69 - contact) - ) - ) - ) - - (:task press_Home_From_Contacts_Details - :parameters (?newObj_variable12 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable12) - ) - :tasks ( - (press_Home_From_Contacts_Details_primitive ?newObj_variable12 - contact) - ) - ) - ) - - (:task press_Home_From_SMS_Mobile - :parameters (?newObj_variable15 - object) - (:method method1 - :precondition (and - (type_member_contactable ?newObj_variable15) - ) - :tasks ( - (press_Home_From_SMS_Mobile_primitive ?newObj_variable15 - contactable) - ) - ) - ) - - (:task press_Home_From_SMS_Office - :parameters (?newObj_variable105 - object) - (:method method1 - :precondition (and - (type_member_contactable ?newObj_variable105) - ) - :tasks ( - (press_Home_From_SMS_Office_primitive ?newObj_variable105 - contactable) - ) - ) - ) - - (:task press_Home_From_Telephone_Mobile - :parameters (?newObj_variable97 - object) - (:method method1 - :precondition (and - (type_member_contactable ?newObj_variable97) - ) - :tasks ( - (press_Home_From_Telephone_Mobile_primitive ?newObj_variable97 - contactable) - ) - ) - ) - - (:task press_Home_From_Telephone_Office - :parameters (?newObj_variable98 - object) - (:method method1 - :precondition (and - (type_member_contactable ?newObj_variable98) - ) - :tasks ( - (press_Home_From_Telephone_Office_primitive ?newObj_variable98 - contactable) - ) - ) - ) - - (:task press_Messages_NewMessage - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (press_Messages_NewMessage_primitive) - ) - ) - ) - - (:task press_NewMessage_Send_Mobile - :parameters (?newObj_variable107 - object ?press_NewMessage_Send_Mobile_variable2 - object) - (:method method1 - :precondition (and - (type_member_contactable ?newObj_variable107) - (type_member_sms ?press_NewMessage_Send_Mobile_variable2) - ) - :tasks ( - (press_NewMessage_Send_Mobile_primitive ?newObj_variable107 - contactable ?press_NewMessage_Send_Mobile_variable2 - sms) - ) - ) - ) - - (:task press_NewMessage_Send_Office - :parameters (?newObj_variable108 - object ?press_NewMessage_Send_Office_variable1 - object) - (:method method1 - :precondition (and - (type_member_contactable ?newObj_variable108) - (type_member_sms ?press_NewMessage_Send_Office_variable1) - ) - :tasks ( - (press_NewMessage_Send_Office_primitive ?newObj_variable108 - contactable ?press_NewMessage_Send_Office_variable1 - sms) - ) - ) - ) - - (:task press_People_LargePlus - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (press_People_LargePlus_primitive) - ) - ) - ) - - (:task press_People_Menu - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (press_People_Menu_primitive) - ) - ) - ) - - (:task press_People_Menu_AddFavourite - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (press_People_Menu_AddFavourite_primitive) - ) - ) - ) - - (:task press_People_More - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (press_People_More_primitive) - ) - ) - ) - - (:task press_People_Smallplus_AlreadyPressed - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (press_People_Smallplus_AlreadyPressed_primitive) - ) - ) - ) - - (:task press_People_Smallplus_FavouriteSelected - :parameters (?newObj_variable94 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable94) - ) - :tasks ( - (press_People_Smallplus_FavouriteSelected_primitive ?newObj_variable94 - contact) - ) - ) - ) - - (:task press_Programs_Tasks - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (press_Programs_Tasks_primitive) - ) - ) - ) - - (:task press_Tasks_Menu - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (press_Tasks_Menu_primitive) - ) - ) - ) - - (:task press_Tasks_Menu_NewTask - :parameters (?press_Tasks_Menu_NewTask_variable2 - object) - (:method method1 - :precondition (and - (type_member_task ?press_Tasks_Menu_NewTask_variable2) - ) - :tasks ( - (press_Tasks_Menu_NewTask_primitive ?press_Tasks_Menu_NewTask_variable2 - task) - ) - ) - ) - - (:task press_Tasks_NewTask_OK - :parameters (?press_Tasks_NewTask_OK_variable1 - object) - (:method method1 - :precondition (and - (type_member_task ?press_Tasks_NewTask_OK_variable1) - ) - :tasks ( - (press_Tasks_NewTask_OK_primitive ?press_Tasks_NewTask_OK_variable1 - task) - ) - ) - ) - - (:task press_Telephone_Call_Mobile - :parameters (?newObj_variable73 - object ?press_Call_Mobile_variable1 - object) - (:method method1 - :precondition (and - (type_member_contactable ?newObj_variable73) - (type_member_call ?press_Call_Mobile_variable1) - ) - :tasks ( - (press_Telephone_Call_Mobile_primitive ?newObj_variable73 - contactable ?press_Call_Mobile_variable1 - call) - ) - ) - ) - - (:task press_Telephone_Call_Office - :parameters (?newObj_variable74 - object ?press_Call_Office_variable1 - object) - (:method method1 - :precondition (and - (type_member_contactable ?newObj_variable74) - (type_member_call ?press_Call_Office_variable1) - ) - :tasks ( - (press_Telephone_Call_Office_primitive ?newObj_variable74 - contactable ?press_Call_Office_variable1 - call) - ) - ) - ) - - (:task press_Telephone_Contacts - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (press_Telephone_Contacts_primitive) - ) - ) - ) - - (:task select_AccountSelection_Account - :parameters (?newObj_variable140 - object) - (:method method1 - :precondition (and - (type_member_emailaccount ?newObj_variable140) - ) - :tasks ( - (select_AccountSelection_Account_primitive ?newObj_variable140 - emailaccount) - ) - ) - ) - - (:task select_Contacts_ContactForContactable - :parameters (?newObj_variable78 - object ?newObj_variable79 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable78) - (type_member_contactable ?newObj_variable79) - ) - :tasks ( - (select_Contacts_ContactForContactable_primitive ?newObj_variable78 - contact ?newObj_variable79 - contactable) - ) - ) - ) - - (:task select_Contacts_Details_Mobile - :parameters (?newObj_variable83 - object ?select_Contacts_Details_Mobile_variable1 - object ?select_Contacts_Details_Mobile_variable2 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable83) - (type_member_call ?select_Contacts_Details_Mobile_variable1) - (type_member_contactable ?select_Contacts_Details_Mobile_variable2) - ) - :tasks ( - (select_Contacts_Details_Mobile_primitive ?newObj_variable83 - contact ?select_Contacts_Details_Mobile_variable1 - call ?select_Contacts_Details_Mobile_variable2 - contactable) - ) - ) - ) - - (:task select_Contacts_Details_Office - :parameters (?newObj_variable84 - object ?select_Contacts_Details_Office_variable1 - object ?select_Contacts_Details_Office_variable2 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable84) - (type_member_call ?select_Contacts_Details_Office_variable1) - (type_member_contactable ?select_Contacts_Details_Office_variable2) - ) - :tasks ( - (select_Contacts_Details_Office_primitive ?newObj_variable84 - contact ?select_Contacts_Details_Office_variable1 - call ?select_Contacts_Details_Office_variable2 - contactable) - ) - ) - ) - - (:task select_EMail_EMailAccount_NoOp - :parameters (?newObj_variable137 - object) - (:method method1 - :precondition (and - (type_member_emailaccount ?newObj_variable137) - ) - :tasks ( - (select_EMail_EMailAccount_NoOp_primitive ?newObj_variable137 - emailaccount) - ) - ) - ) - - (:task select_EMail_EMailAccount_WithPreviousSelection - :parameters (?newObj_variable114 - object ?select_EMail_EMailAccount_variable1 - object) - (:method method1 - :precondition (and - (type_member_emailaccount ?newObj_variable114) - (type_member_emailaccount ?select_EMail_EMailAccount_variable1) - ) - :tasks ( - (select_EMail_EMailAccount_WithPreviousSelection_primitive ?newObj_variable114 - emailaccount ?select_EMail_EMailAccount_variable1 - emailaccount) - ) - ) - ) - - (:task select_People_AddFavourite_Contact_withEmail - :parameters (?newObj_variable57 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable57) - ) - :tasks ( - (select_People_AddFavourite_Contact_withEmail_primitive ?newObj_variable57 - contact) - ) - ) - ) - - (:task select_People_AddFavourite_Contact_withMobile - :parameters (?newObj_variable53 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable53) - ) - :tasks ( - (select_People_AddFavourite_Contact_withMobile_primitive ?newObj_variable53 - contact) - ) - ) - ) - - (:task select_People_AddFavourite_Contact_withOffice - :parameters (?newObj_variable58 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable58) - ) - :tasks ( - (select_People_AddFavourite_Contact_withOffice_primitive ?newObj_variable58 - contact) - ) - ) - ) - - (:task select_People_AddFavourite_FavouriteNumber_WithPicture - :parameters (?newObj_variable20 - object ?newObj_variable22 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable20) - (type_member_picture ?newObj_variable22) - ) - :tasks ( - (select_People_AddFavourite_FavouriteNumber_WithPicture_primitive ?newObj_variable20 - contact ?newObj_variable22 - picture) - ) - ) - ) - - (:task select_People_AddFavourite_FavouriteNumber_WithoutPicture - :parameters (?newObj_variable33 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable33) - ) - :tasks ( - (select_People_AddFavourite_FavouriteNumber_WithoutPicture_primitive ?newObj_variable33 - contact) - ) - ) - ) - - (:task select_People_AddFavourite_Picture - :parameters (?newObj_variable62 - object ?newObj_variable63 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable62) - (type_member_picture ?newObj_variable63) - ) - :tasks ( - (select_People_AddFavourite_Picture_primitive ?newObj_variable62 - contact ?newObj_variable63 - picture) - ) - ) - ) - - (:task select_People_FavouriteSelected_EMail - :parameters (?newObj_variable135 - object ?select_People_FavouriteSelected_EMail_variable1 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable135) - (type_member_contactable ?select_People_FavouriteSelected_EMail_variable1) - ) - :tasks ( - (select_People_FavouriteSelected_EMail_primitive ?newObj_variable135 - contact ?select_People_FavouriteSelected_EMail_variable1 - contactable) - ) - ) - ) - - (:task select_People_FavouriteSelected_Mobile - :parameters (?newObj_variable88 - object ?select_People_FavouriteSelected_Mobile_variable1 - object ?select_People_FavouriteSelected_Mobile_variable2 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable88) - (type_member_call ?select_People_FavouriteSelected_Mobile_variable1) - (type_member_contactable ?select_People_FavouriteSelected_Mobile_variable2) - ) - :tasks ( - (select_People_FavouriteSelected_Mobile_primitive ?newObj_variable88 - contact ?select_People_FavouriteSelected_Mobile_variable1 - call ?select_People_FavouriteSelected_Mobile_variable2 - contactable) - ) - ) - ) - - (:task select_People_FavouriteSelected_Office - :parameters (?newObj_variable89 - object ?select_People_FavouriteSelected_Office_variable1 - object ?select_People_FavouriteSelected_Office_variable2 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable89) - (type_member_call ?select_People_FavouriteSelected_Office_variable1) - (type_member_contactable ?select_People_FavouriteSelected_Office_variable2) - ) - :tasks ( - (select_People_FavouriteSelected_Office_primitive ?newObj_variable89 - contact ?select_People_FavouriteSelected_Office_variable1 - call ?select_People_FavouriteSelected_Office_variable2 - contactable) - ) - ) - ) - - (:task select_People_FavouriteSelected_SMS - :parameters (?newObj_variable112 - object ?newObj_variable113 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable112) - (type_member_contactable ?newObj_variable113) - ) - :tasks ( - (select_People_FavouriteSelected_SMS_primitive ?newObj_variable112 - contact ?newObj_variable113 - contactable) - ) - ) - ) - - (:task select_People_Favourite_FromReadyToAddFavourite - :parameters (?newObj_variable123 - object ?newObj_variable124 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable123) - (type_member_contactable ?newObj_variable124) - ) - :tasks ( - (select_People_Favourite_FromReadyToAddFavourite_primitive ?newObj_variable123 - contact ?newObj_variable124 - contactable) - ) - ) - ) - - (:task select_People_Favourite_NoOp - :parameters (?newObj_variable130 - object ?newObj_variable131 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable130) - (type_member_contactable ?newObj_variable131) - ) - :tasks ( - (select_People_Favourite_NoOp_primitive ?newObj_variable130 - contact ?newObj_variable131 - contactable) - ) - ) - ) - - (:task select_People_Favourite_WithPreviousSelection - :parameters (?newObj_variable120 - object ?newObj_variable121 - object ?newObj_variable122 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable120) - (type_member_contact ?newObj_variable121) - (type_member_contactable ?newObj_variable122) - ) - :tasks ( - (select_People_Favourite_WithPreviousSelection_primitive ?newObj_variable120 - contact ?newObj_variable121 - contact ?newObj_variable122 - contactable) - ) - ) - ) - - (:task select_PictureSelection_PictureForNewContact - :parameters (?newObj_variable52 - object ?select_PictureSelection_PictureForNewContact_variable2 - object) - (:method method1 - :precondition (and - (type_member_picture ?newObj_variable52) - (type_member_contact ?select_PictureSelection_PictureForNewContact_variable2) - ) - :tasks ( - (select_PictureSelection_PictureForNewContact_primitive ?newObj_variable52 - picture ?select_PictureSelection_PictureForNewContact_variable2 - contact) - ) - ) - ) - - (:task set_Alarm_Days - :parameters (?setAlarm_Days_variable1 - object ?set_Alarm_Days_variable1 - object) - (:method method1 - :precondition (and - (type_member_alarm ?setAlarm_Days_variable1) - (type_member_date ?set_Alarm_Days_variable1) - ) - :tasks ( - (set_Alarm_Days_primitive ?setAlarm_Days_variable1 - alarm ?set_Alarm_Days_variable1 - date) - ) - ) - ) - - (:task set_Alarm_Description - :parameters (?newObj_variable6 - object) - (:method method1 - :precondition (and - (type_member_alarm ?newObj_variable6) - ) - :tasks ( - (set_Alarm_Description_primitive ?newObj_variable6 - alarm) - ) - ) - ) - - (:task set_Alarm_Time - :parameters (?setAlarm_Time_variable1 - object ?set_Alarm_Time_variable1 - object) - (:method method1 - :precondition (and - (type_member_alarm ?setAlarm_Time_variable1) - (type_member_date ?set_Alarm_Time_variable1) - ) - :tasks ( - (set_Alarm_Time_primitive ?setAlarm_Time_variable1 - alarm ?set_Alarm_Time_variable1 - date) - ) - ) - ) - - (:task set_Appointment_Location - :parameters (?newObj_variable9 - object ?set_Appointment_Location_variable1 - object) - (:method method1 - :precondition (and - (type_member_appointment ?newObj_variable9) - (type_member_location ?set_Appointment_Location_variable1) - ) - :tasks ( - (set_Appointment_Location_primitive ?newObj_variable9 - appointment ?set_Appointment_Location_variable1 - location) - ) - ) - ) - - (:task set_Appointment_Name - :parameters (?newObj_variable8 - object) - (:method method1 - :precondition (and - (type_member_appointment ?newObj_variable8) - ) - :tasks ( - (set_Appointment_Name_primitive ?newObj_variable8 - appointment) - ) - ) - ) - - (:task set_Appointment_Reminder - :parameters (?newObj_variable10 - object) - (:method method1 - :precondition (and - (type_member_appointment ?newObj_variable10) - ) - :tasks ( - (set_Appointment_Reminder_primitive ?newObj_variable10 - appointment) - ) - ) - ) - - (:task set_Appointment_Time - :parameters (?newObj_variable2 - object ?set_Appointment_Time_variable1 - object) - (:method method1 - :precondition (and - (type_member_appointment ?newObj_variable2) - (type_member_date ?set_Appointment_Time_variable1) - ) - :tasks ( - (set_Appointment_Time_primitive ?newObj_variable2 - appointment ?set_Appointment_Time_variable1 - date) - ) - ) - ) - - (:task set_Contact_Email - :parameters (?newObj_variable39 - object ?set_Contact_Email_variable1 - object ?set_Contact_Email_variable2 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable39) - (type_member_contactable ?set_Contact_Email_variable1) - (type_member_emailaddress ?set_Contact_Email_variable2) - ) - :tasks ( - (set_Contact_Email_primitive ?newObj_variable39 - contact ?set_Contact_Email_variable1 - contactable ?set_Contact_Email_variable2 - emailaddress) - ) - ) - ) - - (:task set_Contact_Name - :parameters (?newObj_variable44 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable44) - ) - :tasks ( - (set_Contact_Name_primitive ?newObj_variable44 - contact) - ) - ) - ) - - (:task set_Contact_NumberMobile - :parameters (?newObj_variable37 - object ?set_Contact_Mobile_variable1 - object ?set_Contact_Mobile_variable2 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable37) - (type_member_contactable ?set_Contact_Mobile_variable1) - (type_member_numbermobile ?set_Contact_Mobile_variable2) - ) - :tasks ( - (set_Contact_NumberMobile_primitive ?newObj_variable37 - contact ?set_Contact_Mobile_variable1 - contactable ?set_Contact_Mobile_variable2 - numbermobile) - ) - ) - ) - - (:task set_Contact_NumberOffice - :parameters (?newObj_variable38 - object ?set_Contact_Office_variable1 - object ?set_Contact_Office_variable2 - object) - (:method method1 - :precondition (and - (type_member_contact ?newObj_variable38) - (type_member_contactable ?set_Contact_Office_variable1) - (type_member_numberoffice ?set_Contact_Office_variable2) - ) - :tasks ( - (set_Contact_NumberOffice_primitive ?newObj_variable38 - contact ?set_Contact_Office_variable1 - contactable ?set_Contact_Office_variable2 - numberoffice) - ) - ) - ) - - (:task set_Task_Name - :parameters (?newObj_variable19 - object) - (:method method1 - :precondition (and - (type_member_task ?newObj_variable19) - ) - :tasks ( - (set_Task_Name_primitive ?newObj_variable19 - task) - ) - ) - ) - - (:task set_Task_Name_Light - :parameters (?newObj_variable47 - object) - (:method method1 - :precondition (and - (type_member_task ?newObj_variable47) - ) - :tasks ( - (set_Task_Name_Light_primitive ?newObj_variable47 - task) - ) - ) - ) - - (:task set_Task_Reminder - :parameters (?newObj_variable26 - object) - (:method method1 - :precondition (and - (type_member_task ?newObj_variable26) - ) - :tasks ( - (set_Task_Reminder_primitive ?newObj_variable26 - task) - ) - ) - ) - - (:task set_Task_Time - :parameters (?newObj_variable25 - object ?set_Task_Time_variable1 - object) - (:method method1 - :precondition (and - (type_member_task ?newObj_variable25) - (type_member_date ?set_Task_Time_variable1) - ) - :tasks ( - (set_Task_Time_primitive ?newObj_variable25 - task ?set_Task_Time_variable1 - date) - ) - ) - ) - - (:task goal_action - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (goal_action_primitive) - ) - ) - ) - -; ************************************************************ -; ************************************************************ - (:task add_Favourite - :parameters (?newObj_variable67 - contact) - (:method method28 - :precondition (and - (type_member_contact ?newObj_variable67 - contact) - ) - :tasks ( - (enterMode_People) - (add_NewFavourite ?newObj_variable67) - ) - ) - ) - - (:task add_NewFavourite - :parameters (?newObj_variable64 - contact) - (:method method26 - :precondition (and - (type_member_contact ?newObj_variable64 - contact) - (type_member_picture ?select_People_AddFavourite_Picture_instance_5_argument_3 - picture) - ) - :tasks ( - (enterMode_People_AddFavourite) - (select_People_AddFavourite_Contact ?newObj_variable64) - (select_People_AddFavourite_FavouriteNumber_WithoutPicture ?newObj_variable64) - (select_People_AddFavourite_Picture ?newObj_variable64 ?select_People_AddFavourite_Picture_instance_5_argument_3) - ) - ) - (:method method34 - :precondition (and - (type_member_contact ?newObj_variable64 - contact) - (type_member_picture ?select_People_AddFavourite_FavouriteNumber_WithPicture_instance_4_argument_2 - picture) - ) - :tasks ( - (enterMode_People_AddFavourite) - (select_People_AddFavourite_Contact ?newObj_variable64) - (select_People_AddFavourite_FavouriteNumber_WithPicture ?newObj_variable64 ?select_People_AddFavourite_FavouriteNumber_WithPicture_instance_4_argument_2) - ) - ) - ) - - (:task attachInformation - :parameters (?newObj_variable4 - message ?newObj_variable7 - information) - (:method method69 - :precondition (and - (type_member_call ?newObj_variable4 - message) - (type_member_transferablebycall ?newObj_variable7 - information) - (type_member_call ?newObj_variable4) - (type_member_transferablebycall ?newObj_variable7) - ) - :tasks ( - (attachInformationToCall ?newObj_variable4 ?newObj_variable7) - ) - ) - (:method method70 - :precondition (and - (type_member_email ?newObj_variable4 - message) - (type_member_transferablebyemail ?newObj_variable7 - information) - (type_member_email ?newObj_variable4) - (type_member_transferablebyemail ?newObj_variable7) - ) - :tasks ( - (attachInformationToEMail ?newObj_variable4 ?newObj_variable7) - ) - ) - (:method method71 - :precondition (and - (type_member_sms ?newObj_variable4 - message) - (type_member_transferablebysms ?newObj_variable7 - information) - (type_member_sms ?newObj_variable4) - (type_member_transferablebysms ?newObj_variable7) - ) - :tasks ( - (attachInformationToSMS ?newObj_variable4 ?newObj_variable7) - ) - ) - ) - - (:task attachInformationToCall - :parameters (?newObj_variable146 - call ?newObj_variable147 - transferablebycall) - (:method method63 - :precondition (and - (type_member_call ?newObj_variable146 - call) - (type_member_transferablebyphoneregular ?newObj_variable147 - transferablebycall) - (type_member_transferablebyphoneregular ?newObj_variable147) - ) - :tasks ( - (attachRegularInformationToCall ?newObj_variable146 ?newObj_variable147) - ) - ) - (:method method64 - :precondition (and - (type_member_call ?newObj_variable146 - call) - (type_member_transferablebyphonecontactable ?newObj_variable147 - transferablebycall) - (type_member_contactable ?attachContactableInformationToCall_instance_2_argument_2 - contactable) - (type_member_transferablebyphonecontactable ?newObj_variable147) - ) - :tasks ( - (attachContactableInformationToCall ?newObj_variable146 ?newObj_variable147 ?attachContactableInformationToCall_instance_2_argument_2) - ) - ) - ) - - (:task attachInformationToEMail - :parameters (?newObj_variable142 - email ?newObj_variable143 - transferablebyemail) - (:method method65 - :precondition (and - (type_member_email ?newObj_variable142 - email) - (type_member_transferablebyemailregular ?newObj_variable143 - transferablebyemail) - (type_member_transferablebyemailregular ?newObj_variable143) - ) - :tasks ( - (attachRegularInformationToEMail ?newObj_variable142 ?newObj_variable143) - ) - ) - (:method method66 - :precondition (and - (type_member_email ?newObj_variable142 - email) - (type_member_transferablebyemailcontactable ?newObj_variable143 - transferablebyemail) - (type_member_contactable ?attachContactableInformationToEMail_instance_2_argument_2 - contactable) - (type_member_transferablebyemailcontactable ?newObj_variable143) - ) - :tasks ( - (attachContactableInformationToEMail ?newObj_variable142 ?newObj_variable143 ?attachContactableInformationToEMail_instance_2_argument_2) - ) - ) - ) - - (:task attachInformationToSMS - :parameters (?newObj_variable144 - sms ?newObj_variable145 - transferablebysms) - (:method method67 - :precondition (and - (type_member_sms ?newObj_variable144 - sms) - (type_member_transferablebysmsregular ?newObj_variable145 - transferablebysms) - (type_member_transferablebysmsregular ?newObj_variable145) - ) - :tasks ( - (attachRegularInformationToSMS ?newObj_variable144 ?newObj_variable145) - ) - ) - (:method method68 - :precondition (and - (type_member_sms ?newObj_variable144 - sms) - (type_member_transferablebysmscontactable ?newObj_variable145 - transferablebysms) - (type_member_contactable ?attachContactableInformationToSMS_instance_2_argument_2 - contactable) - (type_member_transferablebysmscontactable ?newObj_variable145) - ) - :tasks ( - (attachContactableInformationToSMS ?newObj_variable144 ?newObj_variable145 ?attachContactableInformationToSMS_instance_2_argument_2) - ) - ) - ) - - (:task attachMultipleInformation - :parameters (?newObj_variable195 - message) - (:method method74 - :precondition (and - (type_member_message ?newObj_variable195 - message) - (type_member_information ?attachInformation_instance_2_argument_1 - information) - ) - :tasks ( - (attachInformation ?newObj_variable195 ?attachInformation_instance_2_argument_1) - ) - ) - (:method method75 - :precondition (and - (type_member_information ?attachInformation_instance_3_argument_2 - information) - (type_member_message ?newObj_variable195 - message) - ) - :tasks ( - (attachInformation ?newObj_variable195 ?attachInformation_instance_3_argument_2) - (attachMultipleInformation ?newObj_variable195) - ) - ) - ) - - (:task call - :parameters (?newObj_variable49 - contactable ?call_variable1 - call) - (:method method39 - :precondition (and - (type_member_contactable ?newObj_variable49 - contactable) - (type_member_call ?call_variable1 - call) - ) - :tasks ( - (enterMode_Telephone) - (enter_Number_ForCall) - (press_Telephone_Call ?newObj_variable49 ?call_variable1) - ) - ) - (:method method42 - :precondition (and - (type_member_contact ?select_Contacts_Details_Number_instance_4_argument_2 - contact) - (type_member_call ?call_variable1 - call) - (type_member_contactable ?newObj_variable49 - contactable) - ) - :tasks ( - (enterMode_Contacts) - (select_Contacts_ContactForContactable ?select_Contacts_Details_Number_instance_4_argument_2 ?newObj_variable49) - (select_Contacts_Details_Number ?select_Contacts_Details_Number_instance_4_argument_2 ?call_variable1 ?newObj_variable49) - ) - ) - (:method method43 - :precondition (and - (type_member_call ?call_variable1 - call) - (type_member_contact ?select_People_Favourite_instance_3_argument_0 - contact) - (type_member_contactable ?newObj_variable49 - contactable) - ) - :tasks ( - (enterMode_People) - (select_People_Favourite ?select_People_Favourite_instance_3_argument_0 ?newObj_variable49) - (select_People_FavouriteSelected_Number ?select_People_Favourite_instance_3_argument_0 ?call_variable1 ?newObj_variable49) - ) - ) - ) - - (:task configure_Alarm - :parameters (?configure_Alarm_variable1 - date) - (:method method1 - :precondition (and - (type_member_alarm ?activate_Alarm_instance_2_argument_0 - alarm) - (type_member_date ?configure_Alarm_variable1 - date) - (type_member_alarm ?set_Alarm_Days_instance_3_argument_1 - alarm) - (type_member_date ?set_Alarm_Days_instance_3_argument_2 - date) - (type_member_alarm ?set_Alarm_Description_instance_5_argument_5 - alarm) - (type_member_alarm ?set_Alarm_Time_instance_4_argument_3 - alarm) - (type_member_date ?set_Alarm_Time_instance_4_argument_4 - date) - ) - :tasks ( - (set_Alarm_Description ?set_Alarm_Description_instance_5_argument_5) - (set_Alarm_Time ?set_Alarm_Time_instance_4_argument_3 ?set_Alarm_Time_instance_4_argument_4) - (set_Alarm_Days ?set_Alarm_Days_instance_3_argument_1 ?set_Alarm_Days_instance_3_argument_2) - (activate_Alarm ?activate_Alarm_instance_2_argument_0) - ) - ) - ) - - (:task configure_Appointment - :parameters (?newObj_variable1 - appointment ?configure_Appointment_variable1 - date ?configure_Appointment_variable2 - location) - (:method method4 - :precondition (and - (type_member_location ?configure_Appointment_variable2 - location) - (type_member_appointment ?newObj_variable1 - appointment) - (type_member_date ?configure_Appointment_variable1 - date) - ) - :tasks ( - (set_Appointment_Time ?newObj_variable1 ?configure_Appointment_variable1) - (set_Appointment_Reminder ?newObj_variable1) - (set_Appointment_Name ?newObj_variable1) - (set_Appointment_Location ?newObj_variable1 ?configure_Appointment_variable2) - ) - ) - ) - - (:task configure_Contact - :parameters (?newObj_variable34 - contact ?configure_Contact_variable1 - contactable) - (:method method17 - :precondition (and - (type_member_contactable ?configure_Contact_variable1 - contactable) - (type_member_contact ?newObj_variable34 - contact) - ) - :tasks ( - (set_Contact_Connection ?newObj_variable34 ?configure_Contact_variable1) - (set_Contact_Name ?newObj_variable34) - ) - ) - (:method method18 - :precondition (and - (type_member_contactable ?configure_Contact_variable1 - contactable) - (type_member_contact ?newObj_variable34 - contact) - (type_member_picture ?set_Contact_Picture_instance_3_argument_3 - picture) - ) - :tasks ( - (set_Contact_Connection ?newObj_variable34 ?configure_Contact_variable1) - (set_Contact_Name ?newObj_variable34) - (set_Contact_Picture ?newObj_variable34 ?set_Contact_Picture_instance_3_argument_3) - ) - ) - ) - - (:task configure_Task - :parameters (?newObj_variable13 - task) - (:method method8 - :precondition (and - (type_member_task ?newObj_variable13 - task) - (type_member_date ?set_Task_Time_instance_3_argument_2 - date) - ) - :tasks ( - (set_Task_Reminder ?newObj_variable13) - (set_Task_Time ?newObj_variable13 ?set_Task_Time_instance_3_argument_2) - (set_Task_Name ?newObj_variable13) - ) - ) - ) - - (:task contact - :parameters (?newObj_variable204 - contactable ?newObj_variable205 - message) - (:method method78 - :precondition (and - (type_member_contactable ?newObj_variable204 - contactable) - (type_member_call ?newObj_variable205 - message) - (type_member_call ?newObj_variable205) - ) - :tasks ( - (call ?newObj_variable204 ?newObj_variable205) - ) - ) - (:method method79 - :precondition (and - (type_member_contactable ?newObj_variable204 - contactable) - (type_member_email ?newObj_variable205 - message) - (type_member_email ?newObj_variable205) - ) - :tasks ( - (send_EMail ?newObj_variable204 ?newObj_variable205) - ) - ) - (:method method80 - :precondition (and - (type_member_contactable ?newObj_variable204 - contactable) - (type_member_sms ?newObj_variable205 - message) - (type_member_sms ?newObj_variable205) - ) - :tasks ( - (send_SMS ?newObj_variable204 ?newObj_variable205) - ) - ) - ) - - (:task create_Appointment - :parameters (?newObj_variable16 - appointment ?create_Appointment_variable1 - location ?create_Appointment_variable2 - date) - (:method method6 - :precondition (and - (type_member_appointment ?newObj_variable16 - appointment) - (type_member_date ?create_Appointment_variable2 - date) - (type_member_location ?create_Appointment_variable1 - location) - ) - :tasks ( - (enterMode_Calendar) - (create_NewAppointment ?newObj_variable16 ?create_Appointment_variable2 ?create_Appointment_variable1) - ) - ) - ) - - (:task create_Contact - :parameters (?newObj_variable32 - contact ?create_Contact_variable2 - contactable) - (:method method24 - :precondition (and - (type_member_contact ?newObj_variable32 - contact) - (type_member_contactable ?create_Contact_variable2 - contactable) - ) - :tasks ( - (enterMode_Contacts) - (create_NewContact ?newObj_variable32 ?create_Contact_variable2) - ) - ) - ) - - (:task create_NewAppointment - :parameters (?newObj_variable14 - appointment ?create_NewAppointment_variable1 - date ?create_NewAppointment_variable2 - location) - (:method method5 - :precondition (and - (type_member_location ?create_NewAppointment_variable2 - location) - (type_member_appointment ?newObj_variable14 - appointment) - (type_member_date ?create_NewAppointment_variable1 - date) - ) - :tasks ( - (press_Calendar_Menu) - (press_Calendar_Menu_NewAppointment ?newObj_variable14) - (configure_Appointment ?newObj_variable14 ?create_NewAppointment_variable1 ?create_NewAppointment_variable2) - (press_Calendar_NewAppointment_OK ?newObj_variable14 ?create_NewAppointment_variable1) - ) - ) - ) - - (:task create_NewContact - :parameters (?newObj_variable54 - contact ?create_NewContact_variable1 - contactable) - (:method method23 - :precondition (and - (type_member_contact ?newObj_variable54 - contact) - (type_member_contactable ?create_NewContact_variable1 - contactable) - ) - :tasks ( - (press_Contacts_New ?newObj_variable54 ?create_NewContact_variable1) - (configure_Contact ?newObj_variable54 ?create_NewContact_variable1) - (press_Contacts_NewContact_OK ?newObj_variable54) - ) - ) - ) - - (:task create_NewTask - :parameters (?newObj_variable27 - task) - (:method method9 - :precondition (and - (type_member_task ?newObj_variable27 - task) - ) - :tasks ( - (press_Tasks_Menu) - (press_Tasks_Menu_NewTask ?newObj_variable27) - (configure_Task ?newObj_variable27) - (press_Tasks_NewTask_OK ?newObj_variable27) - ) - ) - (:method method10 - :precondition (and - (type_member_task ?newObj_variable27 - task) - ) - :tasks ( - (set_Task_Name_Light ?newObj_variable27) - ) - ) - ) - - (:task create_Task - :parameters (?newObj_variable18 - task) - (:method method11 - :precondition (and - (type_member_task ?newObj_variable18 - task) - ) - :tasks ( - (enterMode_Tasks) - (create_NewTask ?newObj_variable18) - ) - ) - ) - - (:task enterMode_Alarm - :parameters () - (:method method0 - :precondition ( - ) - :tasks ( - (enterMode_Home) - (press_Home_Clock) - (press_Clock_Alarm) - ) - ) - ) - - (:task enterMode_Calendar - :parameters () - (:method method3 - :precondition ( - ) - :tasks ( - (enterMode_Home) - (press_Home_Calendar) - ) - ) - (:method method82 - :precondition ( - ) - :tasks ( - (press_Home_Calendar) - ) - ) - ) - - (:task enterMode_Contacts - :parameters () - (:method method13 - :precondition ( - ) - :tasks ( - (enterMode_Telephone) - (press_Telephone_Contacts) - ) - ) - (:method method14 - :precondition ( - ) - :tasks ( - (enterMode_People) - (press_People_More) - ) - ) - ) - - (:task enterMode_EMail - :parameters () - (:method method55 - :precondition ( - ) - :tasks ( - (press_Home) - (press_Home_EMail) - ) - ) - (:method method83 - :precondition ( - ) - :tasks ( - (press_Home_EMail) - ) - ) - ) - - (:task enterMode_Home - :parameters () - (:method method15 - :precondition ( - ) - :tasks ( - (press_Home) - ) - ) - ) - - (:task enterMode_Messages - :parameters () - (:method method48 - :precondition ( - ) - :tasks ( - (press_Home) - (press_Home_Messages) - ) - ) - (:method method84 - :precondition ( - ) - :tasks ( - (press_Home_Messages) - ) - ) - ) - - (:task enterMode_People - :parameters () - (:method method16 - :precondition ( - ) - :tasks ( - (enterMode_Home) - (press_Home_People) - ) - ) - (:method method85 - :precondition ( - ) - :tasks ( - (press_Home_People) - ) - ) - ) - - (:task enterMode_People_AddFavourite - :parameters () - (:method method25 - :precondition ( - ) - :tasks ( - (press_People_Smallplus) - (press_People_LargePlus) - ) - ) - (:method method27 - :precondition ( - ) - :tasks ( - (press_People_Menu) - (press_People_Menu_AddFavourite) - ) - ) - ) - - (:task enterMode_Tasks - :parameters () - (:method method7 - :precondition ( - ) - :tasks ( - (enterMode_Home) - (press_Home_Programs) - (press_Programs_Tasks) - ) - ) - (:method method86 - :precondition ( - ) - :tasks ( - (press_Home_Programs) - (press_Programs_Tasks) - ) - ) - ) - - (:task enterMode_Telephone - :parameters () - (:method method12 - :precondition ( - ) - :tasks ( - (enterMode_Home) - (press_Home_Telephone) - ) - ) - (:method method87 - :precondition ( - ) - :tasks ( - (press_Home_Telephone) - ) - ) - ) - - (:task enter_Number_ForCall - :parameters () - (:method method35 - :precondition (and - (type_member_contactable ?enter_Number_ForCall_Mobile_instance_2_argument_0 - contactable) - (type_member_numbermobile ?enter_Number_ForCall_Mobile_instance_2_argument_1 - numbermobile) - ) - :tasks ( - (enter_Number_ForCall_Mobile ?enter_Number_ForCall_Mobile_instance_2_argument_0 ?enter_Number_ForCall_Mobile_instance_2_argument_1) - ) - ) - (:method method36 - :precondition (and - (type_member_contactable ?enter_Number_ForCall_Office_instance_2_argument_0 - contactable) - (type_member_numberoffice ?enter_Number_ForCall_Office_instance_2_argument_1 - numberoffice) - ) - :tasks ( - (enter_Number_ForCall_Office ?enter_Number_ForCall_Office_instance_2_argument_0 ?enter_Number_ForCall_Office_instance_2_argument_1) - ) - ) - ) - - (:task enter_Number_ForSMS - :parameters () - (:method method49 - :precondition (and - (type_member_contactable ?enter_Number_ForSMS_Mobile_instance_2_argument_0 - contactable) - (type_member_numbermobile ?enter_Number_ForSMS_Mobile_instance_2_argument_1 - numbermobile) - ) - :tasks ( - (enter_Number_ForSMS_Mobile ?enter_Number_ForSMS_Mobile_instance_2_argument_0 ?enter_Number_ForSMS_Mobile_instance_2_argument_1) - ) - ) - (:method method50 - :precondition (and - (type_member_contactable ?enter_Number_ForSMS_Office_instance_2_argument_0 - contactable) - (type_member_numberoffice ?enter_Number_ForSMS_Office_instance_2_argument_1 - numberoffice) - ) - :tasks ( - (enter_Number_ForSMS_Office ?enter_Number_ForSMS_Office_instance_2_argument_0 ?enter_Number_ForSMS_Office_instance_2_argument_1) - ) - ) - ) - - (:task extractsInformation - :parameters (?extractsInformation_variable1 - contactable ?extractsInformation_variable2 - message ?extractsInformation_variable3 - information) - (:method method72 - :precondition (and - (type_member_contactable ?extractsInformation_variable1 - contactable) - (type_member_message ?extractsInformation_variable2 - message) - (type_member_regularinformation ?extractsInformation_variable3 - information) - (type_member_regularinformation ?extractsInformation_variable3) - ) - :tasks ( - (extractsInformation_Regular ?extractsInformation_variable1 ?extractsInformation_variable2 ?extractsInformation_variable3) - ) - ) - (:method method73 - :precondition (and - (type_member_contactable ?extractsInformation_variable1 - contactable) - (type_member_message ?extractsInformation_variable2 - message) - (type_member_contactableinformation ?extractsInformation_variable3 - information) - (type_member_contactable ?extractsInformation_Contactable_instance_2_argument_3 - contactable) - (type_member_contactableinformation ?extractsInformation_variable3) - ) - :tasks ( - (extractsInformation_Contactable ?extractsInformation_variable1 ?extractsInformation_variable2 ?extractsInformation_variable3 ?extractsInformation_Contactable_instance_2_argument_3) - ) - ) - ) - - (:task extractsMultipleInformation - :parameters (?newObj_variable198 - contactable ?newObj_variable199 - message) - (:method method76 - :precondition (and - (type_member_contactable ?newObj_variable198 - contactable) - (type_member_message ?newObj_variable199 - message) - (type_member_information ?extractsInformation_instance_2_argument_2 - information) - ) - :tasks ( - (extractsInformation ?newObj_variable198 ?newObj_variable199 ?extractsInformation_instance_2_argument_2) - ) - ) - (:method method77 - :precondition (and - (type_member_information ?extractsInformation_instance_3_argument_4 - information) - (type_member_contactable ?newObj_variable198 - contactable) - (type_member_message ?newObj_variable199 - message) - ) - :tasks ( - (extractsInformation ?newObj_variable198 ?newObj_variable199 ?extractsInformation_instance_3_argument_4) - (extractsMultipleInformation ?newObj_variable198 ?newObj_variable199) - ) - ) - ) - - (:task press_Home - :parameters () - (:method method29 - :precondition ( - ) - :tasks ( - (press_Home_Default) - ) - ) - (:method method30 - :precondition (and - (type_member_contact ?press_Home_From_Add_Favourite_instance_2_argument_0 - contact) - ) - :tasks ( - (press_Home_From_Add_Favourite ?press_Home_From_Add_Favourite_instance_2_argument_0) - ) - ) - (:method method92 - :precondition ( - ) - :tasks ( - (press_Home_From_SMS) - ) - ) - (:method method93 - :precondition ( - ) - :tasks ( - (press_Home_From_Telephone) - ) - ) - (:method method94 - :precondition (and - (type_member_contact ?press_Home_From_Contacts_Details_instance_2_argument_0 - contact) - ) - :tasks ( - (press_Home_From_Contacts_Details ?press_Home_From_Contacts_Details_instance_2_argument_0) - ) - ) - ) - - (:task press_Home_From_SMS - :parameters () - (:method method88 - :precondition (and - (type_member_contactable ?press_Home_From_SMS_Mobile_instance_2_argument_0 - contactable) - ) - :tasks ( - (press_Home_From_SMS_Mobile ?press_Home_From_SMS_Mobile_instance_2_argument_0) - ) - ) - (:method method89 - :precondition (and - (type_member_contactable ?press_Home_From_SMS_Office_instance_2_argument_0 - contactable) - ) - :tasks ( - (press_Home_From_SMS_Office ?press_Home_From_SMS_Office_instance_2_argument_0) - ) - ) - ) - - (:task press_Home_From_Telephone - :parameters () - (:method method90 - :precondition (and - (type_member_contactable ?press_Home_From_Telephone_Mobile_instance_2_argument_0 - contactable) - ) - :tasks ( - (press_Home_From_Telephone_Mobile ?press_Home_From_Telephone_Mobile_instance_2_argument_0) - ) - ) - (:method method91 - :precondition (and - (type_member_contactable ?press_Home_From_Telephone_Office_instance_2_argument_0 - contactable) - ) - :tasks ( - (press_Home_From_Telephone_Office ?press_Home_From_Telephone_Office_instance_2_argument_0) - ) - ) - ) - - (:task press_NewMessage_Send - :parameters (?newObj_variable106 - contactable ?press_NewMessage_Send_variable1 - sms) - (:method method51 - :precondition (and - (type_member_contactable ?newObj_variable106 - contactable) - (type_member_sms ?press_NewMessage_Send_variable1 - sms) - ) - :tasks ( - (press_NewMessage_Send_Mobile ?newObj_variable106 ?press_NewMessage_Send_variable1) - ) - ) - (:method method52 - :precondition (and - (type_member_contactable ?newObj_variable106 - contactable) - (type_member_sms ?press_NewMessage_Send_variable1 - sms) - ) - :tasks ( - (press_NewMessage_Send_Office ?newObj_variable106 ?press_NewMessage_Send_variable1) - ) - ) - ) - - (:task press_People_Smallplus - :parameters () - (:method method46 - :precondition (and - (type_member_contact ?press_People_Smallplus_FavouriteSelected_instance_2_argument_0 - contact) - ) - :tasks ( - (press_People_Smallplus_FavouriteSelected ?press_People_Smallplus_FavouriteSelected_instance_2_argument_0) - ) - ) - (:method method47 - :precondition ( - ) - :tasks ( - (press_People_Smallplus_AlreadyPressed) - ) - ) - ) - - (:task press_Telephone_Call - :parameters (?newObj_variable72 - contactable ?press_Call_variable1 - call) - (:method method37 - :precondition (and - (type_member_contactable ?newObj_variable72 - contactable) - (type_member_call ?press_Call_variable1 - call) - ) - :tasks ( - (press_Telephone_Call_Mobile ?newObj_variable72 ?press_Call_variable1) - ) - ) - (:method method38 - :precondition (and - (type_member_contactable ?newObj_variable72 - contactable) - (type_member_call ?press_Call_variable1 - call) - ) - :tasks ( - (press_Telephone_Call_Office ?newObj_variable72 ?press_Call_variable1) - ) - ) - ) - - (:task select_Contacts_Details_Number - :parameters (?newObj_variable80 - contact ?select_Contacts_Details_Number_variable1 - call ?select_Contacts_Details_Number_variable2 - contactable) - (:method method40 - :precondition (and - (type_member_contact ?newObj_variable80 - contact) - (type_member_call ?select_Contacts_Details_Number_variable1 - call) - (type_member_contactable ?select_Contacts_Details_Number_variable2 - contactable) - ) - :tasks ( - (select_Contacts_Details_Mobile ?newObj_variable80 ?select_Contacts_Details_Number_variable1 ?select_Contacts_Details_Number_variable2) - ) - ) - (:method method41 - :precondition (and - (type_member_contact ?newObj_variable80 - contact) - (type_member_call ?select_Contacts_Details_Number_variable1 - call) - (type_member_contactable ?select_Contacts_Details_Number_variable2 - contactable) - ) - :tasks ( - (select_Contacts_Details_Office ?newObj_variable80 ?select_Contacts_Details_Number_variable1 ?select_Contacts_Details_Number_variable2) - ) - ) - ) - - (:task select_EMail_EMailAccount - :parameters (?newObj_variable136 - emailaccount) - (:method method61 - :precondition (and - (type_member_emailaccount ?newObj_variable136 - emailaccount) - ) - :tasks ( - (select_EMail_EMailAccount_NoOp ?newObj_variable136) - ) - ) - (:method method62 - :precondition (and - (type_member_emailaccount ?select_EMail_EMailAccount_WithPreviousSelection_instance_2_argument_0 - emailaccount) - (type_member_emailaccount ?newObj_variable136 - emailaccount) - (not (= ?newObj_variable136 ?select_EMail_EMailAccount_WithPreviousSelection_instance_2_argument_0)) - ) - :tasks ( - (select_EMail_EMailAccount_WithPreviousSelection ?select_EMail_EMailAccount_WithPreviousSelection_instance_2_argument_0 ?newObj_variable136) - ) - ) - ) - - (:task select_People_AddFavourite_Contact - :parameters (?newObj_variable40 - contact) - (:method method31 - :precondition (and - (type_member_contact ?newObj_variable40 - contact) - ) - :tasks ( - (select_People_AddFavourite_Contact_withEmail ?newObj_variable40) - ) - ) - (:method method32 - :precondition (and - (type_member_contact ?newObj_variable40 - contact) - ) - :tasks ( - (select_People_AddFavourite_Contact_withMobile ?newObj_variable40) - ) - ) - (:method method33 - :precondition (and - (type_member_contact ?newObj_variable40 - contact) - ) - :tasks ( - (select_People_AddFavourite_Contact_withOffice ?newObj_variable40) - ) - ) - ) - - (:task select_People_Favourite - :parameters (?newObj_variable48 - contact ?newObj_variable71 - contactable) - (:method method57 - :precondition (and - (type_member_contact ?select_People_Favourite_WithPreviousSelection_instance_2_argument_0 - contact) - (type_member_contact ?newObj_variable48 - contact) - (type_member_contactable ?newObj_variable71 - contactable) - (not (= ?newObj_variable48 ?select_People_Favourite_WithPreviousSelection_instance_2_argument_0)) - ) - :tasks ( - (select_People_Favourite_WithPreviousSelection ?select_People_Favourite_WithPreviousSelection_instance_2_argument_0 ?newObj_variable48 ?newObj_variable71) - ) - ) - (:method method58 - :precondition (and - (type_member_contact ?newObj_variable48 - contact) - (type_member_contactable ?newObj_variable71 - contactable) - ) - :tasks ( - (select_People_Favourite_FromReadyToAddFavourite ?newObj_variable48 ?newObj_variable71) - ) - ) - (:method method59 - :precondition (and - (type_member_contact ?newObj_variable48 - contact) - (type_member_contactable ?newObj_variable71 - contactable) - ) - :tasks ( - (select_People_Favourite_NoOp ?newObj_variable48 ?newObj_variable71) - ) - ) - ) - - (:task select_People_FavouriteSelected_Number - :parameters (?newObj_variable82 - contact ?select_People_FavouriteSelected_Number_variable1 - call ?select_People_FavouriteSelected_Number_variable2 - contactable) - (:method method44 - :precondition (and - (type_member_contact ?newObj_variable82 - contact) - (type_member_call ?select_People_FavouriteSelected_Number_variable1 - call) - (type_member_contactable ?select_People_FavouriteSelected_Number_variable2 - contactable) - ) - :tasks ( - (select_People_FavouriteSelected_Mobile ?newObj_variable82 ?select_People_FavouriteSelected_Number_variable1 ?select_People_FavouriteSelected_Number_variable2) - ) - ) - (:method method45 - :precondition (and - (type_member_contact ?newObj_variable82 - contact) - (type_member_call ?select_People_FavouriteSelected_Number_variable1 - call) - (type_member_contactable ?select_People_FavouriteSelected_Number_variable2 - contactable) - ) - :tasks ( - (select_People_FavouriteSelected_Office ?newObj_variable82 ?select_People_FavouriteSelected_Number_variable1 ?select_People_FavouriteSelected_Number_variable2) - ) - ) - ) - - (:task send_EMail - :parameters (?newObj_variable117 - contactable ?send_EMail_variable1 - email) - (:method method56 - :precondition (and - (type_member_emailaddress ?enter_EMailAddress_instance_4_argument_2 - emailaddress) - (type_member_contactable ?newObj_variable117 - contactable) - (type_member_email ?send_EMail_variable1 - email) - (type_member_emailaccount ?select_EMail_EMailAccount_instance_3_argument_0 - emailaccount) - ) - :tasks ( - (enterMode_EMail) - (select_EMail_EMailAccount ?select_EMail_EMailAccount_instance_3_argument_0) - (press_EMail_NewEMail ?select_EMail_EMailAccount_instance_3_argument_0) - (enter_EMailAddress ?newObj_variable117 ?enter_EMailAddress_instance_4_argument_2) - (press_EMail_NewEMail_Send ?newObj_variable117 ?send_EMail_variable1) - ) - ) - (:method method60 - :precondition (and - (type_member_email ?send_EMail_variable1 - email) - (type_member_emailaccount ?select_AccountSelection_Account_instance_5_argument_4 - emailaccount) - (type_member_contact ?select_People_Favourite_instance_3_argument_0 - contact) - (type_member_contactable ?newObj_variable117 - contactable) - ) - :tasks ( - (enterMode_People) - (select_People_Favourite ?select_People_Favourite_instance_3_argument_0 ?newObj_variable117) - (select_People_FavouriteSelected_EMail ?select_People_Favourite_instance_3_argument_0 ?newObj_variable117) - (select_AccountSelection_Account ?select_AccountSelection_Account_instance_5_argument_4) - (press_EMail_NewEMail_Send ?newObj_variable117 ?send_EMail_variable1) - ) - ) - ) - - (:task send_SMS - :parameters (?newObj_variable95 - contactable ?send_SMS_variable1 - sms) - (:method method53 - :precondition (and - (type_member_contactable ?newObj_variable95 - contactable) - (type_member_sms ?send_SMS_variable1 - sms) - ) - :tasks ( - (enterMode_Messages) - (press_Messages_NewMessage) - (enter_Number_ForSMS) - (press_NewMessage_Send ?newObj_variable95 ?send_SMS_variable1) - ) - ) - (:method method54 - :precondition (and - (type_member_sms ?send_SMS_variable1 - sms) - (type_member_contact ?select_People_Favourite_instance_3_argument_0 - contact) - (type_member_contactable ?newObj_variable95 - contactable) - ) - :tasks ( - (enterMode_People) - (select_People_Favourite ?select_People_Favourite_instance_3_argument_0 ?newObj_variable95) - (select_People_FavouriteSelected_SMS ?select_People_Favourite_instance_3_argument_0 ?newObj_variable95) - (press_NewMessage_Send_Mobile ?newObj_variable95 ?send_SMS_variable1) - ) - ) - ) - - (:task set_Alarm - :parameters (?set_Alarm_variable1 - date) - (:method method2 - :precondition (and - (type_member_date ?configure_Alarm_instance_3_argument_0 - date) - (type_member_date ?set_Alarm_variable1 - date) - ) - :tasks ( - (enterMode_Alarm) - (configure_Alarm ?configure_Alarm_instance_3_argument_0) - ) - ) - ) - - (:task set_Contact_Connection - :parameters (?newObj_variable45 - contact ?set_Contact_Connection_variable1 - contactable) - (:method method19 - :precondition (and - (type_member_contact ?newObj_variable45 - contact) - (type_member_contactable ?set_Contact_Connection_variable1 - contactable) - (type_member_emailaddress ?set_Contact_Email_instance_2_argument_2 - emailaddress) - ) - :tasks ( - (set_Contact_Email ?newObj_variable45 ?set_Contact_Connection_variable1 ?set_Contact_Email_instance_2_argument_2) - ) - ) - (:method method20 - :precondition (and - (type_member_contact ?newObj_variable45 - contact) - (type_member_contactable ?set_Contact_Connection_variable1 - contactable) - (type_member_numberoffice ?set_Contact_NumberOffice_instance_2_argument_2 - numberoffice) - ) - :tasks ( - (set_Contact_NumberOffice ?newObj_variable45 ?set_Contact_Connection_variable1 ?set_Contact_NumberOffice_instance_2_argument_2) - ) - ) - (:method method21 - :precondition (and - (type_member_contact ?newObj_variable45 - contact) - (type_member_contactable ?set_Contact_Connection_variable1 - contactable) - (type_member_numbermobile ?set_Contact_NumberMobile_instance_2_argument_2 - numbermobile) - ) - :tasks ( - (set_Contact_NumberMobile ?newObj_variable45 ?set_Contact_Connection_variable1 ?set_Contact_NumberMobile_instance_2_argument_2) - ) - ) - ) - - (:task set_Contact_Picture - :parameters (?newObj_variable41 - contact ?newObj_variable42 - picture) - (:method method22 - :precondition (and - (type_member_contact ?newObj_variable41 - contact) - (type_member_picture ?newObj_variable42 - picture) - ) - :tasks ( - (press_Contacts_NewContact_SelectPicture ?newObj_variable41) - (select_PictureSelection_PictureForNewContact ?newObj_variable42 ?newObj_variable41) - ) - ) - ) - - (:task transferMessage - :parameters (?newObj_variable219 - contactable ?newObj_variable220 - message) - (:method method81 - :precondition (and - (type_member_contactable ?newObj_variable219 - contactable) - (type_member_message ?newObj_variable220 - message) - ) - :tasks ( - (attachMultipleInformation ?newObj_variable220) - (contact ?newObj_variable219 ?newObj_variable220) - (extractsMultipleInformation ?newObj_variable219 ?newObj_variable220) - ) - ) - ) - - (:action activate_Alarm_primitive - :parameters (?selectAlarm_variable1 - alarm) - :precondition (and - (inMode_Clock) - (inMode_Clock_Alarm) - ) - :effect (and - (active_Alarm ?selectAlarm_variable1) - ) - ) - - (:action attachContactableInformationToCall_primitive - :parameters (?newObj_variable150 - call ?newObj_variable151 - transferablebyphonecontactable ?newObj_variable152 - contactable) - :precondition (and - (haveInformation_Contactable ?newObj_variable152 ?newObj_variable151) - (not (haveSent ?newObj_variable150)) - ) - :effect (and - (attached ?newObj_variable150 ?newObj_variable151) - ) - ) - - (:action attachContactableInformationToEMail_primitive - :parameters (?newObj_variable153 - email ?newObj_variable154 - transferablebyemailcontactable ?newObj_variable155 - contactable) - :precondition (and - (haveInformation_Contactable ?newObj_variable155 ?newObj_variable154) - (not (haveSent ?newObj_variable153)) - ) - :effect (and - (attached ?newObj_variable153 ?newObj_variable154) - ) - ) - - (:action attachContactableInformationToSMS_primitive - :parameters (?newObj_variable156 - sms ?newObj_variable157 - transferablebysmscontactable ?newObj_variable158 - contactable) - :precondition (and - (haveInformation_Contactable ?newObj_variable158 ?newObj_variable157) - (not (haveSent ?newObj_variable156)) - ) - :effect (and - (attached ?newObj_variable156 ?newObj_variable157) - ) - ) - - (:action attachRegularInformationToCall_primitive - :parameters (?newObj_variable148 - call ?newObj_variable149 - transferablebyphoneregular) - :precondition (and - (haveInformation_Regular ?newObj_variable149) - (not (haveSent ?newObj_variable148)) - ) - :effect (and - (attached ?newObj_variable148 ?newObj_variable149) - ) - ) - - (:action attachRegularInformationToEMail_primitive - :parameters (?newObj_variable159 - email ?newObj_variable160 - transferablebyemailregular) - :precondition (and - (haveInformation_Regular ?newObj_variable160) - (not (haveSent ?newObj_variable159)) - ) - :effect (and - (attached ?newObj_variable159 ?newObj_variable160) - ) - ) - - (:action attachRegularInformationToSMS_primitive - :parameters (?newObj_variable161 - sms ?newObj_variable162 - transferablebysmsregular) - :precondition (and - (haveInformation_Regular ?newObj_variable162) - (not (haveSent ?newObj_variable161)) - ) - :effect (and - (attached ?newObj_variable161 ?newObj_variable162) - ) - ) - - (:action enter_EMailAddress_primitive - :parameters (?newObj_variable115 - contactable ?enter_EMailAddress_variable1 - emailaddress) - :precondition (and - (haveInformation_Contactable ?newObj_variable115 ?enter_EMailAddress_variable1) - (inMode_EMail_NewEMail) - ) - :effect (and - (entered_EMail ?newObj_variable115) - ) - ) - - (:action enter_Number_ForCall_Mobile_primitive - :parameters (?newObj_variable60 - contactable ?enter_Number_ForCall_Mobile_variable1 - numbermobile) - :precondition (and - (inMode_Telephone) - (haveInformation_Contactable ?newObj_variable60 ?enter_Number_ForCall_Mobile_variable1) - ) - :effect (and - (entered_NumberMobile ?newObj_variable60) - (entered_AnyNumber) - ) - ) - - (:action enter_Number_ForCall_Office_primitive - :parameters (?newObj_variable61 - contactable ?enter_Number_ForCall_Office_variable1 - numberoffice) - :precondition (and - (inMode_Telephone) - (haveInformation_Contactable ?newObj_variable61 ?enter_Number_ForCall_Office_variable1) - ) - :effect (and - (entered_NumberOffice ?newObj_variable61) - (entered_AnyNumber) - ) - ) - - (:action enter_Number_ForSMS_Mobile_primitive - :parameters (?newObj_variable100 - contactable ?enter_Number_ForSMS_Mobile_variable1 - numbermobile) - :precondition (and - (inMode_NewMessage) - (haveInformation_Contactable ?newObj_variable100 ?enter_Number_ForSMS_Mobile_variable1) - ) - :effect (and - (entered_NumberMobile ?newObj_variable100) - (entered_AnyNumber) - ) - ) - - (:action enter_Number_ForSMS_Office_primitive - :parameters (?newObj_variable101 - contactable ?enter_Number_ForSMS_Office_variable1 - numberoffice) - :precondition (and - (haveInformation_Contactable ?newObj_variable101 ?enter_Number_ForSMS_Office_variable1) - (inMode_NewMessage) - ) - :effect (and - (entered_NumberOffice ?newObj_variable101) - (entered_AnyNumber) - ) - ) - - (:action extractsInformation_Contactable_primitive - :parameters (?newObj_variable182 - contactable ?newObj_variable183 - message ?newObj_variable184 - contactableinformation ?newObj_variable185 - contactable) - :precondition (and - (hasReceived ?newObj_variable182 ?newObj_variable183) - (attached ?newObj_variable183 ?newObj_variable184) - ) - :effect (and - (hasInformation_Contactable ?newObj_variable182 ?newObj_variable185 ?newObj_variable184) - ) - ) - - (:action extractsInformation_Regular_primitive - :parameters (?newObj_variable186 - contactable ?newObj_variable187 - message ?newObj_variable188 - regularinformation) - :precondition (and - (hasReceived ?newObj_variable186 ?newObj_variable187) - (attached ?newObj_variable187 ?newObj_variable188) - ) - :effect (and - (hasInformation_Regular ?newObj_variable186 ?newObj_variable188) - ) - ) - - (:action press_Calendar_Menu_primitive - :parameters () - :precondition (and - (inMode_Calendar) - (not (inMode_Calendar_ConfigureAppointment)) - (not (inMode_Menu)) - ) - :effect (and - (inMode_Menu) - ) - ) - - (:action press_Calendar_Menu_NewAppointment_primitive - :parameters (?press_Calendar_Menu_NewAppointment_variable1 - appointment) - :precondition (and - (inMode_Calendar) - (inMode_Menu) - (not (inUse ?press_Calendar_Menu_NewAppointment_variable1)) - ) - :effect (and - (inMode_Calendar_ConfigureAppointment) - (not (inMode_Menu)) - (inUse ?press_Calendar_Menu_NewAppointment_variable1) - (selected ?press_Calendar_Menu_NewAppointment_variable1) - ) - ) - - (:action press_Calendar_NewAppointment_OK_primitive - :parameters (?press_Calendar_NewAppointment_OK_variable1 - appointment ?press_Calendar_NewAppointment_OK_variable2 - date) - :precondition (and - (inMode_Calendar) - (inMode_Calendar_ConfigureAppointment) - (selected ?press_Calendar_NewAppointment_OK_variable1) - (isSet_Appointment_Name ?press_Calendar_NewAppointment_OK_variable1) - (isSet_Appointment_Time ?press_Calendar_NewAppointment_OK_variable1 ?press_Calendar_NewAppointment_OK_variable2) - ) - :effect (and - (not (inMode_Calendar_ConfigureAppointment)) - (not (selected ?press_Calendar_NewAppointment_OK_variable1)) - (created ?press_Calendar_NewAppointment_OK_variable1) - ) - ) - - (:action press_Clock_Alarm_primitive - :parameters () - :precondition (and - (inMode_Clock) - ) - :effect (and - (inMode_Clock_Alarm) - ) - ) - - (:action press_Contacts_New_primitive - :parameters (?press_Contacts_New_variable1 - contact ?press_Contacts_New_variable2 - contactable) - :precondition (and - (inMode_Contacts) - (not (inMode_Contacts_ConfigureContact)) - (not (inUse ?press_Contacts_New_variable1)) - (not (inMode_Contacts_Details)) - ) - :effect (and - (inMode_Contacts_ConfigureContact) - (associated_Contact ?press_Contacts_New_variable1 ?press_Contacts_New_variable2) - (inUse ?press_Contacts_New_variable1) - (selected ?press_Contacts_New_variable1) - ) - ) - - (:action press_Contacts_NewContact_OK_primitive - :parameters (?press_Contacts_NewContact_OK_variable1 - contact) - :precondition (and - (inMode_Contacts) - (inMode_Contacts_ConfigureContact) - (not (inMode_PictureSelection)) - (isSet_Contact_Name ?press_Contacts_NewContact_OK_variable1) - ) - :effect (and - (not (inMode_Contacts_ConfigureContact)) - (not (selected ?press_Contacts_NewContact_OK_variable1)) - (created ?press_Contacts_NewContact_OK_variable1) - ) - ) - - (:action press_Contacts_NewContact_SelectPicture_primitive - :parameters (?press_Contacts_NewContact_SelectPicture_variable1 - contact) - :precondition (and - (inMode_Contacts) - (inMode_Contacts_ConfigureContact) - (selected ?press_Contacts_NewContact_SelectPicture_variable1) - ) - :effect (and - (inMode_PictureSelection) - ) - ) - - (:action press_EMail_NewEMail_primitive - :parameters (?press_EMail_NewEMail_variable1 - emailaccount) - :precondition (and - (inMode_EMail) - (not (inMode_EMail_NewEMail)) - (not (inMode_EMail_Inbox)) - (selected ?press_EMail_NewEMail_variable1) - ) - :effect (and - (inMode_EMail_NewEMail) - ) - ) - - (:action press_EMail_NewEMail_Send_primitive - :parameters (?newObj_variable116 - contactable ?press_EMail_NewEMail_Send_variable1 - email) - :precondition (and - (inMode_EMail) - (inMode_EMail_NewEMail) - (entered_EMail ?newObj_variable116) - (not (haveSent ?press_EMail_NewEMail_Send_variable1)) - ) - :effect (and - (not (inMode_EMail_NewEMail)) - (inMode_EMail_Inbox) - (not (entered_EMail ?newObj_variable116)) - (haveSent ?press_EMail_NewEMail_Send_variable1) - (hasReceived ?newObj_variable116 ?press_EMail_NewEMail_Send_variable1) - ) - ) - - (:action press_Home_Calendar_primitive - :parameters () - :precondition (and - (inMode_Home) - ) - :effect (and - (inMode_Calendar) - (not (inMode_Home)) - ) - ) - - (:action press_Home_Clock_primitive - :parameters () - :precondition (and - (inMode_Home) - ) - :effect (and - (inMode_Clock) - (not (inMode_Home)) - ) - ) - - (:action press_Home_EMail_primitive - :parameters () - :precondition (and - (inMode_Home) - ) - :effect (and - (not (inMode_Home)) - (inMode_EMail) - ) - ) - - (:action press_Home_Messages_primitive - :parameters () - :precondition (and - (inMode_Home) - ) - :effect (and - (not (inMode_Home)) - (inMode_Messages) - ) - ) - - (:action press_Home_People_primitive - :parameters () - :precondition (and - (inMode_Home) - ) - :effect (and - (not (inMode_Home)) - (inMode_People) - ) - ) - - (:action press_Home_Programs_primitive - :parameters () - :precondition (and - (inMode_Home) - ) - :effect (and - (inMode_Programs) - (not (inMode_Home)) - ) - ) - - (:action press_Home_Telephone_primitive - :parameters () - :precondition (and - (inMode_Home) - ) - :effect (and - (inMode_Telephone) - (not (inMode_Home)) - ) - ) - - (:action press_Home_Default_primitive - :parameters () - :precondition (and - (not (inMode_People_AddFavourite)) - (not (entered_AnyNumber)) - (not (inMode_Contacts_Details)) - ) - :effect (and - (inMode_Home) - (not (inMode_Calendar)) - (not (inMode_Clock)) - (not (inMode_Menu)) - (not (inMode_Programs)) - (not (inMode_Tasks)) - (not (inMode_Telephone)) - (not (inMode_Contacts)) - (not (inMode_People_ReadyToAddFavourite)) - (not (inMode_Messages)) - (not (inMode_NewMessage)) - (not (inMode_EMail)) - (not (inMode_EMail_NewEMail)) - (not (inMode_EMail_Inbox)) - (not (inMode_People)) - (not (inMode_Contacts_Details)) - ) - ) - - (:action press_Home_From_Add_Favourite_primitive - :parameters (?newObj_variable69 - contact) - :precondition (and - (inMode_People_AddFavourite) - ) - :effect (and - (inMode_Home) - (not (inMode_Calendar)) - (not (inMode_Clock)) - (not (inMode_Menu)) - (not (inMode_Programs)) - (not (inMode_Tasks)) - (not (inMode_Telephone)) - (not (inMode_Contacts)) - (not (inMode_People_ReadyToAddFavourite)) - (not (inMode_People_AddFavourite)) - (not (selected_AddAsFavourite ?newObj_variable69)) - (not (selected_FavouriteNumber)) - (not (inMode_Messages)) - (not (inMode_NewMessage)) - (not (inMode_EMail)) - (not (inMode_EMail_Inbox)) - (not (inMode_EMail_NewEMail)) - (not (inMode_People)) - (not (inMode_Contacts_Details)) - ) - ) - - (:action press_Home_From_Contacts_Details_primitive - :parameters (?newObj_variable12 - contact) - :precondition (and - (inMode_Contacts_Details) - (selected ?newObj_variable12) - ) - :effect (and - (inMode_Home) - (not (inMode_Calendar)) - (not (inMode_Clock)) - (not (inMode_Menu)) - (not (inMode_Programs)) - (not (inMode_Tasks)) - (not (inMode_Telephone)) - (not (inMode_Contacts)) - (not (inMode_People_ReadyToAddFavourite)) - (not (inMode_Messages)) - (not (inMode_NewMessage)) - (not (inMode_EMail)) - (not (inMode_EMail_NewEMail)) - (not (inMode_EMail_Inbox)) - (not (inMode_People)) - (not (inMode_Contacts_Details)) - (not (selected ?newObj_variable12)) - ) - ) - - (:action press_Home_From_SMS_Mobile_primitive - :parameters (?newObj_variable15 - contactable) - :precondition (and - (inMode_NewMessage) - (entered_NumberMobile ?newObj_variable15) - (entered_AnyNumber) - ) - :effect (and - (inMode_Home) - (not (inMode_Calendar)) - (not (inMode_Clock)) - (not (inMode_Menu)) - (not (inMode_Programs)) - (not (inMode_Tasks)) - (not (inMode_Telephone)) - (not (inMode_Contacts)) - (not (inMode_People_ReadyToAddFavourite)) - (not (inMode_Messages)) - (not (inMode_NewMessage)) - (not (inMode_EMail)) - (not (inMode_EMail_Inbox)) - (not (inMode_EMail_NewEMail)) - (not (entered_NumberMobile ?newObj_variable15)) - (not (entered_AnyNumber)) - (not (inMode_People)) - (not (inMode_Contacts_Details)) - ) - ) - - (:action press_Home_From_SMS_Office_primitive - :parameters (?newObj_variable105 - contactable) - :precondition (and - (inMode_NewMessage) - (entered_NumberOffice ?newObj_variable105) - (entered_AnyNumber) - ) - :effect (and - (inMode_Home) - (not (inMode_Calendar)) - (not (inMode_Clock)) - (not (inMode_Menu)) - (not (inMode_Programs)) - (not (inMode_Tasks)) - (not (inMode_Telephone)) - (not (inMode_Contacts)) - (not (inMode_People_ReadyToAddFavourite)) - (not (inMode_Messages)) - (not (inMode_NewMessage)) - (not (entered_NumberOffice ?newObj_variable105)) - (not (inMode_EMail)) - (not (inMode_EMail_Inbox)) - (not (inMode_EMail_NewEMail)) - (not (entered_AnyNumber)) - (not (inMode_People)) - (not (inMode_Contacts_Details)) - ) - ) - - (:action press_Home_From_Telephone_Mobile_primitive - :parameters (?newObj_variable97 - contactable) - :precondition (and - (inMode_Telephone) - (entered_NumberMobile ?newObj_variable97) - (entered_AnyNumber) - ) - :effect (and - (inMode_Home) - (not (inMode_Calendar)) - (not (inMode_Clock)) - (not (inMode_Menu)) - (not (inMode_Programs)) - (not (inMode_Tasks)) - (not (inMode_Telephone)) - (not (inMode_Contacts)) - (not (inMode_People_ReadyToAddFavourite)) - (not (inMode_Messages)) - (not (inMode_NewMessage)) - (not (inMode_EMail)) - (not (inMode_EMail_Inbox)) - (not (inMode_EMail_NewEMail)) - (not (entered_NumberMobile ?newObj_variable97)) - (not (entered_AnyNumber)) - (not (inMode_People)) - (not (inMode_Contacts_Details)) - ) - ) - - (:action press_Home_From_Telephone_Office_primitive - :parameters (?newObj_variable98 - contactable) - :precondition (and - (inMode_Telephone) - (entered_NumberOffice ?newObj_variable98) - (entered_AnyNumber) - ) - :effect (and - (inMode_Home) - (not (inMode_Calendar)) - (not (inMode_Clock)) - (not (inMode_Menu)) - (not (inMode_Programs)) - (not (inMode_Tasks)) - (not (inMode_Telephone)) - (not (inMode_Contacts)) - (not (inMode_People_ReadyToAddFavourite)) - (not (inMode_Messages)) - (not (inMode_NewMessage)) - (not (entered_NumberOffice ?newObj_variable98)) - (not (inMode_EMail)) - (not (inMode_EMail_Inbox)) - (not (inMode_EMail_NewEMail)) - (not (entered_AnyNumber)) - (not (inMode_People)) - (not (inMode_Contacts_Details)) - ) - ) - - (:action press_Messages_NewMessage_primitive - :parameters () - :precondition (and - (inMode_Messages) - (not (inMode_NewMessage)) - ) - :effect (and - (inMode_NewMessage) - ) - ) - - (:action press_NewMessage_Send_Mobile_primitive - :parameters (?newObj_variable107 - contactable ?press_NewMessage_Send_Mobile_variable2 - sms) - :precondition (and - (entered_NumberMobile ?newObj_variable107) - (inMode_NewMessage) - (not (haveSent ?press_NewMessage_Send_Mobile_variable2)) - ) - :effect (and - (not (inMode_NewMessage)) - (not (entered_NumberMobile ?newObj_variable107)) - (not (entered_NumberOffice ?newObj_variable107)) - (haveSent ?press_NewMessage_Send_Mobile_variable2) - (hasReceived ?newObj_variable107 ?press_NewMessage_Send_Mobile_variable2) - (not (entered_AnyNumber)) - ) - ) - - (:action press_NewMessage_Send_Office_primitive - :parameters (?newObj_variable108 - contactable ?press_NewMessage_Send_Office_variable1 - sms) - :precondition (and - (inMode_NewMessage) - (entered_NumberOffice ?newObj_variable108) - (not (haveSent ?press_NewMessage_Send_Office_variable1)) - ) - :effect (and - (not (inMode_NewMessage)) - (not (entered_NumberMobile ?newObj_variable108)) - (not (entered_NumberOffice ?newObj_variable108)) - (hasReceived ?newObj_variable108 ?press_NewMessage_Send_Office_variable1) - (haveSent ?press_NewMessage_Send_Office_variable1) - (not (entered_AnyNumber)) - ) - ) - - (:action press_People_LargePlus_primitive - :parameters () - :precondition (and - (inMode_People_ReadyToAddFavourite) - (not (inMode_Menu)) - ) - :effect (and - (inMode_People_AddFavourite) - (inMode_People_AddFavourite_SelectContact) - (not (inMode_People_ReadyToAddFavourite)) - ) - ) - - (:action press_People_Menu_primitive - :parameters () - :precondition (and - (inMode_People) - (not (inMode_People_AddFavourite)) - (not (inMode_Menu)) - ) - :effect (and - (inMode_Menu) - ) - ) - - (:action press_People_Menu_AddFavourite_primitive - :parameters () - :precondition (and - (inMode_People) - (inMode_Menu) - ) - :effect (and - (inMode_People_AddFavourite) - (inMode_People_AddFavourite_SelectContact) - ) - ) - - (:action press_People_More_primitive - :parameters () - :precondition (and - (inMode_People) - ) - :effect (and - (inMode_Contacts) - (not (inMode_People)) - ) - ) - - (:action press_People_Smallplus_AlreadyPressed_primitive - :parameters () - :precondition (and - (inMode_People) - (not (inMode_Menu)) - (inMode_People_ReadyToAddFavourite) - ) - :effect (and - (not (inMode_People_FavouriteSelected)) - (inMode_People_ReadyToAddFavourite) - ) - ) - - (:action press_People_Smallplus_FavouriteSelected_primitive - :parameters (?newObj_variable94 - contact) - :precondition (and - (inMode_People) - (not (inMode_Menu)) - (inMode_People_FavouriteSelected) - (selected_Favourite ?newObj_variable94) - ) - :effect (and - (not (selected_Favourite ?newObj_variable94)) - (not (inMode_People_FavouriteSelected)) - (inMode_People_ReadyToAddFavourite) - ) - ) - - (:action press_Programs_Tasks_primitive - :parameters () - :precondition (and - (inMode_Programs) - ) - :effect (and - (not (inMode_Programs)) - (inMode_Tasks) - ) - ) - - (:action press_Tasks_Menu_primitive - :parameters () - :precondition (and - (inMode_Tasks) - (not (inMode_Tasks_ConfigureTask)) - (not (inMode_Menu)) - ) - :effect (and - (inMode_Menu) - ) - ) - - (:action press_Tasks_Menu_NewTask_primitive - :parameters (?press_Tasks_Menu_NewTask_variable2 - task) - :precondition (and - (inMode_Tasks) - (inMode_Menu) - (not (inUse ?press_Tasks_Menu_NewTask_variable2)) - ) - :effect (and - (inMode_Tasks_ConfigureTask) - (not (inMode_Menu)) - (inUse ?press_Tasks_Menu_NewTask_variable2) - (selected ?press_Tasks_Menu_NewTask_variable2) - ) - ) - - (:action press_Tasks_NewTask_OK_primitive - :parameters (?press_Tasks_NewTask_OK_variable1 - task) - :precondition (and - (inMode_Tasks) - (inMode_Tasks_ConfigureTask) - (isSet_Task_Name ?press_Tasks_NewTask_OK_variable1) - (selected ?press_Tasks_NewTask_OK_variable1) - ) - :effect (and - (not (inMode_Tasks_ConfigureTask)) - (not (selected ?press_Tasks_NewTask_OK_variable1)) - (created ?press_Tasks_NewTask_OK_variable1) - ) - ) - - (:action press_Telephone_Call_Mobile_primitive - :parameters (?newObj_variable73 - contactable ?press_Call_Mobile_variable1 - call) - :precondition (and - (inMode_Telephone) - (entered_NumberMobile ?newObj_variable73) - (not (haveSent ?press_Call_Mobile_variable1)) - ) - :effect (and - (not (entered_NumberMobile ?newObj_variable73)) - (not (entered_NumberOffice ?newObj_variable73)) - (haveSent ?press_Call_Mobile_variable1) - (hasReceived ?newObj_variable73 ?press_Call_Mobile_variable1) - (not (entered_AnyNumber)) - ) - ) - - (:action press_Telephone_Call_Office_primitive - :parameters (?newObj_variable74 - contactable ?press_Call_Office_variable1 - call) - :precondition (and - (inMode_Telephone) - (entered_NumberOffice ?newObj_variable74) - (not (haveSent ?press_Call_Office_variable1)) - ) - :effect (and - (not (entered_NumberOffice ?newObj_variable74)) - (not (entered_NumberMobile ?newObj_variable74)) - (hasReceived ?newObj_variable74 ?press_Call_Office_variable1) - (haveSent ?press_Call_Office_variable1) - (not (entered_AnyNumber)) - ) - ) - - (:action press_Telephone_Contacts_primitive - :parameters () - :precondition (and - (inMode_Telephone) - ) - :effect (and - (inMode_Contacts) - (not (inMode_Telephone)) - ) - ) - - (:action select_AccountSelection_Account_primitive - :parameters (?newObj_variable140 - emailaccount) - :precondition (and - (inMode_AccountSelection) - ) - :effect (and - (selected ?newObj_variable140) - (inMode_EMail_NewEMail) - (inMode_EMail) - (not (inMode_AccountSelection)) - ) - ) - - (:action select_Contacts_ContactForContactable_primitive - :parameters (?newObj_variable78 - contact ?newObj_variable79 - contactable) - :precondition (and - (associated_Contact ?newObj_variable78 ?newObj_variable79) - (inMode_Contacts) - (not (inMode_Contacts_ConfigureContact)) - (not (inMode_Contacts_Details)) - ) - :effect (and - (selected ?newObj_variable78) - (inMode_Contacts_Details) - ) - ) - - (:action select_Contacts_Details_Mobile_primitive - :parameters (?newObj_variable83 - contact ?select_Contacts_Details_Mobile_variable1 - call ?select_Contacts_Details_Mobile_variable2 - contactable) - :precondition (and - (inMode_Contacts) - (inMode_Contacts_Details) - (isSet_Contact_NumberMobile ?newObj_variable83) - (selected ?newObj_variable83) - (not (haveSent ?select_Contacts_Details_Mobile_variable1)) - (associated_Contact ?newObj_variable83 ?select_Contacts_Details_Mobile_variable2) - ) - :effect (and - (not (inMode_Contacts)) - (not (inMode_Contacts_Details)) - (not (selected ?newObj_variable83)) - (inMode_Telephone) - (hasReceived ?select_Contacts_Details_Mobile_variable2 ?select_Contacts_Details_Mobile_variable1) - (haveSent ?select_Contacts_Details_Mobile_variable1) - ) - ) - - (:action select_Contacts_Details_Office_primitive - :parameters (?newObj_variable84 - contact ?select_Contacts_Details_Office_variable1 - call ?select_Contacts_Details_Office_variable2 - contactable) - :precondition (and - (inMode_Contacts) - (inMode_Contacts_Details) - (selected ?newObj_variable84) - (isSet_Contact_NumberOffice ?newObj_variable84) - (associated_Contact ?newObj_variable84 ?select_Contacts_Details_Office_variable2) - (not (haveSent ?select_Contacts_Details_Office_variable1)) - ) - :effect (and - (not (inMode_Contacts)) - (not (inMode_Contacts_Details)) - (not (selected ?newObj_variable84)) - (inMode_Telephone) - (hasReceived ?select_Contacts_Details_Office_variable2 ?select_Contacts_Details_Office_variable1) - (haveSent ?select_Contacts_Details_Office_variable1) - ) - ) - - (:action select_EMail_EMailAccount_NoOp_primitive - :parameters (?newObj_variable137 - emailaccount) - :precondition (and - (inMode_EMail) - (not (inMode_EMail_NewEMail)) - (not (inMode_EMail_Inbox)) - (selected ?newObj_variable137) - ) - :effect (and - (selected ?newObj_variable137) - ) - ) - - (:action select_EMail_EMailAccount_WithPreviousSelection_primitive - :parameters (?newObj_variable114 - emailaccount ?select_EMail_EMailAccount_variable1 - emailaccount) - :precondition (and - (inMode_EMail) - (selected ?newObj_variable114) - (not (inMode_EMail_NewEMail)) - (not (inMode_EMail_Inbox)) - (not (selected ?select_EMail_EMailAccount_variable1)) - ) - :effect (and - (selected ?select_EMail_EMailAccount_variable1) - (not (selected ?newObj_variable114)) - ) - ) - - (:action select_People_AddFavourite_Contact_withEmail_primitive - :parameters (?newObj_variable57 - contact) - :precondition (and - (inMode_People) - (inMode_People_AddFavourite) - (inMode_People_AddFavourite_SelectContact) - (isSet_Contact_EmailAddress ?newObj_variable57) - (not (isFavourite ?newObj_variable57)) - (created ?newObj_variable57) - ) - :effect (and - (not (inMode_People_AddFavourite_SelectContact)) - (inMode_People_AddFavourite_SelectFavouriteNumber) - (selected_AddAsFavourite ?newObj_variable57) - ) - ) - - (:action select_People_AddFavourite_Contact_withMobile_primitive - :parameters (?newObj_variable53 - contact) - :precondition (and - (inMode_People) - (inMode_People_AddFavourite) - (inMode_People_AddFavourite_SelectContact) - (isSet_Contact_NumberMobile ?newObj_variable53) - (not (isFavourite ?newObj_variable53)) - (created ?newObj_variable53) - ) - :effect (and - (not (inMode_People_AddFavourite_SelectContact)) - (inMode_People_AddFavourite_SelectFavouriteNumber) - (selected_AddAsFavourite ?newObj_variable53) - ) - ) - - (:action select_People_AddFavourite_Contact_withOffice_primitive - :parameters (?newObj_variable58 - contact) - :precondition (and - (inMode_People) - (inMode_People_AddFavourite) - (inMode_People_AddFavourite_SelectContact) - (isSet_Contact_NumberOffice ?newObj_variable58) - (not (isFavourite ?newObj_variable58)) - (created ?newObj_variable58) - ) - :effect (and - (not (inMode_People_AddFavourite_SelectContact)) - (inMode_People_AddFavourite_SelectFavouriteNumber) - (selected_AddAsFavourite ?newObj_variable58) - ) - ) - - (:action select_People_AddFavourite_FavouriteNumber_WithPicture_primitive - :parameters (?newObj_variable20 - contact ?newObj_variable22 - picture) - :precondition (and - (inMode_People_AddFavourite_SelectFavouriteNumber) - (inMode_People_AddFavourite) - (associated_Picture ?newObj_variable20 ?newObj_variable22) - (inMode_People) - (selected_AddAsFavourite ?newObj_variable20) - ) - :effect (and - (not (inMode_People_AddFavourite_SelectFavouriteNumber)) - (not (inMode_People_AddFavourite)) - (isFavourite ?newObj_variable20) - (not (selected_AddAsFavourite ?newObj_variable20)) - ) - ) - - (:action select_People_AddFavourite_FavouriteNumber_WithoutPicture_primitive - :parameters (?newObj_variable33 - contact) - :precondition (and - (not (isSet_Contact_Picture ?newObj_variable33)) - (inMode_People_AddFavourite_SelectFavouriteNumber) - (inMode_People_AddFavourite) - (inMode_People) - (selected_AddAsFavourite ?newObj_variable33) - ) - :effect (and - (selected_FavouriteNumber) - (not (inMode_People_AddFavourite_SelectFavouriteNumber)) - (inMode_People_AddFavourite_SelectPicture) - ) - ) - - (:action select_People_AddFavourite_Picture_primitive - :parameters (?newObj_variable62 - contact ?newObj_variable63 - picture) - :precondition (and - (inMode_People) - (inMode_People_AddFavourite) - (inMode_People_AddFavourite_SelectPicture) - (selected_AddAsFavourite ?newObj_variable62) - (selected_FavouriteNumber) - (haveInformation_Regular ?newObj_variable63) - ) - :effect (and - (isSet_Contact_Picture ?newObj_variable62) - (associated_Picture ?newObj_variable62 ?newObj_variable63) - (not (selected_AddAsFavourite ?newObj_variable62)) - (not (inMode_People_AddFavourite_SelectPicture)) - (not (selected_FavouriteNumber)) - (not (inMode_People_AddFavourite)) - (isFavourite ?newObj_variable62) - ) - ) - - (:action select_People_FavouriteSelected_EMail_primitive - :parameters (?newObj_variable135 - contact ?select_People_FavouriteSelected_EMail_variable1 - contactable) - :precondition (and - (inMode_People) - (inMode_People_FavouriteSelected) - (selected_Favourite ?newObj_variable135) - (isSet_Contact_EmailAddress ?newObj_variable135) - (not (inMode_Menu)) - (not (inMode_People_AddFavourite)) - (associated_Contact ?newObj_variable135 ?select_People_FavouriteSelected_EMail_variable1) - ) - :effect (and - (not (inMode_People)) - (inMode_AccountSelection) - (entered_EMail ?select_People_FavouriteSelected_EMail_variable1) - ) - ) - - (:action select_People_FavouriteSelected_Mobile_primitive - :parameters (?newObj_variable88 - contact ?select_People_FavouriteSelected_Mobile_variable1 - call ?select_People_FavouriteSelected_Mobile_variable2 - contactable) - :precondition (and - (inMode_People) - (inMode_People_FavouriteSelected) - (selected_Favourite ?newObj_variable88) - (not (inMode_Menu)) - (isSet_Contact_NumberMobile ?newObj_variable88) - (not (inMode_People_AddFavourite)) - (not (haveSent ?select_People_FavouriteSelected_Mobile_variable1)) - (associated_Contact ?newObj_variable88 ?select_People_FavouriteSelected_Mobile_variable2) - ) - :effect (and - (not (inMode_People)) - (inMode_Telephone) - (haveSent ?select_People_FavouriteSelected_Mobile_variable1) - (hasReceived ?select_People_FavouriteSelected_Mobile_variable2 ?select_People_FavouriteSelected_Mobile_variable1) - ) - ) - - (:action select_People_FavouriteSelected_Office_primitive - :parameters (?newObj_variable89 - contact ?select_People_FavouriteSelected_Office_variable1 - call ?select_People_FavouriteSelected_Office_variable2 - contactable) - :precondition (and - (inMode_People) - (inMode_People_FavouriteSelected) - (isSet_Contact_NumberOffice ?newObj_variable89) - (not (inMode_Menu)) - (selected_Favourite ?newObj_variable89) - (not (inMode_People_AddFavourite)) - (not (haveSent ?select_People_FavouriteSelected_Office_variable1)) - (associated_Contact ?newObj_variable89 ?select_People_FavouriteSelected_Office_variable2) - ) - :effect (and - (not (inMode_People)) - (inMode_Telephone) - (haveSent ?select_People_FavouriteSelected_Office_variable1) - (hasReceived ?select_People_FavouriteSelected_Office_variable2 ?select_People_FavouriteSelected_Office_variable1) - ) - ) - - (:action select_People_FavouriteSelected_SMS_primitive - :parameters (?newObj_variable112 - contact ?newObj_variable113 - contactable) - :precondition (and - (inMode_People) - (inMode_People_FavouriteSelected) - (selected_Favourite ?newObj_variable112) - (not (inMode_Menu)) - (associated_Contact ?newObj_variable112 ?newObj_variable113) - (isSet_Contact_NumberMobile ?newObj_variable112) - (not (inMode_People_AddFavourite)) - ) - :effect (and - (inMode_NewMessage) - (entered_NumberMobile ?newObj_variable113) - (not (inMode_People)) - (entered_AnyNumber) - ) - ) - - (:action select_People_Favourite_FromReadyToAddFavourite_primitive - :parameters (?newObj_variable123 - contact ?newObj_variable124 - contactable) - :precondition (and - (inMode_People_ReadyToAddFavourite) - (inMode_People) - (associated_Contact ?newObj_variable123 ?newObj_variable124) - (isFavourite ?newObj_variable123) - (not (inMode_People_AddFavourite)) - (not (inMode_Menu)) - ) - :effect (and - (not (inMode_People_ReadyToAddFavourite)) - (selected_Favourite ?newObj_variable123) - (inMode_People_FavouriteSelected) - ) - ) - - (:action select_People_Favourite_NoOp_primitive - :parameters (?newObj_variable130 - contact ?newObj_variable131 - contactable) - :precondition (and - (selected_Favourite ?newObj_variable130) - (associated_Contact ?newObj_variable130 ?newObj_variable131) - (inMode_People_FavouriteSelected) - (not (inMode_Menu)) - (inMode_People) - (not (inMode_People_AddFavourite)) - (isFavourite ?newObj_variable130) - ) - :effect (and - (selected_Favourite ?newObj_variable130) - (inMode_People_FavouriteSelected) - ) - ) - - (:action select_People_Favourite_WithPreviousSelection_primitive - :parameters (?newObj_variable120 - contact ?newObj_variable121 - contact ?newObj_variable122 - contactable) - :precondition (and - (inMode_People) - (not (inMode_People_AddFavourite)) - (associated_Contact ?newObj_variable121 ?newObj_variable122) - (isFavourite ?newObj_variable121) - (selected_Favourite ?newObj_variable120) - (not (selected_Favourite ?newObj_variable121)) - (not (inMode_Menu)) - ) - :effect (and - (selected_Favourite ?newObj_variable121) - (not (selected_Favourite ?newObj_variable120)) - (inMode_People_FavouriteSelected) - ) - ) - - (:action select_PictureSelection_PictureForNewContact_primitive - :parameters (?newObj_variable52 - picture ?select_PictureSelection_PictureForNewContact_variable2 - contact) - :precondition (and - (inMode_PictureSelection) - (inMode_Contacts_ConfigureContact) - (inMode_Contacts) - (selected ?select_PictureSelection_PictureForNewContact_variable2) - (haveInformation_Regular ?newObj_variable52) - ) - :effect (and - (not (inMode_PictureSelection)) - (associated_Picture ?select_PictureSelection_PictureForNewContact_variable2 ?newObj_variable52) - (isSet_Contact_Picture ?select_PictureSelection_PictureForNewContact_variable2) - ) - ) - - (:action set_Alarm_Days_primitive - :parameters (?setAlarm_Days_variable1 - alarm ?set_Alarm_Days_variable1 - date) - :precondition (and - (inMode_Clock) - (inMode_Clock_Alarm) - (haveInformation_Regular ?set_Alarm_Days_variable1) - ) - :effect (and - (isSet_Alarm_Days ?setAlarm_Days_variable1 ?set_Alarm_Days_variable1) - ) - ) - - (:action set_Alarm_Description_primitive - :parameters (?newObj_variable6 - alarm) - :precondition (and - (inMode_Clock) - (inMode_Clock_Alarm) - ) - :effect (and - (isSet_Alarm_Description ?newObj_variable6) - ) - ) - - (:action set_Alarm_Time_primitive - :parameters (?setAlarm_Time_variable1 - alarm ?set_Alarm_Time_variable1 - date) - :precondition (and - (inMode_Clock) - (inMode_Clock_Alarm) - (haveInformation_Regular ?set_Alarm_Time_variable1) - ) - :effect (and - (isSet_Alarm_Time ?setAlarm_Time_variable1 ?set_Alarm_Time_variable1) - ) - ) - - (:action set_Appointment_Location_primitive - :parameters (?newObj_variable9 - appointment ?set_Appointment_Location_variable1 - location) - :precondition (and - (inMode_Calendar) - (inMode_Calendar_ConfigureAppointment) - (selected ?newObj_variable9) - (haveInformation_Regular ?set_Appointment_Location_variable1) - ) - :effect (and - (isSet_Appointment_Location ?newObj_variable9 ?set_Appointment_Location_variable1) - ) - ) - - (:action set_Appointment_Name_primitive - :parameters (?newObj_variable8 - appointment) - :precondition (and - (inMode_Calendar) - (inMode_Calendar_ConfigureAppointment) - (selected ?newObj_variable8) - ) - :effect (and - (isSet_Appointment_Name ?newObj_variable8) - ) - ) - - (:action set_Appointment_Reminder_primitive - :parameters (?newObj_variable10 - appointment) - :precondition (and - (inMode_Calendar) - (inMode_Calendar_ConfigureAppointment) - (selected ?newObj_variable10) - ) - :effect (and - (isSet_Appointment_Reminder ?newObj_variable10) - ) - ) - - (:action set_Appointment_Time_primitive - :parameters (?newObj_variable2 - appointment ?set_Appointment_Time_variable1 - date) - :precondition (and - (inMode_Calendar) - (inMode_Calendar_ConfigureAppointment) - (selected ?newObj_variable2) - (haveInformation_Regular ?set_Appointment_Time_variable1) - ) - :effect (and - (isSet_Appointment_Time ?newObj_variable2 ?set_Appointment_Time_variable1) - ) - ) - - (:action set_Contact_Email_primitive - :parameters (?newObj_variable39 - contact ?set_Contact_Email_variable1 - contactable ?set_Contact_Email_variable2 - emailaddress) - :precondition (and - (inMode_Contacts_ConfigureContact) - (inMode_Contacts) - (not (inMode_PictureSelection)) - (haveInformation_Contactable ?set_Contact_Email_variable1 ?set_Contact_Email_variable2) - (associated_Contact ?newObj_variable39 ?set_Contact_Email_variable1) - (selected ?newObj_variable39) - ) - :effect (and - (isSet_Contact_EmailAddress ?newObj_variable39) - ) - ) - - (:action set_Contact_Name_primitive - :parameters (?newObj_variable44 - contact) - :precondition (and - (inMode_Contacts_ConfigureContact) - (inMode_Contacts) - (not (inMode_PictureSelection)) - (selected ?newObj_variable44) - ) - :effect (and - (isSet_Contact_Name ?newObj_variable44) - ) - ) - - (:action set_Contact_NumberMobile_primitive - :parameters (?newObj_variable37 - contact ?set_Contact_Mobile_variable1 - contactable ?set_Contact_Mobile_variable2 - numbermobile) - :precondition (and - (inMode_Contacts_ConfigureContact) - (inMode_Contacts) - (not (inMode_PictureSelection)) - (haveInformation_Contactable ?set_Contact_Mobile_variable1 ?set_Contact_Mobile_variable2) - (associated_Contact ?newObj_variable37 ?set_Contact_Mobile_variable1) - (selected ?newObj_variable37) - ) - :effect (and - (isSet_Contact_NumberMobile ?newObj_variable37) - ) - ) - - (:action set_Contact_NumberOffice_primitive - :parameters (?newObj_variable38 - contact ?set_Contact_Office_variable1 - contactable ?set_Contact_Office_variable2 - numberoffice) - :precondition (and - (inMode_Contacts_ConfigureContact) - (inMode_Contacts) - (not (inMode_PictureSelection)) - (associated_Contact ?newObj_variable38 ?set_Contact_Office_variable1) - (haveInformation_Contactable ?set_Contact_Office_variable1 ?set_Contact_Office_variable2) - (selected ?newObj_variable38) - ) - :effect (and - (isSet_Contact_NumberOffice ?newObj_variable38) - ) - ) - - (:action set_Task_Name_primitive - :parameters (?newObj_variable19 - task) - :precondition (and - (inMode_Tasks) - (not (inMode_Menu)) - (selected ?newObj_variable19) - ) - :effect (and - (isSet_Task_Name ?newObj_variable19) - ) - ) - - (:action set_Task_Name_Light_primitive - :parameters (?newObj_variable47 - task) - :precondition (and - (inMode_Tasks) - (not (inMode_Menu)) - (not (inUse ?newObj_variable47)) - (selected ?newObj_variable47) - ) - :effect (and - (isSet_Task_Name ?newObj_variable47) - (inUse ?newObj_variable47) - (created ?newObj_variable47) - ) - ) - - (:action set_Task_Reminder_primitive - :parameters (?newObj_variable26 - task) - :precondition (and - (inMode_Tasks) - (inMode_Tasks_ConfigureTask) - (selected ?newObj_variable26) - ) - :effect (and - (isSet_Task_Reminder ?newObj_variable26) - ) - ) - - (:action set_Task_Time_primitive - :parameters (?newObj_variable25 - task ?set_Task_Time_variable1 - date) - :precondition (and - (inMode_Tasks) - (inMode_Tasks_ConfigureTask) - (selected ?newObj_variable25) - (haveInformation_Regular ?set_Task_Time_variable1) - ) - :effect (and - (isSet_Task_Time ?newObj_variable25 ?set_Task_Time_variable1) - ) - ) - - (:action goal_action_primitive - :parameters () - :precondition (and - (created appointmentForMeeting) - (hasReceived greg call1) - (hasReceived dave email1) - ) - :effect ( - ) - ) - -) diff --git a/examples/ipc/SmartPhone/problem.hpdl b/examples/ipc/SmartPhone/problem.hpdl deleted file mode 100644 index 56e6b79..0000000 --- a/examples/ipc/SmartPhone/problem.hpdl +++ /dev/null @@ -1,76 +0,0 @@ -(define (problem prob) (:domain dom) - (:objects - dateForMeeting - date - myEMailAccount - emailaccount - davesEMailAddress - emailaddress - locationForMeeting - location - gregsMobileNumber - numbermobile - ) - - (:init - (haveInformation_Contactable dave davesEMailAddress) - (haveInformation_Contactable greg gregsMobileNumber) - (inMode_Home) - (selected myEMailAccount) - (haveInformation_Regular dateForMeeting) - (haveInformation_Regular locationForMeeting) - (type_member_appointment appointmentForMeeting) - (type_member_call call1) - (type_member_contactable dave) - (type_member_contactable greg) - (type_member_contactableinformation davesEMailAddress) - (type_member_contactableinformation gregsMobileNumber) - (type_member_creatable appointmentForMeeting) - (type_member_date dateForMeeting) - (type_member_email email1) - (type_member_emailaccount myEMailAccount) - (type_member_emailaddress davesEMailAddress) - (type_member_information dateForMeeting) - (type_member_information davesEMailAddress) - (type_member_information gregsMobileNumber) - (type_member_information locationForMeeting) - (type_member_location locationForMeeting) - (type_member_message call1) - (type_member_message email1) - (type_member_numbermobile gregsMobileNumber) - (type_member_person dave) - (type_member_person greg) - (type_member_regularinformation dateForMeeting) - (type_member_regularinformation locationForMeeting) - (type_member_selectable appointmentForMeeting) - (type_member_selectable myEMailAccount) - (type_member_transferablebycall dateForMeeting) - (type_member_transferablebycall davesEMailAddress) - (type_member_transferablebycall gregsMobileNumber) - (type_member_transferablebycall locationForMeeting) - (type_member_transferablebyemail dateForMeeting) - (type_member_transferablebyemail davesEMailAddress) - (type_member_transferablebyemail gregsMobileNumber) - (type_member_transferablebyemail locationForMeeting) - (type_member_transferablebyemailcontactable davesEMailAddress) - (type_member_transferablebyemailcontactable gregsMobileNumber) - (type_member_transferablebyemailregular dateForMeeting) - (type_member_transferablebyemailregular locationForMeeting) - (type_member_transferablebyphonecontactable davesEMailAddress) - (type_member_transferablebyphonecontactable gregsMobileNumber) - (type_member_transferablebyphoneregular dateForMeeting) - (type_member_transferablebyphoneregular locationForMeeting) - (type_member_transferablebysms dateForMeeting) - (type_member_transferablebysms davesEMailAddress) - (type_member_transferablebysms gregsMobileNumber) - (type_member_transferablebysms locationForMeeting) - (type_member_transferablebysmscontactable davesEMailAddress) - (type_member_transferablebysmscontactable gregsMobileNumber) - (type_member_transferablebysmsregular dateForMeeting) - (type_member_transferablebysmsregular locationForMeeting) - ) - - (:tasks-goal - :tasks ( - (call greg call1) - (send_EMail dave email1) - (create_Appointment appointmentForMeeting locationForMeeting dateForMeeting) - (goal_action) - ) - ) -) diff --git a/examples/ipc/Transport/domain.hpdl b/examples/ipc/Transport/domain.hpdl deleted file mode 100644 index 8af5e57..0000000 --- a/examples/ipc/Transport/domain.hpdl +++ /dev/null @@ -1,239 +0,0 @@ -(define (domain dom) - (:requirements - :typing - :htn-expansion - :negative-preconditions - :conditional-effects - :universal-preconditions - :disjunctive-preconditions - :equality - :existential-preconditions - ) - (:types - object__compiled - object - locatable - object__compiled - package - locatable - capacity_number - object__compiled - location - object__compiled - target - object__compiled - vehicle - locatable - ) - - (:constants - ) - - (:predicates - (type_member_capacity_number ?var - object) - (type_member_locatable ?var - object) - (type_member_location ?var - object) - (type_member_object__compiled ?var - object) - (type_member_package ?var - object) - (type_member_target ?var - object) - (type_member_vehicle ?var - object) - (road ?var0 - location ?var1 - location) - (at ?var0 - locatable ?var1 - location) - (in ?var0 - package ?var1 - vehicle) - (capacity ?var0 - vehicle ?var1 - capacity_number) - (capacity_predecessor ?var0 - capacity_number ?var1 - capacity_number) - ) - - - (:task drive - :parameters (?v - object ?l1 - object ?l2 - object) - (:method method1 - :precondition (and - (type_member_vehicle ?v) - (type_member_location ?l1) - (type_member_location ?l2) - ) - :tasks ( - (drive_primitive ?v - vehicle ?l1 - location ?l2 - location) - ) - ) - ) - - (:task noop - :parameters (?v - object ?l2 - object) - (:method method1 - :precondition (and - (type_member_vehicle ?v) - (type_member_location ?l2) - ) - :tasks ( - (noop_primitive ?v - vehicle ?l2 - location) - ) - ) - ) - - (:task pick_up - :parameters (?v - object ?l - object ?p - object ?s1 - object ?s2 - object) - (:method method1 - :precondition (and - (type_member_vehicle ?v) - (type_member_location ?l) - (type_member_package ?p) - (type_member_capacity_number ?s1) - (type_member_capacity_number ?s2) - ) - :tasks ( - (pick_up_primitive ?v - vehicle ?l - location ?p - package ?s1 - capacity_number ?s2 - capacity_number) - ) - ) - ) - - (:task drop - :parameters (?v - object ?l - object ?p - object ?s1 - object ?s2 - object) - (:method method1 - :precondition (and - (type_member_vehicle ?v) - (type_member_location ?l) - (type_member_package ?p) - (type_member_capacity_number ?s1) - (type_member_capacity_number ?s2) - ) - :tasks ( - (drop_primitive ?v - vehicle ?l - location ?p - package ?s1 - capacity_number ?s2 - capacity_number) - ) - ) - ) - -; ************************************************************ -; ************************************************************ - (:task deliver - :parameters (?p - package ?l - location) - (:method m_deliver_ordering_0 - :precondition (and - (type_member_location ?l1 - location) - (type_member_location ?l - location) - (type_member_package ?p - package) - (type_member_vehicle ?v - vehicle) - ) - :tasks ( - (get_to ?v ?l1) - (load ?v ?l1 ?p) - (get_to ?v ?l) - (unload ?v ?l ?p) - ) - ) - ) - - (:task get_to - :parameters (?v - vehicle ?l - location) - (:method m_drive_to_ordering_0 - :precondition (and - (type_member_location ?l1 - location) - (type_member_location ?l - location) - (type_member_vehicle ?v - vehicle) - ) - :tasks ( - (drive ?v ?l1 ?l) - ) - ) - (:method m_drive_to_via_ordering_0 - :precondition (and - (type_member_location ?l2 - location) - (type_member_location ?l - location) - (type_member_vehicle ?v - vehicle) - ) - :tasks ( - (get_to ?v ?l2) - (drive ?v ?l2 ?l) - ) - ) - (:method m_i_am_there_ordering_0 - :precondition (and - (type_member_location ?l - location) - (type_member_vehicle ?v - vehicle) - ) - :tasks ( - (noop ?v ?l) - ) - ) - ) - - (:task load - :parameters (?v - vehicle ?l - location ?p - package) - (:method m_load_ordering_0 - :precondition (and - (type_member_location ?l - location) - (type_member_package ?p - package) - (type_member_capacity_number ?s1 - capacity_number) - (type_member_capacity_number ?s2 - capacity_number) - (type_member_vehicle ?v - vehicle) - ) - :tasks ( - (pick_up ?v ?l ?p ?s1 ?s2) - ) - ) - ) - - (:task unload - :parameters (?v - vehicle ?l - location ?p - package) - (:method m_unload_ordering_0 - :precondition (and - (type_member_location ?l - location) - (type_member_package ?p - package) - (type_member_capacity_number ?s1 - capacity_number) - (type_member_capacity_number ?s2 - capacity_number) - (type_member_vehicle ?v - vehicle) - ) - :tasks ( - (drop ?v ?l ?p ?s1 ?s2) - ) - ) - ) - - (:action drive_primitive - :parameters (?v - vehicle ?l1 - location ?l2 - location) - :precondition (and - (at ?v ?l1) - (road ?l1 ?l2) - ) - :effect (and - (not (at ?v ?l1)) - (at ?v ?l2) - ) - ) - - (:action noop_primitive - :parameters (?v - vehicle ?l2 - location) - :precondition (and - (at ?v ?l2) - ) - :effect ( - ) - ) - - (:action pick_up_primitive - :parameters (?v - vehicle ?l - location ?p - package ?s1 - capacity_number ?s2 - capacity_number) - :precondition (and - (at ?v ?l) - (at ?p ?l) - (capacity_predecessor ?s1 ?s2) - (capacity ?v ?s2) - ) - :effect (and - (not (at ?p ?l)) - (in ?p ?v) - (capacity ?v ?s1) - (not (capacity ?v ?s2)) - ) - ) - - (:action drop_primitive - :parameters (?v - vehicle ?l - location ?p - package ?s1 - capacity_number ?s2 - capacity_number) - :precondition (and - (at ?v ?l) - (in ?p ?v) - (capacity_predecessor ?s1 ?s2) - (capacity ?v ?s1) - ) - :effect (and - (not (in ?p ?v)) - (at ?p ?l) - (capacity ?v ?s2) - (not (capacity ?v ?s1)) - ) - ) - -) diff --git a/examples/ipc/Transport/problem.hpdl b/examples/ipc/Transport/problem.hpdl deleted file mode 100644 index 995c7da..0000000 --- a/examples/ipc/Transport/problem.hpdl +++ /dev/null @@ -1,46 +0,0 @@ -(define (problem prob) (:domain dom) - (:objects - capacity_0 capacity_1 - capacity_number - city_loc_0 city_loc_1 city_loc_2 - location - package_0 package_1 - package - truck_0 - vehicle - ) - - (:init - (capacity_predecessor capacity_0 capacity_1) - (road city_loc_0 city_loc_1) - (road city_loc_1 city_loc_0) - (road city_loc_1 city_loc_2) - (road city_loc_2 city_loc_1) - (at package_0 city_loc_1) - (at package_1 city_loc_1) - (at truck_0 city_loc_2) - (capacity truck_0 capacity_1) - (type_member_capacity_number capacity_0) - (type_member_capacity_number capacity_1) - (type_member_locatable package_0) - (type_member_locatable package_1) - (type_member_locatable truck_0) - (type_member_location city_loc_0) - (type_member_location city_loc_1) - (type_member_location city_loc_2) - (type_member_object__compiled capacity_0) - (type_member_object__compiled capacity_1) - (type_member_object__compiled city_loc_0) - (type_member_object__compiled city_loc_1) - (type_member_object__compiled city_loc_2) - (type_member_object__compiled package_0) - (type_member_object__compiled package_1) - (type_member_object__compiled truck_0) - (type_member_package package_0) - (type_member_package package_1) - (type_member_vehicle truck_0) - ) - - (:tasks-goal - :tasks ( - (deliver package_0 city_loc_0) - (deliver package_1 city_loc_2) - ) - ) -) diff --git a/examples/ipc/UM-Translog/domain.hpdl b/examples/ipc/UM-Translog/domain.hpdl deleted file mode 100644 index 642c8d0..0000000 --- a/examples/ipc/UM-Translog/domain.hpdl +++ /dev/null @@ -1,2472 +0,0 @@ -(define (domain dom) - (:requirements - :typing - :htn-expansion - :negative-preconditions - :conditional-effects - :universal-preconditions - :disjunctive-preconditions - :equality - :existential-preconditions - ) - (:types - equipment_position package_storage_position thing vehicle_position - object - object__compiled - thing - physical - object__compiled - equipment - object__compiled - package - object__compiled - speciality - object__compiled - vehicle - object__compiled - location - thing - city - location - city_location - location - route - thing - region - location - bulky - physical - regular - physical - air_route - route - liquid - package - liquid - physical - livestock - physical - water - liquid - not_tcenter - city_location - - traincar - vehicle - traincar - vehicle_position - regular_traincar - traincar - truck - vehicle - regular_truck - truck - regular_vehicle - regular - regular_vehicle - vehicle - regular_traincar - regular_vehicle - regular_truck - regular_vehicle - airplane - regular_vehicle - tcenter - city_location - airport - tcenter - granular - physical - hub - tcenter - airport_hub - airport - airport_hub - hub - road_route - route - hopper - physical - sand - granular - sand - package - steel - bulky - steel - package - tanker - physical - flatbed - physical - flatbed_vehicle - vehicle - flatbed_vehicle - flatbed - flatbed_traincar - traincar - flatbed_traincar - flatbed_vehicle - flatbed_truck - flatbed_vehicle - flatbed_truck - truck - tanker_vehicle - tanker - tanker_vehicle - vehicle - tanker_traincar - traincar - tanker_traincar - tanker_vehicle - tanker_truck - tanker_vehicle - tanker_truck - truck - train - vehicle - train_station - tcenter - train_station_hub - hub - train_station_hub - train_station - valuable - package - - water - package - armored - speciality - hopper_vehicle - hopper - hopper_vehicle - vehicle - armored_vehicle - armored - armored_vehicle - vehicle - armored_flatbed_traincar - traincar - armored_flatbed_traincar - flatbed_vehicle - armored_flatbed_traincar - armored_vehicle - armored_flatbed_truck - flatbed_vehicle - armored_flatbed_truck - armored_vehicle - armored_flatbed_truck - truck - armored_hopper_traincar - traincar - armored_hopper_traincar - armored_vehicle - armored_hopper_traincar - hopper_vehicle - armored_hopper_truck - armored_vehicle - armored_hopper_truck - truck - armored_hopper_truck - hopper_vehicle - armored_regular_traincar - regular_vehicle - armored_regular_traincar - traincar - armored_regular_traincar - armored_vehicle - armored_regular_truck - regular_vehicle - armored_regular_truck - armored_vehicle - armored_regular_truck - truck - armored_tanker_traincar - traincar - armored_tanker_traincar - tanker_vehicle - armored_tanker_traincar - armored_vehicle - armored_tanker_truck - tanker_vehicle - armored_tanker_truck - armored_vehicle - armored_tanker_truck - truck - ore - granular - ore - package - parcels - package - parcels - regular - perishable - package - plane_ramp - equipment - post_office - not_tcenter - rail_route - route - refrigerated - speciality - auto - physical - auto_vehicle - vehicle - auto_vehicle - auto - auto_truck - truck - auto_traincar - traincar - auto_traincar - auto_vehicle - auto_truck - auto_vehicle - cars - package - cars - auto - hazardous - package - chemicals - hazardous - chemicals - perishable - chemicals - liquid - crane - package_storage_position - crane - equipment - customer_location - not_tcenter - - food - package - food - regular - food - perishable - - hopper_traincar - traincar - hopper_traincar - hopper_vehicle - hopper_truck - truck - hopper_truck - hopper_vehicle - - livestock_package - package - livestock_package - livestock - livestock_traincar - traincar - livestock_vehicle - livestock - livestock_vehicle - vehicle - livestock_traincar - livestock_vehicle - livestock_truck - livestock_vehicle - livestock_truck - truck - - local_road_route - road_route - lumber - bulky - lumber - package - mail - physical - mail_package - mail - mail_package - package - mail_package - regular - mail_traincar - traincar - mail_vehicle - regular_vehicle - mail_vehicle - mail - mail_traincar - mail_vehicle - mail_truck - mail_vehicle - mail_truck - truck - - money_art - valuable - money_art - package - money_art - regular - refrigerated_vehicle - refrigerated - refrigerated_vehicle - vehicle - refrigerated_regular_traincar - regular_vehicle - refrigerated_regular_traincar - traincar - refrigerated_regular_traincar - refrigerated_vehicle - refrigerated_regular_truck - regular_vehicle - refrigerated_regular_truck - truck - refrigerated_regular_truck - refrigerated_vehicle - refrigerated_tanker_traincar - traincar - refrigerated_tanker_traincar - tanker_vehicle - refrigerated_tanker_traincar - refrigerated_vehicle - refrigerated_tanker_truck - tanker_vehicle - refrigerated_tanker_truck - truck - refrigerated_tanker_truck - refrigerated_vehicle - - - ) - - (:constants - Drucker Toshiba_Laptops - parcels - ) - - (:predicates - (type_member_air_route ?var - object) - (type_member_airplane ?var - object) - (type_member_airport ?var - object) - (type_member_airport_hub ?var - object) - (type_member_armored ?var - object) - (type_member_armored_flatbed_traincar ?var - object) - (type_member_armored_flatbed_truck ?var - object) - (type_member_armored_hopper_traincar ?var - object) - (type_member_armored_hopper_truck ?var - object) - (type_member_armored_regular_traincar ?var - object) - (type_member_armored_regular_truck ?var - object) - (type_member_armored_tanker_traincar ?var - object) - (type_member_armored_tanker_truck ?var - object) - (type_member_armored_vehicle ?var - object) - (type_member_auto ?var - object) - (type_member_auto_traincar ?var - object) - (type_member_auto_truck ?var - object) - (type_member_auto_vehicle ?var - object) - (type_member_bulky ?var - object) - (type_member_cars ?var - object) - (type_member_chemicals ?var - object) - (type_member_city ?var - object) - (type_member_city_location ?var - object) - (type_member_crane ?var - object) - (type_member_customer_location ?var - object) - (type_member_equipment ?var - object) - (type_member_equipment_position ?var - object) - (type_member_flatbed ?var - object) - (type_member_flatbed_traincar ?var - object) - (type_member_flatbed_truck ?var - object) - (type_member_flatbed_vehicle ?var - object) - (type_member_food ?var - object) - (type_member_granular ?var - object) - (type_member_hazardous ?var - object) - (type_member_hopper ?var - object) - (type_member_hopper_traincar ?var - object) - (type_member_hopper_truck ?var - object) - (type_member_hopper_vehicle ?var - object) - (type_member_hub ?var - object) - (type_member_liquid ?var - object) - (type_member_livestock ?var - object) - (type_member_livestock_package ?var - object) - (type_member_livestock_traincar ?var - object) - (type_member_livestock_truck ?var - object) - (type_member_livestock_vehicle ?var - object) - (type_member_local_road_route ?var - object) - (type_member_location ?var - object) - (type_member_lumber ?var - object) - (type_member_mail ?var - object) - (type_member_mail_package ?var - object) - (type_member_mail_traincar ?var - object) - (type_member_mail_truck ?var - object) - (type_member_mail_vehicle ?var - object) - (type_member_money_art ?var - object) - (type_member_not_tcenter ?var - object) - (type_member_object__compiled ?var - object) - (type_member_ore ?var - object) - (type_member_package ?var - object) - (type_member_package_storage_position ?var - object) - (type_member_parcels ?var - object) - (type_member_perishable ?var - object) - (type_member_physical ?var - object) - (type_member_plane_ramp ?var - object) - (type_member_post_office ?var - object) - (type_member_rail_route ?var - object) - (type_member_refrigerated ?var - object) - (type_member_refrigerated_regular_traincar ?var - object) - (type_member_refrigerated_regular_truck ?var - object) - (type_member_refrigerated_tanker_traincar ?var - object) - (type_member_refrigerated_tanker_truck ?var - object) - (type_member_refrigerated_vehicle ?var - object) - (type_member_region ?var - object) - (type_member_regular ?var - object) - (type_member_regular_traincar ?var - object) - (type_member_regular_truck ?var - object) - (type_member_regular_vehicle ?var - object) - (type_member_road_route ?var - object) - (type_member_route ?var - object) - (type_member_sand ?var - object) - (type_member_speciality ?var - object) - (type_member_steel ?var - object) - (type_member_tcenter ?var - object) - (type_member_tanker ?var - object) - (type_member_tanker_traincar ?var - object) - (type_member_tanker_truck ?var - object) - (type_member_tanker_vehicle ?var - object) - (type_member_thing ?var - object) - (type_member_train ?var - object) - (type_member_train_station ?var - object) - (type_member_train_station_hub ?var - object) - (type_member_traincar ?var - object) - (type_member_truck ?var - object) - (type_member_valuable ?var - object) - (type_member_vehicle ?var - object) - (type_member_vehicle_position ?var - object) - (type_member_water ?var - object) - (At_Equipment ?var0 - equipment ?var1 - equipment_position) - (At_Package ?var0 - package ?var1 - package_storage_position) - (At_Vehicle ?var0 - vehicle ?var1 - vehicle_position) - (Available ?var0 - thing) - (Chute_Connected ?var0 - hopper_vehicle) - (City_Hazardous_Compatible ?var0 - city) - (Clean_Interior ?var0 - vehicle) - (Connected_To ?var0 - traincar ?var1 - train) - (Connects ?var0 - route ?var1 - location ?var2 - location) - (Decontaminated_Interior ?var0 - vehicle) - (Delivered ?var0 - package) - (Door_Open ?var0 - vehicle) - (Empty ?var0 - crane) - (Fees_Collected ?var0 - package) - (Guard_Inside ?var0 - armored) - (Guard_Outside ?var0 - armored) - (Have_Permit ?var0 - hazardous) - (Hose_Connected ?var0 - tanker_vehicle ?var1 - liquid) - (In_City ?var0 - city_location ?var1 - city) - (In_Region ?var0 - city ?var1 - region) - (Insured ?var0 - valuable) - (PV_Compatible ?var0 - package ?var1 - vehicle) - (RV_Compatible ?var0 - route ?var1 - vehicle) - (Ramp_Connected ?var0 - plane_ramp ?var1 - airplane) - (Ramp_Down ?var0 - vehicle) - (Serves ?var0 - tcenter ?var1 - location) - (Trough_Full ?var0 - livestock) - (Valve_Open ?var0 - tanker) - (Warning_Signs_Affixed ?var0 - vehicle) - ) - - - (:task affix_warning_signs - :parameters (?fws_v - object) - (:method method1 - :precondition (and - (type_member_vehicle ?fws_v) - ) - :tasks ( - (affix_warning_signs_primitive ?fws_v - vehicle) - ) - ) - ) - - (:task attach_conveyor_ramp - :parameters (?acr_ap - airplane ?acr_pr - plane_ramp ?acr_l - location) - (:method method1 - :precondition (and - (type_member_airplane ?acr_ap) - (type_member_plane_ramp ?acr_pr) - (type_member_location ?acr_l) - ) - :tasks ( - (attach_conveyor_ramp_primitive ?acr_ap - airplane ?acr_pr - plane_ramp ?acr_l - location) - ) - ) - ) - - (:task attach_train_car - :parameters (?atc_t - object ?atc_tc - object ?atc_l - object) - (:method method1 - :precondition (and - (type_member_train ?atc_t) - (type_member_traincar ?atc_tc) - (type_member_location ?atc_l) - ) - :tasks ( - (attach_train_car_primitive ?atc_t - train ?atc_tc - traincar ?atc_l - location) - ) - ) - ) - - (:task close_door - :parameters (?cd_rv - object) - (:method method1 - :precondition (and - (type_member_regular_vehicle ?cd_rv) - ) - :tasks ( - (close_door_primitive ?cd_rv - regular_vehicle) - ) - ) - ) - - (:task close_valve - :parameters (?cv_tv - object) - (:method method1 - :precondition (and - (type_member_tanker_vehicle ?cv_tv) - ) - :tasks ( - (close_valve_primitive ?cv_tv - tanker_vehicle) - ) - ) - ) - - (:task collect_fees - :parameters (?cf_p - object) - (:method method1 - :precondition (and - (type_member_package ?cf_p) - ) - :tasks ( - (collect_fees_primitive ?cf_p - package) - ) - ) - ) - - (:task collect_insurance - :parameters (?ci_v - object) - (:method method1 - :precondition (and - (type_member_valuable ?ci_v) - ) - :tasks ( - (collect_insurance_primitive ?ci_v - valuable) - ) - ) - ) - - (:task connect_chute - :parameters (?cc_h - object) - (:method method1 - :precondition (and - (type_member_hopper_vehicle ?cc_h) - ) - :tasks ( - (connect_chute_primitive ?cc_h - hopper_vehicle) - ) - ) - ) - - (:task connect_hose - :parameters (?ch_tv - object ?ch_l - object) - (:method method1 - :precondition (and - (type_member_tanker_vehicle ?ch_tv) - (type_member_liquid ?ch_l) - ) - :tasks ( - (connect_hose_primitive ?ch_tv - tanker_vehicle ?ch_l - liquid) - ) - ) - ) - - (:task decontaminate_interior - :parameters (?di_v - object) - (:method method1 - :precondition (and - (type_member_vehicle ?di_v) - ) - :tasks ( - (decontaminate_interior_primitive ?di_v - vehicle) - ) - ) - ) - - (:task deliver_h - :parameters (?dh_h - object) - (:method method1 - :precondition (and - (type_member_hazardous ?dh_h) - ) - :tasks ( - (deliver_h_primitive ?dh_h - hazardous) - ) - ) - ) - - (:task deliver_p - :parameters (?dp_p - object) - (:method method1 - :precondition (and - (type_member_package ?dp_p) - ) - :tasks ( - (deliver_p_primitive ?dp_p - package) - ) - ) - ) - - (:task deliver_v - :parameters (?dv_v - object) - (:method method1 - :precondition (and - (type_member_valuable ?dv_v) - ) - :tasks ( - (deliver_v_primitive ?dv_v - valuable) - ) - ) - ) - - (:task detach_conveyor_ramp - :parameters (?dcr_ap - object ?dcr_pr - object ?dcr_l - object) - (:method method1 - :precondition (and - (type_member_airplane ?dcr_ap) - (type_member_plane_ramp ?dcr_pr) - (type_member_location ?dcr_l) - ) - :tasks ( - (detach_conveyor_ramp_primitive ?dcr_ap - airplane ?dcr_pr - plane_ramp ?dcr_l - location) - ) - ) - ) - - (:task detach_train_car - :parameters (?dtc_t - object ?dtc_tc - object ?dtc_l - object) - (:method method1 - :precondition (and - (type_member_train ?dtc_t) - (type_member_traincar ?dtc_tc) - (type_member_location ?dtc_l) - ) - :tasks ( - (detach_train_car_primitive ?dtc_t - train ?dtc_tc - traincar ?dtc_l - location) - ) - ) - ) - - (:task disconnect_chute - :parameters (?dc_h - object) - (:method method1 - :precondition (and - (type_member_hopper_vehicle ?dc_h) - ) - :tasks ( - (disconnect_chute_primitive ?dc_h - hopper_vehicle) - ) - ) - ) - - (:task disconnect_hose - :parameters (?dch_tv - object ?dch_l - object) - (:method method1 - :precondition (and - (type_member_tanker_vehicle ?dch_tv) - (type_member_liquid ?dch_l) - ) - :tasks ( - (disconnect_hose_primitive ?dch_tv - tanker_vehicle ?dch_l - liquid) - ) - ) - ) - - (:task do_clean_interior - :parameters (?cli_v - object) - (:method method1 - :precondition (and - (type_member_vehicle ?cli_v) - ) - :tasks ( - (do_clean_interior_primitive ?cli_v - vehicle) - ) - ) - ) - - (:task empty_hopper - :parameters (?eh_p - object ?eh_hv - object ?eh_l - object) - (:method method1 - :precondition (and - (type_member_package ?eh_p) - (type_member_hopper_vehicle ?eh_hv) - (type_member_location ?eh_l) - ) - :tasks ( - (empty_hopper_primitive ?eh_p - package ?eh_hv - hopper_vehicle ?eh_l - location) - ) - ) - ) - - (:task empty_tank - :parameters (?et_tv - object ?et_li - object ?et_lo - object) - (:method method1 - :precondition (and - (type_member_tanker_vehicle ?et_tv) - (type_member_liquid ?et_li) - (type_member_location ?et_lo) - ) - :tasks ( - (empty_tank_primitive ?et_tv - tanker_vehicle ?et_li - liquid ?et_lo - location) - ) - ) - ) - - (:task fill_hopper - :parameters (?fh_p - object ?fh_hv - object ?fh_l - object) - (:method method1 - :precondition (and - (type_member_package ?fh_p) - (type_member_hopper_vehicle ?fh_hv) - (type_member_location ?fh_l) - ) - :tasks ( - (fill_hopper_primitive ?fh_p - package ?fh_hv - hopper_vehicle ?fh_l - location) - ) - ) - ) - - (:task fill_tank - :parameters (?ft_tv - object ?ft_li - object ?ft_lo - object) - (:method method1 - :precondition (and - (type_member_tanker_vehicle ?ft_tv) - (type_member_liquid ?ft_li) - (type_member_location ?ft_lo) - ) - :tasks ( - (fill_tank_primitive ?ft_tv - tanker_vehicle ?ft_li - liquid ?ft_lo - location) - ) - ) - ) - - (:task fill_trough - :parameters (?ftr_v - object) - (:method method1 - :precondition (and - (type_member_livestock_vehicle ?ftr_v) - ) - :tasks ( - (fill_trough_primitive ?ftr_v - livestock_vehicle) - ) - ) - ) - - (:task go_through_tcenter_cc - :parameters (?gttc_lo - object ?gttc_ld - object ?gttc_co - object ?gttc_cd - object ?gttc_tc - object) - (:method method1 - :precondition (and - (type_member_not_tcenter ?gttc_lo) - (type_member_not_tcenter ?gttc_ld) - (type_member_city ?gttc_co) - (type_member_city ?gttc_cd) - (type_member_tcenter ?gttc_tc) - ) - :tasks ( - (go_through_tcenter_cc_primitive ?gttc_lo - not_tcenter ?gttc_ld - not_tcenter ?gttc_co - city ?gttc_cd - city ?gttc_tc - tcenter) - ) - ) - ) - - (:task go_through_two_tcenters - :parameters (?gtttc_to - object ?gtttc_td - object) - (:method method1 - :precondition (and - (type_member_tcenter ?gtttc_to) - (type_member_tcenter ?gtttc_td) - ) - :tasks ( - (go_through_two_tcenters_primitive ?gtttc_to - tcenter ?gtttc_td - tcenter) - ) - ) - ) - - (:task go_through_two_tcenters_cities_otd - :parameters (?gtttccotd_ld - object ?gtttccotd_co - object ?gtttccotd_cd - object ?gtttccotd_to - object ?gtttccotd_t1 - object) - (:method method1 - :precondition (and - (type_member_not_tcenter ?gtttccotd_ld) - (type_member_city ?gtttccotd_co) - (type_member_city ?gtttccotd_cd) - (type_member_tcenter ?gtttccotd_to) - (type_member_tcenter ?gtttccotd_t1) - ) - :tasks ( - (go_through_two_tcenters_cities_otd_primitive ?gtttccotd_ld - not_tcenter ?gtttccotd_co - city ?gtttccotd_cd - city ?gtttccotd_to - tcenter ?gtttccotd_t1 - tcenter) - ) - ) - ) - - (:task go_through_two_tcenters_cities_ott - :parameters (?gtttccott_ld - object ?gtttccott_co - object ?gtttccott_cd - object ?gtttccott_to - object ?gtttccott_td - object) - (:method method1 - :precondition (and - (type_member_city_location ?gtttccott_ld) - (type_member_city ?gtttccott_co) - (type_member_city ?gtttccott_cd) - (type_member_tcenter ?gtttccott_to) - (type_member_tcenter ?gtttccott_td) - ) - :tasks ( - (go_through_two_tcenters_cities_ott_primitive ?gtttccott_ld - city_location ?gtttccott_co - city ?gtttccott_cd - city ?gtttccott_to - tcenter ?gtttccott_td - tcenter) - ) - ) - ) - - (:task go_through_two_tcenters_cities_ottd - :parameters (?gtttcc_lo - object ?gtttcc_ld - object ?gtttcc_co - object ?gtttcc_cd - object ?gtttcc_t1 - object ?gtttcc_t2 - object) - (:method method1 - :precondition (and - (type_member_not_tcenter ?gtttcc_lo) - (type_member_not_tcenter ?gtttcc_ld) - (type_member_city ?gtttcc_co) - (type_member_city ?gtttcc_cd) - (type_member_tcenter ?gtttcc_t1) - (type_member_tcenter ?gtttcc_t2) - ) - :tasks ( - (go_through_two_tcenters_cities_ottd_primitive ?gtttcc_lo - not_tcenter ?gtttcc_ld - not_tcenter ?gtttcc_co - city ?gtttcc_cd - city ?gtttcc_t1 - tcenter ?gtttcc_t2 - tcenter) - ) - ) - ) - - (:task go_through_two_tcenters_tt - :parameters (?gtttctt_to - object ?gtttctt_td - object ?gtttctt_co - object ?gtttctt_cd - object) - (:method method1 - :precondition (and - (type_member_tcenter ?gtttctt_to) - (type_member_tcenter ?gtttctt_td) - (type_member_city ?gtttctt_co) - (type_member_city ?gtttctt_cd) - ) - :tasks ( - (go_through_two_tcenters_tt_primitive ?gtttctt_to - tcenter ?gtttctt_td - tcenter ?gtttctt_co - city ?gtttctt_cd - city) - ) - ) - ) - - (:task go_through_two_tcenters_via_hub_hazardous - :parameters (?gtttcvhh_to - object ?gtttcvhh_td - object ?gtttcvhh_h - object ?gtttcvhh_co - object ?gtttcvhh_ch - object ?gtttcvhh_cd - object ?gtttcvhh_ro - object ?gtttcvhh_rd - object) - (:method method1 - :precondition (and - (type_member_tcenter ?gtttcvhh_to) - (type_member_tcenter ?gtttcvhh_td) - (type_member_hub ?gtttcvhh_h) - (type_member_city ?gtttcvhh_co) - (type_member_city ?gtttcvhh_ch) - (type_member_city ?gtttcvhh_cd) - (type_member_region ?gtttcvhh_ro) - (type_member_region ?gtttcvhh_rd) - ) - :tasks ( - (go_through_two_tcenters_via_hub_hazardous_primitive ?gtttcvhh_to - tcenter ?gtttcvhh_td - tcenter ?gtttcvhh_h - hub ?gtttcvhh_co - city ?gtttcvhh_ch - city ?gtttcvhh_cd - city ?gtttcvhh_ro - region ?gtttcvhh_rd - region) - ) - ) - ) - - (:task go_through_two_tcenters_via_hub_not_hazardous - :parameters (?gtttcvhnh_to - object ?gtttcvhnh_td - object ?gtttcvhnh_co - object ?gtttcvhnh_cd - object ?gtttcvhnh_ro - object ?gtttcvhnh_rd - object ?gtttcvhnh_h - object) - (:method method1 - :precondition (and - (type_member_tcenter ?gtttcvhnh_to) - (type_member_tcenter ?gtttcvhnh_td) - (type_member_city ?gtttcvhnh_co) - (type_member_city ?gtttcvhnh_cd) - (type_member_region ?gtttcvhnh_ro) - (type_member_region ?gtttcvhnh_rd) - (type_member_hub ?gtttcvhnh_h) - ) - :tasks ( - (go_through_two_tcenters_via_hub_not_hazardous_primitive ?gtttcvhnh_to - tcenter ?gtttcvhnh_td - tcenter ?gtttcvhnh_co - city ?gtttcvhnh_cd - city ?gtttcvhnh_ro - region ?gtttcvhnh_rd - region ?gtttcvhnh_h - hub) - ) - ) - ) - - (:task load_cars - :parameters (?lc_c - object ?lc_v - object ?lc_l - object) - (:method method1 - :precondition (and - (type_member_cars ?lc_c) - (type_member_auto_vehicle ?lc_v) - (type_member_location ?lc_l) - ) - :tasks ( - (load_cars_primitive ?lc_c - cars ?lc_v - auto_vehicle ?lc_l - location) - ) - ) - ) - - (:task load_livestock - :parameters (?ll_p - object ?ll_v - object ?ll_l - object) - (:method method1 - :precondition (and - (type_member_livestock_package ?ll_p) - (type_member_livestock_vehicle ?ll_v) - (type_member_location ?ll_l) - ) - :tasks ( - (load_livestock_primitive ?ll_p - livestock_package ?ll_v - livestock_vehicle ?ll_l - location) - ) - ) - ) - - (:task load_package - :parameters (?lp_p - object ?lp_v - object ?lp_l - object) - (:method method1 - :precondition (and - (type_member_package ?lp_p) - (type_member_vehicle ?lp_v) - (type_member_location ?lp_l) - ) - :tasks ( - (load_package_primitive ?lp_p - package ?lp_v - vehicle ?lp_l - location) - ) - ) - ) - - (:task lower_ramp - :parameters (?lr_v - object) - (:method method1 - :precondition (and - (type_member_vehicle ?lr_v) - ) - :tasks ( - (lower_ramp_primitive ?lr_v - vehicle) - ) - ) - ) - - (:task move_vehicle_no_traincar - :parameters (?hmnt_v - object ?hmnt_o - object ?hmnt_r - object ?hmnt_d - object) - (:method method1 - :precondition (and - (type_member_vehicle ?hmnt_v) - (type_member_location ?hmnt_o) - (type_member_route ?hmnt_r) - (type_member_location ?hmnt_d) - ) - :tasks ( - (move_vehicle_no_traincar_primitive ?hmnt_v - vehicle ?hmnt_o - location ?hmnt_r - route ?hmnt_d - location) - ) - ) - ) - - (:task obtain_permit - :parameters (?op_h - object) - (:method method1 - :precondition (and - (type_member_hazardous ?op_h) - ) - :tasks ( - (obtain_permit_primitive ?op_h - hazardous) - ) - ) - ) - - (:task open_door - :parameters (?od_rv - object) - (:method method1 - :precondition (and - (type_member_regular_vehicle ?od_rv) - ) - :tasks ( - (open_door_primitive ?od_rv - regular_vehicle) - ) - ) - ) - - (:task open_valve - :parameters (?ov_tv - object) - (:method method1 - :precondition (and - (type_member_tanker_vehicle ?ov_tv) - ) - :tasks ( - (open_valve_primitive ?ov_tv - tanker_vehicle) - ) - ) - ) - - (:task pick_up_package_ground - :parameters (?pupg_p - object ?pupg_c - object ?pupg_l - object) - (:method method1 - :precondition (and - (type_member_package ?pupg_p) - (type_member_crane ?pupg_c) - (type_member_location ?pupg_l) - ) - :tasks ( - (pick_up_package_ground_primitive ?pupg_p - package ?pupg_c - crane ?pupg_l - location) - ) - ) - ) - - (:task pick_up_package_vehicle - :parameters (?pupv_p - object ?pupv_c - object ?pupv_fv - object ?pupv_l - object) - (:method method1 - :precondition (and - (type_member_package ?pupv_p) - (type_member_crane ?pupv_c) - (type_member_flatbed_vehicle ?pupv_fv) - (type_member_location ?pupv_l) - ) - :tasks ( - (pick_up_package_vehicle_primitive ?pupv_p - package ?pupv_c - crane ?pupv_fv - flatbed_vehicle ?pupv_l - location) - ) - ) - ) - - (:task post_guard_inside - :parameters (?pci_a - object) - (:method method1 - :precondition (and - (type_member_armored ?pci_a) - ) - :tasks ( - (post_guard_inside_primitive ?pci_a - armored) - ) - ) - ) - - (:task post_guard_outside - :parameters (?pco_a - object) - (:method method1 - :precondition (and - (type_member_armored ?pco_a) - ) - :tasks ( - (post_guard_outside_primitive ?pco_a - armored) - ) - ) - ) - - (:task put_down_package_ground - :parameters (?pdpg_p - object ?pdpg_c - object ?pdpg_l - object) - (:method method1 - :precondition (and - (type_member_package ?pdpg_p) - (type_member_crane ?pdpg_c) - (type_member_location ?pdpg_l) - ) - :tasks ( - (put_down_package_ground_primitive ?pdpg_p - package ?pdpg_c - crane ?pdpg_l - location) - ) - ) - ) - - (:task put_down_package_vehicle - :parameters (?pdpv_p - object ?pdpv_c - object ?pdpv_fv - object ?pdpv_l - object) - (:method method1 - :precondition (and - (type_member_package ?pdpv_p) - (type_member_crane ?pdpv_c) - (type_member_flatbed_vehicle ?pdpv_fv) - (type_member_location ?pdpv_l) - ) - :tasks ( - (put_down_package_vehicle_primitive ?pdpv_p - package ?pdpv_c - crane ?pdpv_fv - flatbed_vehicle ?pdpv_l - location) - ) - ) - ) - - (:task raise_ramp - :parameters (?rr_v - object) - (:method method1 - :precondition (and - (type_member_vehicle ?rr_v) - ) - :tasks ( - (raise_ramp_primitive ?rr_v - vehicle) - ) - ) - ) - - (:task remove_guard - :parameters (?mc_a - object) - (:method method1 - :precondition (and - (type_member_armored ?mc_a) - ) - :tasks ( - (remove_guard_primitive ?mc_a - armored) - ) - ) - ) - - (:task remove_warning_signs - :parameters (?mws_v - object) - (:method method1 - :precondition (and - (type_member_vehicle ?mws_v) - ) - :tasks ( - (remove_warning_signs_primitive ?mws_v - vehicle) - ) - ) - ) - - (:task unload_cars - :parameters (?uc_c - object ?uc_v - object ?uc_l - object) - (:method method1 - :precondition (and - (type_member_cars ?uc_c) - (type_member_auto_vehicle ?uc_v) - (type_member_location ?uc_l) - ) - :tasks ( - (unload_cars_primitive ?uc_c - cars ?uc_v - auto_vehicle ?uc_l - location) - ) - ) - ) - - (:task unload_livestock - :parameters (?ull_p - object ?ull_v - object ?ull_l - object) - (:method method1 - :precondition (and - (type_member_livestock_package ?ull_p) - (type_member_livestock_vehicle ?ull_v) - (type_member_location ?ull_l) - ) - :tasks ( - (unload_livestock_primitive ?ull_p - livestock_package ?ull_v - livestock_vehicle ?ull_l - location) - ) - ) - ) - - (:task unload_package - :parameters (?up_p - object ?up_v - object ?up_l - object) - (:method method1 - :precondition (and - (type_member_package ?up_p) - (type_member_vehicle ?up_v) - (type_member_location ?up_l) - ) - :tasks ( - (unload_package_primitive ?up_p - package ?up_v - vehicle ?up_l - location) - ) - ) - ) - - (:task goal_action - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (goal_action_primitive) - ) - ) - ) - -; ************************************************************ -; ************************************************************ - (:task carry - :parameters (?c_p - package ?c_lo - location ?c_ld - location) - (:method method7 - :precondition (and - (type_member_package ?c_p - package) - (type_member_location ?c_lo - location) - (type_member_location ?c_ld - location) - (not (= ?c_lo ?c_ld)) - ) - :tasks ( - (carry_direct ?c_p ?c_lo ?c_ld) - ) - ) - (:method method8 - :precondition (and - (type_member_package ?c_p - package) - (type_member_tcenter ?c_lo - location) - (type_member_city ?helper_carry_tt_instance_2_argument_2 - city) - (type_member_tcenter ?c_ld - location) - (type_member_city ?helper_carry_tt_instance_2_argument_4 - city) - (not (type_member_hub ?c_lo)) - (not (type_member_hub ?c_ld)) - (not (= ?c_lo ?c_ld)) - (type_member_tcenter ?c_lo) - (type_member_tcenter ?c_ld) - ) - :tasks ( - (helper_carry_tt ?c_p ?c_lo ?helper_carry_tt_instance_2_argument_2 ?c_ld ?helper_carry_tt_instance_2_argument_4) - ) - ) - (:method method10 - :precondition (and - (type_member_package ?c_p - package) - (type_member_city_location ?c_lo - location) - (type_member_city ?helper_carry_ott_instance_2_argument_2 - city) - (type_member_tcenter ?helper_carry_ott_instance_2_argument_3 - tcenter) - (type_member_tcenter ?c_ld - location) - (type_member_city ?helper_carry_ott_instance_2_argument_5 - city) - (not (type_member_tcenter ?c_lo)) - (not (= ?helper_carry_ott_instance_2_argument_2 ?helper_carry_ott_instance_2_argument_5)) - (not (= ?c_lo ?c_ld)) - (type_member_city_location ?c_lo) - (type_member_tcenter ?c_ld) - ) - :tasks ( - (helper_carry_ott ?c_p ?c_lo ?helper_carry_ott_instance_2_argument_2 ?helper_carry_ott_instance_2_argument_3 ?c_ld ?helper_carry_ott_instance_2_argument_5) - ) - ) - (:method method12 - :precondition (and - (type_member_package ?c_p - package) - (type_member_tcenter ?c_lo - location) - (type_member_city ?helper_carry_otd_instance_2_argument_2 - city) - (type_member_tcenter ?helper_carry_otd_instance_2_argument_3 - tcenter) - (type_member_not_tcenter ?c_ld - location) - (type_member_city ?helper_carry_otd_instance_2_argument_5 - city) - (not (= ?c_lo ?c_ld)) - (not (= ?c_lo ?helper_carry_otd_instance_2_argument_3)) - (not (= ?c_ld ?helper_carry_otd_instance_2_argument_3)) - (type_member_tcenter ?c_lo) - (type_member_not_tcenter ?c_ld) - ) - :tasks ( - (helper_carry_otd ?c_p ?c_lo ?helper_carry_otd_instance_2_argument_2 ?helper_carry_otd_instance_2_argument_3 ?c_ld ?helper_carry_otd_instance_2_argument_5) - ) - ) - (:method method14 - :precondition (and - (type_member_package ?c_p - package) - (type_member_not_tcenter ?c_lo - location) - (type_member_city ?helper_carry_ottd_instance_2_argument_2 - city) - (type_member_tcenter ?helper_carry_ottd_instance_2_argument_3 - tcenter) - (type_member_tcenter ?helper_carry_ottd_instance_2_argument_4 - tcenter) - (type_member_not_tcenter ?c_ld - location) - (type_member_city ?helper_carry_ottd_instance_2_argument_6 - city) - (not (= ?c_lo ?c_ld)) - (not (= ?c_lo ?helper_carry_ottd_instance_2_argument_3)) - (not (= ?c_ld ?helper_carry_ottd_instance_2_argument_3)) - (not (= ?c_lo ?helper_carry_ottd_instance_2_argument_4)) - (not (= ?c_ld ?helper_carry_ottd_instance_2_argument_4)) - (type_member_not_tcenter ?c_lo) - (type_member_not_tcenter ?c_ld) - ) - :tasks ( - (helper_carry_ottd ?c_p ?c_lo ?helper_carry_ottd_instance_2_argument_2 ?helper_carry_ottd_instance_2_argument_3 ?helper_carry_ottd_instance_2_argument_4 ?c_ld ?helper_carry_ottd_instance_2_argument_6) - ) - ) - (:method method16 - :precondition (and - (type_member_package ?c_p - package) - (type_member_not_tcenter ?c_lo - location) - (type_member_city ?helper_carry_cc_instance_2_argument_2 - city) - (type_member_tcenter ?helper_carry_cc_instance_2_argument_3 - tcenter) - (type_member_not_tcenter ?c_ld - location) - (type_member_city ?helper_carry_cc_instance_2_argument_5 - city) - (not (= ?c_lo ?c_ld)) - (type_member_not_tcenter ?c_lo) - (type_member_not_tcenter ?c_ld) - ) - :tasks ( - (helper_carry_cc ?c_p ?c_lo ?helper_carry_cc_instance_2_argument_2 ?helper_carry_cc_instance_2_argument_3 ?c_ld ?helper_carry_cc_instance_2_argument_5) - ) - ) - ) - - (:task carry_between_tcenters - :parameters (?cbt_p - package ?cbt_tco - tcenter ?cbt_tcd - tcenter) - (:method method18 - :precondition (and - (type_member_package ?cbt_p - package) - (type_member_tcenter ?cbt_tco - tcenter) - (type_member_tcenter ?cbt_tcd - tcenter) - (not (= ?cbt_tco ?cbt_tcd)) - ) - :tasks ( - (carry_direct ?cbt_p ?cbt_tco ?cbt_tcd) - (go_through_two_tcenters ?cbt_tco ?cbt_tcd) - ) - ) - (:method method19 - :precondition (and - (type_member_package ?cbt_p - package) - (type_member_tcenter ?cbt_tco - tcenter) - (type_member_tcenter ?cbt_tcd - tcenter) - (not (type_member_hub ?cbt_tco)) - (not (type_member_hub ?cbt_tcd)) - (not (= ?cbt_tco ?cbt_tcd)) - ) - :tasks ( - (carry_via_hub ?cbt_p ?cbt_tco ?cbt_tcd) - ) - ) - ) - - (:task carry_direct - :parameters (?cd_p - package ?cd_lo - location ?cd_ld - location) - (:method method24 - :precondition (and - (type_member_vehicle ?helper_carry_direct_instance_2_argument_0 - vehicle) - (type_member_package ?cd_p - package) - (type_member_location ?cd_lo - location) - (type_member_location ?cd_ld - location) - (not (= ?cd_lo ?cd_ld)) - ) - :tasks ( - (helper_carry_direct ?helper_carry_direct_instance_2_argument_0 ?cd_p ?cd_lo ?cd_ld) - ) - ) - ) - - (:task carry_via_hub - :parameters (?tch_p - package ?tch_tco - tcenter ?tch_tcd - tcenter) - (:method method20 - :precondition (and - (type_member_package ?tch_p - package) - (type_member_tcenter ?tch_tco - tcenter) - (type_member_city ?helper_carry_via_hub_not_hazardous_instance_2_argument_2 - city) - (type_member_region ?helper_carry_via_hub_not_hazardous_instance_2_argument_3 - region) - (type_member_hub ?helper_carry_via_hub_not_hazardous_instance_2_argument_4 - hub) - (type_member_tcenter ?tch_tcd - tcenter) - (type_member_city ?helper_carry_via_hub_not_hazardous_instance_2_argument_6 - city) - (type_member_region ?helper_carry_via_hub_not_hazardous_instance_2_argument_7 - region) - (not (type_member_hazardous ?tch_p)) - (not (= ?tch_tco ?tch_tcd)) - (not (= ?tch_tco ?helper_carry_via_hub_not_hazardous_instance_2_argument_4)) - (not (= ?tch_tcd ?helper_carry_via_hub_not_hazardous_instance_2_argument_4)) - ) - :tasks ( - (helper_carry_via_hub_not_hazardous ?tch_p ?tch_tco ?helper_carry_via_hub_not_hazardous_instance_2_argument_2 ?helper_carry_via_hub_not_hazardous_instance_2_argument_3 ?helper_carry_via_hub_not_hazardous_instance_2_argument_4 ?tch_tcd ?helper_carry_via_hub_not_hazardous_instance_2_argument_6 ?helper_carry_via_hub_not_hazardous_instance_2_argument_7) - ) - ) - (:method method22 - :precondition (and - (type_member_package ?tch_p - package) - (type_member_tcenter ?tch_tco - tcenter) - (type_member_city ?helper_carry_via_hub_hazardous_instance_2_argument_2 - city) - (type_member_region ?helper_carry_via_hub_hazardous_instance_2_argument_3 - region) - (type_member_hub ?helper_carry_via_hub_hazardous_instance_2_argument_4 - hub) - (type_member_city ?helper_carry_via_hub_hazardous_instance_2_argument_5 - city) - (type_member_tcenter ?tch_tcd - tcenter) - (type_member_city ?helper_carry_via_hub_hazardous_instance_2_argument_7 - city) - (type_member_region ?helper_carry_via_hub_hazardous_instance_2_argument_8 - region) - (type_member_hazardous ?tch_p) - (not (= ?tch_tco ?tch_tcd)) - (not (= ?tch_tco ?helper_carry_via_hub_hazardous_instance_2_argument_4)) - (not (= ?tch_tcd ?helper_carry_via_hub_hazardous_instance_2_argument_4)) - ) - :tasks ( - (helper_carry_via_hub_hazardous ?tch_p ?tch_tco ?helper_carry_via_hub_hazardous_instance_2_argument_2 ?helper_carry_via_hub_hazardous_instance_2_argument_3 ?helper_carry_via_hub_hazardous_instance_2_argument_4 ?helper_carry_via_hub_hazardous_instance_2_argument_5 ?tch_tcd ?helper_carry_via_hub_hazardous_instance_2_argument_7 ?helper_carry_via_hub_hazardous_instance_2_argument_8) - ) - ) - ) - - (:task deliver - :parameters (?d_p - package) - (:method method4 - :precondition (and - (type_member_package ?d_p - package) - (not (type_member_hazardous ?d_p)) - (not (type_member_valuable ?d_p)) - ) - :tasks ( - (deliver_p ?d_p) - ) - ) - (:method method5 - :precondition (and - (type_member_valuable ?d_p - package) - (type_member_valuable ?d_p) - ) - :tasks ( - (deliver_v ?d_p) - ) - ) - (:method method6 - :precondition (and - (type_member_hazardous ?d_p - package) - (type_member_hazardous ?d_p) - ) - :tasks ( - (deliver_h ?d_p) - ) - ) - ) - - (:task helper_carry_cc - :parameters (?hccc_p - package ?hccc_o - not_tcenter ?hccc_co - city ?hccc_t - tcenter ?hccc_d - not_tcenter ?hccc_cd - city) - (:method method17 - :precondition (and - (type_member_package ?hccc_p - package) - (type_member_not_tcenter ?hccc_o - not_tcenter) - (type_member_not_tcenter ?hccc_d - not_tcenter) - (type_member_city ?hccc_co - city) - (type_member_city ?hccc_cd - city) - (type_member_tcenter ?hccc_t - tcenter) - (not (= ?hccc_o ?hccc_d)) - (not (= ?hccc_co ?hccc_cd)) - ) - :tasks ( - (carry_direct ?hccc_p ?hccc_o ?hccc_t) - (go_through_tcenter_cc ?hccc_o ?hccc_d ?hccc_co ?hccc_cd ?hccc_t) - (carry_direct ?hccc_p ?hccc_t ?hccc_d) - ) - ) - ) - - (:task helper_carry_direct - :parameters (?hcd_v - vehicle ?hcd_p - package ?hcd_o - location ?hcd_d - location) - (:method method25 - :precondition (and - (type_member_location ?move_instance_2_argument_1 - location) - (type_member_location ?hcd_o - location) - (type_member_vehicle ?hcd_v - vehicle) - (type_member_location ?hcd_d - location) - (type_member_package ?hcd_p - package) - (not (= ?move_instance_2_argument_1 ?hcd_o)) - (not (= ?hcd_o ?hcd_d)) - ) - :tasks ( - (move ?hcd_v ?move_instance_2_argument_1 ?hcd_o) - (load_top ?hcd_p ?hcd_v ?hcd_o) - (move ?hcd_v ?hcd_o ?hcd_d) - (unload_top ?hcd_p ?hcd_v ?hcd_d) - ) - ) - (:method method26 - :precondition (and - (type_member_location ?hcd_o - location) - (type_member_package ?hcd_p - package) - (type_member_vehicle ?hcd_v - vehicle) - (type_member_location ?hcd_d - location) - (not (= ?hcd_o ?hcd_d)) - ) - :tasks ( - (load_top ?hcd_p ?hcd_v ?hcd_o) - (move ?hcd_v ?hcd_o ?hcd_d) - (unload_top ?hcd_p ?hcd_v ?hcd_d) - ) - ) - ) - - (:task helper_carry_otd - :parameters (?hcotd_p - package ?hcotd_o - tcenter ?hcotd_co - city ?hcotd_t1 - tcenter ?hcotd_d - not_tcenter ?hcotd_cd - city) - (:method method13 - :precondition (and - (type_member_package ?hcotd_p - package) - (type_member_not_tcenter ?hcotd_d - not_tcenter) - (type_member_city ?hcotd_co - city) - (type_member_city ?hcotd_cd - city) - (type_member_tcenter ?hcotd_o - tcenter) - (type_member_tcenter ?hcotd_t1 - tcenter) - (not (= ?hcotd_co ?hcotd_cd)) - (not (= ?hcotd_o ?hcotd_t1)) - ) - :tasks ( - (carry_between_tcenters ?hcotd_p ?hcotd_o ?hcotd_t1) - (go_through_two_tcenters_cities_otd ?hcotd_d ?hcotd_co ?hcotd_cd ?hcotd_o ?hcotd_t1) - (carry_direct ?hcotd_p ?hcotd_t1 ?hcotd_d) - ) - ) - ) - - (:task helper_carry_ott - :parameters (?hcott_p - package ?hcott_o - city_location ?hcott_co - city ?hcott_t1 - tcenter ?hcott_d - tcenter ?hcott_cd - city) - (:method method11 - :precondition (and - (type_member_package ?hcott_p - package) - (type_member_city_location ?hcott_o - city_location) - (type_member_city ?hcott_co - city) - (type_member_city ?hcott_cd - city) - (type_member_tcenter ?hcott_t1 - tcenter) - (type_member_tcenter ?hcott_d - tcenter) - (not (= ?hcott_co ?hcott_cd)) - ) - :tasks ( - (carry_direct ?hcott_p ?hcott_o ?hcott_t1) - (go_through_two_tcenters_cities_ott ?hcott_o ?hcott_co ?hcott_cd ?hcott_t1 ?hcott_d) - (carry_between_tcenters ?hcott_p ?hcott_t1 ?hcott_d) - ) - ) - ) - - (:task helper_carry_ottd - :parameters (?hcottd_p - package ?hcottd_o - not_tcenter ?hcottd_co - city ?hcottd_t1 - tcenter ?hcottd_t2 - tcenter ?hcottd_d - not_tcenter ?hcottd_cd - city) - (:method method15 - :precondition (and - (type_member_package ?hcottd_p - package) - (type_member_not_tcenter ?hcottd_o - not_tcenter) - (type_member_not_tcenter ?hcottd_d - not_tcenter) - (type_member_city ?hcottd_co - city) - (type_member_city ?hcottd_cd - city) - (type_member_tcenter ?hcottd_t1 - tcenter) - (type_member_tcenter ?hcottd_t2 - tcenter) - (not (= ?hcottd_o ?hcottd_d)) - (not (= ?hcottd_t1 ?hcottd_t2)) - (not (= ?hcottd_co ?hcottd_cd)) - ) - :tasks ( - (carry_direct ?hcottd_p ?hcottd_o ?hcottd_t1) - (go_through_two_tcenters_cities_ottd ?hcottd_o ?hcottd_d ?hcottd_co ?hcottd_cd ?hcottd_t1 ?hcottd_t2) - (carry_between_tcenters ?hcottd_p ?hcottd_t1 ?hcottd_t2) - (carry_direct ?hcottd_p ?hcottd_t2 ?hcottd_d) - ) - ) - ) - - (:task helper_carry_tt - :parameters (?hctt_p - package ?hctt_o - tcenter ?hctt_co - city ?hctt_d - tcenter ?hctt_cd - city) - (:method method9 - :precondition (and - (type_member_package ?hctt_p - package) - (type_member_tcenter ?hctt_o - tcenter) - (type_member_tcenter ?hctt_d - tcenter) - (type_member_city ?hctt_co - city) - (type_member_city ?hctt_cd - city) - (not (= ?hctt_o ?hctt_d)) - (not (= ?hctt_co ?hctt_cd)) - ) - :tasks ( - (carry_via_hub ?hctt_p ?hctt_o ?hctt_d) - (go_through_two_tcenters_tt ?hctt_o ?hctt_d ?hctt_co ?hctt_cd) - ) - ) - ) - - (:task helper_carry_via_hub_hazardous - :parameters (?hcvhh_p - package ?hcvhh_tco - tcenter ?hcvhh_ctco - city ?hcvhh_rctco - region ?hcvhh_h - hub ?hcvhh_ch - city ?hcvhh_tcd - tcenter ?hcvhh_ctcd - city ?hcvhh_rctcd - region) - (:method method23 - :precondition (and - (type_member_package ?hcvhh_p - package) - (type_member_region ?hcvhh_rctcd - region) - (type_member_tcenter ?hcvhh_tco - tcenter) - (type_member_tcenter ?hcvhh_tcd - tcenter) - (type_member_hub ?hcvhh_h - hub) - (type_member_city ?hcvhh_ctco - city) - (type_member_city ?hcvhh_ch - city) - (type_member_city ?hcvhh_ctcd - city) - (type_member_region ?hcvhh_rctco - region) - (not (= ?hcvhh_tco ?hcvhh_tcd)) - (not (= ?hcvhh_tco ?hcvhh_h)) - (not (= ?hcvhh_h ?hcvhh_tcd)) - (not (= ?hcvhh_ctco ?hcvhh_ch)) - (not (= ?hcvhh_ctco ?hcvhh_ctcd)) - (not (= ?hcvhh_ch ?hcvhh_ctcd)) - (not (= ?hcvhh_rctco ?hcvhh_rctcd)) - ) - :tasks ( - (carry_direct ?hcvhh_p ?hcvhh_tco ?hcvhh_h) - (go_through_two_tcenters_via_hub_hazardous ?hcvhh_tco ?hcvhh_tcd ?hcvhh_h ?hcvhh_ctco ?hcvhh_ch ?hcvhh_ctcd ?hcvhh_rctco ?hcvhh_rctcd) - (carry_direct ?hcvhh_p ?hcvhh_h ?hcvhh_tcd) - ) - ) - ) - - (:task helper_carry_via_hub_not_hazardous - :parameters (?hcvhn_p - package ?hcvhn_tco - tcenter ?hcvhn_ctco - city ?hcvhn_rctco - region ?hcvhn_h - hub ?hcvhn_tcd - tcenter ?hcvhn_ctcd - city ?hcvhn_rctcd - region) - (:method method21 - :precondition (and - (type_member_package ?hcvhn_p - package) - (type_member_tcenter ?hcvhn_tco - tcenter) - (type_member_tcenter ?hcvhn_tcd - tcenter) - (type_member_city ?hcvhn_ctco - city) - (type_member_city ?hcvhn_ctcd - city) - (type_member_region ?hcvhn_rctco - region) - (type_member_region ?hcvhn_rctcd - region) - (type_member_hub ?hcvhn_h - hub) - (not (= ?hcvhn_tco ?hcvhn_tcd)) - (not (= ?hcvhn_tco ?hcvhn_h)) - (not (= ?hcvhn_h ?hcvhn_tcd)) - (not (= ?hcvhn_ctco ?hcvhn_ctcd)) - (not (= ?hcvhn_rctco ?hcvhn_rctcd)) - ) - :tasks ( - (carry_direct ?hcvhn_p ?hcvhn_tco ?hcvhn_h) - (go_through_two_tcenters_via_hub_not_hazardous ?hcvhn_tco ?hcvhn_tcd ?hcvhn_ctco ?hcvhn_ctcd ?hcvhn_rctco ?hcvhn_rctcd ?hcvhn_h) - (carry_direct ?hcvhn_p ?hcvhn_h ?hcvhn_tcd) - ) - ) - ) - - (:task helper_move_traincar - :parameters (?hmt_v - traincar ?hmt_t - train ?hmt_o - location ?hmt_d - location) - (:method method29 - :precondition (and - (type_member_traincar ?hmt_v - traincar) - (type_member_location ?hmt_d - location) - (type_member_train ?hmt_t - train) - (type_member_location ?move_instance_2_argument_1 - location) - (type_member_location ?hmt_o - location) - (not (= ?hmt_o ?hmt_d)) - (not (= ?move_instance_2_argument_1 ?hmt_o)) - ) - :tasks ( - (move ?hmt_t ?move_instance_2_argument_1 ?hmt_o) - (attach_train_car ?hmt_t ?hmt_v ?hmt_o) - (move ?hmt_t ?hmt_o ?hmt_d) - (detach_train_car ?hmt_t ?hmt_v ?hmt_d) - ) - ) - (:method method30 - :precondition (and - (type_member_train ?hmt_t - train) - (type_member_traincar ?hmt_v - traincar) - (type_member_location ?hmt_d - location) - (type_member_location ?hmt_o - location) - (not (= ?hmt_o ?hmt_d)) - ) - :tasks ( - (attach_train_car ?hmt_t ?hmt_v ?hmt_o) - (move ?hmt_t ?hmt_o ?hmt_d) - (detach_train_car ?hmt_t ?hmt_v ?hmt_d) - ) - ) - ) - - (:task load - :parameters (?l_p - package ?l_v - vehicle ?l_l - location) - (:method method44 - :precondition (and - (type_member_regular_vehicle ?l_v - vehicle) - (type_member_package ?l_p - package) - (type_member_location ?l_l - location) - (type_member_regular ?l_p) - (not (type_member_airplane ?l_v)) - (type_member_regular_vehicle ?l_v) - ) - :tasks ( - (open_door ?l_v) - (load_package ?l_p ?l_v ?l_l) - (close_door ?l_v) - ) - ) - (:method method45 - :precondition (and - (type_member_package ?l_p - package) - (type_member_crane ?put_down_package_vehicle_instance_3_argument_4 - crane) - (type_member_flatbed_vehicle ?l_v - vehicle) - (type_member_location ?l_l - location) - (type_member_bulky ?l_p) - (type_member_flatbed_vehicle ?l_v) - ) - :tasks ( - (pick_up_package_ground ?l_p ?put_down_package_vehicle_instance_3_argument_4 ?l_l) - (put_down_package_vehicle ?l_p ?put_down_package_vehicle_instance_3_argument_4 ?l_v ?l_l) - ) - ) - (:method method46 - :precondition (and - (type_member_hopper_vehicle ?l_v - vehicle) - (type_member_package ?l_p - package) - (type_member_location ?l_l - location) - (type_member_hopper_vehicle ?l_v) - ) - :tasks ( - (connect_chute ?l_v) - (fill_hopper ?l_p ?l_v ?l_l) - (disconnect_chute ?l_v) - ) - ) - (:method method47 - :precondition (and - (type_member_tanker_vehicle ?l_v - vehicle) - (type_member_liquid ?l_p - package) - (type_member_location ?l_l - location) - (type_member_liquid ?l_p) - (type_member_tanker_vehicle ?l_v) - ) - :tasks ( - (connect_hose ?l_v ?l_p) - (open_valve ?l_v) - (fill_tank ?l_v ?l_p ?l_l) - (close_valve ?l_v) - (disconnect_hose ?l_v ?l_p) - ) - ) - (:method method48 - :precondition (and - (type_member_livestock_package ?l_p - package) - (type_member_location ?l_l - location) - (type_member_vehicle ?l_v - vehicle) - (type_member_livestock_package ?l_p) - ) - :tasks ( - (lower_ramp ?l_v) - (fill_trough ?l_v) - (load_livestock ?l_p ?l_v ?l_l) - (raise_ramp ?l_v) - ) - ) - (:method method49 - :precondition (and - (type_member_cars ?l_p - package) - (type_member_location ?l_l - location) - (type_member_vehicle ?l_v - vehicle) - (type_member_cars ?l_p) - ) - :tasks ( - (lower_ramp ?l_v) - (load_cars ?l_p ?l_v ?l_l) - (raise_ramp ?l_v) - ) - ) - (:method method50 - :precondition (and - (type_member_location ?l_l - location) - (type_member_airplane ?l_v - vehicle) - (type_member_plane_ramp ?detach_conveyor_ramp_instance_6_argument_9 - plane_ramp) - (type_member_package ?l_p - package) - (type_member_regular ?l_p) - (type_member_airplane ?l_v) - ) - :tasks ( - (attach_conveyor_ramp ?l_v ?detach_conveyor_ramp_instance_6_argument_9 ?l_l) - (open_door ?l_v) - (load_package ?l_p ?l_v ?l_l) - (close_door ?l_v) - (detach_conveyor_ramp ?l_v ?detach_conveyor_ramp_instance_6_argument_9 ?l_l) - ) - ) - ) - - (:task load_top - :parameters (?lt_p - package ?lt_v - vehicle ?lt_l - location) - (:method method38 - :precondition (and - (type_member_package ?lt_p - package) - (type_member_vehicle ?lt_v - vehicle) - (type_member_location ?lt_l - location) - (not (type_member_valuable ?lt_p)) - (not (type_member_hazardous ?lt_p)) - ) - :tasks ( - (load ?lt_p ?lt_v ?lt_l) - ) - ) - (:method method39 - :precondition (and - (type_member_package ?lt_p - package) - (type_member_vehicle ?lt_v - vehicle) - (type_member_location ?lt_l - location) - (type_member_hazardous ?lt_p) - ) - :tasks ( - (affix_warning_signs ?lt_v) - (load ?lt_p ?lt_v ?lt_l) - ) - ) - (:method method40 - :precondition (and - (type_member_package ?lt_p - package) - (type_member_location ?lt_l - location) - (type_member_armored ?lt_v - vehicle) - (type_member_valuable ?lt_p) - (type_member_armored ?lt_v) - ) - :tasks ( - (post_guard_outside ?lt_v) - (load ?lt_p ?lt_v ?lt_l) - (post_guard_inside ?lt_v) - ) - ) - ) - - (:task move - :parameters (?m_v - vehicle ?m_lo - location ?m_ld - location) - (:method method27 - :precondition (and - (type_member_vehicle ?m_v - vehicle) - (type_member_location ?m_lo - location) - (type_member_route ?move_vehicle_no_traincar_instance_2_argument_2 - route) - (type_member_location ?m_ld - location) - (not (type_member_traincar ?m_v)) - (not (= ?m_lo ?m_ld)) - ) - :tasks ( - (move_vehicle_no_traincar ?m_v ?m_lo ?move_vehicle_no_traincar_instance_2_argument_2 ?m_ld) - ) - ) - (:method method28 - :precondition (and - (type_member_traincar ?m_v - vehicle) - (type_member_train ?helper_move_traincar_instance_2_argument_1 - train) - (type_member_location ?m_lo - location) - (type_member_location ?m_ld - location) - (not (= ?m_lo ?m_ld)) - (type_member_traincar ?m_v) - ) - :tasks ( - (helper_move_traincar ?m_v ?helper_move_traincar_instance_2_argument_1 ?m_lo ?m_ld) - ) - ) - ) - - (:task pickup - :parameters (?p_p - package) - (:method method1 - :precondition (and - (type_member_package ?p_p - package) - (not (type_member_hazardous ?p_p)) - (not (type_member_valuable ?p_p)) - ) - :tasks ( - (collect_fees ?p_p) - ) - ) - (:method method2 - :precondition (and - (type_member_hazardous ?p_p - package) - (type_member_hazardous ?p_p) - ) - :tasks ( - (collect_fees ?p_p) - (obtain_permit ?p_p) - ) - ) - (:method method3 - :precondition (and - (type_member_valuable ?p_p - package) - (type_member_valuable ?p_p) - ) - :tasks ( - (collect_fees ?p_p) - (collect_insurance ?p_p) - ) - ) - ) - - (:task transport - :parameters (?t_p - package ?t_lo - location ?t_ld - location) - (:method method0 - :precondition (and - (type_member_location ?t_lo - location) - (type_member_location ?t_ld - location) - (type_member_package ?t_p - package) - (not (= ?t_lo ?t_ld)) - ) - :tasks ( - (pickup ?t_p) - (carry ?t_p ?t_lo ?t_ld) - (deliver ?t_p) - ) - ) - ) - - (:task unload - :parameters (?ul_p - package ?ul_v - vehicle ?ul_l - location) - (:method method31 - :precondition (and - (type_member_regular_vehicle ?ul_v - vehicle) - (type_member_package ?ul_p - package) - (type_member_location ?ul_l - location) - (type_member_regular ?ul_p) - (not (type_member_airplane ?ul_v)) - (type_member_regular_vehicle ?ul_v) - ) - :tasks ( - (open_door ?ul_v) - (unload_package ?ul_p ?ul_v ?ul_l) - (close_door ?ul_v) - ) - ) - (:method method32 - :precondition (and - (type_member_flatbed_vehicle ?ul_v - vehicle) - (type_member_package ?ul_p - package) - (type_member_crane ?put_down_package_ground_instance_3_argument_5 - crane) - (type_member_location ?ul_l - location) - (type_member_bulky ?ul_p) - (type_member_flatbed_vehicle ?ul_v) - ) - :tasks ( - (pick_up_package_vehicle ?ul_p ?put_down_package_ground_instance_3_argument_5 ?ul_v ?ul_l) - (put_down_package_ground ?ul_p ?put_down_package_ground_instance_3_argument_5 ?ul_l) - ) - ) - (:method method33 - :precondition (and - (type_member_hopper_vehicle ?ul_v - vehicle) - (type_member_package ?ul_p - package) - (type_member_location ?ul_l - location) - (type_member_hopper_vehicle ?ul_v) - ) - :tasks ( - (connect_chute ?ul_v) - (empty_hopper ?ul_p ?ul_v ?ul_l) - (disconnect_chute ?ul_v) - ) - ) - (:method method34 - :precondition (and - (type_member_tanker_vehicle ?ul_v - vehicle) - (type_member_liquid ?ul_p - package) - (type_member_location ?ul_l - location) - (type_member_liquid ?ul_p) - (type_member_tanker_vehicle ?ul_v) - ) - :tasks ( - (connect_hose ?ul_v ?ul_p) - (open_valve ?ul_v) - (empty_tank ?ul_v ?ul_p ?ul_l) - (close_valve ?ul_v) - (disconnect_hose ?ul_v ?ul_p) - ) - ) - (:method method35 - :precondition (and - (type_member_vehicle ?ul_v - vehicle) - (type_member_livestock_package ?ul_p - package) - (type_member_location ?ul_l - location) - (type_member_livestock_package ?ul_p) - ) - :tasks ( - (lower_ramp ?ul_v) - (unload_livestock ?ul_p ?ul_v ?ul_l) - (do_clean_interior ?ul_v) - (raise_ramp ?ul_v) - ) - ) - (:method method36 - :precondition (and - (type_member_vehicle ?ul_v - vehicle) - (type_member_cars ?ul_p - package) - (type_member_location ?ul_l - location) - (type_member_cars ?ul_p) - ) - :tasks ( - (lower_ramp ?ul_v) - (unload_cars ?ul_p ?ul_v ?ul_l) - (raise_ramp ?ul_v) - ) - ) - (:method method37 - :precondition (and - (type_member_location ?ul_l - location) - (type_member_airplane ?ul_v - vehicle) - (type_member_plane_ramp ?detach_conveyor_ramp_instance_6_argument_9 - plane_ramp) - (type_member_package ?ul_p - package) - (type_member_airplane ?ul_v) - ) - :tasks ( - (attach_conveyor_ramp ?ul_v ?detach_conveyor_ramp_instance_6_argument_9 ?ul_l) - (open_door ?ul_v) - (unload_package ?ul_p ?ul_v ?ul_l) - (close_door ?ul_v) - (detach_conveyor_ramp ?ul_v ?detach_conveyor_ramp_instance_6_argument_9 ?ul_l) - ) - ) - ) - - (:task unload_top - :parameters (?ult_p - package ?ult_v - vehicle ?ult_l - location) - (:method method41 - :precondition (and - (type_member_package ?ult_p - package) - (type_member_vehicle ?ult_v - vehicle) - (type_member_location ?ult_l - location) - (not (type_member_valuable ?ult_p)) - (not (type_member_hazardous ?ult_p)) - ) - :tasks ( - (unload ?ult_p ?ult_v ?ult_l) - ) - ) - (:method method42 - :precondition (and - (type_member_package ?ult_p - package) - (type_member_vehicle ?ult_v - vehicle) - (type_member_location ?ult_l - location) - (type_member_hazardous ?ult_p) - ) - :tasks ( - (unload ?ult_p ?ult_v ?ult_l) - (decontaminate_interior ?ult_v) - (remove_warning_signs ?ult_v) - ) - ) - (:method method43 - :precondition (and - (type_member_package ?ult_p - package) - (type_member_vehicle ?ult_v - vehicle) - (type_member_location ?ult_l - location) - (type_member_valuable ?ult_p) - ) - :tasks ( - (post_guard_outside ?ult_v) - (unload ?ult_p ?ult_v ?ult_l) - (remove_guard ?ult_v) - ) - ) - ) - - (:action affix_warning_signs_primitive - :parameters (?fws_v - vehicle) - :precondition (and - (not (Warning_Signs_Affixed ?fws_v)) - ) - :effect (and - (Warning_Signs_Affixed ?fws_v) - ) - ) - - (:action attach_conveyor_ramp_primitive - :parameters (?acr_ap - vehicle ?acr_pr - equipment ?acr_l - location) - :precondition (and - (Available ?acr_pr) - (At_Equipment ?acr_pr ?acr_l) - (At_Vehicle ?acr_ap ?acr_l) - ) - :effect (and - (Ramp_Connected ?acr_pr ?acr_ap) - (not (Available ?acr_pr)) - ) - ) - - (:action attach_train_car_primitive - :parameters (?atc_t - train ?atc_tc - traincar ?atc_l - location) - :precondition (and - (At_Vehicle ?atc_tc ?atc_l) - (At_Vehicle ?atc_t ?atc_l) - (not (Connected_To ?atc_tc ?atc_t)) - ) - :effect (and - (Connected_To ?atc_tc ?atc_t) - (not (At_Vehicle ?atc_tc ?atc_l)) - ) - ) - - (:action close_door_primitive - :parameters (?cd_rv - regular_vehicle) - :precondition (and - (Door_Open ?cd_rv) - ) - :effect (and - (not (Door_Open ?cd_rv)) - ) - ) - - (:action close_valve_primitive - :parameters (?cv_tv - tanker_vehicle) - :precondition (and - (Valve_Open ?cv_tv) - ) - :effect (and - (not (Valve_Open ?cv_tv)) - ) - ) - - (:action collect_fees_primitive - :parameters (?cf_p - package) - :precondition (and - (not (Fees_Collected ?cf_p)) - ) - :effect (and - (Fees_Collected ?cf_p) - ) - ) - - (:action collect_insurance_primitive - :parameters (?ci_v - valuable) - :precondition (and - (not (Insured ?ci_v)) - ) - :effect (and - (Insured ?ci_v) - ) - ) - - (:action connect_chute_primitive - :parameters (?cc_h - hopper_vehicle) - :precondition (and - (not (Chute_Connected ?cc_h)) - ) - :effect (and - (Chute_Connected ?cc_h) - ) - ) - - (:action connect_hose_primitive - :parameters (?ch_tv - tanker_vehicle ?ch_l - liquid) - :precondition (and - (not (Hose_Connected ?ch_tv ?ch_l)) - ) - :effect (and - (Hose_Connected ?ch_tv ?ch_l) - ) - ) - - (:action decontaminate_interior_primitive - :parameters (?di_v - vehicle) - :precondition ( - ) - :effect (and - (Decontaminated_Interior ?di_v) - ) - ) - - (:action deliver_h_primitive - :parameters (?dh_h - hazardous) - :precondition (and - (Fees_Collected ?dh_h) - (Have_Permit ?dh_h) - ) - :effect (and - (not (Have_Permit ?dh_h)) - (not (Fees_Collected ?dh_h)) - (Delivered ?dh_h) - ) - ) - - (:action deliver_p_primitive - :parameters (?dp_p - package) - :precondition (and - (Fees_Collected ?dp_p) - ) - :effect (and - (not (Fees_Collected ?dp_p)) - (Delivered ?dp_p) - ) - ) - - (:action deliver_v_primitive - :parameters (?dv_v - valuable) - :precondition (and - (Fees_Collected ?dv_v) - (Insured ?dv_v) - ) - :effect (and - (not (Fees_Collected ?dv_v)) - (not (Insured ?dv_v)) - (Delivered ?dv_v) - ) - ) - - (:action detach_conveyor_ramp_primitive - :parameters (?dcr_ap - airplane ?dcr_pr - plane_ramp ?dcr_l - location) - :precondition (and - (Ramp_Connected ?dcr_pr ?dcr_ap) - (At_Equipment ?dcr_pr ?dcr_l) - (At_Vehicle ?dcr_ap ?dcr_l) - ) - :effect (and - (Available ?dcr_pr) - (not (Ramp_Connected ?dcr_pr ?dcr_ap)) - ) - ) - - (:action detach_train_car_primitive - :parameters (?dtc_t - train ?dtc_tc - traincar ?dtc_l - location) - :precondition (and - (At_Vehicle ?dtc_t ?dtc_l) - (Connected_To ?dtc_tc ?dtc_t) - ) - :effect (and - (At_Vehicle ?dtc_tc ?dtc_l) - (not (Connected_To ?dtc_tc ?dtc_t)) - ) - ) - - (:action disconnect_chute_primitive - :parameters (?dc_h - hopper_vehicle) - :precondition (and - (Chute_Connected ?dc_h) - ) - :effect (and - (not (Chute_Connected ?dc_h)) - ) - ) - - (:action disconnect_hose_primitive - :parameters (?dch_tv - tanker_vehicle ?dch_l - liquid) - :precondition (and - (Hose_Connected ?dch_tv ?dch_l) - ) - :effect (and - (not (Hose_Connected ?dch_tv ?dch_l)) - ) - ) - - (:action do_clean_interior_primitive - :parameters (?cli_v - vehicle) - :precondition ( - ) - :effect (and - (Clean_Interior ?cli_v) - ) - ) - - (:action empty_hopper_primitive - :parameters (?eh_p - package ?eh_hv - hopper_vehicle ?eh_l - location) - :precondition (and - (Chute_Connected ?eh_hv) - (At_Vehicle ?eh_hv ?eh_l) - (At_Package ?eh_p ?eh_hv) - ) - :effect (and - (At_Package ?eh_p ?eh_l) - (not (At_Package ?eh_p ?eh_hv)) - ) - ) - - (:action empty_tank_primitive - :parameters (?et_tv - tanker_vehicle ?et_li - liquid ?et_lo - location) - :precondition (and - (Hose_Connected ?et_tv ?et_li) - (Valve_Open ?et_tv) - (At_Package ?et_li ?et_tv) - (At_Vehicle ?et_tv ?et_lo) - ) - :effect (and - (At_Package ?et_li ?et_lo) - (not (At_Package ?et_li ?et_tv)) - ) - ) - - (:action fill_hopper_primitive - :parameters (?fh_p - package ?fh_hv - hopper_vehicle ?fh_l - location) - :precondition (and - (Chute_Connected ?fh_hv) - (At_Vehicle ?fh_hv ?fh_l) - (At_Package ?fh_p ?fh_l) - (PV_Compatible ?fh_p ?fh_hv) - ) - :effect (and - (At_Package ?fh_p ?fh_hv) - (not (At_Package ?fh_p ?fh_l)) - ) - ) - - (:action fill_tank_primitive - :parameters (?ft_tv - tanker_vehicle ?ft_li - liquid ?ft_lo - location) - :precondition (and - (Hose_Connected ?ft_tv ?ft_li) - (Valve_Open ?ft_tv) - (At_Package ?ft_li ?ft_lo) - (At_Vehicle ?ft_tv ?ft_lo) - (PV_Compatible ?ft_li ?ft_tv) - ) - :effect (and - (At_Package ?ft_li ?ft_tv) - (not (At_Package ?ft_li ?ft_lo)) - ) - ) - - (:action fill_trough_primitive - :parameters (?ftr_v - livestock_vehicle) - :precondition ( - ) - :effect (and - (Trough_Full ?ftr_v) - ) - ) - - (:action go_through_tcenter_cc_primitive - :parameters (?gttc_lo - not_tcenter ?gttc_ld - not_tcenter ?gttc_co - city ?gttc_cd - city ?gttc_tc - tcenter) - :precondition (and - (In_City ?gttc_lo ?gttc_co) - (In_City ?gttc_ld ?gttc_cd) - (Serves ?gttc_tc ?gttc_co) - (Serves ?gttc_tc ?gttc_cd) - (Available ?gttc_tc) - ) - :effect ( - ) - ) - - (:action go_through_two_tcenters_primitive - :parameters (?gtttc_to - tcenter ?gtttc_td - tcenter) - :precondition (and - (Available ?gtttc_to) - (Available ?gtttc_td) - ) - :effect ( - ) - ) - - (:action go_through_two_tcenters_cities_otd_primitive - :parameters (?gtttccotd_ld - not_tcenter ?gtttccotd_co - city ?gtttccotd_cd - city ?gtttccotd_to - tcenter ?gtttccotd_t1 - tcenter) - :precondition (and - (In_City ?gtttccotd_to ?gtttccotd_co) - (In_City ?gtttccotd_ld ?gtttccotd_cd) - (Serves ?gtttccotd_t1 ?gtttccotd_cd) - ) - :effect ( - ) - ) - - (:action go_through_two_tcenters_cities_ott_primitive - :parameters (?gtttccott_ld - city_location ?gtttccott_co - city ?gtttccott_cd - city ?gtttccott_to - tcenter ?gtttccott_td - tcenter) - :precondition (and - (In_City ?gtttccott_ld ?gtttccott_co) - (In_City ?gtttccott_td ?gtttccott_cd) - (Serves ?gtttccott_to ?gtttccott_co) - ) - :effect ( - ) - ) - - (:action go_through_two_tcenters_cities_ottd_primitive - :parameters (?gtttcc_lo - not_tcenter ?gtttcc_ld - not_tcenter ?gtttcc_co - city ?gtttcc_cd - city ?gtttcc_t1 - tcenter ?gtttcc_t2 - tcenter) - :precondition (and - (In_City ?gtttcc_lo ?gtttcc_co) - (In_City ?gtttcc_ld ?gtttcc_cd) - (Serves ?gtttcc_t1 ?gtttcc_co) - (Serves ?gtttcc_t2 ?gtttcc_cd) - ) - :effect ( - ) - ) - - (:action go_through_two_tcenters_tt_primitive - :parameters (?gtttctt_to - tcenter ?gtttctt_td - tcenter ?gtttctt_co - city ?gtttctt_cd - city) - :precondition (and - (In_City ?gtttctt_to ?gtttctt_co) - (In_City ?gtttctt_td ?gtttctt_cd) - ) - :effect ( - ) - ) - - (:action go_through_two_tcenters_via_hub_hazardous_primitive - :parameters (?gtttcvhh_to - tcenter ?gtttcvhh_td - tcenter ?gtttcvhh_h - hub ?gtttcvhh_co - city ?gtttcvhh_ch - city ?gtttcvhh_cd - city ?gtttcvhh_ro - region ?gtttcvhh_rd - region) - :precondition (and - (Available ?gtttcvhh_to) - (Available ?gtttcvhh_td) - (In_City ?gtttcvhh_h ?gtttcvhh_ch) - (City_Hazardous_Compatible ?gtttcvhh_ch) - (In_City ?gtttcvhh_to ?gtttcvhh_co) - (In_City ?gtttcvhh_td ?gtttcvhh_cd) - (In_Region ?gtttcvhh_co ?gtttcvhh_ro) - (In_Region ?gtttcvhh_cd ?gtttcvhh_rd) - (Serves ?gtttcvhh_h ?gtttcvhh_ro) - (Serves ?gtttcvhh_h ?gtttcvhh_rd) - (Available ?gtttcvhh_h) - ) - :effect ( - ) - ) - - (:action go_through_two_tcenters_via_hub_not_hazardous_primitive - :parameters (?gtttcvhnh_to - tcenter ?gtttcvhnh_td - tcenter ?gtttcvhnh_co - city ?gtttcvhnh_cd - city ?gtttcvhnh_ro - region ?gtttcvhnh_rd - region ?gtttcvhnh_h - hub) - :precondition (and - (Available ?gtttcvhnh_to) - (Available ?gtttcvhnh_td) - (In_City ?gtttcvhnh_to ?gtttcvhnh_co) - (In_City ?gtttcvhnh_td ?gtttcvhnh_cd) - (In_Region ?gtttcvhnh_co ?gtttcvhnh_ro) - (In_Region ?gtttcvhnh_cd ?gtttcvhnh_rd) - (Serves ?gtttcvhnh_h ?gtttcvhnh_ro) - (Serves ?gtttcvhnh_h ?gtttcvhnh_rd) - (Available ?gtttcvhnh_h) - ) - :effect ( - ) - ) - - (:action load_cars_primitive - :parameters (?lc_c - cars ?lc_v - auto_vehicle ?lc_l - location) - :precondition (and - (At_Package ?lc_c ?lc_l) - (At_Vehicle ?lc_v ?lc_l) - (Ramp_Down ?lc_v) - (PV_Compatible ?lc_c ?lc_v) - ) - :effect (and - (At_Package ?lc_c ?lc_v) - (not (At_Package ?lc_c ?lc_l)) - ) - ) - - (:action load_livestock_primitive - :parameters (?ll_p - livestock_package ?ll_v - livestock_vehicle ?ll_l - location) - :precondition (and - (At_Package ?ll_p ?ll_l) - (At_Vehicle ?ll_v ?ll_l) - (Ramp_Down ?ll_v) - (PV_Compatible ?ll_p ?ll_v) - ) - :effect (and - (At_Package ?ll_p ?ll_v) - (not (At_Package ?ll_p ?ll_l)) - (not (Clean_Interior ?ll_v)) - ) - ) - - (:action load_package_primitive - :parameters (?lp_p - package ?lp_v - vehicle ?lp_l - location) - :precondition (and - (At_Package ?lp_p ?lp_l) - (At_Vehicle ?lp_v ?lp_l) - (PV_Compatible ?lp_p ?lp_v) - ) - :effect (and - (At_Package ?lp_p ?lp_v) - (not (At_Package ?lp_p ?lp_l)) - ) - ) - - (:action lower_ramp_primitive - :parameters (?lr_v - vehicle) - :precondition (and - (not (Ramp_Down ?lr_v)) - ) - :effect (and - (Ramp_Down ?lr_v) - ) - ) - - (:action move_vehicle_no_traincar_primitive - :parameters (?hmnt_v - vehicle ?hmnt_o - location ?hmnt_r - route ?hmnt_d - location) - :precondition (and - (Connects ?hmnt_r ?hmnt_o ?hmnt_d) - (Available ?hmnt_v) - (Available ?hmnt_r) - (RV_Compatible ?hmnt_r ?hmnt_v) - (At_Vehicle ?hmnt_v ?hmnt_o) - ) - :effect (and - (At_Vehicle ?hmnt_v ?hmnt_d) - (not (At_Vehicle ?hmnt_v ?hmnt_o)) - ) - ) - - (:action obtain_permit_primitive - :parameters (?op_h - hazardous) - :precondition (and - (not (Have_Permit ?op_h)) - ) - :effect (and - (Have_Permit ?op_h) - ) - ) - - (:action open_door_primitive - :parameters (?od_rv - regular_vehicle) - :precondition (and - (not (Door_Open ?od_rv)) - ) - :effect (and - (Door_Open ?od_rv) - ) - ) - - (:action open_valve_primitive - :parameters (?ov_tv - tanker_vehicle) - :precondition (and - (not (Valve_Open ?ov_tv)) - ) - :effect (and - (Valve_Open ?ov_tv) - ) - ) - - (:action pick_up_package_ground_primitive - :parameters (?pupg_p - package ?pupg_c - crane ?pupg_l - location) - :precondition (and - (Empty ?pupg_c) - (Available ?pupg_c) - (At_Equipment ?pupg_c ?pupg_l) - (At_Package ?pupg_p ?pupg_l) - ) - :effect (and - (At_Package ?pupg_p ?pupg_c) - (not (Empty ?pupg_c)) - (not (At_Package ?pupg_p ?pupg_l)) - ) - ) - - (:action pick_up_package_vehicle_primitive - :parameters (?pupv_p - package ?pupv_c - crane ?pupv_fv - flatbed_vehicle ?pupv_l - location) - :precondition (and - (Empty ?pupv_c) - (Available ?pupv_c) - (At_Equipment ?pupv_c ?pupv_l) - (At_Package ?pupv_p ?pupv_fv) - (At_Vehicle ?pupv_fv ?pupv_l) - ) - :effect (and - (At_Package ?pupv_p ?pupv_c) - (not (Empty ?pupv_c)) - (not (At_Package ?pupv_p ?pupv_fv)) - ) - ) - - (:action post_guard_inside_primitive - :parameters (?pci_a - armored) - :precondition ( - ) - :effect (and - (Guard_Inside ?pci_a) - (not (Guard_Outside ?pci_a)) - ) - ) - - (:action post_guard_outside_primitive - :parameters (?pco_a - armored) - :precondition ( - ) - :effect (and - (Guard_Outside ?pco_a) - (not (Guard_Inside ?pco_a)) - ) - ) - - (:action put_down_package_ground_primitive - :parameters (?pdpg_p - package ?pdpg_c - crane ?pdpg_l - location) - :precondition (and - (Available ?pdpg_c) - (At_Equipment ?pdpg_c ?pdpg_l) - (At_Package ?pdpg_p ?pdpg_c) - ) - :effect (and - (At_Package ?pdpg_p ?pdpg_l) - (Empty ?pdpg_c) - (not (At_Package ?pdpg_p ?pdpg_c)) - ) - ) - - (:action put_down_package_vehicle_primitive - :parameters (?pdpv_p - package ?pdpv_c - crane ?pdpv_fv - flatbed_vehicle ?pdpv_l - location) - :precondition (and - (Available ?pdpv_c) - (At_Package ?pdpv_p ?pdpv_c) - (At_Equipment ?pdpv_c ?pdpv_l) - (At_Vehicle ?pdpv_fv ?pdpv_l) - (PV_Compatible ?pdpv_p ?pdpv_fv) - ) - :effect (and - (Empty ?pdpv_c) - (At_Package ?pdpv_p ?pdpv_fv) - (not (At_Package ?pdpv_p ?pdpv_c)) - ) - ) - - (:action raise_ramp_primitive - :parameters (?rr_v - vehicle) - :precondition (and - (Ramp_Down ?rr_v) - ) - :effect (and - (not (Ramp_Down ?rr_v)) - ) - ) - - (:action remove_guard_primitive - :parameters (?mc_a - armored) - :precondition ( - ) - :effect (and - (not (Guard_Outside ?mc_a)) - (not (Guard_Inside ?mc_a)) - ) - ) - - (:action remove_warning_signs_primitive - :parameters (?mws_v - vehicle) - :precondition (and - (Warning_Signs_Affixed ?mws_v) - ) - :effect (and - (not (Warning_Signs_Affixed ?mws_v)) - ) - ) - - (:action unload_cars_primitive - :parameters (?uc_c - cars ?uc_v - auto_vehicle ?uc_l - location) - :precondition (and - (At_Package ?uc_c ?uc_v) - (At_Vehicle ?uc_v ?uc_l) - (Ramp_Down ?uc_v) - ) - :effect (and - (At_Package ?uc_c ?uc_l) - (not (At_Package ?uc_c ?uc_v)) - ) - ) - - (:action unload_livestock_primitive - :parameters (?ull_p - livestock_package ?ull_v - livestock_vehicle ?ull_l - location) - :precondition (and - (At_Package ?ull_p ?ull_v) - (At_Vehicle ?ull_v ?ull_l) - (Ramp_Down ?ull_v) - ) - :effect (and - (At_Package ?ull_p ?ull_l) - (not (At_Package ?ull_p ?ull_v)) - (not (Trough_Full ?ull_v)) - ) - ) - - (:action unload_package_primitive - :parameters (?up_p - package ?up_v - vehicle ?up_l - location) - :precondition (and - (At_Package ?up_p ?up_v) - (At_Vehicle ?up_v ?up_l) - ) - :effect (and - (At_Package ?up_p ?up_l) - (not (At_Package ?up_p ?up_v)) - ) - ) - - (:action goal_action_primitive - :parameters () - :precondition (and - (Delivered Toshiba_Laptops) - (Delivered Drucker) - ) - :effect ( - ) - ) - -) diff --git a/examples/ipc/UM-Translog/problem.hpdl b/examples/ipc/UM-Translog/problem.hpdl deleted file mode 100644 index 7bd7fca..0000000 --- a/examples/ipc/UM-Translog/problem.hpdl +++ /dev/null @@ -1,94 +0,0 @@ -(define (problem prob) (:domain dom) - (:objects - Ulm - city - Bibliothek O27 O28 - customer_location - Frauen_Strasse James_Franck_Ring - local_road_route - Pferd - regular_truck - ) - - (:init - (In_City O27 Ulm) - (In_City O28 Ulm) - (In_City Bibliothek Ulm) - (At_Vehicle Pferd O27) - (Connects James_Franck_Ring O27 O28) - (Connects Frauen_Strasse O28 Bibliothek) - (Available James_Franck_Ring) - (Available Frauen_Strasse) - (Available Pferd) - (PV_Compatible Toshiba_Laptops Pferd) - (PV_Compatible Drucker Pferd) - (RV_Compatible James_Franck_Ring Pferd) - (RV_Compatible Frauen_Strasse Pferd) - (At_Package Toshiba_Laptops O27) - (At_Package Drucker O28) - (type_member_city Ulm) - (type_member_city_location Bibliothek) - (type_member_city_location O27) - (type_member_city_location O28) - (type_member_customer_location Bibliothek) - (type_member_customer_location O27) - (type_member_customer_location O28) - (type_member_equipment_position Bibliothek) - (type_member_equipment_position O27) - (type_member_equipment_position O28) - (type_member_equipment_position Pferd) - (type_member_equipment_position Ulm) - (type_member_local_road_route Frauen_Strasse) - (type_member_local_road_route James_Franck_Ring) - (type_member_location Bibliothek) - (type_member_location O27) - (type_member_location O28) - (type_member_location Ulm) - (type_member_not_tcenter Bibliothek) - (type_member_not_tcenter O27) - (type_member_not_tcenter O28) - (type_member_object__compiled Drucker) - (type_member_object__compiled Pferd) - (type_member_object__compiled Toshiba_Laptops) - (type_member_package Drucker) - (type_member_package Toshiba_Laptops) - (type_member_package_storage_position Bibliothek) - (type_member_package_storage_position O27) - (type_member_package_storage_position O28) - (type_member_package_storage_position Pferd) - (type_member_package_storage_position Ulm) - (type_member_parcels Drucker) - (type_member_parcels Toshiba_Laptops) - (type_member_physical Drucker) - (type_member_physical Pferd) - (type_member_physical Toshiba_Laptops) - (type_member_regular Drucker) - (type_member_regular Pferd) - (type_member_regular Toshiba_Laptops) - (type_member_regular_truck Pferd) - (type_member_regular_vehicle Pferd) - (type_member_road_route Frauen_Strasse) - (type_member_road_route James_Franck_Ring) - (type_member_route Frauen_Strasse) - (type_member_route James_Franck_Ring) - (type_member_thing Bibliothek) - (type_member_thing Drucker) - (type_member_thing Frauen_Strasse) - (type_member_thing James_Franck_Ring) - (type_member_thing O27) - (type_member_thing O28) - (type_member_thing Pferd) - (type_member_thing Toshiba_Laptops) - (type_member_thing Ulm) - (type_member_truck Pferd) - (type_member_vehicle Pferd) - (type_member_vehicle_position Bibliothek) - (type_member_vehicle_position O27) - (type_member_vehicle_position O28) - (type_member_vehicle_position Ulm) - ) - - (:tasks-goal - :tasks ( - (transport Toshiba_Laptops O27 O28) - (transport Drucker O28 Bibliothek) - (goal_action) - ) - ) -) diff --git a/examples/ipc/Zenotravel/domain.hpdl b/examples/ipc/Zenotravel/domain.hpdl deleted file mode 100644 index 8efd56b..0000000 --- a/examples/ipc/Zenotravel/domain.hpdl +++ /dev/null @@ -1,291 +0,0 @@ -(define (domain dom) - (:requirements - :typing - :htn-expansion - :negative-preconditions - :conditional-effects - :universal-preconditions - :disjunctive-preconditions - :equality - :existential-preconditions - ) - (:types - object__compiled - object - time - object__compiled - city - object__compiled - thing - object__compiled - flevel - object__compiled - aircraft - thing - person - thing - ) - - (:constants - c3 c4 - city - p1 p2 p3 p4 - person - ) - - (:predicates - (type_member_aircraft ?var - object) - (type_member_city ?var - object) - (type_member_flevel ?var - object) - (type_member_object__compiled ?var - object) - (type_member_person ?var - object) - (type_member_thing ?var - object) - (type_member_time ?var - object) - (at ?var0 - thing ?var1 - city) - (in ?var0 - person ?var1 - aircraft) - (different ?var0 - city ?var1 - city) - (next ?var0 - flevel ?var1 - flevel) - (fuel-level ?var0 - aircraft ?var1 - flevel) - ) - - - (:task board - :parameters (?p - object ?a - object ?c - object) - (:method method1 - :precondition (and - (type_member_person ?p) - (type_member_aircraft ?a) - (type_member_city ?c) - ) - :tasks ( - (board_primitive ?p - person ?a - aircraft ?c - city) - ) - ) - ) - - (:task debark - :parameters (?p - object ?a - object ?c - object) - (:method method1 - :precondition (and - (type_member_person ?p) - (type_member_aircraft ?a) - (type_member_city ?c) - ) - :tasks ( - (debark_primitive ?p - person ?a - aircraft ?c - city) - ) - ) - ) - - (:task refuel - :parameters (?a - object ?l - object ?l1 - object) - (:method method1 - :precondition (and - (type_member_aircraft ?a) - (type_member_flevel ?l) - (type_member_flevel ?l1) - ) - :tasks ( - (refuel_primitive ?a - aircraft ?l - flevel ?l1 - flevel) - ) - ) - ) - - (:task fly - :parameters (?a - object ?c1 - object ?c2 - object ?l1 - object ?l2 - object) - (:method method1 - :precondition (and - (type_member_aircraft ?a) - (type_member_city ?c1) - (type_member_city ?c2) - (type_member_flevel ?l1) - (type_member_flevel ?l2) - ) - :tasks ( - (fly_primitive ?a - aircraft ?c1 - city ?c2 - city ?l1 - flevel ?l2 - flevel) - ) - ) - ) - - (:task goal_action - :parameters () - (:method method1 - :precondition ( - ) - :tasks ( - (goal_action_primitive) - ) - ) - ) - -; ************************************************************ -; ************************************************************ - (:task transport-person - :parameters (?p - person ?c - city) - (:method m1-ordering-0 - :precondition (and - (type_member_city ?c - city) - (type_member_person ?p - person) - (at ?p ?c) - ) - :tasks () - ) - (:method m2-ordering-0 - :precondition (and - (type_member_aircraft ?a - aircraft) - (type_member_city ?c1 - city) - (type_member_city ?c - city) - (type_member_person ?p - person) - (at ?p ?c1) - (at ?a ?c1) - ) - :tasks ( - (board ?p ?a ?c1) - (upper-move-aircraft ?a ?c) - (debark ?p ?a ?c) - ) - ) - (:method m3-ordering-0 - :precondition (and - (type_member_aircraft ?a - aircraft) - (type_member_city ?c1 - city) - (type_member_city ?c - city) - (type_member_city ?c3 - city) - (type_member_person ?p - person) - (at ?p ?c1) - (at ?a ?c3) - (different ?c1 ?c3) - ) - :tasks ( - (upper-move-aircraft ?a ?c1) - (board ?p ?a ?c1) - (upper-move-aircraft ?a ?c) - (debark ?p ?a ?c) - ) - ) - ) - - (:task upper-move-aircraft - :parameters (?a - aircraft ?c - city) - (:method m4-abort-ordering-0 - :precondition (and - (type_member_aircraft ?a - aircraft) - (type_member_city ?c - city) - (at ?a ?c) - ) - :tasks () - ) - (:method m4-do-ordering-0 - :precondition (and - (type_member_aircraft ?a - aircraft) - (type_member_city ?c - city) - (type_member_city ?other - city) - (not (at ?a ?c)) - (at ?a ?other) - (different ?c ?other) - ) - :tasks ( - (move-aircraft ?a ?other ?c) - ) - ) - ) - - (:task move-aircraft - :parameters (?a - aircraft ?c1 - city ?c2 - city) - (:method m5-case1-ordering-0 - :precondition (and - (type_member_aircraft ?a - aircraft) - (type_member_city ?c1 - city) - (type_member_city ?c2 - city) - (type_member_flevel ?l1 - flevel) - (type_member_flevel ?l2 - flevel) - (fuel-level ?a ?l1) - (next ?l2 ?l1) - ) - :tasks ( - (fly ?a ?c1 ?c2 ?l1 ?l2) - ) - ) - (:method m5-case2-ordering-0 - :precondition (and - (type_member_aircraft ?a - aircraft) - (type_member_city ?c1 - city) - (type_member_city ?c2 - city) - (type_member_flevel ?l - flevel) - (type_member_flevel ?l1 - flevel) - (fuel-level ?a ?l) - (forall (?l2 - flevel) - (not (next ?l2 ?l)) - ) - ) - :tasks ( - (refuel ?a ?l ?l1) - (fly ?a ?c1 ?c2 ?l1 ?l) - ) - ) - ) - - (:task transport-aircraft - :parameters (?a - aircraft ?c - city) - (:method m6-ordering-0 - :precondition (and - (type_member_aircraft ?a - aircraft) - (type_member_city ?c - city) - ) - :tasks ( - (upper-move-aircraft ?a ?c) - ) - ) - ) - - (:action board_primitive - :parameters (?p - person ?a - aircraft ?c - city) - :precondition (and - (at ?p ?c) - ) - :effect (and - (not (at ?p ?c)) - (in ?p ?a) - ) - ) - - (:action debark_primitive - :parameters (?p - person ?a - aircraft ?c - city) - :precondition (and - (in ?p ?a) - ) - :effect (and - (not (in ?p ?a)) - (at ?p ?c) - ) - ) - - (:action refuel_primitive - :parameters (?a - aircraft ?l - flevel ?l1 - flevel) - :precondition (and - (fuel-level ?a ?l) - ) - :effect (and - (not (fuel-level ?a ?l)) - (fuel-level ?a ?l1) - ) - ) - - (:action fly_primitive - :parameters (?a - aircraft ?c1 - city ?c2 - city ?l1 - flevel ?l2 - flevel) - :precondition (and - (at ?a ?c1) - (fuel-level ?a ?l1) - ) - :effect (and - (not (at ?a ?c1)) - (not (fuel-level ?a ?l1)) - (at ?a ?c2) - (fuel-level ?a ?l2) - ) - ) - - (:action goal_action_primitive - :parameters () - :precondition (and - (at p1 c3) - (at p2 c4) - (at p3 c4) - (at p4 c4) - ) - :effect ( - ) - ) - -) diff --git a/examples/ipc/Zenotravel/problem.hpdl b/examples/ipc/Zenotravel/problem.hpdl deleted file mode 100644 index 514da37..0000000 --- a/examples/ipc/Zenotravel/problem.hpdl +++ /dev/null @@ -1,87 +0,0 @@ -(define (problem prob) (:domain dom) - (:objects - a1 a2 - aircraft - c1 c2 - city - f0 f1 f2 f3 f4 f5 f6 - flevel - ) - - (:init - (next f0 f1) - (next f1 f2) - (next f2 f3) - (next f3 f4) - (next f4 f5) - (next f5 f6) - (next f5 f6) - (different c1 c2) - (different c1 c3) - (different c1 c4) - (different c2 c1) - (different c2 c3) - (different c2 c4) - (different c3 c1) - (different c3 c2) - (different c3 c4) - (different c4 c1) - (different c4 c2) - (different c4 c3) - (at a1 c2) - (at a2 c3) - (at p1 c4) - (at p2 c1) - (at p3 c1) - (at p4 c2) - (fuel-level a1 f6) - (fuel-level a2 f5) - (type_member_aircraft a1) - (type_member_aircraft a2) - (type_member_city c1) - (type_member_city c2) - (type_member_city c3) - (type_member_city c4) - (type_member_flevel f0) - (type_member_flevel f1) - (type_member_flevel f2) - (type_member_flevel f3) - (type_member_flevel f4) - (type_member_flevel f5) - (type_member_flevel f6) - (type_member_object__compiled a1) - (type_member_object__compiled a2) - (type_member_object__compiled c1) - (type_member_object__compiled c2) - (type_member_object__compiled c3) - (type_member_object__compiled c4) - (type_member_object__compiled f0) - (type_member_object__compiled f1) - (type_member_object__compiled f2) - (type_member_object__compiled f3) - (type_member_object__compiled f4) - (type_member_object__compiled f5) - (type_member_object__compiled f6) - (type_member_object__compiled p1) - (type_member_object__compiled p2) - (type_member_object__compiled p3) - (type_member_object__compiled p4) - (type_member_person p1) - (type_member_person p2) - (type_member_person p3) - (type_member_person p4) - (type_member_thing a1) - (type_member_thing a2) - (type_member_thing p1) - (type_member_thing p2) - (type_member_thing p3) - (type_member_thing p4) - ) - - (:tasks-goal - :tasks ( - (transport-person p1 c3) - (transport-person p4 c4) - (transport-person p3 c4) - (transport-person p2 c4) - (goal_action) - ) - ) -) diff --git a/test/domain2.pddl b/test/domain2.pddl index 72657dc..89541db 100644 --- a/test/domain2.pddl +++ b/test/domain2.pddl @@ -1,13 +1,13 @@ -(define (domain instance_4-domain) - (:requirements :strips :typing :numeric-fluents) - (:types counter) - (:functions (value ?c - counter) (max_int)) - (:action increment - :parameters ( ?c - counter) - :precondition (and (<= (+ 1 (value ?c)) (max_int))) - :effect (and (increase (value ?c) 1))) - (:action decrement - :parameters ( ?c - counter) - :precondition (and (<= 1 (value ?c))) - :effect (and (decrease (value ?c) 1))) -) +(define (domain instance_4-domain) + (:requirements :strips :typing :numeric-fluents) + (:types counter) + (:functions (value ?c - counter) (max_int)) + (:action increment + :parameters ( ?c - counter) + :precondition (and (<= (+ 1 (value ?c)) (max_int))) + :effect (and (increase (value ?c) 1))) + (:action decrement + :parameters ( ?c - counter) + :precondition (and (<= 1 (value ?c))) + :effect (and (decrease (value ?c) 1))) +) diff --git a/test/hddl-problem.hpdl b/test/hddl-problem.hpdl new file mode 100644 index 0000000..90dddd8 --- /dev/null +++ b/test/hddl-problem.hpdl @@ -0,0 +1,34 @@ +(define (problem p-problem) + (:domain p-domain) + (:customization + (= :time-format "%d/%m/%Y %H:%M:%S") + (= :time-horizon-relative 2500) + (= :time-start "05/06/2007 08:00:00") + (= :time-unit :hours) + ) + (:objects + city_loc_0 city_loc_1 city_loc_2 - location + package_0 package_1 - package + truck_0 - vehicle + capacity_0 capacity_1 - capacity_number + ) + (:init + (capacity_predecessor capacity_0 capacity_1) + (road city_loc_0 city_loc_1) + (road city_loc_1 city_loc_0) + (road city_loc_1 city_loc_2) + (road city_loc_2 city_loc_1) + (at_ package_0 city_loc_1) + (at_ package_1 city_loc_1) + (at_ truck_0 city_loc_2) + (capacity truck_0 capacity_1) + ) + (:tasks-goal + :tasks ( + [ + (deliver package-0 city-loc-0) + (deliver package-1 city-loc-2) + ] + ) + ) +) \ No newline at end of file diff --git a/test/problem2.pddl b/test/problem2.pddl index b524db0..669e271 100644 --- a/test/problem2.pddl +++ b/test/problem2.pddl @@ -1,6 +1,6 @@ -(define (problem instance_4-problem) - (:domain instance_4-domain) - (:objects - c10 c0 c1 c2 c3 - counter - ) +(define (problem instance_4-problem) + (:domain instance_4-domain) + (:objects + c10 c0 c1 c2 c3 - counter + ) (:init \ No newline at end of file diff --git a/test/satellite-problem.hpdl b/test/satellite-problem.hpdl index 0474bcc..26b8d86 100644 --- a/test/satellite-problem.hpdl +++ b/test/satellite-problem.hpdl @@ -1,61 +1,61 @@ -(define (problem prob-problem) - (:domain prob-domain) - (:customization - (= :time-format "%d/%m/%Y %H:%M:%S") - (= :time-horizon-relative 2500) - (= :time-start "05/06/2007 08:00:00") - (= :time-unit :hours) - ) - (:objects - instrument01 instrument02 instrument11 instrument12 - instrument - groundstation0 groundstation1 - calib_direction - phenomenon4 phenomenon6 phenomenon7 star5 - image_direction - thermograph x_ray - mode - satellite0 satellite1 - satellite - ) - (:init - (on_board instrument01 satellite0) - (supports instrument01 thermograph) - (calibration_target instrument01 groundstation0) - (on_board instrument02 satellite0) - (supports instrument02 x_ray) - (calibration_target instrument02 groundstation0) - (power_avail satellite0) - (pointing satellite0 phenomenon6) - (on_board instrument11 satellite1) - (supports instrument11 thermograph) - (calibration_target instrument11 groundstation1) - (on_board instrument12 satellite1) - (supports instrument12 x_ray) - (calibration_target instrument12 groundstation1) - (power_avail satellite1) - (pointing satellite1 phenomenon7) - (type_member_calib_direction groundstation0) - (type_member_calib_direction groundstation1) - (type_member_direction groundstation0) - (type_member_direction groundstation1) - (type_member_direction phenomenon4) - (type_member_direction phenomenon6) - (type_member_direction phenomenon7) - (type_member_direction star5) - (type_member_image_direction phenomenon4) - (type_member_image_direction phenomenon6) - (type_member_image_direction phenomenon7) - (type_member_image_direction star5) - (type_member_instrument instrument01) - (type_member_instrument instrument02) - (type_member_instrument instrument11) - (type_member_instrument instrument12) - (type_member_mode thermograph) - (type_member_mode x_ray) - (type_member_satellite satellite0) - (type_member_satellite satellite1) - ) - (:tasks-goal - :tasks ( - (do_observation ?star5 ?x_ray) - (do_observation ?phenomenon4 ?thermograph) - (do_observation ?phenomenon6 ?x_ray) - ) - ) +(define (problem prob-problem) + (:domain prob-domain) + (:customization + (= :time-format "%d/%m/%Y %H:%M:%S") + (= :time-horizon-relative 2500) + (= :time-start "05/06/2007 08:00:00") + (= :time-unit :hours) + ) + (:objects + instrument01 instrument02 instrument11 instrument12 - instrument + groundstation0 groundstation1 - calib_direction + phenomenon4 phenomenon6 phenomenon7 star5 - image_direction + thermograph x_ray - mode + satellite0 satellite1 - satellite + ) + (:init + (on_board instrument01 satellite0) + (supports instrument01 thermograph) + (calibration_target instrument01 groundstation0) + (on_board instrument02 satellite0) + (supports instrument02 x_ray) + (calibration_target instrument02 groundstation0) + (power_avail satellite0) + (pointing satellite0 phenomenon6) + (on_board instrument11 satellite1) + (supports instrument11 thermograph) + (calibration_target instrument11 groundstation1) + (on_board instrument12 satellite1) + (supports instrument12 x_ray) + (calibration_target instrument12 groundstation1) + (power_avail satellite1) + (pointing satellite1 phenomenon7) + (type_member_calib_direction groundstation0) + (type_member_calib_direction groundstation1) + (type_member_direction groundstation0) + (type_member_direction groundstation1) + (type_member_direction phenomenon4) + (type_member_direction phenomenon6) + (type_member_direction phenomenon7) + (type_member_direction star5) + (type_member_image_direction phenomenon4) + (type_member_image_direction phenomenon6) + (type_member_image_direction phenomenon7) + (type_member_image_direction star5) + (type_member_instrument instrument01) + (type_member_instrument instrument02) + (type_member_instrument instrument11) + (type_member_instrument instrument12) + (type_member_mode thermograph) + (type_member_mode x_ray) + (type_member_satellite satellite0) + (type_member_satellite satellite1) + ) + (:tasks-goal + :tasks ( + (do_observation ?star5 ?x_ray) + (do_observation ?phenomenon4 ?thermograph) + (do_observation ?phenomenon6 ?x_ray) + ) + ) ) \ No newline at end of file diff --git a/test/satellite.hpdl b/test/satellite.hpdl index f780b03..0a387bf 100644 --- a/test/satellite.hpdl +++ b/test/satellite.hpdl @@ -1,210 +1,210 @@ -(define (domain prob-domain) - (:requirements - :strips - :typing - :negative-preconditions - :equality - :htn-expansion - ) - (:types - instrument direction mode satellite - object - calib_direction image_direction - direction - ) - (:predicates - (type_member_calib_direction ?var - object) - (type_member_direction ?var - object) - (type_member_image_direction ?var - object) - (type_member_instrument ?var - object) - (type_member_mode ?var - object) - (type_member_satellite ?var - object) - (calibrated ?var0 - instrument) - (calibration_target ?var0 - instrument ?var1 - calib_direction) - (have_image ?var0 - image_direction ?var1 - mode) - (on_board ?var0 - instrument ?var1 - satellite) - (pointing ?var0 - satellite ?var1 - direction) - (power_avail ?var0 - satellite) - (power_on ?var0 - instrument) - (supports ?var0 - instrument ?var1 - mode) - ) - (:task calibrate - :parameters (?c_s - satellite ?c_i - instrument ?c_d - calib_direction ) - (:method calibrate_method1 - :precondition (and - (type_member_calib_direction ?c_d - calib_direction) - ) - :tasks ( - (calibrate_primitive ?c_s - satellite ?c_i - instrument ?c_d - calib_direction ) - ) - ) - ) - (:task switch_off - :parameters (?sof_i - object ?sof_s - object ) - (:method switch_off_method1 - :precondition (and - (and (type_member_instrument ?sof_i - object) (type_member_satellite ?sof_s - object)) - ) - :tasks ( - (switch_off_primitive ?sof_i - object ?sof_s - object ) - ) - ) - ) - (:task switch_on - :parameters (?so_i - object ?so_s - object ) - (:method switch_on_method1 - :precondition (and - (and (type_member_instrument ?so_i - object) (type_member_satellite ?so_s - object)) - ) - :tasks ( - (switch_on_primitive ?so_i - object ?so_s - object ) - ) - ) - ) - (:task take_image - :parameters (?ti_s - object ?ti_d - object ?ti_i - object ?ti_m - object ) - (:method take_image_method1 - :precondition (and - (and (type_member_satellite ?ti_s - object) (type_member_image_direction ?ti_d - object) (type_member_instrument ?ti_i - object) (type_member_mode ?ti_m - object)) - ) - :tasks ( - (take_image_primitive ?ti_s - object ?ti_d - object ?ti_i - object ?ti_m - object ) - ) - ) - ) - (:task turn_to - :parameters (?t_s - object ?t_d_new - object ?t_d_prev - object ) - (:method turn_to_method1 - :precondition (and - (and (type_member_satellite ?t_s - object) (type_member_direction ?t_d_new - object) (type_member_direction ?t_d_prev - object)) - ) - :tasks ( - (turn_to_primitive ?t_s - object ?t_d_new - object ?t_d_prev - object ) - ) - ) - ) - (:task activate_instrument - :parameters (?ai_s - satellite ?ai_i - instrument ) - (:method activate_instrument_method4 - :precondition (and - (and (type_member_satellite ?ai_s - satellite) (type_member_instrument ?ai_i - instrument) (type_member_instrument ?switch_off_instance_2_argument_0 - instrument) (not (= ?switch_off_instance_2_argument_0 ?ai_i ))) - ) - :tasks ( - (switch_off ?switch_off_instance_2_argument_0 - instrument ?ai_s - satellite ) - (switch_on ?ai_i - instrument ?ai_s - satellite ) - (auto_calibrate ?ai_s - satellite ?ai_i - instrument ) - ) - ) - (:method activate_instrument_method5 - :precondition (and - (and (type_member_satellite ?ai_s - satellite) (type_member_instrument ?ai_i - instrument)) - ) - :tasks ( - (switch_on ?ai_i - instrument ?ai_s - satellite ) - (auto_calibrate ?ai_s - satellite ?ai_i - instrument ) - ) - ) - ) - (:task auto_calibrate - :parameters (?ac_s - satellite ?ac_i - instrument ) - (:method auto_calibrate_method6 - :precondition (and - (and (type_member_satellite ?ac_s - satellite) (type_member_instrument ?ac_i - instrument) (type_member_calib_direction ?calibrate_instance_3_argument_5 - calib_direction) (type_member_direction ?turn_to_instance_2_argument_2 - calib_direction) (not (= ?calibrate_instance_3_argument_5 ?turn_to_instance_2_argument_2 ))) - ) - :tasks ( - (turn_to ?ac_s - satellite ?calibrate_instance_3_argument_5 - calib_direction ?turn_to_instance_2_argument_2 - calib_direction ) - (calibrate ?ac_s - satellite ?ac_i - instrument ?calibrate_instance_3_argument_5 - calib_direction ) - ) - ) - (:method auto_calibrate_method7 - :precondition (and - (and (type_member_satellite ?ac_s - satellite) (type_member_instrument ?ac_i - instrument) (type_member_calib_direction ?calibrate_instance_2_argument_2 - calib_direction)) - ) - :tasks ( - (calibrate ?ac_s - satellite ?ac_i - instrument ?calibrate_instance_2_argument_2 - calib_direction ) - ) - ) - ) - (:task do_observation - :parameters (?do_d - image_direction ?do_m - mode ) - (:method do_observation_method0 - :precondition (and - (and (type_member_image_direction ?do_d - image_direction) (type_member_instrument ?take_image_instance_4_argument_7 - instrument) (type_member_mode ?do_m - mode) (type_member_satellite ?turn_to_instance_3_argument_2 - satellite) (type_member_direction ?turn_to_instance_3_argument_4 - image_direction) (not (= ?do_d ?turn_to_instance_3_argument_4 ))) - ) - :tasks ( - (activate_instrument ?turn_to_instance_3_argument_2 - satellite ?take_image_instance_4_argument_7 - instrument ) - (turn_to ?turn_to_instance_3_argument_2 - satellite ?do_d - image_direction ?turn_to_instance_3_argument_4 - image_direction ) - (take_image ?turn_to_instance_3_argument_2 - satellite ?do_d - image_direction ?take_image_instance_4_argument_7 - instrument ?do_m - mode ) - ) - ) - (:method do_observation_method1 - :precondition (and - (and (type_member_image_direction ?do_d - image_direction) (type_member_instrument ?take_image_instance_3_argument_5 - instrument) (type_member_mode ?do_m - mode) (type_member_satellite ?turn_to_instance_2_argument_0 - satellite) (type_member_direction ?turn_to_instance_2_argument_2 - image_direction) (not (= ?do_d ?turn_to_instance_2_argument_2 ))) - ) - :tasks ( - (turn_to ?turn_to_instance_2_argument_0 - satellite ?do_d - image_direction ?turn_to_instance_2_argument_2 - image_direction ) - (take_image ?turn_to_instance_2_argument_0 - satellite ?do_d - image_direction ?take_image_instance_3_argument_5 - instrument ?do_m - mode ) - ) - ) - (:method do_observation_method2 - :precondition (and - (and (type_member_satellite ?take_image_instance_3_argument_2 - satellite) (type_member_image_direction ?do_d - image_direction) (type_member_instrument ?take_image_instance_3_argument_4 - instrument) (type_member_mode ?do_m - mode)) - ) - :tasks ( - (activate_instrument ?take_image_instance_3_argument_2 - satellite ?take_image_instance_3_argument_4 - instrument ) - (take_image ?take_image_instance_3_argument_2 - satellite ?do_d - image_direction ?take_image_instance_3_argument_4 - instrument ?do_m - mode ) - ) - ) - (:method do_observation_method3 - :precondition (and - (and (type_member_satellite ?take_image_instance_2_argument_0 - satellite) (type_member_image_direction ?do_d - image_direction) (type_member_instrument ?take_image_instance_2_argument_2 - instrument) (type_member_mode ?do_m - mode)) - ) - :tasks ( - (take_image ?take_image_instance_2_argument_0 - satellite ?do_d - image_direction ?take_image_instance_2_argument_2 - instrument ?do_m - mode ) - ) - ) - ) - (:action calibrate_primitive - :parameters (?c_s - satellite ?c_i - instrument ?c_d - calib_direction ) - :precondition (and - (and (on_board ?c_i - instrument ?c_s - satellite) (calibration_target ?c_i - instrument ?c_d - calib_direction) (pointing ?c_s - satellite ?c_d - calib_direction) (power_on ?c_i - instrument)) - ) - :effect (and - (calibrated ?c_i - instrument) - ) - ) - (:action switch_off_primitive - :parameters (?sof_i - instrument ?sof_s - satellite ) - :precondition (and - (and (on_board ?sof_i - instrument ?sof_s - satellite) (power_on ?sof_i - instrument)) - ) - :effect (and - (not (power_on ?sof_i - instrument))(power_avail ?sof_s - satellite) - ) - ) - (:action switch_on_primitive - :parameters (?so_i - instrument ?so_s - satellite ) - :precondition (and - (and (on_board ?so_i - instrument ?so_s - satellite) (power_avail ?so_s - satellite)) - ) - :effect (and - (power_on ?so_i - instrument)(not (calibrated ?so_i - instrument))(not (power_avail ?so_s - satellite)) - ) - ) - (:action take_image_primitive - :parameters (?ti_s - satellite ?ti_d - image_direction ?ti_i - instrument ?ti_m - mode ) - :precondition (and - (and (calibrated ?ti_i - instrument) (pointing ?ti_s - satellite ?ti_d - image_direction) (on_board ?ti_i - instrument ?ti_s - satellite) (power_on ?ti_i - instrument) (supports ?ti_i - instrument ?ti_m - mode)) - ) - :effect (and - (have_image ?ti_d - image_direction ?ti_m - mode) - ) - ) - (:action turn_to_primitive - :parameters (?t_s - satellite ?t_d_new - direction ?t_d_prev - direction ) - :precondition (and - (pointing ?t_s - satellite ?t_d_prev - direction) - ) - :effect (and - (pointing ?t_s - satellite ?t_d_new - direction)(not (pointing ?t_s - satellite ?t_d_prev - direction)) - ) - ) -) +(define (domain prob-domain) + (:requirements + :strips + :typing + :negative-preconditions + :equality + :htn-expansion + ) + (:types + instrument direction mode satellite - object + calib_direction image_direction - direction + ) + (:predicates + (type_member_calib_direction ?var - object) + (type_member_direction ?var - object) + (type_member_image_direction ?var - object) + (type_member_instrument ?var - object) + (type_member_mode ?var - object) + (type_member_satellite ?var - object) + (calibrated ?var0 - instrument) + (calibration_target ?var0 - instrument ?var1 - calib_direction) + (have_image ?var0 - image_direction ?var1 - mode) + (on_board ?var0 - instrument ?var1 - satellite) + (pointing ?var0 - satellite ?var1 - direction) + (power_avail ?var0 - satellite) + (power_on ?var0 - instrument) + (supports ?var0 - instrument ?var1 - mode) + ) + (:task calibrate + :parameters (?c_s - satellite ?c_i - instrument ?c_d - calib_direction ) + (:method calibrate_method1 + :precondition (and + (type_member_calib_direction ?c_d - calib_direction) + ) + :tasks ( + (calibrate_primitive ?c_s - satellite ?c_i - instrument ?c_d - calib_direction ) + ) + ) + ) + (:task switch_off + :parameters (?sof_i - object ?sof_s - object ) + (:method switch_off_method1 + :precondition (and + (and (type_member_instrument ?sof_i - object) (type_member_satellite ?sof_s - object)) + ) + :tasks ( + (switch_off_primitive ?sof_i - object ?sof_s - object ) + ) + ) + ) + (:task switch_on + :parameters (?so_i - object ?so_s - object ) + (:method switch_on_method1 + :precondition (and + (and (type_member_instrument ?so_i - object) (type_member_satellite ?so_s - object)) + ) + :tasks ( + (switch_on_primitive ?so_i - object ?so_s - object ) + ) + ) + ) + (:task take_image + :parameters (?ti_s - object ?ti_d - object ?ti_i - object ?ti_m - object ) + (:method take_image_method1 + :precondition (and + (and (type_member_satellite ?ti_s - object) (type_member_image_direction ?ti_d - object) (type_member_instrument ?ti_i - object) (type_member_mode ?ti_m - object)) + ) + :tasks ( + (take_image_primitive ?ti_s - object ?ti_d - object ?ti_i - object ?ti_m - object ) + ) + ) + ) + (:task turn_to + :parameters (?t_s - object ?t_d_new - object ?t_d_prev - object ) + (:method turn_to_method1 + :precondition (and + (and (type_member_satellite ?t_s - object) (type_member_direction ?t_d_new - object) (type_member_direction ?t_d_prev - object)) + ) + :tasks ( + (turn_to_primitive ?t_s - object ?t_d_new - object ?t_d_prev - object ) + ) + ) + ) + (:task activate_instrument + :parameters (?ai_s - satellite ?ai_i - instrument ) + (:method activate_instrument_method4 + :precondition (and + (and (type_member_satellite ?ai_s - satellite) (type_member_instrument ?ai_i - instrument) (type_member_instrument ?switch_off_instance_2_argument_0 - instrument) (not (= ?switch_off_instance_2_argument_0 ?ai_i ))) + ) + :tasks ( + (switch_off ?switch_off_instance_2_argument_0 - instrument ?ai_s - satellite ) + (switch_on ?ai_i - instrument ?ai_s - satellite ) + (auto_calibrate ?ai_s - satellite ?ai_i - instrument ) + ) + ) + (:method activate_instrument_method5 + :precondition (and + (and (type_member_satellite ?ai_s - satellite) (type_member_instrument ?ai_i - instrument)) + ) + :tasks ( + (switch_on ?ai_i - instrument ?ai_s - satellite ) + (auto_calibrate ?ai_s - satellite ?ai_i - instrument ) + ) + ) + ) + (:task auto_calibrate + :parameters (?ac_s - satellite ?ac_i - instrument ) + (:method auto_calibrate_method6 + :precondition (and + (and (type_member_satellite ?ac_s - satellite) (type_member_instrument ?ac_i - instrument) (type_member_calib_direction ?calibrate_instance_3_argument_5 - calib_direction) (type_member_direction ?turn_to_instance_2_argument_2 - calib_direction) (not (= ?calibrate_instance_3_argument_5 ?turn_to_instance_2_argument_2 ))) + ) + :tasks ( + (turn_to ?ac_s - satellite ?calibrate_instance_3_argument_5 - calib_direction ?turn_to_instance_2_argument_2 - calib_direction ) + (calibrate ?ac_s - satellite ?ac_i - instrument ?calibrate_instance_3_argument_5 - calib_direction ) + ) + ) + (:method auto_calibrate_method7 + :precondition (and + (and (type_member_satellite ?ac_s - satellite) (type_member_instrument ?ac_i - instrument) (type_member_calib_direction ?calibrate_instance_2_argument_2 - calib_direction)) + ) + :tasks ( + (calibrate ?ac_s - satellite ?ac_i - instrument ?calibrate_instance_2_argument_2 - calib_direction ) + ) + ) + ) + (:task do_observation + :parameters (?do_d - image_direction ?do_m - mode ) + (:method do_observation_method0 + :precondition (and + (and (type_member_image_direction ?do_d - image_direction) (type_member_instrument ?take_image_instance_4_argument_7 - instrument) (type_member_mode ?do_m - mode) (type_member_satellite ?turn_to_instance_3_argument_2 - satellite) (type_member_direction ?turn_to_instance_3_argument_4 - image_direction) (not (= ?do_d ?turn_to_instance_3_argument_4 ))) + ) + :tasks ( + (activate_instrument ?turn_to_instance_3_argument_2 - satellite ?take_image_instance_4_argument_7 - instrument ) + (turn_to ?turn_to_instance_3_argument_2 - satellite ?do_d - image_direction ?turn_to_instance_3_argument_4 - image_direction ) + (take_image ?turn_to_instance_3_argument_2 - satellite ?do_d - image_direction ?take_image_instance_4_argument_7 - instrument ?do_m - mode ) + ) + ) + (:method do_observation_method1 + :precondition (and + (and (type_member_image_direction ?do_d - image_direction) (type_member_instrument ?take_image_instance_3_argument_5 - instrument) (type_member_mode ?do_m - mode) (type_member_satellite ?turn_to_instance_2_argument_0 - satellite) (type_member_direction ?turn_to_instance_2_argument_2 - image_direction) (not (= ?do_d ?turn_to_instance_2_argument_2 ))) + ) + :tasks ( + (turn_to ?turn_to_instance_2_argument_0 - satellite ?do_d - image_direction ?turn_to_instance_2_argument_2 - image_direction ) + (take_image ?turn_to_instance_2_argument_0 - satellite ?do_d - image_direction ?take_image_instance_3_argument_5 - instrument ?do_m - mode ) + ) + ) + (:method do_observation_method2 + :precondition (and + (and (type_member_satellite ?take_image_instance_3_argument_2 - satellite) (type_member_image_direction ?do_d - image_direction) (type_member_instrument ?take_image_instance_3_argument_4 - instrument) (type_member_mode ?do_m - mode)) + ) + :tasks ( + (activate_instrument ?take_image_instance_3_argument_2 - satellite ?take_image_instance_3_argument_4 - instrument ) + (take_image ?take_image_instance_3_argument_2 - satellite ?do_d - image_direction ?take_image_instance_3_argument_4 - instrument ?do_m - mode ) + ) + ) + (:method do_observation_method3 + :precondition (and + (and (type_member_satellite ?take_image_instance_2_argument_0 - satellite) (type_member_image_direction ?do_d - image_direction) (type_member_instrument ?take_image_instance_2_argument_2 - instrument) (type_member_mode ?do_m - mode)) + ) + :tasks ( + (take_image ?take_image_instance_2_argument_0 - satellite ?do_d - image_direction ?take_image_instance_2_argument_2 - instrument ?do_m - mode ) + ) + ) + ) + (:action calibrate_primitive + :parameters (?c_s - satellite ?c_i - instrument ?c_d - calib_direction ) + :precondition (and + (and (on_board ?c_i - instrument ?c_s - satellite) (calibration_target ?c_i - instrument ?c_d - calib_direction) (pointing ?c_s - satellite ?c_d - calib_direction) (power_on ?c_i - instrument)) + ) + :effect (and + (calibrated ?c_i - instrument) + ) + ) + (:action switch_off_primitive + :parameters (?sof_i - instrument ?sof_s - satellite ) + :precondition (and + (and (on_board ?sof_i - instrument ?sof_s - satellite) (power_on ?sof_i - instrument)) + ) + :effect (and + (not (power_on ?sof_i - instrument))(power_avail ?sof_s - satellite) + ) + ) + (:action switch_on_primitive + :parameters (?so_i - instrument ?so_s - satellite ) + :precondition (and + (and (on_board ?so_i - instrument ?so_s - satellite) (power_avail ?so_s - satellite)) + ) + :effect (and + (power_on ?so_i - instrument)(not (calibrated ?so_i - instrument))(not (power_avail ?so_s - satellite)) + ) + ) + (:action take_image_primitive + :parameters (?ti_s - satellite ?ti_d - image_direction ?ti_i - instrument ?ti_m - mode ) + :precondition (and + (and (calibrated ?ti_i - instrument) (pointing ?ti_s - satellite ?ti_d - image_direction) (on_board ?ti_i - instrument ?ti_s - satellite) (power_on ?ti_i - instrument) (supports ?ti_i - instrument ?ti_m - mode)) + ) + :effect (and + (have_image ?ti_d - image_direction ?ti_m - mode) + ) + ) + (:action turn_to_primitive + :parameters (?t_s - satellite ?t_d_new - direction ?t_d_prev - direction ) + :precondition (and + (pointing ?t_s - satellite ?t_d_prev - direction) + ) + :effect (and + (pointing ?t_s - satellite ?t_d_new - direction)(not (pointing ?t_s - satellite ?t_d_prev - direction)) + ) + ) +) diff --git a/test/zeno-domain.hpdl b/test/zeno-domain.hpdl index 9133af5..ba2ae65 100644 --- a/test/zeno-domain.hpdl +++ b/test/zeno-domain.hpdl @@ -1,208 +1,208 @@ -(define (domain prob-domain) - (:requirements - :strips - :typing - :negative-preconditions - :universal-preconditions - :htn-expansion - ) - (:types - object__compiled - object - thing city flevel - object__compiled - person aircraft - thing - ) - (:constants - p4 p1 p3 p2 - person - c4 c3 - city - ) - (:predicates - (type_member_aircraft ?var - object) - (type_member_city ?var - object) - (type_member_flevel ?var - object) - (type_member_object__compiled ?var - object) - (type_member_person ?var - object) - (type_member_thing ?var - object) - (type_member_time ?var - object) - (at_ ?var0 - thing ?var1 - city) - (in ?var0 - person ?var1 - aircraft) - (different ?var0 - city ?var1 - city) - (next ?var0 - flevel ?var1 - flevel) - (fuel_level ?var0 - aircraft ?var1 - flevel) - ) - (:task board - :parameters (?p - object ?a - object ?c - object ) - (:method board_method1 - :precondition (and - (and (type_member_person ?p) (type_member_aircraft ?a) (type_member_city ?c)) - ) - :tasks ( - (board_primitive ?p - person ?a - aircraft ?c - city ) - ) - ) - ) - (:task debark - :parameters (?p - object ?a - object ?c - object ) - (:method debark_method1 - :precondition (and - (and (type_member_person ?p) (type_member_aircraft ?a) (type_member_city ?c)) - ) - :tasks ( - (debark_primitive ?p - person ?a - aircraft ?c - city ) - ) - ) - ) - (:task refuel - :parameters (?a - object ?l - object ?l1 - object ) - (:method refuel_method1 - :precondition (and - (and (type_member_aircraft ?a) (type_member_flevel ?l) (type_member_flevel ?l1)) - ) - :tasks ( - (refuel_primitive ?a - aircraft ?l - flevel ?l1 - flevel ) - ) - ) - ) - (:task fly - :parameters (?a - object ?c1 - object ?c2 - object ?l1 - object ?l2 - object ) - (:method fly_method1 - :precondition (and - (and (type_member_aircraft ?a) (type_member_city ?c1) (type_member_city ?c2) (type_member_flevel ?l1) (type_member_flevel ?l2)) - ) - :tasks ( - (fly_primitive ?a - aircraft ?c1 - city ?c2 - city ?l1 - flevel ?l2 - flevel ) - ) - ) - ) - (:task goal_action - :parameters () - (:method goal_action_method1 - :precondition () - :tasks ( - (goal_action_primitive ) - ) - ) - ) - (:task transport_person - :parameters (?p - person ?c - city ) - (:method transport_person_m1_ordering_0 - :precondition (and - (and (type_member_city ?c) (type_member_person ?p) (at_ ?p ?c)) - ) - :tasks ( - ) - ) - (:method transport_person_m2_ordering_0 - :precondition (and - (and (type_member_aircraft ?a) (type_member_city ?c1) (type_member_city ?c) (type_member_person ?p) (at_ ?p ?c1) (at_ ?a ?c1)) - ) - :tasks ( - (board ?p - object ?a - object ?c1 - object ) - (upper_move_aircraft ?a - aircraft ?c - city ) - (debark ?p - object ?a - object ?c - object ) - ) - ) - (:method transport_person_m3_ordering_0 - :precondition (and - (and (type_member_aircraft ?a) (type_member_city ?c1) (type_member_city ?c) (type_member_city ?c3) (type_member_person ?p) (at_ ?p ?c1) (at_ ?a ?c3) (different ?c1 ?c3)) - ) - :tasks ( - (upper_move_aircraft ?a - aircraft ?c1 - city ) - (board ?p - object ?a - object ?c1 - object ) - (upper_move_aircraft ?a - aircraft ?c - city ) - (debark ?p - object ?a - object ?c - object ) - ) - ) - ) - (:task upper_move_aircraft - :parameters (?a - aircraft ?c - city ) - (:method upper_move_aircraft_m4_abort_ordering_0 - :precondition (and - (and (type_member_aircraft ?a) (type_member_city ?c) (at_ ?a ?c)) - ) - :tasks ( - ) - ) - (:method upper_move_aircraft_m4_do_ordering_0 - :precondition (and - (and (type_member_aircraft ?a) (type_member_city ?c) (type_member_city ?other) (not (at_ ?a ?c)) (at_ ?a ?other) (different ?c ?other)) - ) - :tasks ( - (move_aircraft ?a - aircraft ?other - city ?c - city ) - ) - ) - ) - (:task move_aircraft - :parameters (?a - aircraft ?c1 - city ?c2 - city ) - (:method move_aircraft_m5_case1_ordering_0 - :precondition (and - (and (type_member_aircraft ?a) (type_member_city ?c1) (type_member_city ?c2) (type_member_flevel ?l1) (type_member_flevel ?l2) (fuel_level ?a ?l1) (next ?l2 ?l1)) - ) - :tasks ( - (fly ?a - object ?c1 - object ?c2 - object ?l1 - object ?l2 - object ) - ) - ) - (:method move_aircraft_m5_case2_ordering_0 - :precondition (and - (and (type_member_aircraft ?a) (type_member_city ?c1) (type_member_city ?c2) (type_member_flevel ?l) (type_member_flevel ?l1) (fuel_level ?a ?l) (forall (?l2 - flevel) - (not (next ?l2 ?l)))) - ) - :tasks ( - (refuel ?a - object ?l - object ?l1 - object ) - (fly ?a - object ?c1 - object ?c2 - object ?l1 - object ?l - object ) - ) - ) - ) - (:task transport_aircraft - :parameters (?a - aircraft ?c - city ) - (:method transport_aircraft_m6_ordering_0 - :precondition (and - (and (type_member_aircraft ?a) (type_member_city ?c)) - ) - :tasks ( - (upper_move_aircraft ?a - aircraft ?c - city ) - ) - ) - ) - (:action board_primitive - :parameters (?p - person ?a - aircraft ?c - city ) - :precondition (and - (at_ ?p ?c) - ) - :effect (and - (not (at_ ?p ?c))(in ?p ?a) - ) - ) - (:action debark_primitive - :parameters (?p - person ?a - aircraft ?c - city ) - :precondition (and - (in ?p ?a) - ) - :effect (and - (not (in ?p ?a))(at_ ?p ?c) - ) - ) - (:action refuel_primitive - :parameters (?a - aircraft ?l - flevel ?l1 - flevel ) - :precondition (and - (fuel_level ?a ?l) - ) - :effect (and - (not (fuel_level ?a ?l))(fuel_level ?a ?l1) - ) - ) - (:action fly_primitive - :parameters (?a - aircraft ?c1 - city ?c2 - city ?l1 - flevel ?l2 - flevel ) - :precondition (and - (and (at_ ?a ?c1) (fuel_level ?a ?l1)) - ) - :effect (and - (not (at_ ?a ?c1))(not (fuel_level ?a ?l1))(at_ ?a ?c2)(fuel_level ?a ?l2) - ) - ) - (:action goal_action_primitive - :parameters () - :precondition (and - (and (at_ p1 c3) (at_ p2 c4) (at_ p3 c4) (at_ p4 c4)) - ) - ) -) +(define (domain prob-domain) + (:requirements + :strips + :typing + :negative-preconditions + :universal-preconditions + :htn-expansion + ) + (:types + object__compiled - object + thing city flevel - object__compiled + person aircraft - thing + ) + (:constants + p4 p1 p3 p2 - person + c4 c3 - city + ) + (:predicates + (type_member_aircraft ?var - object) + (type_member_city ?var - object) + (type_member_flevel ?var - object) + (type_member_object__compiled ?var - object) + (type_member_person ?var - object) + (type_member_thing ?var - object) + (type_member_time ?var - object) + (at_ ?var0 - thing ?var1 - city) + (in ?var0 - person ?var1 - aircraft) + (different ?var0 - city ?var1 - city) + (next ?var0 - flevel ?var1 - flevel) + (fuel_level ?var0 - aircraft ?var1 - flevel) + ) + (:task board + :parameters (?p - object ?a - object ?c - object ) + (:method board_method1 + :precondition (and + (and (type_member_person ?p) (type_member_aircraft ?a) (type_member_city ?c)) + ) + :tasks ( + (board_primitive ?p - person ?a - aircraft ?c - city ) + ) + ) + ) + (:task debark + :parameters (?p - object ?a - object ?c - object ) + (:method debark_method1 + :precondition (and + (and (type_member_person ?p) (type_member_aircraft ?a) (type_member_city ?c)) + ) + :tasks ( + (debark_primitive ?p - person ?a - aircraft ?c - city ) + ) + ) + ) + (:task refuel + :parameters (?a - object ?l - object ?l1 - object ) + (:method refuel_method1 + :precondition (and + (and (type_member_aircraft ?a) (type_member_flevel ?l) (type_member_flevel ?l1)) + ) + :tasks ( + (refuel_primitive ?a - aircraft ?l - flevel ?l1 - flevel ) + ) + ) + ) + (:task fly + :parameters (?a - object ?c1 - object ?c2 - object ?l1 - object ?l2 - object ) + (:method fly_method1 + :precondition (and + (and (type_member_aircraft ?a) (type_member_city ?c1) (type_member_city ?c2) (type_member_flevel ?l1) (type_member_flevel ?l2)) + ) + :tasks ( + (fly_primitive ?a - aircraft ?c1 - city ?c2 - city ?l1 - flevel ?l2 - flevel ) + ) + ) + ) + (:task goal_action + :parameters () + (:method goal_action_method1 + :precondition () + :tasks ( + (goal_action_primitive ) + ) + ) + ) + (:task transport_person + :parameters (?p - person ?c - city ) + (:method transport_person_m1_ordering_0 + :precondition (and + (and (type_member_city ?c) (type_member_person ?p) (at_ ?p ?c)) + ) + :tasks ( + ) + ) + (:method transport_person_m2_ordering_0 + :precondition (and + (and (type_member_aircraft ?a) (type_member_city ?c1) (type_member_city ?c) (type_member_person ?p) (at_ ?p ?c1) (at_ ?a ?c1)) + ) + :tasks ( + (board ?p - object ?a - object ?c1 - object ) + (upper_move_aircraft ?a - aircraft ?c - city ) + (debark ?p - object ?a - object ?c - object ) + ) + ) + (:method transport_person_m3_ordering_0 + :precondition (and + (and (type_member_aircraft ?a) (type_member_city ?c1) (type_member_city ?c) (type_member_city ?c3) (type_member_person ?p) (at_ ?p ?c1) (at_ ?a ?c3) (different ?c1 ?c3)) + ) + :tasks ( + (upper_move_aircraft ?a - aircraft ?c1 - city ) + (board ?p - object ?a - object ?c1 - object ) + (upper_move_aircraft ?a - aircraft ?c - city ) + (debark ?p - object ?a - object ?c - object ) + ) + ) + ) + (:task upper_move_aircraft + :parameters (?a - aircraft ?c - city ) + (:method upper_move_aircraft_m4_abort_ordering_0 + :precondition (and + (and (type_member_aircraft ?a) (type_member_city ?c) (at_ ?a ?c)) + ) + :tasks ( + ) + ) + (:method upper_move_aircraft_m4_do_ordering_0 + :precondition (and + (and (type_member_aircraft ?a) (type_member_city ?c) (type_member_city ?other) (not (at_ ?a ?c)) (at_ ?a ?other) (different ?c ?other)) + ) + :tasks ( + (move_aircraft ?a - aircraft ?other - city ?c - city ) + ) + ) + ) + (:task move_aircraft + :parameters (?a - aircraft ?c1 - city ?c2 - city ) + (:method move_aircraft_m5_case1_ordering_0 + :precondition (and + (and (type_member_aircraft ?a) (type_member_city ?c1) (type_member_city ?c2) (type_member_flevel ?l1) (type_member_flevel ?l2) (fuel_level ?a ?l1) (next ?l2 ?l1)) + ) + :tasks ( + (fly ?a - object ?c1 - object ?c2 - object ?l1 - object ?l2 - object ) + ) + ) + (:method move_aircraft_m5_case2_ordering_0 + :precondition (and + (and (type_member_aircraft ?a) (type_member_city ?c1) (type_member_city ?c2) (type_member_flevel ?l) (type_member_flevel ?l1) (fuel_level ?a ?l) (forall (?l2 - flevel) + (not (next ?l2 ?l)))) + ) + :tasks ( + (refuel ?a - object ?l - object ?l1 - object ) + (fly ?a - object ?c1 - object ?c2 - object ?l1 - object ?l - object ) + ) + ) + ) + (:task transport_aircraft + :parameters (?a - aircraft ?c - city ) + (:method transport_aircraft_m6_ordering_0 + :precondition (and + (and (type_member_aircraft ?a) (type_member_city ?c)) + ) + :tasks ( + (upper_move_aircraft ?a - aircraft ?c - city ) + ) + ) + ) + (:action board_primitive + :parameters (?p - person ?a - aircraft ?c - city ) + :precondition (and + (at_ ?p ?c) + ) + :effect (and + (not (at_ ?p ?c))(in ?p ?a) + ) + ) + (:action debark_primitive + :parameters (?p - person ?a - aircraft ?c - city ) + :precondition (and + (in ?p ?a) + ) + :effect (and + (not (in ?p ?a))(at_ ?p ?c) + ) + ) + (:action refuel_primitive + :parameters (?a - aircraft ?l - flevel ?l1 - flevel ) + :precondition (and + (fuel_level ?a ?l) + ) + :effect (and + (not (fuel_level ?a ?l))(fuel_level ?a ?l1) + ) + ) + (:action fly_primitive + :parameters (?a - aircraft ?c1 - city ?c2 - city ?l1 - flevel ?l2 - flevel ) + :precondition (and + (and (at_ ?a ?c1) (fuel_level ?a ?l1)) + ) + :effect (and + (not (at_ ?a ?c1))(not (fuel_level ?a ?l1))(at_ ?a ?c2)(fuel_level ?a ?l2) + ) + ) + (:action goal_action_primitive + :parameters () + :precondition (and + (and (at_ p1 c3) (at_ p2 c4) (at_ p3 c4) (at_ p4 c4)) + ) + ) +) diff --git a/test/zeno-problem.hpdl b/test/zeno-problem.hpdl index 1b8e701..1c924c2 100644 --- a/test/zeno-problem.hpdl +++ b/test/zeno-problem.hpdl @@ -1,91 +1,91 @@ -(define (problem prob-problem) - (:domain prob-domain) - (:customization - (= :time-format "%d/%m/%Y %H:%M:%S") - (= :time-horizon-relative 2500) - (= :time-start "05/06/2007 08:00:00") - (= :time-unit :hours) - ) - (:objects - c1 c2 - city - a1 a2 - aircraft - f0 f1 f2 f3 f4 f5 f6 - flevel - ) - (:init - (next f0 f1) - (next f1 f2) - (next f2 f3) - (next f3 f4) - (next f4 f5) - (next f5 f6) - (different c1 c2) - (different c1 c3) - (different c1 c4) - (different c2 c1) - (different c2 c3) - (different c2 c4) - (different c3 c1) - (different c3 c2) - (different c3 c4) - (different c4 c1) - (different c4 c2) - (different c4 c3) - (at_ a1 c2) - (at_ a2 c3) - (at_ p1 c4) - (at_ p2 c1) - (at_ p3 c1) - (at_ p4 c2) - (fuel_level a1 f6) - (fuel_level a2 f5) - (type_member_aircraft a1) - (type_member_aircraft a2) - (type_member_city c1) - (type_member_city c2) - (type_member_city c3) - (type_member_city c4) - (type_member_flevel f0) - (type_member_flevel f1) - (type_member_flevel f2) - (type_member_flevel f3) - (type_member_flevel f4) - (type_member_flevel f5) - (type_member_flevel f6) - (type_member_object__compiled a1) - (type_member_object__compiled a2) - (type_member_object__compiled c1) - (type_member_object__compiled c2) - (type_member_object__compiled c3) - (type_member_object__compiled c4) - (type_member_object__compiled f0) - (type_member_object__compiled f1) - (type_member_object__compiled f2) - (type_member_object__compiled f3) - (type_member_object__compiled f4) - (type_member_object__compiled f5) - (type_member_object__compiled f6) - (type_member_object__compiled p1) - (type_member_object__compiled p2) - (type_member_object__compiled p3) - (type_member_object__compiled p4) - (type_member_person p1) - (type_member_person p2) - (type_member_person p3) - (type_member_person p4) - (type_member_thing a1) - (type_member_thing a2) - (type_member_thing p1) - (type_member_thing p2) - (type_member_thing p3) - (type_member_thing p4) - ) - (:tasks-goal - :tasks ( - (transport_person ?p1 ?c3) - (transport_person ?p4 ?c4) - (transport_person ?p3 ?c4) - (transport_person ?p2 ?c4) - (goal_action ) - ) - ) +(define (problem prob-problem) + (:domain prob-domain) + (:customization + (= :time-format "%d/%m/%Y %H:%M:%S") + (= :time-horizon-relative 2500) + (= :time-start "05/06/2007 08:00:00") + (= :time-unit :hours) + ) + (:objects + c1 c2 - city + a1 a2 - aircraft + f0 f1 f2 f3 f4 f5 f6 - flevel + ) + (:init + (next f0 f1) + (next f1 f2) + (next f2 f3) + (next f3 f4) + (next f4 f5) + (next f5 f6) + (different c1 c2) + (different c1 c3) + (different c1 c4) + (different c2 c1) + (different c2 c3) + (different c2 c4) + (different c3 c1) + (different c3 c2) + (different c3 c4) + (different c4 c1) + (different c4 c2) + (different c4 c3) + (at_ a1 c2) + (at_ a2 c3) + (at_ p1 c4) + (at_ p2 c1) + (at_ p3 c1) + (at_ p4 c2) + (fuel_level a1 f6) + (fuel_level a2 f5) + (type_member_aircraft a1) + (type_member_aircraft a2) + (type_member_city c1) + (type_member_city c2) + (type_member_city c3) + (type_member_city c4) + (type_member_flevel f0) + (type_member_flevel f1) + (type_member_flevel f2) + (type_member_flevel f3) + (type_member_flevel f4) + (type_member_flevel f5) + (type_member_flevel f6) + (type_member_object__compiled a1) + (type_member_object__compiled a2) + (type_member_object__compiled c1) + (type_member_object__compiled c2) + (type_member_object__compiled c3) + (type_member_object__compiled c4) + (type_member_object__compiled f0) + (type_member_object__compiled f1) + (type_member_object__compiled f2) + (type_member_object__compiled f3) + (type_member_object__compiled f4) + (type_member_object__compiled f5) + (type_member_object__compiled f6) + (type_member_object__compiled p1) + (type_member_object__compiled p2) + (type_member_object__compiled p3) + (type_member_object__compiled p4) + (type_member_person p1) + (type_member_person p2) + (type_member_person p3) + (type_member_person p4) + (type_member_thing a1) + (type_member_thing a2) + (type_member_thing p1) + (type_member_thing p2) + (type_member_thing p3) + (type_member_thing p4) + ) + (:tasks-goal + :tasks ( + (transport_person ?p1 ?c3) + (transport_person ?p4 ?c4) + (transport_person ?p3 ?c4) + (transport_person ?p2 ?c4) + (goal_action ) + ) + ) ) \ No newline at end of file diff --git a/unified-planning b/unified-planning index b00f149..4048245 160000 --- a/unified-planning +++ b/unified-planning @@ -1 +1 @@ -Subproject commit b00f14903c06dbc03fc6cbe34e18f59890f019c6 +Subproject commit 4048245c23515623df037afe8a6b684f21df36da diff --git a/up_siadex/__init__.py b/up_siadex/__init__.py index e1aa793..a078147 100644 --- a/up_siadex/__init__.py +++ b/up_siadex/__init__.py @@ -1 +1,2 @@ +from .siadex_debugger import SIADEXDebugger, StateCommand from .siadex_planner import SIADEXEngine diff --git a/up_siadex/siadex_debugger.py b/up_siadex/siadex_debugger.py new file mode 100644 index 0000000..293302e --- /dev/null +++ b/up_siadex/siadex_debugger.py @@ -0,0 +1,868 @@ +import os +import re +import subprocess +import tempfile +import threading +import time +from abc import ABC +from dataclasses import dataclass +from queue import Empty, Queue +from typing import List, Tuple, Union + +import pkg_resources +import unified_planning as up +from unified_planning.io.hpdl.hpdl_writer import ( + ConverterToPDDLString, + HPDLWriter, + _get_pddl_name, +) +from unified_planning.model.htn.hierarchical_problem import HierarchicalProblem +from unified_planning.model.htn.task import Subtask, Task +from unified_planning.model.state import UPCOWState +from unified_planning.plans import ActionInstance, SequentialPlan +from unified_planning.shortcuts import * + + +def find_task_action( + problem: "up.model.AbstractProblem", name: str +) -> Union[Task, Action]: + """Returns the task or action by its name""" + if name[-1] == "_": + name = name[:-1] + + if problem.has_task(name): + return problem.get_task(name) + if problem.has_action(name): + return problem.action(name) + + name = name.replace("_", "-") + if problem.has_task(name): + return problem.get_task(name) + if problem.has_action(name): + return problem.action(name) + + raise Exception(f"Not found Task or Action: {name}") + + +def find_depth(line: str) -> Tuple[int, str]: + """Finds the depth in the message, returns the line clean""" + if line.startswith("(***"): + last = line.find("***)") + depth = int(line[4:last]) + return depth, line[last + 4 :] + + return -1, line + + +def find_obj(problem: "up.model.AbstractProblem", name: str) -> "up.model.FNode": + """Returns an object from the problem""" + return problem.object(name.replace("_", "-")) + + +def find_fluent(problem: "up.model.AbstractProblem", name: str) -> "up.model.Fluent": + """Returns a fluent from the problem""" + if name[-1] == "_": + name = name[:-1] + return problem.fluent(name.replace("_", "-")) + + +class ICommand(ABC): + """Abstract command""" + + name = None + cmd = None + + def parse( + self, problem: "up.model.AbstractProblem", std: List[str], err: List[str] + ): + raise NotImplementedError() + + +class STRCommand(ABC): + """Run a string command""" + + name = None + cmd = None + + def __init__(self, cmd: str) -> None: + super().__init__() + self.cmd = cmd + + def parse( + self, problem: "up.model.AbstractProblem", std: List[str], err: List[str] + ): + [print(msg, end="") for msg in std] + print("_" * 50) + [print(msg, end="") for msg in err] + + +class StateCommand(ICommand): + """Returns a list of parametrized fluents that represents the actual state""" + + name = "state" + cmd = "print state" + + def parse( + self, + problem: "up.model.AbstractProblem", + std: List[str], + err: List[str], + ) -> List[FNode]: + err = [er for er in err if not er.startswith("(***")] + err = [er for er in err if not er.startswith("\n")] + result = [] + for pre in err: + pre = pre.replace("(", "").replace(")", "").replace("\n", "").split(" ") + fluent = find_fluent(problem, pre[0]) + parameters = [] + for obj in pre[1:]: + parameters.append(find_obj(problem, obj)) + result.append(fluent(*parameters)) + + # state = UPCOWState({f: True for f in result}) + return result + + +class EvalCommand(ICommand): + + cmd = "eval" + name = "eval" + parameters = None + + def __init__(self, precondition: str, parameters: List[Parameter] = None) -> None: + super().__init__() + self.cmd = f"eval {precondition}" + self.parameters = parameters + + def parse( + self, problem: "up.model.AbstractProblem", std: List[str], err: List[str] + ): + unifications = [] + if err[-1].startswith("No unification"): + return [] + + """ + debug:> eval (and (at_ ?v - vehicle ?l1 - location) (road ?l1 - location ?l2 - location)) + __________________________________________________ + Evaluating: (and + (at_ ?v ?l1) + (road ?l1 ?l2) + ) + + ?l2 <- city_loc_0 + ?l1 <- city_loc_1 + ?v <- truck_0 + 3 variable subtition(s). + + ?l2 <- city_loc_2 + ?l1 <- city_loc_1 + ?v <- truck_0 + 3 variable subtition(s). + """ + # Lets parse it reversed + next_line = len(err) - 2 + while next_line > -1: + # Is a new unification? + line = err[next_line].removesuffix("\n") + if line.startswith("("): + break + num = 0 + if line.endswith("variable subtition(s)."): + # 3 variable subtition(s). + # Get the number + num = int(line.split(" ")[0]) + batch = {} + for i in range(1, num + 1): + line = err[next_line - i].removesuffix("\n") + line = line.split(" <- ") + parameter = line[0].removeprefix("?") + if self.parameters: + for p in self.parameters: + if p.name == parameter: + parameter = p + break + obj = line[1] + batch[parameter] = find_obj(problem, obj) + unifications.append(batch) + + next_line = next_line - num - 1 + + return unifications + + +class EffectCommand(ICommand): + cmd = "apply" + name = "apply" + + def __init__(self, effect: str) -> None: + super().__init__() + self.cmd = f"apply {effect}" + + def parse( + self, problem: "up.model.AbstractProblem", std: List[str], err: List[str] + ): + pass + # return STRCommand("").parse(problem, std, err) + + +@dataclass +class AgendaLine: + """Represents one line of the agenda command""" + + identifier: int + status: str + expanded: str + subtask: Subtask + successors: List[int] + + def __repr__(self) -> str: + return self.__str__() + + def __str__(self) -> str: + return f"""{self.identifier}: ({self.subtask.task.name if self.subtask else "root"} {self.subtask.parameters if self.subtask else ""}) + status: {self.status}, expanded: {self.expanded}, + successors: {self.successors}""" + + +class AgendaCommand(ICommand): + """Print agenda command""" + + name = "agenda" + cmd = "print agenda" + + def parse( + self, problem: "up.model.AbstractProblem", std: List[str], err: List[str] + ): + """ + __________________________________________________ + Succesors: + [0] 2 3 + [1] 0 + [2] 0 + [3] 4 + [4] 5 + [5] 6 + [6] 0 + Task list: + [1] (closed) :unexpanded (deliver package_0 city_loc_0) + [2] (agenda) :unexpanded (deliver package_1 city_loc_2) + [3] (agenda) :unexpanded (get_to ?v ?l1) + [4] (pending) :unexpanded (load ?v ?l1 package_0) + [5] (pending) :unexpanded (get_to ?v ?l2) + [6] (pending) :unexpanded (unload ?v ?l2 package_0) + =========== + """ + + # __________SUCCESSORS_____________ + # Find "Task list:" position + task_position = -1 + end_position = -1 + for i, e in enumerate(err): + if e.startswith("Task list:"): + task_position = i + if e.startswith("==========="): + end_position = i + + if task_position == -1 or end_position == -1: + raise Exception("Error on debugger") + # for i, e in enumerate(err): + # if e.startswith("==========="): + # end_position = i + # break + + successors = {} + # From [0] to ...[n] + for succ in err[1:task_position]: + # [0] 2 3 + numbers = succ.removesuffix("\n").split(" ") + if "0" in numbers[1:-1]: + continue + successors[int(numbers[0][1:-1])] = [int(n) for n in numbers[1:-1]] + # __________TASKS_____________ + tasks = {} + tasks[0] = AgendaLine(0, "root", "root", None, successors[0]) + + rex = re.compile(r"\s+") # remove multiple whitespace + for task in err[task_position + 1 : end_position]: + task = rex.sub(" ", task) + line = ( + task.strip() + .replace("(", "") + .replace(")", "") + .removesuffix("\n") + .split(" ") + ) + number = int(line[0][1:-1]) # [1] + status = line[1] # (agenda) + expanded = line[2][1:] # :unexpanded + # subtask = line[3:] # (deliver package_0 city_loc_0) + action = find_task_action(problem, line[3]) + params = [] + for i, p in enumerate(line[4:]): + # is a parameter? + if p.startswith("?"): + params.append(action.parameters[i]) + else: + params.append(find_obj(problem, p)) + + subtask = Subtask(action, params) + tasks[number] = AgendaLine( + identifier=number, + status=status, + expanded=expanded, + subtask=subtask, + successors=successors.get(number, []), + ) + + return tasks + + +class PlanCommand(ICommand): + """Returns the actual plan""" + + name = "plan" + cmd = "print plan" + + def parse( + self, problem: "up.model.AbstractProblem", std: List[str], err: List[str] + ) -> SequentialPlan: + actions = [] + for line in err: + try: + line = ( + line.replace("(", "").replace(")", "").removesuffix("\n").split(" ") + ) + action_name = line[1] + params = [find_obj(problem, p) for p in line[2:]] + action = find_task_action(problem, action_name) + actions.append(ActionInstance(action, tuple(params))) + except Exception as ex: + ... + + return SequentialPlan(actions) + + +class NexpCommand(ICommand): + name = "nexp" + cmd = "nexp" + + def parse( + self, problem: "up.model.AbstractProblem", std: List[str], err: List[str] + ): + depth, line = find_depth(err[0]) + try: + is_action = line.index("Solving action:") + print("Solving action") + """ + (*** 7 ***) Solving action: + (:action drive + :parameters ( truck_0 ?l1 - location ?l2 - location) + """ + action_name = err[1].split(" ")[1].strip() + action = find_task_action(problem, action_name) + vars = ( + err[3] + .removeprefix(":parameters") + .replace("(", "") + .replace(")", "") + .replace("- ", "-") + .strip() + .split(" ") + ) + + print(vars) + params = [] + for v in vars: + if v.startswith("-"): + continue + if v.startswith("?"): + continue + + params.append(find_obj(problem, v)) + + return action, params + except ValueError as error: + ... + + print(depth) + + +class NextCommand(ICommand): + name = "next" + cmd = "next" + + def _detect_version(self, line: str) -> int: + return 0 + + def _parse_first(self, err: List[str]): + pass + + def _parse_second(self, err: List[str]): + pass + + def _parse_third(self, err: List[str]): + pass + + def parse( + self, problem: "up.model.AbstractProblem", std: List[str], err: List[str] + ): + """ + 1: + __________________________________________________ + + (*** 1 ***) Expanding: [0] (deliver package_0 city_loc_0) + + (*** 1 ***) Selecting a candidate task. + (*** 1 ***) Found: 1 candidates (left). + [0] :task (deliver ?p ?l) + + 2: + __________________________________________________ + (*** 1 ***) Selecting a method to expand from compound task. + :task (deliver ?p ?l) + (*** 1 ***) Found: 1 methods to expand (left). + [0] + (:method m_deliver + :precondition + ( ) + :tasks ( + (get_to ?v ?l1) + (load ?v ?l1 ?p) + (get_to ?v ?l2) + (unload ?v ?l2 ?p) + ) + ) + + 3: + __________________________________________________ + (*** 1 ***) Expanding method: m_deliver + (*** 1 ***) Working in task: + (:task deliver + :parameters ( ?p - package ?l - location) + (:method m_deliver + :precondition + ( ) + :tasks ( + (get_to ?v ?l1) + (load ?v ?l1 package_0) + (get_to ?v ?l2) + (unload ?v ?l2 package_0) + ) + ) + ) + + (*** 1 ***) Using method: m_deliver + (*** 1 ***) No preconditions. + Selecting unification: + (*** 2 ***) Depth: 2 + (*** 2 ***) Selecting task to expand from agenda. + 4: + __________________________________________________ + *** 3 ***) Solving action: + (:action drive + :parameters ( ?v - vehicle ?l1 - location ?l2 - location) + :precondition + (and + (and + (at_ ?v ?l1) + (road ?l1 ?l2) + ) + + ) + + :effect + (and + (not (at_ ?v ?l1)) + (at_ ?v ?l2) + ) + + ) + (*** 3 ***) working in action: + (:action drive + :parameters ( ?v - vehicle ?l1 - location ?l2 - location) + :precondition + (and + (and + (at_ ?v ?l1) + (road ?l1 ?l2) + ) + + ) + + :effect + (and + (not (at_ ?v ?l1)) + (at_ ?v ?l2) + ) + + ) + + (*** 3 ***) Found: 1 unification(s) (left). + Unification [0]: + ?l2 <- city_loc_1 + ?l1 <- city_loc_2 + ?v <- truck_0 + 3 variable subtition(s). + + Selecting unification: + + ___________________________________________ + (ccc) Performing unification: + ?l2 <- city_loc_1 + ?l1 <- city_loc_2 + ?v <- truck_0 + 3 variable subtition(s). + + (ccc) Deleted from state: (at_ truck_0 city_loc_2) + (ccc) Added to state: (at_ truck_0 city_loc_1) + (*** 4 ***) Depth: 4 + (*** 4 ***) Selecting task to expand from agenda. + """ + + return + + +class BreakCommand(ICommand): + name = "break" + cmd = "break" + + def __init__(self, name: str, params: List[str]) -> None: + super().__init__() + params = " ".join(params) + self.cmd = f"break ({name} {params})" + + def parse( + self, problem: "up.model.AbstractProblem", std: List[str], err: List[str] + ): + return STRCommand("").parse(problem, std, err) + + +class ListBreakCommand(ICommand): + name = "list break" + cmd = "break" + + def parse( + self, problem: "up.model.AbstractProblem", std: List[str], err: List[str] + ): + """Breakpoint 0::(road ?l1 ?l2) + Breakpoint 1::(road ?l1 ?l2) + """ + + result = {} + + for line in err: + line = line.removeprefix("Breakpoint ").removesuffix("\n") + line = line.replace("::", " ").replace("<", " ").replace(">", " ") + line = line.split(" ") + num = int(line[0]) + status = line[2] == "enabled" + node = " ".join(line[3:]) + result[num] = {"id": num, "enabled": status, "node": node} + + return result + + # return STRCommand("").parse(problem, std, err) + + +class DisableBreakCommand(ICommand): + name = "disable" + cmd = "disable" + + def __init__(self, iden: int) -> None: + super().__init__() + self.cmd = f"disable {iden}" + + def parse( + self, problem: "up.model.AbstractProblem", std: List[str], err: List[str] + ): + pass + # return super().parse(problem, std, err) + + +class EnableBreakCommand(ICommand): + name = "enable" + cmd = "enable" + + def __init__(self, iden: int) -> None: + super().__init__() + self.cmd = f"enable {iden}" + + def parse( + self, problem: "up.model.AbstractProblem", std: List[str], err: List[str] + ): + pass + # return super().parse(problem, std, err) + + +class SIADEXDebugger: + std_q = Queue() + err_q = Queue() + problem: "up.model.AbstractProblem" = None + env: "up.model.Environment" = None + converter: ConverterToPDDLString = None + thread_std: threading.Thread = None + thread_err: threading.Thread = None + + temp_dir = None + process = None + lock = False + started = False + + def _get_cmd(self, domain_filename: str, problem_filename: str) -> List[str]: + base_command = [ + pkg_resources.resource_filename(__name__, "bin/planner"), + "-d", + domain_filename, + "-p", + problem_filename, + "-g", + ] + return base_command + + def _capture_output(self, queue: Queue): + """This methods capture the output from a thread.""" + self.lock = True + result = [] + while True: + try: + # Capture msgs + line = queue.get(block=False) + result.append(line) + # print(line, end='') + except Empty: + # No more messages so... + # # Free the lock + # # return the result + self.lock = False + return result + + def _capture_std(self): + """This methods captures the output of STD from the thread.""" + return self._capture_output(self.std_q) + + def _capture_error(self): + """This methods captures the output of err from the thread.""" + return self._capture_output(self.err_q) + + def __del__(self): + return self.stop() + + def debug(self, problem: "up.model.AbstractProblem"): + """Initialize the debug process for a problem""" + self.problem = problem + assert isinstance(problem, HierarchicalProblem) + # Let's add the stopping action for an ending breakpoint + end_action = InstantaneousAction("siadex_debugger_stop") + self.problem.add_action(end_action) + self.problem.task_network.add_subtask(end_action) + + self.env = problem.env + self.converter = ConverterToPDDLString(problem.env, _get_pddl_name) + writer = HPDLWriter(problem, True) + self.temp_dir = tempfile.TemporaryDirectory() + domain_filename = os.path.join(self.temp_dir.name, "domain.hpdl") + problem_filename = os.path.join(self.temp_dir.name, "problem.hpdl") + writer.write_domain(domain_filename) + writer.write_problem(problem_filename) + cmd = self._get_cmd(domain_filename, problem_filename) + + self.process = subprocess.Popen( + cmd, + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + ) + + def output_reader(proc, outq): + for line in iter(proc.stdout.readline, b""): + outq.put(line.decode("utf-8")) + + def error_reader(proc, outq): + for line in iter(proc.stderr.readline, b""): + outq.put(line.decode("utf-8")) + + self.thread_std = threading.Thread( + target=output_reader, args=(self.process, self.std_q) + ) + self.thread_err = threading.Thread( + target=error_reader, args=(self.process, self.err_q) + ) + self.thread_std.start() + self.thread_err.start() + self.started = True + + # Create the ending breakpoint + self.add_break(end_action) + + def _run_command(self, command: str, parser=None): + """Run a command in the debugger""" + + if not self.process: + raise Exception("Debugger stopped") + + if self.process.poll() is not None: + raise Exception("Debugger stopped") + + if not self.started: + raise Exception("Please start the debugger first: debugger.debug(problem)") + + # If the process is locked running previous commands, lets wait until it has finnished + while self.lock: + time.sleep(0.5) + try: + # Lock the process + self.lock = True + + # Write the command in the input + self.process.stdin.write(f"{command}\n".encode()) + self.process.stdin.flush() + # Time to wait for the response + time.sleep(0.3) + + std = self._capture_std() + err = self._capture_error() + if parser: + return parser(self.problem, std, err) + else: + [print(msg, end="") for msg in std] + print("_" * 50) + [print(msg, end="") for msg in err] + except BrokenPipeError as error: + print("Error: ", error) + self.started = False + + def run(self, command: ICommand): + """Run a command""" + return self._run_command(command.cmd, command.parse) + + def force_run(self, command: str): + """Runs a string command""" + return self.run(STRCommand(command)) + + def eval_preconditions( + self, + node: Union[ + "up.model.Action", + "up.model.fnode.FNode", + "up.model.fluent.Fluent", + "up.model.parameter.Parameter", + bool, + ], + ) -> List[Dict[Union[Parameter, str], FNode]]: + """ + Evaluates a precondition on the actual state + """ + parameters = None + if isinstance(node, Action): + precondition = node.preconditions[0] + parameters = node.parameters + command = self.converter.convert(precondition) + elif isinstance(node, Fluent): + args = "" + for s in node.signature: + args += f"?{s.name} " + command = f"({node.name} {args})" + else: + precondition = node + command = self.converter.convert(precondition) + # print(precondition_exp) + return self.run(EvalCommand(command, parameters)) + + def apply_effect(self, effect: FNode): + """Apply an effect""" + command = self.converter.convert(effect) + self.run(EffectCommand(command)) + return self.run(StateCommand()) + + def list_break(self): + """List all breakpoints""" + return self.run(ListBreakCommand()) + + def add_break(self, node: Union[FNode, Fluent, InstantaneousAction, Task]): + """Set a breakpoint""" + if isinstance(node, FNode) and node.is_fluent_exp(): + name = node.fluent().name + params = [str(p).replace("-", "_") for p in node.args] + elif isinstance(node, Fluent): + name = node.name + params = [f"?{p.name}" for p in node.signature] + elif isinstance(node, Action) or isinstance(node, Task): + name = node.name + params = [f"?{p.name}" for p in node.parameters] + + self.run(BreakCommand(name, params)) + return self.run(ListBreakCommand()) + + def enable_break(self, iden: int): + """Enable a breakpoint""" + self.run(EnableBreakCommand(iden)) + return self.run(ListBreakCommand()) + + def disable_break(self, iden: int): + """Disable a breakpoint""" + if iden == 0: + return self.run(ListBreakCommand()) + self.run(DisableBreakCommand(iden)) + return self.run(ListBreakCommand()) + + def state(self) -> List: + """Returns a list of parametrized fluents that represents the actual state""" + return self.run(StateCommand()) + + def agenda(self) -> Dict[int, AgendaLine]: + """Returns the actual agenda""" + return self.run(AgendaCommand()) + + def agenda_tree(self): + agenda = self.agenda() + return self._print_tree(agenda, 0, "") + + def _print_tree(self, data, node_id, indentation): + node = data[node_id] + subtask_str = f'{node.subtask.task.name if node.subtask else "root"} {node.subtask.parameters if node.subtask else ""}' + print( + "{}{}: ({}) status: {}, expanded: {}".format( + indentation, node_id, subtask_str, node.status, node.expanded + ) + ) + for successor in node.successors: + self._print_tree(data, successor, indentation + " ") + + def continue_run(self): + return self.run(STRCommand("continue")) + + def continue_to(self, node: Union[FNode, Fluent, InstantaneousAction, Task]): + self.add_break(node) + return self.continue_run() + + def nexp(self, step: int = 1): + """Advance x steps in the debug process.""" + for _ in range(step): + self.run(STRCommand("nexp")) + + def next(self): + """Advance one step in the debug process.""" + return self.run(STRCommand("next")) + + def plan(self) -> SequentialPlan: + """Returns the actual plan""" + return self.run(PlanCommand()) + + def help(self): + return self.run(STRCommand("help")) + + def stop(self): + """Stops the debug process""" + self.started = False + if self.process: + self.process.terminate() + + if self.thread_err.is_alive(): + self.thread_err.join() + + if self.thread_std.is_alive(): + self.thread_std.join() + + if self.temp_dir: + self.temp_dir.cleanup() + print("Debugger stopped") diff --git a/up_siadex/siadex_planner.py b/up_siadex/siadex_planner.py index 51123f6..d50a218 100644 --- a/up_siadex/siadex_planner.py +++ b/up_siadex/siadex_planner.py @@ -10,21 +10,18 @@ import pkg_resources import unified_planning as up from unified_planning.engines import Credits, PDDLPlanner -from unified_planning.engines.pddl_planner import ( - run_command_asyncio, - run_command_posix_select, -) -from unified_planning.engines.results import ( - LogLevel, - LogMessage, - PlanGenerationResult, - PlanGenerationResultStatus, -) +from unified_planning.engines.pddl_planner import (run_command_asyncio, + run_command_posix_select) +from unified_planning.engines.results import (LogLevel, LogMessage, + PlanGenerationResult, + PlanGenerationResultStatus) from unified_planning.exceptions import UPException from unified_planning.io.hpdl.hpdl_writer import HPDLWriter from unified_planning.model import ProblemKind from unified_planning.model.htn.hierarchical_problem import HierarchicalProblem +from up_siadex import SIADEXDebugger + USE_ASYNCIO_ON_UNIX = False ENV_USE_ASYNCIO = os.environ.get("UP_USE_ASYNCIO_PDDL_PLANNER") if ENV_USE_ASYNCIO is not None: @@ -45,14 +42,13 @@ class SIADEXEngine(PDDLPlanner): def __init__(self): super().__init__(needs_requirements=True) - # def _check_requisites(self): # lib = subprocess.call(["which", "libreadline-dev"]) # py = subprocess.call(["which", "python2.7-dev"]) # if lib != 0 or py != 0: - # raise UPException("Package neededs on system: libreadline-dev, python2.7-dev") - + # raise UPException("Package neededs on system: libreadline-dev, python2.7-dev") + @staticmethod def name() -> str: return "SIADEX" @@ -71,6 +67,10 @@ def _get_cmd( ] return base_command + @staticmethod + def debugger(): + return SIADEXDebugger() + def _solve( self, problem: "up.model.AbstractProblem", @@ -206,19 +206,19 @@ def _plan_from_file( ) if res: try: - action_name = res.group(1)#.replace("_", "-") + action_name = res.group(1) # .replace("_", "-") action = problem.action(action_name) except Exception as e: action_name = action_name.replace("_", "-") action = problem.action(action_name) parameters = [] for param in res.group(2).split(): - param = param.replace("_", "-") - parameters.append( - problem.env.expression_manager.ObjectExp( - problem.object(param) - ) - ) + try: + obj = problem.object(param) + except Exception as e: + param = param.replace("_", "-") + obj = problem.object(param) + parameters.append(problem.env.expression_manager.ObjectExp(obj)) actions.append(up.plans.ActionInstance(action, tuple(parameters))) else: raise UPException( diff --git a/up_siadex/test/domain.hddl b/up_siadex/test/domain.hddl index 579a489..e52e940 100644 --- a/up_siadex/test/domain.hddl +++ b/up_siadex/test/domain.hddl @@ -1,114 +1,114 @@ -(define (domain transport) - (:requirements :negative-preconditions :typing :hierarchy) - (:types - location target locatable - object - vehicle package - locatable - capacity-number - object - ) - - (:predicates - (road ?l1 ?l2 - location) - (at ?x - locatable ?v - location) - (in ?x - package ?v - vehicle) - (capacity ?v - vehicle ?s1 - capacity-number) - (capacity-predecessor ?s1 ?s2 - capacity-number) - ) - - (:task deliver :parameters (?p - package ?l - location)) - (:task get-to :parameters (?v - vehicle ?l - location)) - (:task load :parameters (?v - vehicle ?l - location ?p - package)) - (:task unload :parameters (?v - vehicle ?l - location ?p - package)) - - (:method m-deliver - :parameters (?p - package ?l1 ?l2 - location ?v - vehicle) - :task (deliver ?p ?l2) - :ordered-subtasks (and - (get-to ?v ?l1) - (load ?v ?l1 ?p) - (get-to ?v ?l2) - (unload ?v ?l2 ?p)) - ) - - (:method m-unload - :parameters (?v - vehicle ?l - location ?p - package ?s1 ?s2 - capacity-number) - :task (unload ?v ?l ?p) - :subtasks (drop ?v ?l ?p ?s1 ?s2) - ) - - (:method m-load - :parameters (?v - vehicle ?l - location ?p - package ?s1 ?s2 - capacity-number) - :task (load ?v ?l ?p) - :subtasks (pick-up ?v ?l ?p ?s1 ?s2) - ) - - (:method m-drive-to - :parameters (?v - vehicle ?l1 ?l2 - location) - :task (get-to ?v ?l2) - :subtasks (and - (drive ?v ?l1 ?l2)) - ) - - (:method m-drive-to-via - :parameters (?v - vehicle ?l2 ?l3 - location) - :task (get-to ?v ?l3) - :ordered-subtasks (and - (get-to ?v ?l2) - (drive ?v ?l2 ?l3)) - ) - - (:method m-i-am-there - :parameters (?v - vehicle ?l - location) - :task (get-to ?v ?l) - :subtasks (and - (noop ?v ?l)) - ) - - (:action drive - :parameters (?v - vehicle ?l1 ?l2 - location) - :precondition (and - (at ?v ?l1) - (road ?l1 ?l2)) - :effect (and - (not (at ?v ?l1)) - (at ?v ?l2)) - ) - - (:action noop - :parameters (?v - vehicle ?l2 - location) - :precondition (at ?v ?l2) - :effect () - ) - - (:action pick-up - :parameters (?v - vehicle ?l - location ?p - package ?s1 ?s2 - capacity-number) - :precondition (and - (at ?v ?l) - (at ?p ?l) - (capacity-predecessor ?s1 ?s2) - (capacity ?v ?s2) - ) - :effect (and - (not (at ?p ?l)) - (in ?p ?v) - (capacity ?v ?s1) - (not (capacity ?v ?s2)) - ) - ) - - (:action drop - :parameters (?v - vehicle ?l - location ?p - package ?s1 ?s2 - capacity-number) - :precondition (and - (at ?v ?l) - (in ?p ?v) - (capacity-predecessor ?s1 ?s2) - (capacity ?v ?s1) - ) - :effect (and - (not (in ?p ?v)) - (at ?p ?l) - (capacity ?v ?s2) - (not (capacity ?v ?s1)) - ) - ) - -) +(define (domain transport) + (:requirements :negative-preconditions :typing :hierarchy) + (:types + location target locatable - object + vehicle package - locatable + capacity-number - object + ) + + (:predicates + (road ?l1 ?l2 - location) + (at ?x - locatable ?v - location) + (in ?x - package ?v - vehicle) + (capacity ?v - vehicle ?s1 - capacity-number) + (capacity-predecessor ?s1 ?s2 - capacity-number) + ) + + (:task deliver :parameters (?p - package ?l - location)) + (:task get-to :parameters (?v - vehicle ?l - location)) + (:task load :parameters (?v - vehicle ?l - location ?p - package)) + (:task unload :parameters (?v - vehicle ?l - location ?p - package)) + + (:method m-deliver + :parameters (?p - package ?l1 ?l2 - location ?v - vehicle) + :task (deliver ?p ?l2) + :ordered-subtasks (and + (get-to ?v ?l1) + (load ?v ?l1 ?p) + (get-to ?v ?l2) + (unload ?v ?l2 ?p)) + ) + + (:method m-unload + :parameters (?v - vehicle ?l - location ?p - package ?s1 ?s2 - capacity-number) + :task (unload ?v ?l ?p) + :subtasks (drop ?v ?l ?p ?s1 ?s2) + ) + + (:method m-load + :parameters (?v - vehicle ?l - location ?p - package ?s1 ?s2 - capacity-number) + :task (load ?v ?l ?p) + :subtasks (pick-up ?v ?l ?p ?s1 ?s2) + ) + + (:method m-drive-to + :parameters (?v - vehicle ?l1 ?l2 - location) + :task (get-to ?v ?l2) + :subtasks (and + (drive ?v ?l1 ?l2)) + ) + + (:method m-drive-to-via + :parameters (?v - vehicle ?l2 ?l3 - location) + :task (get-to ?v ?l3) + :ordered-subtasks (and + (get-to ?v ?l2) + (drive ?v ?l2 ?l3)) + ) + + (:method m-i-am-there + :parameters (?v - vehicle ?l - location) + :task (get-to ?v ?l) + :subtasks (and + (noop ?v ?l)) + ) + + (:action drive + :parameters (?v - vehicle ?l1 ?l2 - location) + :precondition (and + (at ?v ?l1) + (road ?l1 ?l2)) + :effect (and + (not (at ?v ?l1)) + (at ?v ?l2)) + ) + + (:action noop + :parameters (?v - vehicle ?l2 - location) + :precondition (at ?v ?l2) + :effect () + ) + + (:action pick-up + :parameters (?v - vehicle ?l - location ?p - package ?s1 ?s2 - capacity-number) + :precondition (and + (at ?v ?l) + (at ?p ?l) + (capacity-predecessor ?s1 ?s2) + (capacity ?v ?s2) + ) + :effect (and + (not (at ?p ?l)) + (in ?p ?v) + (capacity ?v ?s1) + (not (capacity ?v ?s2)) + ) + ) + + (:action drop + :parameters (?v - vehicle ?l - location ?p - package ?s1 ?s2 - capacity-number) + :precondition (and + (at ?v ?l) + (in ?p ?v) + (capacity-predecessor ?s1 ?s2) + (capacity ?v ?s1) + ) + :effect (and + (not (in ?p ?v)) + (at ?p ?l) + (capacity ?v ?s2) + (not (capacity ?v ?s1)) + ) + ) + +) diff --git a/up_siadex/test/domain.hpdl b/up_siadex/test/domain.hpdl index c0c0f33..9e80a67 100644 --- a/up_siadex/test/domain.hpdl +++ b/up_siadex/test/domain.hpdl @@ -5,7 +5,7 @@ :negative-preconditions :conditional-effects :universal-preconditions - :disjunctive-preconditions + :disjuntive-preconditions :equality :existential-preconditions ) diff --git a/up_siadex/test/problem.hddl b/up_siadex/test/problem.hddl index e3cfeff..572c748 100644 --- a/up_siadex/test/problem.hddl +++ b/up_siadex/test/problem.hddl @@ -1,27 +1,27 @@ -(define (problem p) - (:domain domain_htn) - (:objects - city-loc-0 city-loc-1 city-loc-2 - location - truck-0 - vehicle - package-0 package-1 - package - capacity-0 capacity-1 - capacity-number - ) - (:htn - :tasks (and - (deliver package-0 city-loc-0) - (deliver package-1 city-loc-2) - ) - :ordering ( ) - :constraints ( )) - (:init - (capacity-predecessor capacity-0 capacity-1) - (road city-loc-0 city-loc-1) - (road city-loc-1 city-loc-0) - (road city-loc-1 city-loc-2) - (road city-loc-2 city-loc-1) - (at package-0 city-loc-1) - (at package-1 city-loc-1) - (at truck-0 city-loc-2) - (capacity truck-0 capacity-1) - ) -) +(define (problem p) + (:domain domain_htn) + (:objects + city-loc-0 city-loc-1 city-loc-2 - location + truck-0 - vehicle + package-0 package-1 - package + capacity-0 capacity-1 - capacity-number + ) + (:htn + :tasks (and + (deliver package-0 city-loc-0) + (deliver package-1 city-loc-2) + ) + :ordering ( ) + :constraints ( )) + (:init + (capacity-predecessor capacity-0 capacity-1) + (road city-loc-0 city-loc-1) + (road city-loc-1 city-loc-0) + (road city-loc-1 city-loc-2) + (road city-loc-2 city-loc-1) + (at package-0 city-loc-1) + (at package-1 city-loc-1) + (at truck-0 city-loc-2) + (capacity truck-0 capacity-1) + ) +)