Step 5: Run scenario comparison
We are ready now to run scenario comparison much like in Part 1, but this time using external scenario files.
Prepare example data
Download and save the example scenarios from
the https://github.com/amalgama-llc/supply-chain-tutorial-part-2/tree/main/scenarios
folder
to the local scenarios
folder.
Check the result
Start the program.
The updated main()
method runs an experiment for each example scenarios from the scenarios
folder.
Here is the output you should get printed:
Scenario Trucks count SL Expenses Expenses/SL scenario.json 1 57,14% $ 420,00 $ 7,35 scenario1.1.json 2 0,69% $ 112 055,08 $ 162 683,60 scenario1.2.json 4 66,65% $ 169 545,00 $ 2 543,97 scenario1.3.json 6 86,05% $ 201 655,00 $ 2 343,60 scenario2.json 2 0,44% $ 111 904,34 $ 255 461,63 scenario3.json 3 56,45% $ 128 115,00 $ 2 269,71 scenario4.json 18 0,43% $ 77 588,13 $ 181 556,22
Scenarios 1.1-1.3 use the same road graph and are only different in the number of trucks, so we can see how adding new trucks affects the simulation results.