- Company: Codtech IT Solutions Private Limited
- Name: Abhishek Sharma
- Intern ID: CTIS9913
- Domain: Data Science
- Duration: 6 Weeks
The END-TO-END SUPPLY CHAIN TRANSPORTATION COST OPTIMIZATION SYSTEM is an End-to-End Data Science and Operations Research project developed as part of the Data Science Internship Program at Codtech IT Solutions Private Limited. This project demonstrates the complete optimization workflow, starting from understanding the business problem and preparing datasets to building a Linear Programming model, solving the optimization problem using PuLP, analyzing the generated solution, creating visualizations, and documenting the complete project.
The primary objective of this project is to determine the most cost-effective transportation plan for distributing products from multiple warehouses to multiple retail stores while satisfying all business constraints. Instead of predicting future outcomes as in traditional Machine Learning projects, this project focuses on identifying the optimal decision that minimizes the total transportation cost while fulfilling customer demand and respecting warehouse supply capacities.
The project applies Operations Research concepts and Linear Programming techniques to solve a real-world supply chain optimization problem. By integrating mathematical modeling with Python programming, the system automatically determines the optimal shipment quantity between warehouses and customer locations. The implementation also includes dataset analysis, optimization result visualization, CSV report generation, business insight extraction, and project documentation, demonstrating how optimization techniques can support intelligent business decision-making in logistics and supply chain management.
The project uses three business datasets representing a transportation network.
- supply_data.csv
- demand_data.csv
- transportation_costs.csv
The datasets contain information about warehouse capacities, customer demand requirements, and transportation costs between warehouses and retail stores.
- Mumbai
- Delhi
- Ahmedabad
- Jaipur
- Surat
- Pune
- Indore
Supply Dataset
- Warehouse
- Available Supply
Demand Dataset
- Store
- Required Demand
Transportation Cost Dataset
- Warehouse
- Store
- Transportation Cost per Unit
The total available warehouse supply equals the total customer demand, making the transportation optimization problem balanced and suitable for Linear Programming.
The primary objectives of this project are:
- To understand the fundamentals of Operations Research and Linear Programming.
- To formulate a transportation cost optimization problem mathematically.
- To build an optimization model using the PuLP Python library.
- To minimize the total transportation cost while satisfying supply and demand constraints.
- To analyze transportation routes and shipment allocations.
- To generate optimization reports and business insights.
- To visualize optimization results using charts and graphs.
- To demonstrate the practical application of optimization techniques in supply chain management.
- Python
- Pandas
- NumPy
- Matplotlib
- Seaborn
- PuLP
- NetworkX
- Jupyter Notebook
The project follows a structured Optimization and Data Science workflow consisting of multiple stages.
The transportation optimization problem is studied to understand warehouse capacities, customer demand, transportation routes, and business constraints. The objective is clearly defined as minimizing transportation cost while satisfying operational requirements.
Three business datasets are used to represent the transportation network.
The datasets include:
- Warehouse supply information
- Customer demand information
- Transportation cost matrix
The datasets are loaded using Pandas and prepared for optimization.
Before building the optimization model, the datasets are analyzed to understand the transportation network.
The analysis includes:
- Dataset overview
- Supply validation
- Demand validation
- Transportation cost analysis
- Data consistency verification
This stage ensures that the optimization model receives accurate and reliable business data.
The transportation problem is converted into a mathematical optimization model.
The formulation consists of:
- Decision Variables
- Objective Function
- Supply Constraints
- Demand Constraints
- Non-Negativity Constraints
This mathematical representation forms the foundation of the optimization process.
The optimization model is developed using the PuLP library.
The implementation includes:
- Creating the optimization problem
- Defining decision variables
- Building the objective function
- Applying supply constraints
- Applying demand constraints
- Solving the optimization model
The solver automatically identifies the least-cost transportation plan.
After solving the optimization model, the generated solution is analyzed.
The analysis includes:
- Optimal shipment allocation
- Transportation route selection
- Minimum transportation cost
- Supply utilization
- Demand fulfillment
Optimization outputs are exported as CSV files for future reference.
Multiple visualizations are generated to simplify interpretation of the optimization results.
The project generates:
- Supply Distribution Chart
- Demand Distribution Chart
- Shipment Heatmap
- Transportation Network Visualization
- Transportation Cost Analysis
These visualizations help explain the optimization results through graphical representation.
The final stage includes project documentation, debugging, dependency management, and GitHub deployment.
The project is organized with a professional folder structure, README documentation, requirements.txt, datasets, outputs, and source code to ensure reproducibility and ease of use.
Let
xᵢⱼ represent the quantity transported from warehouse i to store j.
Minimize the total transportation cost.
Minimize Z = Σ (Transportation Cost × Shipment Quantity)
Supply Constraints
Total shipments from each warehouse
≤ Available warehouse supply
Demand Constraints
Total shipments received by each store
= Customer demand
Non-Negativity Constraints
Shipment Quantity ≥ 0
Supply_Chain_Transportation_Optimization/
│
├── data/
│ ├── supply_data.csv
│ ├── demand_data.csv
│ └── transportation_costs.csv
│
├── outputs/
│ ├── supply_chart.png
│ ├── demand_chart.png
│ ├── shipment_heatmap.png
│ ├── shipment_network.png
│ ├── optimal_shipments.csv
│ └── transportation_cost_summary.csv
│
├── src/
│ └── optimization_model.py
│
├── Supply_Chain_Optimization.ipynb
├── requirements.txt
├── README.md
└── .gitignore
pip install -r requirements.txtjupyter notebookOpen:
Supply_Chain_Optimization.ipynb
Run all notebook cells sequentially.
Alternatively, execute the reusable Python module directly.
python src/optimization_model.pyThe project successfully demonstrates the implementation of an End-to-End Supply Chain Transportation Cost Optimization System using Linear Programming and PuLP.
The optimization model determines the least-cost transportation plan while satisfying all warehouse supply capacities and customer demand requirements.
Minimum Transportation Cost: 1950
| Warehouse | Jaipur | Surat | Pune | Indore |
|---|---|---|---|---|
| Mumbai | 0 | 0 | 130 | 20 |
| Delhi | 100 | 0 | 0 | 100 |
| Ahmedabad | 0 | 120 | 0 | 60 |
The project automatically generates:
- Optimal Shipment CSV
- Transportation Cost Summary
- Supply Distribution Chart
- Demand Distribution Chart
- Shipment Heatmap
- Transportation Network Graph
Key findings obtained from the optimization model include:
- All customer demand requirements are successfully satisfied.
- Total transportation cost is minimized while maintaining all operational constraints.
- Ahmedabad to Surat is identified as the most economical transportation route.
- Mumbai primarily serves Pune because of its relatively lower transportation cost.
- Delhi efficiently supplies Jaipur and Indore within the optimal solution.
- Warehouse capacities are utilized efficiently since total supply equals total demand.
- The optimized transportation plan provides valuable decision support for logistics planning and cost reduction.
This project successfully fulfills the requirements of an End-to-End Supply Chain Transportation Cost Optimization System by integrating Operations Research principles, Linear Programming, and Python-based optimization into a complete workflow. The implementation demonstrates how mathematical optimization techniques can be applied to solve practical business problems involving logistics and supply chain management.
The project covers every stage of the optimization lifecycle, including business problem understanding, dataset preparation, mathematical formulation, optimization model development, solution generation, visualization, documentation, and deployment. By combining data analysis with optimization techniques, the project provides an efficient and scalable solution for transportation planning while minimizing operational costs.
Overall, this project serves as a practical demonstration of how Data Science and Operations Research can work together to support intelligent business decision-making and improve supply chain efficiency through optimization.