Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

END-TO-END SUPPLY CHAIN TRANSPORTATION COST OPTIMIZATION SYSTEM USING LINEAR PROGRAMMING AND PULP

Internship Details

  • Company: Codtech IT Solutions Private Limited
  • Name: Abhishek Sharma
  • Intern ID: CTIS9913
  • Domain: Data Science
  • Duration: 6 Weeks

Project Overview

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.


Dataset Information

The project uses three business datasets representing a transportation network.

Dataset Files

  • supply_data.csv
  • demand_data.csv
  • transportation_costs.csv

Dataset Description

The datasets contain information about warehouse capacities, customer demand requirements, and transportation costs between warehouses and retail stores.

Warehouses

  • Mumbai
  • Delhi
  • Ahmedabad

Retail Stores

  • Jaipur
  • Surat
  • Pune
  • Indore

Dataset Features

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.


Objective

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.

Technologies Used

Programming Language

  • Python

Libraries and Frameworks

  • Pandas
  • NumPy
  • Matplotlib
  • Seaborn
  • PuLP
  • NetworkX
  • Jupyter Notebook

Project Workflow

The project follows a structured Optimization and Data Science workflow consisting of multiple stages.

1. Business Problem Understanding

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.

2. Data Collection and Dataset Preparation

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.

3. Dataset Analysis

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.

4. Linear Programming Formulation

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.

5. Optimization Model Development

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.

6. Solution Generation and Analysis

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.

7. Data Visualization

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.

8. Documentation and Deployment

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.


Mathematical Formulation

Let

xᵢⱼ represent the quantity transported from warehouse i to store j.

Objective Function

Minimize the total transportation cost.

Minimize Z = Σ (Transportation Cost × Shipment Quantity)

Subject to

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

Project Structure

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

How to Run the Project

Install Dependencies

pip install -r requirements.txt

Launch Jupyter Notebook

jupyter notebook

Open:

Supply_Chain_Optimization.ipynb

Run all notebook cells sequentially.

Alternatively, execute the reusable Python module directly.

python src/optimization_model.py

Results

The 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.

Optimization Result

Minimum Transportation Cost: 1950

Optimal Shipment Plan

Warehouse Jaipur Surat Pune Indore
Mumbai 0 0 130 20
Delhi 100 0 0 100
Ahmedabad 0 120 0 60

Generated Outputs

The project automatically generates:

  • Optimal Shipment CSV
  • Transportation Cost Summary
  • Supply Distribution Chart
  • Demand Distribution Chart
  • Shipment Heatmap
  • Transportation Network Graph

Business Insights

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.

Conclusion

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.