Pruning project for MAPF
- We don't allow for:
- Vertex Conflicts
- Swap Conflicts
- We start by using the single agent shortest paths
- And throw away all verticies that aren't part of these plans
- Then when combining these leads to a conflict we:
- Find the verticies where the conflict(s) occur
- Expand our selection of verticies to all cells reachabe by 1 from the conflict cells
- Try solving again ...
We provided a python script which uses the clingo API to execute our pruning approach.
For provding the MIF input file and values for the EXPANSION_HORIZON
as well as the TIME_HORIZON
just modify the constants in lines 11-13
of the (solving.lp)[encoding/solving.lp] encoding file.
Then for executing our approach you can just run this on your command line.
python3 enconding/main.py
Necessary libraries are:
- clingo
These can be installed using pip:
pip install clingo
The output of our encoding is provided in asprilo format to aid easy visualization using the asprilo visualizer.
- Actions:
occurs(object(robot,ID),action(move,(DX,DY)),TIMESTEP).
- Agent-Positions:
position(object(robot,ID),value(at,(X,Y)), TIMESTEP).
- CPU:
Intel i5 13600K
- RAM:
32GB DDR5
- GPU:
NVIDIA GeForce RTX 4070 Ti
- SYSTEM:
Ubuntu 23.04
- Timeout:
600 seconds
- Time Horizon:
40 time steps
Instance | grid size | agents | Solving time (no pruning) in s | Solving time (with pruning) in s |
---|---|---|---|---|
test_s5_a1_smol | ||||
test_s5_a2_detour | ||||
test_s5_a2_exchange(hard) | ||||
test_s5_a2_square | ||||
test_s4x2_a6_exchange | ||||
maze_s10_a25 | UNSAT | TIMEOUT | ||
maze_s10_a30 | UNSAT | TIMEOUT | ||
random_s10_a15_c50 | ||||
random_s10_a20_c55 | ||||
room_s10_a15_w1 | ||||
room_s10_a30_w5 |
The solving time of the pruning approach could probably also be generally reduced further, if instead of just solving when new nodes are expanded, it is ensured that all conflict nodes are expanded before calling the solver. This is due to the most time during the execution of our approach being spent by the solver. So by making sure that every conflict node is expanded we reduce the amount of solver calls and thus the total runtime.
It can genrallay be observed that our pruning approach takes more time than just simply solving the instance. This is due to the high amount of solver calls that have to be made because we are incrementally increasing the amount of nodes. This leads to a large computaion overhead that reflects in our results.
The only instances that where our approach was able to improve on the general solving strategy were the two maze benchmarks (maze_s10_a25
, maze_s10_a30
). In the results table above you can see that both are listed as UNSAT
which is due to there only being a solution with a minimal time horizon of 68
. So when we compute these benchmarks again with this time horizon we get the results below:
Instance | grid size | agents | Solving time (no pruning) in s | Solving time (with pruning) in s |
---|---|---|---|---|
maze_s10_a25 | 2580.906s | 2405.3621s | ||
maze_s10_a30 | 1575.236s | 1184.8219s |
Here we can see some small improvements performance wise in the pruning approach. We suspect that for more difficult benchmarks with more nodes to prune this behavior could continue. But as it is observable now from our current benchmark selection the performance gains to be had only occur in very few cases and else often worsen the performance.
An idea could be to redefine the time steps to not only expand one new node at a time, but for every different collision node expand the grid by one step in each legal (reachable) direction.
Another appproach that could improve our pruning's performance would be to keep crutial context infiormation between solver calls. This would probably prove very difficult to implement though.
TypeError: arguments did not match any overloaded call:
QRect(): too many arguments
QRect(int, int, int, int): argument 1 has unexpected type 'float'
QRect(QPoint, QPoint): argument 1 has unexpected type 'float'
QRect(QPoint, QSize): argument 1 has unexpected type 'float'
QRect(QRect): argument 1 has unexpected type 'float'
Aborted (core dumped)
- Solved by using a Python 3.9 venv