Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs Pull Request - 260123 #564

Merged
merged 5 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/interoperability.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ In order to make the library immediately usable for people having existing code
PDDL/MAPDDL/HDDL reader and writer
----------------------------------

The library offers a comprehensive and well-tested parser for PDDL 2.1 level 3 (i.e. up to temporal planning without continuous change). The parser can be invoked as shown in the example below and can be used either to parse a whole planning instance (i.e. a domain and a problem), or just to porsche the domain file, resulting in an incomplete ``Problem`` object that can be completed using the UP API as shown below. This latter use-case allows to model the action schemata using PDDL and then formulate the problem(s) using the UP (possibly using data available at runtime for doing so).
The library offers a comprehensive and well-tested parser for PDDL 2.1 level 3 (i.e. up to temporal planning without continuous change). The parser can be invoked as shown in the example below and can be used either to parse a whole planning instance (i.e. a domain and a problem), or just to parse the domain file, resulting in an incomplete ``Problem`` object that can be completed using the UP API as shown below. This latter use-case allows to model the action schemata using PDDL and then formulate the problem(s) using the UP (possibly using data available at runtime for doing so).

.. literalinclude:: ./code_snippets/pddl_interop.py
.. literalinclude::
miquelramirez marked this conversation as resolved.
Show resolved Hide resolved
:caption: PDDLReader example
:lines: 12-16
:lines: 2,11-16

.. literalinclude:: ./code_snippets/pddl_interop.py
:caption: PDDLReader with domain file and problem populated using UP
Expand Down
24 changes: 11 additions & 13 deletions docs/notebooks/03-temporal-planning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,7 @@
"]\n",
"\n",
"goals = [\n",
"]\n",
"\n",
"\n"
"]\n"
]
}
],
Expand Down Expand Up @@ -426,15 +424,15 @@
"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_environment().credits_stream = None`\n",
"\u001b[0m\u001b[96m *** Credits ***\n",
"\u001b[0m\u001b[96m * In operation mode `OneshotPlanner` at line 1 of `/tmp/ipykernel_153164/3087807287.py`, \u001b[0m\u001b[96myou are using the following planning engine:\n",
"\u001b[0m\u001b[96m * Engine name: Tamer\n",
"\u001B[96m\u001B[1mNOTE: To disable printing of planning engine credits, add this line to your code: `up.shortcuts.get_environment().credits_stream = None`\n",
"\u001B[0m\u001B[96m *** Credits ***\n",
"\u001B[0m\u001B[96m * In operation mode `OneshotPlanner` at line 1 of `/tmp/ipykernel_153164/3087807287.py`, \u001B[0m\u001B[96myou are using the following planning engine:\n",
"\u001B[0m\u001B[96m * Engine name: Tamer\n",
" * Developers: FBK Tamer Development Team\n",
"\u001b[0m\u001b[96m * Description: \u001b[0m\u001b[96mTamer offers the capability to generate a plan for classical, numerical and temporal problems.\n",
" * For those kind of problems tamer also offers the possibility of validating a submitted plan.\u001b[0m\u001b[96m\n",
"\u001b[0m\u001b[96m\n",
"\u001b[0mTamer returned:\n",
"\u001B[0m\u001B[96m * Description: \u001B[0m\u001B[96mTamer offers the capability to generate a plan for classical, numerical and temporal problems.\n",
" * For those kind of problems tamer also offers the possibility of validating a submitted plan.\u001B[0m\u001B[96m\n",
"\u001B[0m\u001B[96m\n",
"\u001B[0mTamer returned:\n",
"0.0: light_match(m1) [6.0]\n",
"0.01: mend_fuse(f1) [5.0]\n",
"6.01: light_match(m2) [6.0]\n",
Expand All @@ -449,9 +447,9 @@
" result = planner.solve(problem)\n",
" plan = result.plan\n",
" if plan is not None:\n",
" print(\"%s returned:\" % planner.name)\n",
" print(f\"{planner.name} returned:\")\n",
" for start, action, duration in plan.timed_actions:\n",
" print(\"%s: %s [%s]\" % (float(start), action, float(duration)))\n",
" print(f\"{float(start)}: {action} [{float(duration)}]\")\n",
" else:\n",
" print(\"No plan found.\")"
]
Expand Down