Author: Zengjie Zhang (z.zhang3@tue.nl)
This project demonstrates the risk-aware allocation of real-time STL specifications for stochastic multi-agent systems, with restricted risk probabilities.
A complicated practical task usually requires the cooperation among multiple agents, which can be formulated as a multi-agent system (MAS) control problem. Formal language such as signal temporal logic (STL) specifications can be used to facilitate correctness or safety guarantees.
In many practical applications, the MAS is usually required to accomplish dynamically assign tasks during runtime. This requires the MAS to dynamically adjust the global cooperation protocol, namely to which agent a new task should be assigned. From the local perspective, the agent should reschedule its control strategy to accomplish the new task in the lowest possible risk.
Let us consider a multi-bus routing scenario in a tourism attraction point, as illustrated in Figure 1, where four bus terminals denoted as T-X, where X
Figure 1. A multi-bus routing scenario with dynamically assigned tasks.
In a risk-aware control framework, we formulate the physical model of each agent as a linear dynamic system with random dynamic noise and use a set of STL to describe the tasks. In this sense, risk is quantified by the probability that a certain STL task is not satisfied. The risk also serves as an evidence to support the decision-making of the robot whether it has the capability to accept a new task. Based on the risk measures of all agents, an auction-based task assignment algorithm dynamically assigns a new task to the agent that promises the least accomplishing risk. Then, this agent performs control synthesis using a tube-based shrinking-horizon model predictive control method. Please refer to our associated ArXiv article in https://arxiv.org/abs/2404.02111 for the theoretical details. This paper has been accepted by 2024 Conference on Decision and Control to be held in Milan, Italy, in December 16-19, 2024.
The probstlpy
library in this project is modified from the stlpy toolbox.
Operating system
- Windows (compatible in general, succeed on 11)
- Linux (compatible in general, succeed on 20.04)
- MacOS (compatible in general, succeed on 13.4.1)
Python Environment
- Python version: test passed on
python=3.11
- Required Packages:
matplotlib==3.9.0
numpy==1.26.4
scipy==1.14.0
treelib==1.7.0
control==0.10.0
(see Documentation)gurobipy==11.0.2
(license required, see How to Get a Gurobi License)
-
Install Python environment;
pip install .
-
Activate the
gurobi
license (See How To). Note that this project is compatible withgurobi
Released version11.0.1
. Keep yourgurobi
updated in case of incompatibility. -
Running Instructions
- Run the main script
example/main.py
; - Watch the terminal for runtime information;
- The figures will show up at the end of running; They are also automatically saved in the root directory;
- The figures may impede each other; Drag the figures for a better view;
- Check out the logging file
INFO.log
for the runtime information.
- Run the main script
Feel free to try out the code with different parameter settings in the src/utils/config.py
file.
- Change the coordinates of the regions in this file to construct a different map;
- Change the standard deviation variable
Sigma
for different noise levels; - Change the initial position of the robot in
x0
; - Customize the lists of runtime specifications
specs
and their instants intimes
for various tasks.
This project is with a BSD-3 license, refer to LICENSE
for details.