Company X Problem

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:

    • Tables: $\$ 400$ per unit.
    • Sofas: $\$ 750$ per unit.
    • Chairs: $\$ 240$ per unit.

Variables

  • $X_{1}$ = Table
  • $X_{2}$ = Sofa
  • $X_{3}$ = Chair

Objective function

  • $z(max) = (400-100) X_{1} + (750-75-175) X_{2} + (240-40) X_{3} - 75000$
  • $z(max) = 300 X_{1} + 500 X_{2} + 200 X_{3} - 75000$

Constraints:

  • $C_1$(Wood): $10 X_{1} + 7.5 X_{2} + 4 X_{3} \leq 4350$
  • $C_2$(Cloth): $10 X_{2} \leq 2500$
  • $C_3$(Saw): $0.5 X_{1} + 0.4 X_{2} + 0.5 X_{3} \leq 280$
  • $C_4$(Cut Cloth): $0.4 X_{2} \leq 140$
  • $C_5$(Sand): $0.5 X_{1} + 0.1 X_{2} + 0.5 X_{3} \leq 280$
  • $C_6$(Inky): $0.4 X_{1} + 0.2 X_{2} + 0.4 X_{3} \leq 140$
  • $C_7$(Assembly): $1 X_{1} + 1.5 X_{2} + 0.5 X_{3} \leq 700$

Demand

  • $C_8$(Tables): $X_{1} \leq 300$
  • $C_9$(Sofas): $X_{2} \leq 180$
  • $C_{10}$(Chairs): $X_{3} \leq 400$

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]:
Company X:
MAXIMIZE
300*x1 + 500*x2 + 200*x3 + -75000
SUBJECT TO
_C1: 10 x1 + 7.5 x2 + 4 x3 <= 4350

_C2: 10 x2 <= 2500

_C3: 0.5 x1 + 0.4 x2 + 0.5 x3 <= 280

_C4: 0.4 x2 <= 140

_C5: 0.5 x1 + 0.1 x2 + 0.5 x3 <= 280

_C6: 0.4 x1 + 0.2 x2 + 0.4 x3 <= 140

_C7: x1 + 1.5 x2 + 0.5 x3 <= 700

_C8: x1 <= 300

_C9: x2 <= 180

_C10: x3 <= 400

VARIABLES
x1 Continuous
x2 Continuous
x3 Continuous

In [6]:
pulp.LpStatus[z.solve()]


Out[6]:
'Optimal'

In [7]:
pulp.value(x1), pulp.value(x2), pulp.value(x3), pulp.value(z.objective)


Out[7]:
(260.0, 180.0, 0.0, 93000.0)