• 沒有找到結果。

What Is a Linear Programming Problem?

在文檔中 An Introduction to Model Building (頁 49-53)

Determinants

3.1 What Is a Linear Programming Problem?

In this section, we introduce linear programming and define important terms that are used to describe linear programming problems.

Giapetto’s Woodcarving, Inc., manufactures two types of wooden toys: soldiers and trains.

A soldier sells for $27 and uses $10 worth of raw materials. Each soldier that is manu-factured increases Giapetto’s variable labor and overhead costs by $14. A train sells for

$21 and uses $9 worth of raw materials. Each train built increases Giapetto’s variable la-bor and overhead costs by $10. The manufacture of wooden soldiers and trains requires two types of skilled labor: carpentry and finishing. A soldier requires 2 hours of finishing labor and 1 hour of carpentry labor. A train requires 1 hour of finishing and 1 hour of car-pentry labor. Each week, Giapetto can obtain all the needed raw material but only 100 fin-ishing hours and 80 carpentry hours. Demand for trains is unlimited, but at most 40 sol-diers are bought each week. Giapetto wants to maximize weekly profit (revenues  costs).

Formulate a mathematical model of Giapetto’s situation that can be used to maximize Gi-apetto’s weekly profit.

Solution In developing the Giapetto model, we explore characteristics shared by all linear pro-gramming problems.

Decision Variables We begin by defining the relevant decision variables. In any linear programming model, the decision variables should completely describe the decisions to be made (in this case, by Giapetto). Clearly, Giapetto must decide how many soldiers and trains should be manufactured each week. With this in mind, we define

x1 number of soldiers produced each week x2 number of trains produced each week

Objective Function In any linear programming problem, the decision maker wants to max-imize (usually revenue or profit) or minmax-imize (usually costs) some function of the deci-sion variables. The function to be maximized or minimized is called the objective func-tion. For the Giapetto problem, we note that fixed costs (such as rent and insurance) do not depend on the values of x1 and x2. Thus, Giapetto can concentrate on maximizing (weekly revenues)  (raw material purchase costs)  (other variable costs).

Giapetto’s weekly revenues and costs can be expressed in terms of the decision vari-ables x1and x2. It would be foolish for Giapetto to manufacture more soldiers than can be sold, so we assume that all toys produced will be sold. Then

Weekly revenues  weekly revenues from soldiers

 weekly revenues from trains





dso o

l l d

la ie

rs

r

 

sow ld ee

ie k

rs







dt o

r l a

l i a

n

rs

 

tw ra e

i e

n k

s



 27x1 21x2

Also,

Weekly raw material costs  10x1 9x2

Other weekly variable costs  14x1 10x2

Then Giapetto wants to maximize

(27x1 21x2)  (10x1 9x2)  (14x1 10x2)  3x1 2x2

Another way to see that Giapetto wants to maximize 3x1 2x2is to note that Weekly revenues  weekly contribution to profit from soldiers

 weekly nonfixed costs  weekly contribution to profit from trains



  

sow

ld ee

ie k

rs





  

tw

ra e

i e

n k

s



Also,

 27  10  14  3

 21  9  10  2 Then, as before, we obtain

Weekly revenues  weekly nonfixed costs  3x1 2x2

Thus, Giapetto’s objective is to choose x1and x2to maximize 3x1 2x2. We use the vari-able z to denote the objective function value of any LP. Giapetto’s objective function is

Maximize z 3x1 2x2 (1)

(In the future, we will abbreviate “maximize” by max and “minimize” by min.) The co-efficient of a variable in the objective function is called the objective function coco-efficient of the variable. For example, the objective function coefficient for x1is 3, and the objec-tive function coefficient for x2is 2. In this example (and in many other problems), the

ob-Contribution to profit



Contribution to profit



contribution to profit



contribution to profit



jective function coefficient for each variable is simply the contribution of the variable to the company’s profit.

Constraints As x1and x2increase, Giapetto’s objective function grows larger. This means that if Giapetto were free to choose any values for x1and x2, the company could make an arbitrarily large profit by choosing x1and x2to be very large. Unfortunately, the values of x1and x2are limited by the following three restrictions (often called constraints):

Constraint 1 Each week, no more than 100 hours of finishing time may be used.

Constraint 2 Each week, no more than 80 hours of carpentry time may be used.

Constraint 3 Because of limited demand, at most 40 soldiers should be produced each week.

The amount of raw material available is assumed to be unlimited, so no restrictions have been placed on this.

The next step in formulating a mathematical model of the Giapetto problem is to ex-press Constraints 1–3 in terms of the decision variables x1and x2. To express Constraint 1 in terms of x1and x2, note that





finis s

o h l i d n i g

er

hrs.

 

soldiw er e

s ek

made







finishtr i

a n

i g n

hrs.

 

traiw ns ee

m k

ade



 2(x1)  1(x2)  2x1 x2

Now Constraint 1 may be expressed by

2x1 x2 100 (2)

Note that the units of each term in (2) are finishing hours per week. For a constraint to be reasonable, all terms in the constraint must have the same units. Otherwise one is adding apples and oranges, and the constraint won’t have any meaning.

To express Constraint 2 in terms of x1and x2, note that





carps e

o n

li t d

ry er

hrs.

 

sow ld ee

ie k

rs







carpetr n a

t i r n y hrs.



 

tw ra e i e

n k

s



 1(x1)  1(x2)  x1 x2

Then Constraint 2 may be written as

x1 x2 80 (3)

Again, note that the units of each term in (3) are the same (in this case, carpentry hours per week).

Finally, we express the fact that at most 40 soldiers per week can be sold by limiting the weekly production of soldiers to at most 40 soldiers. This yields the following constraint:

x1 40 (4)

Thus (2)–(4) express Constraints 1–3 in terms of the decision variables; they are called the constraints for the Giapetto linear programming problem. The coefficients of the de-cision variables in the constraints are called technological coefficients. This is because the technological coefficients often reflect the technology used to produce different prod-ucts. For example, the technological coefficient of x2in (3) is 1, indicating that a soldier requires 1 carpentry hour. The number on the right-hand side of each constraint is called

Total carpentry hrs.



Total finishing hrs.



the constraint’s right-hand side (or rhs). Often the rhs of a constraint represents the quan-tity of a resource that is available.

Sign Restrictions To complete the formulation of a linear programming problem, the fol-lowing question must be answered for each decision variable: Can the decision variable only assume nonnegative values, or is the decision variable allowed to assume both pos-itive and negative values?

If a decision variable xican only assume nonnegative values, then we add the sign re-striction xi 0. If a variable xican assume both positive and negative (or zero) values, then we say that xiis unrestricted in sign (often abbreviated urs). For the Giapetto prob-lem, it is clear that x1 0 and x2 0. In other problems, however, some variables may be urs. For example, if xirepresented a firm’s cash balance, then xicould be considered negative if the firm owed more money than it had on hand. In this case, it would be ap-propriate to classify xias urs. Other uses of urs variables are discussed in Section 4.12.

Combining the sign restrictions x1 0 and x2 0 with the objective function (1) and Constraints (2)–(4) yields the following optimization model:

max z 3x1 2x2 (Objective function) (1) subject to (s.t.)

2x1 x2 100 (Finishing constraint) (2)

x1 x2 80 (Carpentry constraint) (3)

x1 x2 40 (Constraint on demand for soldiers) (4)

x1 x2 0 (Sign restriction) (5)

x1 x2 0 (Sign restriction) (6)

“Subject to” (s.t.) means that the values of the decision variables x1and x2must satisfy all constraints and all sign restrictions.

Before formally defining a linear programming problem, we define the concepts of linear function and linear inequality.

D E F I N I T I O N A function f (x1, x2, . . . , xn) of x1, x2, . . . , xnis a linear function if and only if for some set of constants c1, c2, . . . , cn, f (x1, x2, . . . , xn)  c1x1 c2x2   cnxn.

For example, f (x1, x2)  2x1 x2is a linear function of x1and x2, but f (x1, x2)  x21x2

is not a linear function of x1and x2.

D E F I N I T I O N For any linear function f (x1, x2, . . . , xn) and any number b, the inequalities f (x1, x2, . . . , xn)  b and f (x1, x2, . . . , xn)  b are linear inequalities.

Thus, 2x1 3x2 3 and 2x1 x2 3 are linear inequalities, but x21x2 3 is not a linear inequality.

The sign restrictions do constrain the values of the decision variables, but we choose to consider the sign re-strictions as being separate from the constraints. The reason for this will become apparent when we study the simplex algorithm in Chapter 4.

D E F I N I T I O N A linear programming problem (LP) is an optimization problem for which we do the following:

1 We attempt to maximize (or minimize) a linear function of the decision vari-ables. The function that is to be maximized or minimized is called the objective function.

2 The values of the decision variables must satisfy a set of constraints. Each con-straint must be a linear equation or linear inequality.

3 A sign restriction is associated with each variable. For any variable xi, the sign restriction specifies that xi must be either nonnegative (xi  0) or unrestricted in sign (urs).

Because Giapetto’s objective function is a linear function of x1and x2, and all of Gia-petto’s constraints are linear inequalities, the Giapetto problem is a linear programming problem. Note that the Giapetto problem is typical of a wide class of linear programming problems in which a decision maker’s goal is to maximize profit subject to limited resources.

在文檔中 An Introduction to Model Building (頁 49-53)