Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

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)

• Defining minimum problem

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

Figure 1: MATLAB program and the solution


2)
• Decision variables

𝑥1 - Number of units of liquid products

𝑥2 - Number of units of dry products

• LP formulation

Daily inspection cost


𝑧 = 3𝑥1 + 2𝑥2

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

• Defining minimum problem

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

The lower bound,

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)

• Defining minimum problem

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,

𝐼𝑛𝑓
𝑈𝐵 = [ ]
𝐼𝑛𝑓

Figure 3: MATLAB program and the solution


4)
• Decision variables

𝑥1 - Number of grade 1 inspectors

𝑥2 - Number of grade 2 inspectors

• LP formulation

Daily inspection cost


𝑧 = 68.8𝑥1 + 68𝑥2

Subject to,
40𝑥1 + 30𝑥2 ≥ 250 (pieces)
𝑥1 ≤ 9 (grade 1 inspectors)
𝑥2 ≤ 11 (grade 2 inspectors)
𝑥1 , 𝑥2 ≥ 0 (non-negativity constraint)

• Defining minimum problem

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

Figure 4: MATLAB program and the solution

You might also like