Linear programming - Operations Research

Operations Research
The simplex method – exercise.
Simplex method – examples
Method of artificial variables – examples
Simplex method – examples
Example 1:
Solve linear programming problem with the mathematical model by the simplex
method:
z = x1 + 2x2 −→ max,
x1 + x2 ≤ 12,
3x1 + x2 ≤ 18,
x1 ≥ 0, x2 ≥ 0.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Solution 1:
xopt = (0, 12; 0, 6), zmax = z(xopt ) = 24.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Example 2:
Solve linear programming problem with the mathematical model by the simplex
method:
z = x1 + 2x2 −→ max,
x1 + x2 ≤ 14,
3x1 + x2 ≤ 10,
x1 ≥ 0, x2 ≥ 0.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Solution 2:
xopt = (0, 10; 4, 0), zmax = z(xopt ) = 20.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Example 3:
Solve linear programming problem with the mathematical model by the simplex
method. Find all basic optimal solution.
z=
x1 − x2 −→ min,
x1 + x2 ≤ 6,
3x1 + x2 ≤ 15,
−x1 + x2 ≤ 3,
x1 ≥ 0, x2 ≥ 0.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Solution 3:
xopt,1 = (0, 3; 3, 12, 0), xopt,2 = ( 23 , 92 ; 0, 6, 0), zmin = z(xopt1 ) = z(xopt2 ) = −3.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Example 4:
Solve linear programming problem with the mathematical model by the simplex
method. Find all basic optimal solution.
z = −3x1 + x2 −→ min,
x1 + x2 ≤ 10,
3x1 + x2 ≤ 15,
−x1 + x2 ≤ 3,
x1 ≥ 0, x2 ≥ 0.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Solution 4:
xopt = (5, 0; 5, 0, 8), zmin = z(xopt ) = −15.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Method of artificial variables – examples
Example 1:
The task of company is from materials S1 and S2 as cheaply as possible
produce a mixture, which contains at least 160 g of vitamin A, and at least 500
g of vitamin C.
1 kg raw material S1 contains 1 g of vitamin A and 2 g of vitamin C and costs
30 CZK,
1 kg raw material S2 contains 1 g of vitamin A and 5 g of vitamin C and costs
50 CZK.
The task is to determine the optimal mixing vector.
Create a mathematical model of the problem.
Solve the problem by method of artificial variables.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Solution 1:
xopt = (100, 60; 0, 0), zmin = z(xopt ) = 6 000 CZK.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Example 2:
Metallurgical factory has produced at least 4 000 kg of zinc Zn and at least
3 000 kg of tin Sn. There are three Kinds Of Ores.
1 ton of ore A contains 10 kg Zn, 6 kg Sn and costs 200 CZK;
1 ton of ore B contains 2 kg Zn, 6 kg Sn and costs 150 CZK;
1 ton of ore C contains 12 kg Zn, 4 kg Sn and costs 250 CZK;
The task is to determine in what quantity is necessary to use each kinds of
ores, the total purchase price of ores was minimal.
Solve the problem by method of artificial variables.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Solution 2:
xopt = (375, 125, 0; 0, 0), zmin = z(xopt ) = 93 750 CZK.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Example 3:
By method of artificial variables solve the problem with mathematical model:
z = 12x1 + 20x2 −→ min,
x1 +
x2 = 6,
x1 + 1,5x2 ≥ 8,
12x1 + 10x2 ≥ 60,
x1 ≥ 0, x2 ≥ 0.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Solution 3:
xopt = (2, 4; 0, 4), zmin = z(xopt ) = 104 CZK.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Example 4:
The company cut rods of basic length 80 cm to rods of length 50 cm, 40 cm
and 25 cm. The minimum required amounts are 50 pc , 80 pc and 95 pc.
The task is to determine the optimal mix of cutting plans with minimal waste.
Find the optimal solution of the problem.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Solution 4:
xopt = (50, 40, 0, 15; 0, 0, 0), zmin = z(xopt ) = 325 cm.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Example 5:
The company has sufficient stocks of basic ropes of 52 m. You need to cut them
out of at least 60 pc of 18 m length ropes, at least 100 pc of 11 m length ropes.
The task is to determine the optimal mix of cutting plans with minimize waste.
Find the optimal solution of the problem.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Solution 5:
xopt = (16, 28, 0; 0, 0), zmin = z(xopt ) = 108 m.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Example 6:
Solve the problem with mathematical model:
z=
15x2 + 30x3
+ 15x5 −→ min,
x1 +
x1
≥ 120,
+ 2x3 + x4
≥ 80,
x2
+ 2x4 + 3x5 ≥ 110,
x2
x1 ≥ 0, x2 ≥ 0, x3 ≥ 0, x4 ≥ 0, x5 ≥ 0.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Solution 6:
xopt = (120, 0, 0, 55, 0; 0, 95, 0), zmin = z(xopt ) = 0 cm.
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Example 7:
Assume that we have sufficient number of spools of electric cable of length
of 108 m. For further use we need at least 30 pieces of 50 m cable, at least 60
pieces of 40 m cable and at least 150 pieces of 30 m cable.
The task is to determine the optimal mix of cutting plans with respect to:
a) minimal waste. How many spools will be used in this case?
b) minimal number of cutted spools. What is the total length of the waste in
this case?
Michal Šmerek
Linear programming
Simplex method – examples
Method of artificial variables – examples
Solution 7:
a) xopt = (15, 0, 0, 0, 75, 0; 0, 15, 0), zmin = z(xopt ) = 720 m, will be used 90
spools.
b) xopt = (15, 0, 0, 0, 60, 10; 0, 0, 0), zmin = z(xopt ) = 85 spools, the length of
the waste will be 780 m.
Michal Šmerek
Linear programming
Operations Research
The simplex method – exercise.