Variables that are unrestricted in sign

Download Report

Transcript Variables that are unrestricted in sign

Variables that are unrestricted in sign

LI Xiao-lei

Preview

 In solving LPs with the simplex algorithm, we used the ratio test.  The ratio test depended on the fact that any feasible point required all variables to be nonnegative.

 If some variables are allowed to be unrestricted in sign (urs), the ratio test and therefore the simplex algorithm are no longer valid.

Preview

 For each urs variable

x i

, we begin by defining two new variables

x i ’ x i ’-x i ’’

and

x i ’’.

Then , substitute for xi in each constraint and in the objective function. Also add the sign restrictions

x i ’

≥ 0 and

x

the simplex.

i ’’

≥0. since all variables are now required to be nonnegative, we can proceed with

Preview

For any basic feasible solution, each urs variable

x i

fall into one of the following three cases:    must Case 1

x i ’>

0 and

x i ’’=

0 This case occurs if a bfs has

x i

>0. in this case,

x i

=

x i

’ -

x i

’’ =

x i

’ . Thus,

x i

=

x i

’ . For example, if

x i

=3 in a bfs, this will be indicated by

x i

’ =3 and

x i

’’ =0.

Case 2

x i ’

= 0 and

x i ’’>

0 This case occurs if

x i

<0. Since

x i

=

x i

’ -

x i

’’ , we obtain

x i

=-

x i

’’ . For example, if

x i

=-5 in a bfs, we will have

x i

’ =0 and

x i

’’ =5. then

x i

=0-5=-5.

Case 3

x i ’

=

x i ’’=

0 In this case,

x i

= 0-0=0.

Example 7

 A baker has 30 oz of flour and 5 packages of yeast. Baking a loaf of bread requires 5 oz of flour and 1 package of yeast. Each loaf of bread can be sold for 30¢. The baker may purchase additional flour at 4¢/oz or sell leftover flour at the same price. Formulate and solve an LP to help the baker maximize profits (revenues-costs).

Example 7

Solution

Define x 1 = number of loaves of bread baked x 2 = number of ounces by which flour supply is increased by cash transactions Therefore, x 2 >0 means that x 2 oz of flour were purchased, and x 2 <0 means that – x 2 ounces of flour were sold. x 2 =0 means no flour was bought or sold.

x 1 ≥0 and x 2 is urs.

Example 7

The appropriate LP is max z =30x 1 -4x 2 s.t. 5x 1 ≤30+x 2 (flour constraint) x 1 ≤ 5 (Yeast constraint) x 1 ≥0, x 2 urs since x2 is urs, we substitute x2 ’ -x2 ’’ function and constraints.

for x2 in the objective max z =30x 1 -4x 2 ’ +4x 2 ’’ s.t. 5x 1 ≤30+x 2 ’ -x 2 ’’ (flour constraint) x 1 ≤ 5 (Yeast constraint) x 1 ,x 2 ’ ,x 2 ’’ ≥0

Example 7

Transforming the objective function to row 0 form and adding slack variables to the two constraints, we obtain the initial tableau.

z

1 0 0

x

5

1

-30 ①

x 2 ’

4 -1 0

x

-4 1 0

2 ’’ s

0 1 0

1 s

0 0 1

2 rhs

0 30 5

Basic variable ratio

z=0 s 1 =30 s 2 =5 6 5*

Note: no matter how many pivots we make, the x 2 ’ column will always be the negative of the x 2 ’’ column.

Example 7

x 1 enters the basis in row 2.

z

1 0

x 1

0 0

x 2 ’

4 -1

x 2 ’’

-4 ①

s 1

0 1 0 x 2 ’’ 1 0 0 0 enters the basis in row 1.

s 2

30 -5 1

z

1 0 0 0 1

x 1

0

x 2 ’

0 -1 0 1 0

x 2 ’’

0 1 0

s 1

4

s 2

10 -5 1 5 5

rhs Basic variable ratio

150 z=150 s 1 =5 x 1 =5 5* None

rhs Basic variable

170 z=170 5 5 x 2 ‘’ =5 x 1 =5

Example 7

The optimal solution to the baker ’ s problem is z=170, x 1 =5, x 2 ’’ =5, x 2 ’ =0,s 1 =s 2 =0.

Thus, the baker can earn a profit of 170¢ by baking 5 loaves of bread.

Since x 2 =x 2 ’-x 2 ’’=0-5=-5, the baker should sell 5 oz of flour.