This is a modular Streamlit-based application designed to solve transportation optimization problems. It includes two main functionalities:
- Clark-Wright Savings Algorithm - Optimizes vehicle routing based on savings.
- Dijkstra's Algorithm - Solves the single-source shortest path problem for graphs with non-negative edge weights.
I have deployed this app at routing-app.streamlit.app, feel free to explore it without forking the repo

routing_app/
├── app.py # Entry point for the Streamlit app
├── algorithms/
│ ├── dijkstra.py # Implementation of Dijkstra's algorithm
│ ├── clark_wright.py # Implementation of Clark-Wright savings algorithm
├── navigation/
│ ├── dijkstra_page.py # UI logic for Dijkstra's algorithm
│ ├── clark_wright_page.py # UI logic for Clark-Wright algorithm
├── tests/
│ ├── test_clark_wright.py # Unit tests for Clark_wright algorithm
│ ├── test_dijkstra.py # Unit tests for Dijkstra's algorithm
│ ├── test_pages.py # Unit tests for redenring the pages
- Clone the repository or download the ZIP file.
- Navigate to the project directory.
- (Optional) Install pyenv
- pyenv helps manage locally installed versions of python, we'll be using 3.11 for this project
- After installing, ensure the correct version of python is installed:
$ pyenv install
- Verify:
$ python --version Python 3.11
- Create a virtual environment:
python3.11 -m venv ./env- Activate environment:
source ./env/bin/activate- You will know that this is successful if you see
(env)at the start of your shell prompt
Install dependencies:
pip install -r requirements.txtRun the application:
streamlit run app.pyRun tests We have pytest for running tests. Remember to activate your virtual environment first!
pytestThe app uses the following dependencies (see requirements.txt):
- Streamlit: For building the web interface.
- NumPy: For numerical computations.
- Pandas: For data processing.
- Pytest: For unit testing.
I developed this simple transportation optimization app, featuring Dijkstra and Clark-Wright routing algorithms, to address the challenges I encountered during my learning journey in SC0x Supply Chain Analytics by MITx CTL on EdX. The manual effort required for calculations, Excel interactions, and mapping made the process cumbersome and complex. Inspired by the insights gained from completing the MicroMaster credential and exposure to the CAVE app in the 275x Advanced Supply Chain Systems Planning and Network Design course, I created this app to automate calculations easily and make these algorithms more accessible. My goal is to help others overcome similar challenges and deepen their understanding of these optimization techniques. Thank you MIT CTL!