Solving Linear Programming problems using Simplex Method with linprog
from scipy.optimize
, NumPy
and PuLP
libraries on Python.
Linear programming is used to solve optimization problems. In a LP problem must be defined an Objective Function and Constraints, and they must be Strictly Linears. Constraints may be equalities or inequalities.
Variables:
Objective Function: Constraints:We are going to use SciPy, NumPy and PuLP libraries to solve LP problems. PuLP is not available on Anaconda, try with pip
.
Install via pip:
pip install scipy numpy pulp
Install via conda:
conda install scipy numpy
Solving Company X problem with Linprog