Online repository for the AAMAS 2018 papers "Collective Adaptation through Concurrent Planning: the Case of Sustainable Urban Mobility" and "CARPooL: Collective Adaptation using concuRrent PLanning".
This documentation aims to explain how the planning experiments in the smart mobility domain can be run.
To run the experiments for this domain, you have to download/clone the Temporal Planning repository:
git clone https://github.com/aig-upf/temporal-planning.git
Follow the instructions to compile the contents of this repository.
It is important that you have all folders (universal-pddl-parser
, temporal-planning
, smart-carpooling-demo
, VAL
) in the same path.
The installation of the following Python libraries is required to execute the tools contained in this repository:
You can install all of them at once using the following command:
pip install flask flask-cors geopy openpyxl parse queuelib
To test if everything has been correctly installed, you can follow this section. The file you will be running is called solver.py
(inside the solver
folder):
solver.py [-h] [--json] [--geojson] [--time TIME] [--memory MEMORY] config
where:
-h
- shows help.--json
- whether the solution has to be converted into JSON format.--geojson
- whether the solution has to be converted into GeoJSON format (used by a visualizer).--time
- the amount of time (in seconds) during which the planner will run. Default: 3600s.--memory
- the maximum amount of memory (in MiB) used by the planner. Default: 4096 MiB.config
- the path to a configuration/problem file. The format of these files is explained here.You can use the configuration file config.json
placed in solver/config
. You just have to open the smart-carpooling-demo
folder and run the following command:
./solver/solver.py --json --geojson solver/config/config.json
By running the previous command, you will see the following process:
tmp_sas_plan.json
).cooperative_tmp_sas_plan.geojson
). This file can be later used by a visualizer (explained later).The Collective Adaptation Engine (CAE) code is contained inside the collective-adaptation-engine
folder. It is written in Java and it requires version 8 to run. You can directly import this folder from Eclipse.
This module automatically calls all the previous modules described in the previous section. The class you need to run to is CollectiveMobility.java
.
The execution consists of several runs. Each run follows this process:
Once all runs have been executed, the overall statistics are exported to two files: dataEvaluationCollective.csv
and dataEvaluationSelfish.csv
. The meaning of their columns is the following:
id
- number of run.dv1
- number of vehicles involved.dv2
- number of passenger involved.dv3
- execution time of the adaptation.dv4
- average of meters done by vehicles.dv5
- average of meters done by passengers walking.dv6
- total number of used agents used including the car pool company.Mobility problems are specified using the JSON format. These problems are later converted into PDDL problems that can be solved by a temporal planner. A mobility problem written as JSON specifies the following fields:
map_path
- the path to the input OpenStreetMap.map_boundaries
- object containing defining a rectangular area to analyse inside the map:min_latitude
- minimum latitude.max_latitude
- maximum latitude.min_longitude
- minimum longitude.max_longitude
- maximum longitude.solution_type
- specifies whether the solution must be collective
(agents may interact) or selfish
(agents cannot interact).pedestrians
- list of the pedestrians/passengers in the problem. Each contains the following fields:id
- a unique identifier.init_pos
- OSM label of its initial position.target_pos
- OSM label of its target position.walk_range
- maximum distance it can walk away from its origin and target positions.carpools
- list of carpools in the problem. Each contains the following fields:id
- a unique identifier.init_pos
- OSM label of its initial position.target_pos
- OSM label of its target position.blocked_streets
- list of blocked streets in the problem. Each contains the following fields:init_pos
- OSM label of its initial position.target_pos
- OSM label of its target position.blocked_frontiers
- list of blocked frontiers. Each frontier is either specifies the field latitude
or the field longitude
.You can find examples of these files inside the solver/config
folder.
The visualizer supports the following functionalities:
The following list shows what each of the navigation buttons does:
Play
- each of step in the plan is automatically displayed one after the other. Each state is shown for one second.Pause
- stops the automatic displaying of the plan.Next
- shows the next state in the plan.Restart
- resets the visualizer to the first state (blocked streets are kept).Generate scenario
- generates a new carpooling scenario.Send current state
- the current state of the scenario is sent to the solver to get an updated solution, e.g. to resolve new adaptation issues (blocked streets).To use the different functionalities of the visualizer, you must run the service.py
file of the solver
folder:
./solver/server.py
This file opens uses the port 5000
to receive the calls from the visualizer.
You can see a demo of the visualizer in the following link.
The code for creating and solving smart mobility problems has been written by:
Bucchiarone, A., Furelos-Blanco, D., Jonsson, A., Khandokar, F., and Mourshed, M. (2018). Collective Adaptation through Concurrent Planning: the Case of Sustainable Urban Mobility. Proc. of the 17th International Conference on Autonomous Agents and Multiagent Systems
(AAMAS 2018).
Furelos-Blanco, D., Bucchiarone, A., and Jonsson, A. (2018). CARPooL: Collective Adaptation using concuRrent PLanning. Proc. of the 17th International Conference on Autonomous Agents and Multiagent Systems
(AAMAS 2018).