• 沒有找到結果。

Unrestricted-in-Sign Variables

在文檔中 An Introduction to Model Building (頁 184-190)

Phases I and II Feasible Solutions

4.14 Unrestricted-in-Sign Variables

In solving LPs with the simplex algorithm, we used the ratio test to determine the row in which the entering variable became a basic variable. Recall that the ratio test depended on the fact that any feasible point required all variables to be nonnegative. Thus, if some variables are allowed to be unrestricted in sign (urs), the ratio test and therefore the simplex algorithm are no longer valid. In this section, we show how an LP with unrestricted-in-sign variables can be transformed into an LP in which all variables are required to be nonnegative.

For each urs variable xi, we begin by defining two new variables xiand xi. Then sub-stitute xi xifor xiin each constraint and in the objective function. Also add the sign restrictions xi 0 and xi 0. The effect of this substitution is to express xias the dif-ference of the two nonnegative variables xiand xi. Because all variables are now required to be nonnegative, we can proceed with the simplex. As we will soon see, no basic fea-sible solution can have both xi 0 and xi 0. This means that for any basic feasible solution, each urs variable ximust fall into one of the following three cases:

Case 1 xi 0 and xi 0. This case occurs if a bfs has xi 0. In this case, xi xi xi xi. Thus, xi xi. For example, if xi 3 in a bfs, this will be indicated by xi 3 and xi 0.

Case 2 xi 0 and xi 0. This case occurs if xi 0. Because xi xi xi, we obtain xi xi. For example, if xi 5 in a bfs, we will have xi 0 and xi 5. Then xi 0  5  5.

Case 3 xi xi 0. In this case, xi 0  0  0.

In solving the following example, we will learn why no bfs can ever have both xi 0 and xi 0.

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).

Solution Define

x1 number of loaves of bread baked

x2 number of ounces by which flour supply is increased by cash transactions Therefore, x2 0 means that x2oz of flour were purchased, and x2 0 means that x2

ounces of flour were sold (x2 0 means no flour was bought or sold). After noting that x1 0 and x2is urs, the appropriate LP is

max z 30x1 4x2

s.t. 5x1 30  x2 (Flour constraint) s.t. 5x1 5  x2 (Yeast constraint)

x1 0, x2urs

Because x2is urs, we substitute x2 x2for x2in the objective function and constraints.

This yields

max z 30x1 4x2 4x2 s.t. 5x1 30  x2 x2 s.t. 5x1 5

s.t. 5x1, x2, x2 0

After transforming the objective function to row 0 form and adding slack variables s1

and s2to the two constraints, we obtain the initial tableau in Table 47. Notice that the x2

column is simply the negative of the x2column. We will see that no matter how many piv-ots we make, the x2column will always be the negative of the x2column. (See Problem 6 for a proof of this assertion.)

Because x1has the most negative coefficient in row 0, x1enters the basis—in row 2.

The resulting tableau is shown in Table 48. Again note that the x2column is the negative of the x2column.

Because x2now has the most negative coefficient in row 0, we enter x2into the basis in row 1. The resulting tableau is shown in Table 49. Observe that the x2column is still the negative of the x2column. This is an optimal tableau, so the optimal solution to the baker’s problem is z 170, x1 5, x2 5, x2 0, s1 s2 0. Thus, the baker can earn a profit of 170¢ by baking 5 loaves of bread. Because x2 x2 x2 0  5  5,

Using urs Variables

E X A M P L E 8

the baker should sell 5 oz of flour. It is optimal for the baker to sell flour, because hav-ing 5 packages of yeast limits the baker to manufacturhav-ing at most 5 loaves of bread. These 5 loaves of bread use 5(5)  25 oz of flour, so 30  25  5 oz of flour are left to sell.

The variables x2and x2will never both be basic variables in the same tableau. To see why, suppose that x2is basic (as it is in the optimal tableau). Then the x2column will con-tain a single 1 and have every other entry equal to 0. The x2column is always the nega-tive of the x2column, so the x2column will contain a single 1 and have all other en-tries equal to 0. Such a tableau cannot also have x2as a basic feasible variable. The same reasoning shows that if xiis urs, then xiand xicannot both be basic variables in the same tableau. This means that in any tableau, xi, xi, or both must equal 0 and that one of Cases 1–3 must always occur.

The following example shows how urs variables can be used to model the production-smoothing costs discussed in the Sailco example of Section 3.10.

Mondo Motorcycles is determining its production schedule for the next four quarters. De-mand for motorcycles will be as follows: quarter 1—40; quarter 2—70; quarter 3—50;

quarter 4—20. Mondo incurs four types of costs.

1 It costs Mondo $400 to manufacture each motorcycle.

Modeling Production-Smoothing Costs

E X A M P L E 9

T A B L E 47 Initial Tableau for urs LP

Basic

z x1 x2 x2 s1 s2 rhs Variable Ratio

1 30 4 4 0 0 0 z2 0

0 5 1 1 1 0 30 s1 30 6*

0 1 0 0 0 1 5 s2 5 5*

T A B L E 48 First Tableau for urs LP

Basic

z x1 x2 x2 s1 s2 rhs Variable Ratio

1 0 4 4 0 30 150 z2 150

0 0 1 1 1 5 175 s1 5 5*

0 1 0 0 0 1 175 x1 5 None

T A B L E 49 Optimal Tableau for urs LP

Basic

z x1 x2 x2 s1 s2 rhs Variable

1 0 0 0 4 10 170 z2 170

0 0 1 1 1 5 175 x2 5

0 1 0 0 0 1 175 x1 5

2 At the end of each quarter, a holding cost of $100 per motorcycle is incurred.

3 Increasing production from one quarter to the next incurs costs for training employ-ees. It is estimated that a cost of $700 per motorcycle is incurred if production is increased from one quarter to the next.

4 Decreasing production from one quarter to the next incurs costs for severance pay, de-creasing morale, and so forth. It is estimated that a cost of $600 per motorcycle is in-curred if production is decreased from one quarter to the next.

All demands must be met on time, and a quarter’s production may be used to meet de-mand for the current quarter. During the quarter immediately preceding quarter 1, 50 Mon-dos were produced. Assume that at the beginning of quarter 1, no MonMon-dos are in inventory.

Formulate an LP that minimizes Mondo’s total cost during the next four quarters.

Solution To express inventory and production costs, we define for t 1, 2, 3, 4, pt number of motorcycles produced during quarter t

it inventory at end of quarter t To determine smoothing costs (costs 3 and 4), we define

xt amount by which quarter t production exceeds quarter t  1 production Because xtis unrestricted in sign, we may write xt xt xt, where xt 0 and xt 0.

We know that if xt  0, then xt  xtand xt 0. Also, if xt  0, then xt  xtand xt 0. This means that

xt increase in quarter t production over quarter t  1 production (xt 0 if period t production is less than period t  1 production) xt decrease in quarter t production from quarter t  1 production

(xt 0 if period t production is more than period t  1 production) For example, if p1 30 and p2 50, we have x2 50  30  20, x2 20, x2 0.

Similarly, if p1 30 and p2 15, we have x2 15  30  15, x2 0, and x2 15.

The variables xtand xtcan now be used to express the smoothing costs for quarter t.

We may now express Mondo’s total cost as

Total cost  production cost  inventory cost

 smoothing cost due to increasing production

 smoothing cost due to decreasing production

 400(p1 p2 p3 p4)  100(i1 i2 i3 i4)

 700(x1 x2 x3 x4)  600(x1 x2 x3 x4)

To complete the formulation, we add two types of constraints. First we need inventory constraints (as in the Sailco problem of Section 3.10) that relate the inventory from the current quarter to the past quarter’s inventory and the current quarter’s production. For quarter t, the inventory constraint takes the form

Quarter t inventory  (quarter t  1 inventory)  (quarter t production)

 (quarter t demand)

For t 1, 2, 3, 4, respectively, this yields the following four constraints:

i1 0  p1 40 i2 i1 p2 70 i3 i2 p3 50 i4 i3 p4 20

The sign restrictions it 0 (t  1, 2, 3, 4) ensure that each quarter’s demands will be met on time.

The second type of constraint reflects the fact that pt, pt1, xt, and xtare related. This relationship is captured by

(quarter t production)  (quarter t  1 production)  xt xt xt For t 1, 2, 3, 4, this relation yields the following four constraints:

p1 50  x1 x1 p2 p1 x2 x2

p3 p2 x3 x3 p4 p3 x4 x4

Combining the objective function, the four inventory constraints, the last four constraints, and the sign restrictions (it, pt, xt, xt 0 for t  1, 2, 3, 4), we obtain the following LP:

min z 400p1 400p2 400p3 400p4 100i1 100i2 100i3 100i4

 700x1 700x2 700x3 700x4 600x1 600x2 600x3 600x4

s.t. i1 0  p1 40 s.t. i2 i1 p2 70 s.t. i3 i2 p3 50 s.t. i4 i3 p4 20 s.t. p1 50  x1 x1

s.t. p2 p1 x2 x2

s.t. p3 p2 x3 x3

s.t. p4 p3 x4 x4

s.t. it, pt, xt, xt 0 (t  1, 2, 3, 4)

As in Example 7, the column for xtin the constraints is the negative of the xtcolumn.

Thus, as in Example 7, no bfs to Mondo’s LP can have both xt 0 and xt 0. This means that xtactually is the increase in production during quarter t, and xtactually is the amount by which production decreases during quarter t.

There is another way to show that the optimal solution will not have both xt 0 and xt 0. Suppose, for example, that p2 70 and p1 60. Then the constraint

p2 p1 70  60  x2 x2 (20) can be satisfied by many combinations of x2and x2. For example, x2 10 and x2 0 will satisfy (20), as will x2 20, and x2 10; x2 40 and x2 30; and so on. If p2 p1 10, the optimal LP solution will always choose x2 10 and x2 0 over any other possibility. To see why, look at Mondo’s objective function. If x2 10 and x2 0, then x2and x2contribute 10(700)  $7,000 in smoothing costs. On the other hand, any other choice of x2and x2 satis-fying (20) will contribute more than $7,000 in smoothing costs. For example, x2 20 and x2 10 contributes 20(700)  10(600)  $20,000 in smoothing costs. We are minimizing total cost, so the simplex will never choose a solution where xt 0 and xt 0 both hold.

The optimal solution to Mondo’s problem is p1 55, p2 55, p3 50, p4 50. This solution incurs a total cost of $95,000. The optimal production schedule produces a total of 210 Mondos. Because total demand for the four quarters is only 180 Mondos, there will be an ending inventory of 210  180  30 Mondos. Note that this is in contrast to the Sailco inventory model of Section 3.10, in which ending inventory was always 0. The optimal solution to the Mondo problem has a nonzero inventory in quarter 4, because for the quarter 4 inventory to be 0, quarter 4 production must be lower than quarter 3 pro-duction. Rather than incur the excessive smoothing costs associated with this strategy, the optimal solution opts for holding 30 Mondos in inventory at the end of quarter 4.

P R O B L E M S

Group A

1 Suppose that Mondo no longer must meet demands on time. For each quarter that demand for a motorcycle is unmet, a penalty or shortage cost of $110 per motorcycle short is assessed. Thus, demand can now be backlogged. All demands must be met, however, by the end of quarter 4.

Modify the formulation of the Mondo problem to allow for backlogged demand. (Hint: Unmet demand corresponds to it 0. Thus, itis now urs, and we must substitute it it  it. Now it will be the amount of demand that is unmet at the end of quarter t.)

2 Use the simplex algorithm to solve the following LP:

max z 2x1 x2

s.t. 3x1 x2 6 s.t. 3x1 x2 4 x1 0, x2urs Group B

3 During the next three months, Steelco faces the following demands for steel: 100 tons (month 1); 200 tons (month 2); 50 tons (month 3). During any month, a worker can produce up to 15 tons of steel. Each worker is paid

$5,000 per month. Workers can be hired or fired at a cost of

$3,000 per worker fired and $4,000 per worker hired (it takes 0 time to hire a worker). The cost of holding a ton of steel in inventory for one month is $100. Demand may be backlogged at a cost of $70 per ton month. That is, if 1 ton of month 1 demand is met during month 3, then a backlogging cost of $140 is incurred. At the beginning of month 1, Steelco has 8 workers. During any month, at most 2 workers can be hired. All demand must be met by the end of month 3. The raw material used to produce a ton of steel costs $300. Formulate an LP to minimize Steelco’s costs.

4 Show how you could use linear programming to solve the following problem:

max z |2x1 3x2| s.t. 4x1 x2 4 s.t. 2x1 x2 0.5

x1, x2 0

5 Steelco’s main plant currently has a steel manufacturing area and shipping area located as shown in Figure 13 (distances are in feet). The company must determine where to locate a casting facility and an assembly and storage facility to minimize the daily cost of moving material through the plant. The number of trips made each day are as shown in Table 50.

Assuming that all travel is in only an east–west or north–south direction, formulate an LP that can be used to de-termine where the casting and assembly and storage plants should be located in order to minimize daily transportation costs. (Hint: If the casting facility has coordinates (c1, c2), how should the constraint c1  700  e1 w1be interpreted?) 6 Show that after any number of pivots the coefficient of xi in each row of the simplex tableau will equal the negative of the coefficient of xi in the same row.

7 Clothco manufactures pants. During each of the next six months they can sell up to the numbers of pants given in Table 51.

Demand that is not met during a month is lost. Thus, for example, Clothco can sell up to 500 pants during month 1.

A pair of pants sells for $40, requires 2 hours of labor, and uses $10 of raw material. At the beginning of month 1, Clothco has 4 workers. A worker can work at making pants up to 200 hours per month, and is paid $2,000 per month (irrespective of how many hours worked). At the beginning of each month, workers can be hired and fired. It costs

Based on Love and Yerex (1976).

Steel manufacturing area (700, 600)

(0, 0) (1000, 0)

Shipping area F I G U R E 13

T A B L E 50

Cost (¢) Per Daily Number 100 Feet

From To of Trips Traveled

Casting Assembly and storage 40 10

Steel manufacturing Casting 8 10

Steel manufacturing Assembly and storage 8 10

Shipping Assembly and storage 2 20

T A B L E 51

Month Maximum Demand

1 500

2 600

3 300

4 400

5 300

6 800

$1,500 to hire and $1,000 to fire a worker. A holding cost of $5 per pair of pants is assessed against each month’s end-ing inventory.

在文檔中 An Introduction to Model Building (頁 184-190)