Está en la página 1de 40

Chapter 5

Linear programming (LP)

What is linear programming ?


Linear programming refers to problems in which both
the objective function and the constraints are linear

Prob. 1

Assign employees to schedules for adequation, satisfaction


and productivity

Prob. 2

Products selection for the best advantage of existing


resources and prices to maximum profit

Prob. 3

Products distribution from plants to warehouse for cost


minimization within capacity limitation

Prob. 4

Bids offering to take into account profit for competition in


operating constraints

Canonical form for linear programs


Minimize the objective function:

=
=1

=
Subject to:

=1

0
0

= 1,2, ,
>
= 1,2, ,

Canonical form for linear programs


Matrix form
Minimize:

Subject to:

=
0
0

Note that all constraints are equalities


: variable vector
: objective function vector
: constraint matrix
: constraint vector

Important theorems
Theorem 1

The linear programs are convex problems


The local minimum of is also the global minimum

Theorem 2

Any point in the feasible region is linear combination of another


two points on boundary
The optimal solution is only search on the boundaries (vertices)

Theorem 3

The minimum solution is a vertex which is nearest the origin

Example
Maximize:

= 1 + 32

Subject to:

1 + 2 1
1 + 2 2
1 , 2 0

Example
2

Definitions
Dependent
variables

That appears once in constraint matrix . Number of


dependent variables is

Independent
variables

That appears more than once in constraint matrix . Number of


independent variables is

Basic
solution

That is a unique vector (also the vertex) determined by setting


all of independent variables equal to zero, and solving the
remaining dependent variables

Equivalent systems

System

=
=1

0; 0

= 1,2, ,
>
= 1,2, ,

System

=
=1

0; 0

= 1,2, ,
>
= 1,2, ,

Systems and are equivalent if


they have the same solution sets

Elementary operations
Elementary operations are the operations transform a
given system into an equivalent system

System

=
=1

There are equations

0; 0
Multiplying any equation by a constant 0
Replacing any equation by the equation + ,
where is any other

Simplex algorithm

Moving to another vertex


Test for optimality

Starting at a Basic
solution (or a vertex)
Test for optimality

Until satisfying optimality

Example
Maximize the objective function:

= 21 102 + 43 64

Subject to:

31 2 + 24 16
1 + 22 3 24 4
2 + 33 4 0
1 , 2 , 3 , 4 0

Example
Transform to the canonical form
Minimize

= 21 + 102 43 + 64

Subject to:

31 2 + 24 + 5 = 16
1 22 + 3 + 24 + 6 = 4
2 33 + 4 + 7 = 0
1 , 2 , 3 , 4 , 5 , 6 , 7 0
5 , 6 , 7 are slack variables

Example
Build the constraint matrix

3
1
0


1 0 2
2 1 2
1 3 1

1
0
0

Dependent variables: 5 , 6 , 7
Independent variables: 1 , 2 , 3 , 4

0
1
0

0
0
1

Example

Basic solution

1
0
2
0
3
0
= 4 = 0
5
16
6
4
7
0

Example
Build the simplex table

16
3
4 1
0
0

Dependent

variables



1 0
2 1
2 1
2 0
1 3 1 0

0
1
0

0
0
1

Example
Build the simplex table

16
3
4 1
0
0

Dependent

variables



1 0
2 1
2 1
2 0
1 3 1 0

2 10

4 6

Test for optimality: all values 0

0
1
0

0
0
1

Example
Select the column with maximum positive of

16
3
4 1
0
0

Dependent

variables



1 0
2 1
2 1
2 0
1 3 1 0

2 10

4 6

and the row with minimum positive of

0
1
0

0
0
1

Example
Elementary operations to move to the next vertex
Dependent

variables



0
1
0

1
0
0

0
0
1

Example
Elementary operations to move to the next vertex

16
3
4 1
12 3

Dependent

variables



1 0
2 1
2 1
2 0
7 0
7 0

6 2

0 14 0



0 0
1 0
3 1
4

Example
Change the basic solution

16
3
4 1
12 3

Dependent

variables



1 0
2 1
2 1
2 0
7 0
7 0

6 2

0 14 0



0 0
1 0
3 1
4

Example
Elementary operations to move to the next vertex
Dependent

variables



1
0
0
1
0
0

0
0
1

Example
Elementary operations to move to the next vertex
Dependent

variables

16
3
28
3

1 13

0 73

28

48

1
3
1
3

2
3
8
3

0 8

0 18 2 4

Satisfying optimality: all values 0

Example
Conclusion
= 21 + 102 43 + 64
reaches minimum value of 48 at

1
163
2
0
3
283
= 4 = 0
5
16
6
4
7
18

Example
Conclusion
= 21 102 + 43 64
reaches maximum value of 48 at

1
163
2
0

= =
3
283
4
0

Example
Minimize the objective function:

= 21 + 2

Subject to:

1 + 2 = 3
31 2 1
21 + 32 9
1 , 2 0

Example
Transform to the canonical form
Minimize

Subject to:

= 21 + 2
1 + 2 = 3
31 2 3 = 1
21 + 32 + 4 = 9
1 , 2 , 3 , 4 0
3 , 4 are slack variables

Example
Build the constraint matrix


11
1
0 0
33 1 1 0
22
3
0 1

1
0
0

0
1
0

Dependent variables: 4 adding hidden variables: 5 , 6


Independent variables: 1 , 2 , 3

Example

Basic solution

1
0
2
0
3
= = 0
3
5
6
1
4
9

Example
There are hidden variables, simplex table of Phase 1

Dependent

variables

3
1
9



1
1
0 0
3 1 1 0
2
3
0 1

1 = 5 + 6

1
0
0

0
1
0

Example
There are hidden variables, simplex table of Phase 1

Dependent

variables

3
1
9



1
1
0 0
3 1 1 0
2
3
0 1

1
0
0

0
1
0

0 1

1 = 5 + 6

Example
Change the basic solution

Dependent

variables

3
1
9



1
1
0 0
3 1 1 0
2
3
0 1

1
0
0

0
1
0

0 1

1 = 5 + 6

Example
Change the basic solution

Dependent

variables

0
1
0

1 = 5 + 6

0
0
1

1
0
0

Example
Elementary operations

Dependent

variables

8
3
1
3
25
3

4
3
13
11
3
4
3

1
3
13
2
3
1
3

13

1
3
23
43

1
0
0

1 = 5 + 6

Example
Change the basic solution

Dependent

variables

8
3
1
3
25
3

4
3
13
11
3
4
3

1
3
13
2
3
1
3

13

1
3
23
43

1
0
0

1 = 5 + 6

Example
Change the basic solution

Dependent

variables

0
1
0



1
0
0

1 = 5 + 6

0
0
1

Example
Elementary operations

Dependent

variables

1
4
14
14

3
4
1
4
11
4

14


1 = 5 + 6

0
1

1
4
1
4

Example
Elementary operations

Dependent

variables

14

3
4
1
4
11
4

1 1

1
4
14
14

1 = 5 + 6

1
4
1
4

Example
= 21 + 2

Phase 2

Dependent

variables

1
4
14
14

0
1

Example
= 21 + 2

Phase 2

Dependent

variables

1
4
14
14
14

0
1

Satisfying optimality: all values 0

También podría gustarte