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

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

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

4. Simplex method

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

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

Substituting these expressions into the objective function we find

f =2x1 x2 +3(1+x1 x2) 2(1x1 +x2) +(2x1 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

 

 

1

 

1\1 =1

x4

1

1

0

1

0

 

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

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

— 41 —

4. Simplex method

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

f =3x1 4x2 +x3 +x4 28 max2x1 +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 .

42 —

4. Simplex method

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.

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 = +∞.

— 43 —

4. Simplex method

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?

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?

44 —

4. Simplex method

Exercises for independent work

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

 

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

 

 

 

+3x2 +2x3 +x4 =4,

1)

x1

2x +x 3x +x =3,

 

 

 

1

2

 

 

3

5

 

x 0.

 

 

 

 

 

 

i

 

 

 

 

 

 

 

f = x1 +2x2 max

 

 

 

+2x2 x4 +3x5 =12,

2)

x1

x +x +2x x =1,

 

 

2

 

3

4

 

5

 

 

x 0.

 

 

 

 

 

 

i

 

 

 

 

 

 

 

f = −2x1 +4x2 +6 min

 

x 3x +x

=1,

 

 

 

1

 

2

3

 

 

 

3)

 

 

+x2 +x4 =5,

 

x1

 

 

x +x +x =2,

 

 

 

 

1

2

5

 

 

 

 

x

0.

 

 

 

 

 

 

i

 

 

 

 

 

 

 

f =2x1 x5 max

 

3x

+x

+x

 

=1,

 

 

 

 

1

2

3

 

 

4)

 

 

 

 

 

 

 

3,

1 x1 1 x3 +x4 =

 

 

2

2

 

 

 

2

 

5x1 2x23 +x5 =12,

 

x

0.

 

 

 

 

 

 

i

 

 

 

 

 

 

 

f =14x2 +4x3 28 max

 

 

 

 

 

 

 

=9,

 

 

x +3x +x

 

 

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

i 1 2 3

— 45 —

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 maxa11x1 + +a1nxn = b1,,

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

am1x1 + +amnxn = bmxi 0.

We can transform it to the form

 

F = −y1 − −ym max

 

 

+ +a1nxn +y1 = b1,

 

a11x1

 

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

 

 

 

(5)

 

+ +amnxn +ym = bm,

am1x1

 

f c1x1 − −cxn = c0,

 

 

 

 

xi 0, yj 0.

— 46 —

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

— 47 —

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

3

1

 

1

 

 

 

 

Thus,

a12 =1

— 48 —

5. Method of artificial variables

is the pivot (x3 x2) .

After recalculation we have the following table.

basis

bi

x1

x2

x3

x4

x5

y1

x2

1

1

1

1

0

0

0

y1

16

4

0

3 1 0

1

x5

32

4

0

1

0

1

0

f

11

4

0

3

0

0

0

 

 

 

 

 

 

 

 

F

16

4

0

3

1

0

0

 

 

 

 

 

 

 

 

In this table we have only one the negative evaluation

γ1 = −4 <0 .

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

 

 

 

 

 

16

,

32

 

=4 .

 

 

 

 

 

 

min

4

4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Thus,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

a21 =4

 

 

 

 

is a pivot (y1 x1) .

 

 

 

 

 

 

 

 

 

 

After recalculation we obtain.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

basis

bi

 

x1

x2

 

x3

 

 

x4

x5

y1

 

x2

5

 

0

1

 

1/4

 

1/4

0

1/4

 

x1

4

 

1

0

 

3/4

1/4

0

1/4

 

x5

16

 

0

0

 

 

2

 

 

1

1

1

 

f

27

 

0

0

 

 

0

 

 

1

0

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F

0

 

0

0

 

 

0

 

 

0

0

1

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

Fmax =0

— 49 —

5. Method of artificial variables

and

y1 =0 .

So, the initial linear programming problem is feasible, and we have found its basic solution. We can begin the second phase. We get.

basis

bi

x1

x2

x3

x4

x5

x2

5

0

1

1/4 1/4 0

x1

4

1

0

3/4 1/4 0

x5

16

0

0

2

1

1

f

27

0

0

0

1

0

 

 

 

 

 

 

 

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

X1max* =(4, 5, 0, 0, 16) ,

fmax = f (X1max* )= −27 .

But the evaluation

γ3 =0 .

So, we the alternative optimum. To find another optimal solution we need to select the third column as the pivot column. In this column we have only one positive number

 

 

 

 

a33 =2 .

 

 

Thus, a33 is a pivot (x5 x3) .

 

 

After recalculation we get the table.

 

 

 

 

 

 

 

 

 

 

basis

bi

x1

x2

x3

x4

x5

 

x2

3

0

1

0

3/8

1/8

 

x1

10

1

0

0

1/8

3/8

 

x3

8

0

0

1

1/2

1/2

 

f

27

0

0

0

1

0

— 50 —

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