Traffic Flow Modelling Thesis
Source code for python based traffic flow modelling simulation for Cranfield University individual research project
Model Capabilities
- Network
- Any number of junctions
- Junctions are n in, m out
- Any number of sources and sinks
- Error messages for incorrect usage
- Write simulation run info text file
- Split
main.py
to input map file and parameter fileparams.txt
- Numerical
- Spatial reconstruction
- 1st and 2nd order
- MUSCL 2nd and 3rd order, with 15 slope limiter options
- WENO 3rd, 5th and 7th (monotonicity preserving bounds) order
- Riemann solvers / numerical flux calculations
- Lax-Friedrichs
- Rusanov
- HLL
- Murman-Roe
- Classic 4th order Runge-Kutta update scheme
Ideas / Future Capabilities
- Traffic distribution matrix could be a function of time for different preferences throughout a working day
- Runge-Kutta error adaptive global time step size
- Density gradient adaptive local spatial step size
File Breakdown
.idea
(folder) : Python project filesvenv
(folder) : Python virtual environment librariesMUSCLReconstruction.py
: MUSCL reconstruction functionsREADME.md
: Project and repository information markdown fileTFM_Network_Pseudocode.txt
: A general structure plan for the whole programWENOReconstruction.py
: WENO reconstruction functionsdefine_map.py
: User input define road network and junctions (Python)density_plot.m
: Visualise and verify solution/numerical calculations (MATLAB)main.py
: Flow modelling program (Python)params.txt
: Simulation JSON parameter file read in bymain.py