https://github.com/voschezang/project-agent-based-modelling
Agent Based Modelling of Traffic
https://github.com/voschezang/project-agent-based-modelling
simulation
Last synced: 3 days ago
JSON representation
Agent Based Modelling of Traffic
- Host: GitHub
- URL: https://github.com/voschezang/project-agent-based-modelling
- Owner: voschezang
- License: mit
- Created: 2019-01-10T08:31:59.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-10T10:10:55.000Z (over 7 years ago)
- Last Synced: 2025-02-24T00:24:51.778Z (over 1 year ago)
- Topics: simulation
- Language: Jupyter Notebook
- Homepage:
- Size: 1.76 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Traffic flow model
An Agend-Based Model (ABM) used to study the emergence of traffic jams on highways.

# Setup
### Using `make`
Make sure that `pip`/`pip3` is installed (python version >= 3.6).
On Mac or Linux run the following commands in your terminal. On Windows you may have to install [make](http://gnuwin32.sourceforge.net/packages/make.htm) for PowerShell .
```
git clone https://github.com/voschezang/ABM
cd ABM
make deps
```
### (Alternative) Manual setup
Install all packages listed in `requirements.txt`. Shortcut: `pip3 install -r requirements.txt`
# Run simulation
Start server and run a simulation in your browser
```
make run
```
### (Alternative) Manually run progam
Use an IDE or, depending on your python installation, use one of
```
python3 run.py
python run.py
pythonw run.py
```
## Run analysis
Open `analysis.ipynb` with jupyter notebook.
# Basic agent rules
### Nagel-Schreckenberg rules
- Accelerate if agent is not driving at maximum speed
- Slow down if another car is in front of agent (within range)
- Disable backwards movement
### Extended rules
- Overtake any car in front of agent (if possible)
- else, go to right lane (if possible)