The Company X wants to know, How many products the company should make monthly. This company makes, tables, sofas and chairs. The requirements of each product is in the next Diagram:
The Company needs to pay $\$ 75000$ monthly, this includes, $1540$ hours of work ($\$ 48.70$ per hour).
Prices of each product:
In [1]:
from scipy.optimize import linprog
import numpy as np
In [2]:
z = np.array([300,500,200])
expense = 75000
In [3]:
C = np.array([
[ 10, 7.5, 4], #C1
[ 0, 10, 0], #C2
[0.5, 0.4, 0.5], #C3
[ 0, 0.4, 0], #C4
[0.5, 0.1, 0.5], #C5
[0.4, 0.2, 0.4], #C6
[ 1, 1.5, 0.5], #C7
[ 1, 0, 0], #C8
[ 0, 1, 0], #C9
[ 0, 0, 1] #C10
])
b = np.array([4350, 2500, 280, 140, 280, 140, 700, 300, 180, 400])
In [4]:
x1 = (0, None)
x2 = (0, None)
x3 = (0, None)
In [5]:
sol = linprog(-z, A_ub = C, b_ub = b, bounds = (x1, x2, x3), method='simplex')
#Profit Monthly
profit = (sol.fun*-1) - expense
sol
Out[5]:
In [6]:
print(f"x1 = {sol.x[0]}, x2 = {sol.x[1]}, x3 = {sol.x[2]}, z = {profit}")
The Company X should make monthly:
Profit: $\$ 93000$.