Skip to content

sushruta19/Optimization-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Optimization-Python

A collection of classic optimization problems solved using Python.

This project demonstrates how to formulate and solve optimization problems using libraries like PuLP, SciPy, and matplotlib for visualizations.


Problems Covered

1. Linear Programming Problem (LPP)

  • Solved using PuLP
  • Supports constraints: , , =
  • Maximization & Minimization problems
  • See the code

2. Graphical Method for LPP (2D only)

  • Plotted feasible region and optimal solution
  • Uses matplotlib
  • See the code
  • Shaded Feasible Reigion

3. Transportation Problem

  • Formulated as LPP and solved using PuLP
  • Handles supply and demand balance/unbalance cases
  • See the code

4. Assignment Problem

  • Solved using:
    • Hungarian Method (via scipy.optimize.linear_sum_assignment)
    • LPP formulation (via PuLP)
  • See the code

How to Run?

Follow these steps to set up and run the project on your local machine.

  • Clone the repo
git clone https://github.com/sushruta19/Optimization-Python.git
cd Optimization-Python
  • Create Virtual Env
python -m venv venv
  • Activate Virtual Env
venv\Scripts\activate           # On Windows powershell
venv\Scripts\activate.bat       # On Windows CMD
source venv/bin/activate        # On linux bash
  • Install requirements
pip install -r requirements.txt
  • Run Jupyter Lab or Notebook
jupyter-lab                     # if you have installed this
jupyter-notebook

About

Set of Optimization problems solved in Python(includes graphical method for LPP)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published