Metropolis-Core is the Rust-based core of the METROPOLIS2 simulator.
Explore the docs »
Website
·
Report Bug
·
Request Feature
Table of Contents
METROPOLIS2 is a dynamic multi-modal agent-based transport simulator.
If you use this project in your research, please cite it as follows:
de Palma, A. & Javaudin, L. (2025). METROPOLIS2. https://metropolis2.org
Javaudin, L., & de Palma, A. (2024). METROPOLIS2: Bridging theory and simulation in agent-based transport modeling. Technical report, THEMA (THéorie Economique, Modélisation et Applications).
Refer to CITATION.cff and CITATION.bib for details.
Metropolis-Core make use of the Rust standard library and some awesome Rust crates, including:
- anyhow for error handling
- arrow / parquet for input / output operations
- clap for command line interface
- hashbrown for hash collections
- indicatif / log / simplelog for logging and progress bar
- num-traits for generic mathematics
- petgraph for graphs
- rayon for parallelization
Metropolis-Core is following Semantic Versioning 2.0.
Each new version is given a number MAJOR.MINOR.PATCH. An increase of the MAJOR number indicates backward incompatibilities with previous versions. An increase of the MINOR number indicates new features, that are backward-compatible. An increase of the PATCH number indicates bug fixes.
- Go to the Releases Tab and download the Zip file corresponding to your operating system (Windows, MacOS, or Linux).
- Extract the Zip file in a folder.
- The
metropolis cliexecutable (ormetropolis_cli.exefor Windows) is available in theexecsdirectory. You can move it to any location or your choice.
-
Install Rust, either using the official rustup installer or any package manager you may use.
-
Clone this repository on your PC, you can use "git clone", if you have git installed, like this:
git clone https://github.com/Metropolis2/Metropolis-Core.git
Otherwise in the right up side of the repository page you will see a download button, download the repository as zip and extract it in a folder.
-
Open a new terminal in the folder you extracted the repository in.
-
Run this command in the terminal:
cargo build --release -p metropolis-core
This can take a few minutes depending on your system, but be patient.
-
The
metropolis cliexecutable (ormetropolis_cli.exefor Windows) is now available in thetarget/release/directory.
Before running a METROPOLIS2 simulation with Metropolis-Core, you first need to create the simulation input which consists of a JSON file and multiple Parquet or CSV files.
Example input files are provided in the
examples/data/
directory, in CSV and Parquet version.
This files represent a simulation with no meaningful interpretation.
It makes use of all the possible input values so it is a great way to test if the simulator is
running properly.
Then, to run the simulation, open a terminal, locate the metropolis_cli executable and execute it
with (on Linux or MacOS):
./metropolis_cli [path_to_parameters.json]or (on Windows):
.\metropolis_cli.exe [path_to_parameters.json]For more details, please refer to the Documentation.
If you would like to add a feature to Metropolis-Core, start by opening an issue with the tag "enhancement" so that we can discuss its feasibility.
If your suggestion is accepted, you can then create a Pull Request:
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
For more details, please read CONTRIBUTING.md and CODE_OF_CONDUCT.md.
Metropolis-Core is free and open-source software licensed under the GNU General Public License v3.0.
You are free to:
- Modify and redistribute this software
- Use it for any purpose, personal or commercial
Under the following conditions:
- You retain the original copyright notice
- You distribute you modifications under the same license (GPL-3.0 or later)
- You document any significant changes you make
For the full license text and legal details, see the LICENSE.txt file.
If you have any questions, either post an issue or send an e-mail to any of these addresses:
- METROPOLIS2 team - contact@metropolis2.org
- Lucas Javaudin - metropolis@lucasjavaudin.com
Project Link: https://github.com/Metropolis2/Metropolis-Core
METROPOLIS2 takes its name and inspiration from the METROPOLIS simulator developed by André de Palma, Fabrice Marchal and Yurii Nesterov.
de Palma, A., Marchal, F., & Nesterov, Y. (1997). METROPOLIS: Modular system for dynamic traffic simulation. Transportation Research Record, 1607(1), 178-184.
