This simple program computes traffic assignments using the FW method. BPR cost function is assigned as a major cost function method.
Our code is tested for various networks available on TransportationNetworks.
Our program has been tested for all the networks for which a solution is available on TransportationNetworks and has always obtained the correct solution.
-
Download a Python file ("ComputeTrafficAssignment.py")
-
Insert Network_file (CSV format) & Demand_file (CSV format) in " import_network " function as inputs
-
Determine the file path for the total cost in the " reportTotalCost " function
-
Determine file path for final flow in the " reportFlow " function
-
Run the program
Networks and demand files must be specified in the CSV data format.
A thorough description of the CSV format and a wide range of real transportation networks to test the algorithm on is available at TransportationNetworks.
Several well-known networks’ CSV data format has been provided in the CSV_networks folder.
All the networks I used to test the algorithm’s correctness are available at TransportationNetworks.
The entire program is written by Ashkan Fouladi (fooladiashkang@gmail.com) & Vahid Noroozi (vahidnoroozi1994@yahoo.com).