When and how to use linear programming
“Classic” examples and less classic ones
How to set up a linear program: Cost minimization
- Define the decision variables
- Define the cost of each decision
- Define the inputs and outputs
- Define the flow equations - these become equality constraints
- Define the limits to your inputs and outputs - these become the LEQ constraints
Do I just need to set the costs to negative to make this a maximization problem? Does the above process still work if so? Like is the “material flow” interpretation the same
- Minimum: Find the minimum-cost way to hit some production target on all the outputs
- Maximum: Find the maximum-value way to use all the material present (then -c is the value vector)
https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.linprog.html