Você está na página 1de 5

1

Linear Programming

A linear programming problem consists of minimizing (or maximizing) a linear


function subject to certain conditions or constraints expressible as linear inequalities. The word programming is used here in the sense of planning.
The importance of linear programming derives in part from its many applications and in part from the existence of good general-purpose techniques for
nding optimal solutions.

1.1

The Simplex Algorithm

The basic purpose of the simplex algorithm is to solve linear programming


problems. In the following example, the function f (x; y) = x + y is to be
maximized subject to the two inequalities shown. The function f (x; y) is the
objective function, and the set of linear constraints is called the linear system.
>

To solve a linear programming problem with two constraints


1. Create a 3

1 matrix.

2. Type the function to be maximized in the rst row.


3. Type the linear constraints in the subsequent rows.
4. Leave the insertion point in the matrix.
5. Choose Simplex + Maximize.
I Simplex + Maximize
3
2
x+y
4 4x + 3y 6 5, Maximum is at:
3x + 4y 4

1.2

y=

2
7; x

12
7

Feasible Systems

Two things may prevent the existence of a solution. There may be no values
of x and y satisfying the constraints. Even if there are such values, there may
be none maximizing the objective function. If there are values satisfying the
constraints, the system is called feasible.
The following example illustrates a set of inequality constraints with no
function to be maximized or minimized. You can ask whether the constraints
are feasible that is, whether they dene a nonempty set.

>

To determine if there are values satisfying the constraints


Place the insertion point in the matrix and choose Simplex + Feasible?.
I Simplex + Feasible?
2
3
4x + 3y 6
6 3x + 4y 4 7
6
7, Is feasible? true
4
x 0 5
y 0
4x + 3y 6
, Is feasible? false
4x + 3y 7

4x + 3y 6
is not feasible implies, in particu4x + 3y 7
lar, that there are no values minimizing the objective function in the problem
x+y
4x + 3y 6 .
4x + 3y 7
Saying that the system

1.3

Standard Form

A system of linear inequalities is in standard form when all the inequalities are
of the form .
> To convert a system of linear inequalities to a system in standard
form
Place the insertion point in a system of linear inequalities and choose
Simplex + Standardize.
I Simplex + Standardize
2
3
2
3
4x + 3y 6
3x + 4y 4
6 3x + 4y 4 7
6
7
6
7, System in standard form is: 6 4x + 3y 6 7
4
4
x 0 5
x 0 5
y 0
y 0
With a linear expression added, you can maximize the resulting linear programming problem.

>

To maximize a linear programming problem


Place the insertion point in a system of linear inequalities in standard form
and choose Simplex + Maximize.
I Simplex + Maximize
3
2
x + 3y
6 3x y 4 7
7
6
6 4x + 3y 6 7, Maximum is at: fx = 0; y = 2g
7
6
4
y 0 5
x 0

1.4

The Dual of a Linear Program

The other item on the Simplex menu is Dual.


>

To compute the dual of a linear program


Place the insertion point in a system of linear inequalities entered in standard form, and choose Simplex + Dual.
I Simplex + Dual
3
2
x+y
2
6 4x + 3y 6 7
7
6
6 3x + 4y 4 7, Dual system is: 4 u5
7
6
4
u6
x 0 5
y 0

4u3 + 6u4
4u4 3u3
3u4 4u3

1 5
1

Applying the simplex algorithm to these two linear programs yields the following results.
I Simplex + Maximize
2
3
x+y
6 4x + 3y 6 7
6
7
6 3x + 4y 4 7, Minimum is at: fx = 0; y = 0g
6
7
4
x 0 5
y 0

I Simplex + Minimize
2
6s1 + 4s2
6 1 4s1 + 3s2 s4
6
6 1 3s1 + 4s2 s3
6
6 s1 0
6
6 s2 0
6
4 s3 0
s4 0

7
7
7
7
7, Minimum is at: s1 = 0; s3 = 0; s4 = 0; s2 =
7
7
7
5
3

1
3

3
x+y
6 4x + 3y 6 7
7
6
6 3x + 4y 4 7, Maximum is at: y = 0; x = 4
3
7
6
4
x 0 5
y 0 3
2
x+y
2
3
6 4x + 3y 6 7
4u1 + 6u2
7
6
6 3x + 4y 4 7, Dual system is: 4 u3 4u2 3u1
1 5
7
6
5
4
u4 3u2 4u1
1
x 0
y 0
Ejemplo
4 dim.
3
2
x+y+z+t
6 4x + 3y + t 6 7
7
6
6 3x + 4y + z 4 7
7
6
6
x 0 7
7, Maximum is at: ft = 6; x = 0; y = 0; z = 2g
6
6
y 0 7
7
6
4
t 0 5
z 2
Minimum is at: UNBOUNDED
Considerando
el problema
de programacin lineal:
3
2
2x 3y 4z
6 3x + 2y + z 10 7
7
6
6 2x + 5y + 3z 15 7
7, Minimum is at: fx = 0; y = 0; z = 5g
6
6
x 0 7
7
6
4
y 0 5
z 0
Simplex.
Minimiza la siguiente funcin.
Z = 2x 3y 4z;
Sujeta a
3x + 2y + z 10
2x + 5y + 3z 15
x; y; z 0
Se aaden las variables de holgura s; t, que se representan en la tabla cannica
0
1
1 2 3 4 0 0 0
@ 0 3 2 1 1 0 10 A
0 2 5 3 0 1 15

donde las columnas 5 y 6 representan las variables bsicas s y t y la correspondiente solucin bsica posible es
x = y = z = 0; n; s = 10; t = 15:
Las columnas 2, 3 y 4 pueden ser seleccionadas como columnas pivotes,
para este ejemplo se seleccion la columna 4. Los valores de x resultantes de
la eleccin de las las 2 y 3 como las pivotes son 10/1 = 10 y 15/3 = 5
4

respectivamente. De estos el mnimo es 5,


Operando los pivotes se produce.
0
11
2
0
1
3
3
7
1
@ 0
0
3
3
2
5
0
1
3
3

por lo que la la 3 sera la la pivote.


0
1
0

4
3
1
3
1
3

1
20
5 A
5

Ahora columnas 4 y 5 representan las variables bsicas z y s y la solucin


ptima correspondiente es
x = y = t = 0; n; z = 5; n; s = 5:
Para el paso siguiente, no hay entradas positivas en la la objetivo y de
hecho
4
Z = 20 + 23 x + 11
3 y + 3z
por lo que el valor mnimo de Z = 20.

Você também pode gostar