Professional Documents
Culture Documents
Linear Programming
Linear Programming
1)
• Decision variables
𝑥1 - 𝐴 units per week
𝑥2 - 𝐵 units per week
• LP formulation
Total profit,
𝑧 = 5𝑥1 + 2𝑥2
Subject to,
10𝑥1 + 2𝑥2 ≤ 2100 (time constraint, minutes)
𝑥1 + 0.5𝑥2 ≤ 600 (material constraint in Kgs)
𝑥2 ≤ 800 (market constraint)
𝑥1 , 𝑥2 ≥ 0 (non-negativity constraint)
Coefficient vector,
−5
𝑓=[ ]
−2
Inequality constraints,
10 2
𝐴=[ ]
1 0.5
Inequality constraint,
2100
𝑏=[ ]
600
Equality constraints,
0 0
𝐴𝑒𝑞 = [ ]
0 0
0
𝑏𝑒𝑞 = [ ]
0
The lower bound,
0
𝐿𝐵 = [ ]
0
The upper bound,
𝐼𝑛𝑓
𝑈𝐵 = [ ]
800
• LP formulation
Subject to,
5𝑥1 + 𝑥2 ≥ 10 (units of A)
2𝑥1 + 2𝑥2 ≥ 10 (units of B)
𝑥1 + 4𝑥2 ≥ 10 (units of C)
𝑥1 , 𝑥2 ≥ 0 (non-negativity constraint)
• Slack variable 𝑠,
5𝑥1 + 𝑥2 + 𝑠 = 10
Coefficient vector,
−3
𝑓 = [−2 ]
0
Inequality constraints,
2 2 0
𝐴 = ⌈1 4 0⌉
0 0 0
Inequality constraint,
12
𝑏 = [12]
0
Equality constraints,
5 1 1
𝐴𝑒𝑞 = [0 0 0]
0 0 0
10
𝑏𝑒𝑞 = [ 0 ]
0
0
𝐿𝐵 = [0]
0
The upper bound,
𝑖𝑛𝑓
𝑈𝐵 = [𝑖𝑛𝑓 ]
𝑖𝑛𝑓
Figure 2: MATLAB program and the solution
3)
• Decision variables
𝑥1 - Number of tables
𝑥2 - Number of chairs
• LP formulation
Total profit
𝑧 = 5𝑥1 + 7𝑥2
Subject to,
60𝑥1 + 40𝑥2 ≤ 60 (wood material)
10𝑥1 + 20𝑥2 ≤ 220 (labor hours)
𝑥1 , 𝑥2 ≥ 0 (non-negativity constraint)
Coefficient vector,
−5
𝑓=[ ]
−7
Inequality constraints,
60 40
𝐴=[ ]
10 20
Inequality constraint,
600
𝑏=[ ]
220
Equality constraints,
0 0
𝐴𝑒𝑞 = [ ]
0 0
0
𝑏𝑒𝑞 = [ ]
0
The lower bound,
0
𝐿𝐵 = [ ]
0
The upper bound,
𝐼𝑛𝑓
𝑈𝐵 = [ ]
𝐼𝑛𝑓
• LP formulation
Subject to,
40𝑥1 + 30𝑥2 ≥ 250 (pieces)
𝑥1 ≤ 9 (grade 1 inspectors)
𝑥2 ≤ 11 (grade 2 inspectors)
𝑥1 , 𝑥2 ≥ 0 (non-negativity constraint)
Coefficient vector,
68.8
𝑓=[ ]
68
Inequality constraints,
𝐴 = [−40 −30]
Inequality constraint,
𝑏 = [−250]
Equality constraints,
𝐴𝑒𝑞 = [0 0]
𝑏𝑒𝑞 = [0]
The lower bound,
0
𝐿𝐵 = [ ]
0
The upper bound,
9
𝑈𝐵 = [ ]
11