Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Линейное программирование. Практикум. Учебное пособие для бакалавриата

.pdf
Скачиваний:
0
Добавлен:
12.08.2026
Размер:
1 Мб
Скачать

4. simplex method

The geometrical interpretation

The intersections of the of boundaries of the feasible region give us the following corner points

O(0,0), A(0,1), B(2,5), C(5,2), D(4,0).

f = 3x1 +3x2 +21 → max

−2x1 +x2 ≤1,x1 x2 ≤ 3,x1 +x2 ≤7,

x ≥ 0.

Fig. 6

So we start at point O (f (O)=21), then we move to point A (f (A)=24). From it we get to point B (f (B)= 42), which gives us the optimal solution, and then we move to another optimal point C (f (C)= 42). Thus, the optimal solution is determined by the side CB.

— 41 —

4. simplex method

Example. Find the solution of the linear programming problem by using the simplex method.

f =2x1 x2 +3x3 −2x4 +x5 → max−x1 +x2 +x3 =1,

x1 x2 +x4 =1,x1 +x2 +x5 =2,

x ≥ 0.i

Solution.

To use simplex method, we have to express the objective function in terms of basic variables. We get from the main constraints the expression for the basic variables

x3x4x5

Substituting these function we find

=1+x1 x2,

=1−x1 +x2,

=2 −x1 x2.

expressions into the objective

f =2x1 x2 +3(1+x1 x2 ) −2(1−x1 +x2 ) +(2 −x1 x2 ).

Or

f −6x1 +7x2 = 3 .

As a result, we get the following simplex table.

basis

bi

x1

x2

x3

x4

x5

 

 

x3

1

−1

1

 

1

0

0

 

 

 

 

 

x4

1

1

−1

0

1

0

 

1\1 =1

x5

2

1

1

0

0

1

 

2\1 =2

f

3

−6

7

0

0

0

 

 

 

 

 

 

 

 

 

 

 

 

 

We have the basic solution that is the starting corner point of the feasible region

— 42 —

4. simplex method

X1 = (0, 0, 1, 1, 2).

And

f (X1 )= 3 .

We have only one the negative evaluation

γ1 = −6 < 0 .

So, the first column is a pivot one. In this column we have to find the minimal ratio. We obtain

min 1,2 =1 .

1 1

Thus,

a12 =1

is a pivot.

Now we can recalculate the elements of the simplex table by using the Jordan-Gauss algorithm

basis

bi

x1

x2

x3

x4

x5

x3

2

0

0

1

1

0

x1

1

1

−1

0

1

0

x5

1

0

2

0

−1

1

f

9

0

1

0

6

0

 

 

 

 

 

 

 

In this table all evaluations are non-negative, so the maximum is attained.

Thus.

Xmax* = (1, 0, 2, 0, 1).

fmax = 9 .

Example. Find the solution of the linear programming problem

— 43 —

4. simplex method

f = 3x1 −4x2 +x3 +x4 −28 → max−2x1 +x2 +x3 = 4,

3x1 −8x2 +x4 =24,xi ≥ 0.

Solution.

We get from the main constraints the expression for the

basic variables

x3 = 4 +2x1 x2,x4 =24 −3x1 +8x2.

Using these expressions into we obtain

f = 3x1 −4x2 +(4 +2x1 x2 ) +(24 −3x1 +8x2 ) −28 .

Or

f −2x1 −3x2 = 0 .

So, we find the following simplex table.

basic

bi

x1

x2

x3

x4

x3

3

−2

1

1

0

x4

1

3

−8

0

1

f

0

−2

−3

0

0

 

 

 

 

 

 

We have the basic solution

X1 = (0, 0, 3, 1). And the following values

f (X1 )= 0 .

We have only one the negative evaluation

γ1 = −3 < 0 .

Thus, we choose the first column as pivot column. In this column there is only one positive number a21 = 3 and we use it as is a pivot.

— 44 —

4. simplex method

After recalculation we have

basic

bi

x1

x2

x3

x4

x3

4

−2

1

1

0

x4

56

−13

0

8

1

f

12

−8

0

3

0

 

 

 

 

 

 

In this table we have only one the negative evaluation

γ1 = −8 < 0 .

But all numbers in the first column are negative. It means that the problem is unbounded.

Thus,

fmax = +∞.

Questions for self-control

1)What conditions must be fulfilled for the application of the simplex method?

2)What is the evaluation of the free variable?

3)What is the basic solution?

4)What is the geometric interpretation of the basic solution?

5)What is the main idea of the simplex method from a geometric point of view?

6)Formulate the algorithm of the simplex method for linear programming problems of finding the maximum.

7)Formulate the algorithm of the simplex method for linear programming problems of finding the minimum.

8)How to determine from the simplex table that the maximum of a linear function has been reached?

9)How to determine from the simplex table that the minimum of a linear function has been reached?

10)How to determine with the help of the simplex method that there are infinitely many solutions of a linear programming problem at maximum?

45 —

4.simplex method

11)How to determine with the simplex method that that there are infinitely many solutions of a linear programming problem at minimum?

12)How to determine from the simplex table that the problem of finding the maximum has a unique solution?

13)How to determine from the simplex table that the problem of finding the minimum has a unique solution?

14)How to determine from the simplex table that the problem of finding the maximum is unbounded?

15)How to determine from the simplex table that the problem of finding the minimum is unbounded?

Exercises for independent work

Find the solution of the linear programming problems by using the simplex method.

f = 4x1 +8x3 +x4 x5 +7 → max

1) x1 +3x2 +2x3 +x4 = 4,−2x1 +x2 −3x3 +x5 = 3,

xi ≥ 0.

f = x1 +2x2 → max

2) x1 +2x2 x4 +3x5 =12,x2 +x3 +2x4 x5 =1,

xi ≥ 0.

f = −2x1 +4x2 +6 → minx1 −3x2 +x3 =1,

3) x1 +x2 +x4 =5,−x1 +x2 +x5 =2,

x ≥ 0.i

— 46 —

4. simplex method

 

f =2x1 x5 → max

 

 

−3x

+x

+x =1,

 

 

 

 

 

 

1

 

2

3

 

 

 

 

1

 

 

1

 

3

 

4)

 

 

x1

 

x3 +x4 =

 

,

2

2

2

 

 

 

 

 

 

 

5x1 −2x23 +x5 =12,

 

 

x

 

≥ 0.

 

 

 

 

 

i

 

 

 

 

 

 

 

f =14x2 +4x3 −28 → max

=9,

5)2x1 +3x2 +x4 =18,2x1 x2 +x5 =10,x ≥ 0.

ix1 +3x2 +x3

— 47 —

5. METHOD OF ARTIFICIAL VARIABLES

The method of artificial variable is used if a linear programming problem is written in the canonicals form and the system of main constraints is not reduced to the unit basis (it means that the basic and free variables are not determined and there is no basic solution). The method is also known as the two-phase simplex method.

Remark. All free terms in the system of equations of the main constraints must be non-negative.

b1 ≥ 0,

bm ≥ 0.

We have the following linear programming problem

f = c1x1 + +cxn +c0 → max

 

a11x1 + +a1nxn = b1,,

 

........................................

 

 

 

 

 

+ +amnxn = bm

 

am1x1

 

x ≥ 0.

 

i

 

 

We can transform it to the form

 

F = −y1 − −ym → max

 

 

 

 

a11x1 + +a1nxn +y1 = b1,

 

........................................

 

 

 

(5)

 

+ +amnxn +ym = bm,

am1x1

 

f c1x1 − −cxn = c0,

 

 

 

 

xi ≥ 0, yj ≥ 0.

— 48 —

5. Method of artificial variables

The function F is called the artificial objective function. The variables y1, ,ym are called the artificial variables (or balance variables). They are the basic variables in new system of the main constraints. So, this problem has the basic solution

X1 = (0, ,0,b1,b2, ,bm )≥ 0

Thus, we can use the standard simplex method for the linear programming problem (5).

Remark. We add an artificial variable only in equation where there is no basic variable.

When we solve the problem (7), the following alternatives are possible.

1)Fmax < 0 then the initial linear programming problem is infeasible.

2)Fmax = 0 (it means that all artificial variables are equal to zero) then the initial linear programming problem is feasible, and we have found its basic solution. In this case, we can already apply the standard simplex method to the initial problem. That is, we can begin the second phase of solving the initial problem.

Example. Find the solution of the linear programming problem

f = −x1 −3x2 −8 → max

x1 +x2 +x3 =1,x1 +3x2 x4 =19,3x1 +x2 +x5 = 33,

x ≥ 0.

Solution.

We have the basis variables x3 and x5 in the first and third equations of the system of main constraints. Therefore, we need to add an artificial variable y1 only in the second equation. We get

— 49 —

5. Method of artificial variables

F = −y1 → max

x +x +x =1,

 

1

2

3

 

+3x2

x4 +y1 =19,

x1

3x +x +x = 33,

 

1

2

5

f +x +3x = −8.

 

 

1

2

From here we find that

y1 =191 x1 −3x2 +x4 .

Substituting this expression into the objective function we get

F = −y1 = −19 +x1 +3x2 x4 .

Or

F x1 −3x2 +x4 = −19 .

As a result, we get the following simplex table.

basis

bi

x1

x2

x3

x4

x5

y1

x3

1

−1

1

1

0

 

0

0

y1

19

1

3

0

−1

0

1

x5

33

3

1

0

0

 

1

0

f

−8

1

3

0

0

 

0

0

 

 

 

 

 

F

−19

−1 −3 0 1

0

0

 

 

 

 

 

 

 

 

 

We have the negative evaluation

γ2 = −3 < 0 .

So, the second column is a pivot column. In this column we find the minimal ratio. We obtain

1

 

19

 

33

 

=1 .

min

 

,

 

,

 

 

 

 

 

1

 

3

 

1

 

 

Thus,

— 50 —

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]