Skip to content

Commit

Permalink
Merge pull request #64 from toruseo/develop
Browse files Browse the repository at this point in the history
[Major update] Add taxi (shared mobility)
  • Loading branch information
toruseo committed Apr 25, 2024
2 parents b964261 + 4386aec commit 004e5af
Show file tree
Hide file tree
Showing 26 changed files with 3,966 additions and 218 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ The other people may be able to help.

`uxsim.py` is the core of the traffic flow simulation.
It must contain codes that are essential for simulation only.
If you have developed useful utilities, please consider to add them as a submodule like the current `ResultGUIViewer`.
If you have developed useful utilities, please consider to add them as a submodule like the current `Utilities`.
8 changes: 5 additions & 3 deletions .github/workflows/run-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install uxsim and dependencies
run: pip install .
run: |
python -m pip install --upgrade pip
pip install .
- name: Install pytest other dependencies
run: pip install pytest setuptools gymnasium torch osmnx
run: pip install pytest pytest-xdist setuptools gymnasium torch osmnx
- name: Run examples with pytest
run: pytest tests/test_examples.py --durations=0 -v
run: pytest -n auto tests/test_examples.py --durations=0 -v
8 changes: 5 additions & 3 deletions .github/workflows/verify-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ jobs:
with:
python-version: "3.12"
- name: Install uxsim and dependencies
run: pip install .
run: |
python -m pip install --upgrade pip
pip install .
- name: Install pytest other dependencies
run: pip install pytest pytest-rerunfailures setuptools
run: pip install pytest pytest-rerunfailures pytest-xdist setuptools
- name: Run verifications with pytest
run: pytest tests/test_verification_straight_road.py tests/test_verification_route_choice.py tests/test_verification_node.py tests/test_verification_exceptional.py tests/test_verification_sioux_falls.py tests/test_verification_multilane.py --durations=0 -v
run: pytest -n auto tests/test_verification_straight_road.py tests/test_verification_route_choice.py tests/test_verification_node.py tests/test_verification_exceptional.py tests/test_verification_sioux_falls.py tests/test_verification_multilane.py tests/test_verification_taxi.py --durations=0 -v
2 changes: 0 additions & 2 deletions README.jp.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# UXsim: Python製のマクロ・メソ交通流シミュレータ

[![PyPi](https://img.shields.io/pypi/v/uxsim.svg)](https://pypi.python.org/pypi/uxsim)
[![](https://tokei.rs/b1/github/toruseo/UXsim?style=flat&category=code&color=dddd22)](https://github.com/toruseo/UXsim)
[![](https://tokei.rs/b1/github/toruseo/UXsim?category=comments&style=flat&color=44cc44)](https://github.com/toruseo/UXsim/)
[![arXiv](https://img.shields.io/badge/arXiv-2309.17114-b31b1b.svg)](http://dx.doi.org/10.48550/arXiv.2309.17114)
[![Demo in Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/toruseo/UXsim/blob/main/demos_and_examples/demo_notebook_05en_for_google_colab.ipynb)
[![Static Badge](https://img.shields.io/badge/readme-English%20%F0%9F%87%BA%F0%9F%87%B8%20-%20darkblue)](https://github.com/toruseo/UXsim/blob/main/README.md)
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# UXsim: Network traffic flow simulator in pure Python

[![PyPi](https://img.shields.io/pypi/v/uxsim.svg)](https://pypi.python.org/pypi/uxsim)
[![](https://tokei.rs/b1/github/toruseo/UXsim?style=flat&category=code&color=dddd22)](https://github.com/toruseo/UXsim)
[![](https://tokei.rs/b1/github/toruseo/UXsim?category=comments&style=flat&color=44cc44)](https://github.com/toruseo/UXsim/)
[![Demo in Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/toruseo/UXsim/blob/main/demos_and_examples/demo_notebook_05en_for_google_colab.ipynb)
[![arXiv](https://img.shields.io/badge/arXiv-2309.17114-b31b1b.svg)](http://dx.doi.org/10.48550/arXiv.2309.17114)
[![Static Badge](https://img.shields.io/badge/readme-English%20%F0%9F%87%BA%F0%9F%87%B8%20-%20darkblue)](https://github.com/toruseo/UXsim/blob/main/README.md)
Expand All @@ -24,10 +22,11 @@ If you are interested, please see:
- Macroscopic traffic simulation: Simulating over 60000 vehicles in a city in 30 seconds
- Dynamic traffic assignment: Traffic flow simulation with a given network and time-dependent OD demand
- Theoretically valid models commonly used in academic/professional transportation research
- Implementation of traffic control/management schemes such as traffic signals and road pricing
- Implementation of traffic control/management schemes such as taxi/shared-mobility, traffic signals, road pricing, and so on
- Basic analysis of simulation results and their export to pandas.DataFrame and CSV files
- Visualization of simulation results using matplotlib; interactive GUI is available
- Flexible and customizable thanks to pure Python implementation; can also be directly integrated with other Python-based frameworks, such as PyTorch for deep reinforcement learning traffic control
- The main code `uxsim.py` is only about 1800 lines of code. Users may easily understand and customize it

## Simulation Examples

Expand Down
110 changes: 55 additions & 55 deletions demos_and_examples/demo_notebook_01en.ipynb

Large diffs are not rendered by default.

0 comments on commit 004e5af

Please sign in to comment.