This tool helps in selecting the most suitable mode of transportation based on cost, time, and emissions for a given distance and weight of cargo.
The Transportation Mode Selection Tool is a web application that allows users to input the distance and weight of their shipment and receive recommendations on the best transportation mode to use. The recommendations are based on minimizing total cost, total time, and total emissions.
To install and run the Transportation Mode Selection Tool locally, follow these steps:
Clone the repository:
git clone https://github.com/nkusharoraa/transportation_mode_selection_tool.git
cd transportation_mode_selection_tool
Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
Install the required packages:
pip install flask flask_sqlalchemy pandas
Ensure the transport_modes.csv
file is present in the root directory of the project. This file contains the initial data for different transportation modes.
Initialize the database and start the application:
python app.py
Open your web browser and go to http://127.0.0.1:5000/
.
Enter the distance and weight of your shipment and click “Get Recommendation”.
View the recommendations for the most suitable transportation mode.
The initial data for transportation modes is stored in a CSV file named transport_modes.csv
. This file should have the following format:
mode,cost_per_mile,time_per_mile,emissions_per_mile
Road,0.5,0.1,0.02
Rail,0.3,0.08,0.01
Air,1.5,0.02,0.05
Sea,0.2,0.05,0.01