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]:
import pulp
In [2]:
z = pulp.LpProblem("Company X", pulp.LpMaximize)
x1 = pulp.LpVariable("x1", lowBound=0)
x2 = pulp.LpVariable("x2", lowBound=0)
x3 = pulp.LpVariable("x3", lowBound=0)
In [3]:
z += 300*x1 + 500*x2 + 200*x3 - 75000
In [4]:
z += 10*x1 + 7.5*x2 + 4*x3 <= 4350
z += 10*x2 <= 2500
z += 0.5*x1 + 0.4*x2 + 0.5*x3 <= 280
z += 0.4*x2 <= 140
z += 0.5*x1 + 0.1*x2 + 0.5*x3 <= 280
z += 0.4*x1 + 0.2*x2 + 0.4*x3 <= 140
z += 1*x1 + 1.5*x2 + 0.5*x3 <= 700
z += 1*x1 <= 300
z += 1*x2 <= 180
z += 1*x3 <= 400
In [5]:
z
Out[5]:
In [6]:
pulp.LpStatus[z.solve()]
Out[6]:
In [7]:
pulp.value(x1), pulp.value(x2), pulp.value(x3), pulp.value(z.objective)
Out[7]: