Stream is a mesoscopic traffic simulation tool, that is, a tool whose level of resolution is intermediate between microscopic and macroscopic levels. It also considers vehicles rather than a flow, but merely calculates the passing times of vehicles at the nodes of the road network, rather than calculating all its positions at fixed time steps. The advantages of this resolution method are (i) reduced computing times compared to microscopic, (ii) a reduced number of parameters with clear physical meaning facilitating the parameterization process compared to microscopic, (iii) a wide diversity of use cases far less restrictive than the macroscopic one.
- Event-based mesoscopic calculation core
- Upstream and shortest path static assignment
- Limited management * of different vehicle classes
- Complex node management
- Traffic light intersection management
- Specific lane management (reserved and auxiliary lanes)
- Dynamic regulation during simulation
The main contribution is made by the Cerema East-Central Department. If you have any questions, please send an email to the following address: aurelien.clairais@cerema.fr
Stream works under Anaconda for Python 3.9. With Anaconda, the use of virtual environments is recommended:
$ conda create --name myenv
$ conda activate myenv
The installation is done via cloning the directory followed by installing the package with pip
.
$ git clone https://github.com/AureClai/stream-python
$ cd stream-python
$ git checkout the_branch
$ pip install .
$ stream -i file_of_inputs.npy
From here, a new result
folder has been created in the folder containing the input file with the simulation results associated with the date and time in .npy
format. If a results folder has been pointed (see stream --help
on command line), the results will be saved in this folder.
from stream.main import run_simulation_from_inputs
import numpy as np
# Import the input file
Inputs = np.load("path_to_the_inputs_file.npy", allow_pickle=True).item()
Simulation = run_simulation_from_inputs(Inputs)
Here, the results are created in the form of a dictionary in the Simulation
variable.
$ stream-gui
The QGIS extension https://gitlab.cerema.fr/Stream/qstream allows:
- scenario definition
- analysis features
No known bugs. If you witness a bug, please open an "issue".
- Implementation of visualization tools with the Python
dash
library from Plotly - Management of variable output capacity
- Several assignment modes
- Dynamic speed regulation
- Access regulation
- Management of other types of input/output formats