Optimal Investments in Africa's Road Network - Replication Materials
# Optimal Investments in Africa's Road Network
Replication materials for the paper **Optimal Investments in Africa's Road Network**, preliminarily published as a Kiel Working Paper and World Bank Policy Research Working Paper. Please see the authors website for the latest version and publication status updates.
**Notes**
- The code is organized sequentially, but outputs from each script that are inputs to other scripts are saved under `data/` or `results/`. Thus, each script can be executed on its own, without the need to execute earlier scripts. Also within longer scripts important intermediate results are saved. This is usually indicated at the beginning of a section.
- Each script should be executed in a clean R session, due to global options being set in the scripts.
- Some computations can take long (1-2 days) and require significant memory (>= 30 GB). This pertains particularly to general equilibrium network optimization. I have added a note in the script whenever a computation takes long.
- I do not loop over all possible parameter configurations reported in the general equilibrium section. The total time to obtain all results is approx. 2 months on a strong server. Thus, users should exercise discretion and only replicate GE results of interest by setting the appropriate parameter values.
- For GE simulations install OptimalTransportNetworks.jl (v0.1.6 used, but later versions should work) or OptimalTransportNetworkToolbox (v1.0.4b). I used the MATLAB toolbox for most simulations, but Julia for the Trans-African Network simulations in Section 6.2 of the paper. In theory both libraries are equivalent, the Julia library is just relatively new and the dual model solution and autodifferentiation system is not as efficient in Julia (yet). But all results should be replicable using the Julia library, and a corresponding Julia code is provided for simulations run in MATLAB. Going forward, the Julia library will receive further development and autodifferentia …