Linear Programming Example
A simple production planning problem is given by the use of two ingredients A and B that produce products 1 and 2. In this case, it requires:
- 3 units of A and 6 units of B to produce Product 1
- 8 units of A and 4 units of B to produce Product 2
There are at most 5 units of Product 1 and 4 units of Product 2. Product 1 can be sold for 100 and Product 2 can be sold for 125. The objective is to maximize the profit for this production problem.
A contour plot can be used to explore the optimal solution. In this case, the black lines indicate the upper and lower bounds on the production of 1 and 2. In this case, the production of 1 must be greater than 0 but less than 5. The production of 2 must be greater than 0 but less than 4.
Soft Drink Production Problem
Modified Production Problem
Solution and Contour Plots with Python
Below are the source files for generating the contour plots in Python. The linear program is solved with the APM model through a web-service while the contour plot is generated with the Python package Matplotlib.
comments powered by Disqus