Examples

We present here a list of notebooks recommended to start with unified-planning.

Basic Example

Open In GitHub Open In Colab

In this notebook we show the basic usage of the unified planning library.

In particular we will go through the following steps:

  • create a classical planning problem;

  • call a planner to solve the problem;

  • go beyond plan generation showing how to validate a plan and how to ground a planning problem;

  • call multiple planners in parallel.

Optimal Planning

Open In GitHub Open In Colab

In this notebook we show how to define a problem with an Optimality metric and how to get a solver that gives the optimal solution regarding the given metric.

Temporal Planning

Open In GitHub Open In Colab

In this notebook we show how to use the unified planning library to model temporal problems.

In particular we model the well-known MatchCellar problem and we call a planner to solve it.

Simple Multi-Agent Planning Problem

Open In GitHub Open In Colab

In this notebook shows how to use the unified planning library to model simple multi-agent problems and what heuristics the planner supports.

Depot Multi-Agent Planning Problem

Open In GitHub Open In Colab

In this notebook we show how to use the unified planning library to model multi-agent problems. In particular we model the well-known Depot problem and we call a planner to solve it.

Simulated Effects

Open In GitHub Open In Colab

In this notebook we show the simulated effects usage in the unified planning library.

In particular, we exploit the use of a simulated effects to model the battery consumption of a robot during a movement defining a function in Python code.

Compilers

Open In GitHub Open In Colab

In this notebook we show the usage of the operation mode “Compiler”, explaining how to use a compiler and how to take a plan written for the compiled problem and create the equivalent plan for the original problem.

Oversubscription Planning and MetaEngine Usage

Open In GitHub Open In Colab

In this notebook we define an oversubscription planning problem and we solve it using a MetaEngine.

Hierrachical Planning

Open In GitHub Open In Colab

In this notebook, we show how to use unified planning library to define hierrachical planning problem.

Sequential Simulator

Open In GitHub Open In Colab

In this notebook, we show how to use the SequentialSimulator.

The simulator is used to:

  • check action applicability in a state

  • see the state created by an action application

  • inspect fluents values during a plan execution

  • evaluate quality metrics during plan execution

Planning Engine Integration

Open In GitHub Open In Colab

In this notebook we create a new planning engine for the “OneshotPlanner” operation mode, we register the new planner in the UP library and we test it on a simple problem.

PDDL I/O

Open In GitHub Open In Colab

In this notebook we show how to parse a problem from PDDL in the unified_planning and how to write a unified_planning problem in PDDL.

MA-PDDL Writer

Open In GitHub Open In Colab

In this notebook we show how to write a unified_planning problem in MA-PDDL.