Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 1.24 KB

README.md

File metadata and controls

54 lines (35 loc) · 1.24 KB

Linear Programming Optimization Solver

This Python script uses the linprog function from scipy.optimize to solve linear programming optimization problems. It allows users to input the type of optimization (maximization or minimization), coefficients of the objective function, number of constraints, coefficients for each constraint, and their bounds. It then calculates and displays the optimal value and corresponding point.

Requirements

  • Python 3.x
  • scipy

Usage

  1. Clone the repository to your local machine:
git clone https://github.com/Vikranth3140/optimizer.git
  1. Navigate to the project directory:
cd optimizer
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Run the script:
python optimizer.py
  1. Follow the prompts to input the optimization problem details as instructed.

Example

Here's an example of how to use the script:

  • Maximize: 3x + 2y
  • Subject to constraints:
    • x + y <= 4
    • 2x + y <= 5
    • x >= 0, y >= 0

The script will calculate the optimal value and point that maximizes the objective function under these constraints.

License

This project is licensed under the MIT License.