You are on page 1of 81

L_DIGIT The Excel zoom level for this workbook is 95 %

Adjust your zoom level for all the pages by p

Welcome to LPEMLi

This is the Chapter 1 workbook. It is an introduction to linear programming that is (almost completely) devoid of algeb use of LP to solve common linear business problems. This "training wheels" workbook will get you started in developi geometrically, and performing sensitivity analysis. It lays a foundation for Chapter 2 which Range of Optimality, and Range of Feasibility, and using the Excel solver and interpreting reports. ==>>

CONTENTS
1 2 3 4

Introduction to LP A simple model Constraints and Feasibility Objective functions and model solutions 1 constraint model solution Maximization models

9 10 10A 11 11A 12

5 6 7 8

13

The Z-Function ISO profit line The slope of the Z-Function


14 15

Disclaimer: Dan DuPort disclaims all warranties of quality, accuracy, correctness, or fitness of this wo purpose. The user assumes the entire risk as to the quality , accuracy and correctness of this work. Th modified in any way but the original copyright must be retained. However, no attempt may be made reverse engineer or include it as part of any other work. All rights reserved by Dan DuPort.

Adjust your zoom level for all the pages by putting the desired % in cell E1 - make the presen

Welcome to LPEMLi Version 1.16

(Remember to save your work by saving this workboo

oduction to linear programming that is (almost completely) devoid of algebra. You can use it to obtain a good u roblems. This "training wheels" workbook will get you started in developing models of business situations, and then solving them alysis. It lays a foundation for Chapter 2 which includes a review of this chapter, the 4 aspects of LP: Shadow Price, Reduced Cost, 0 and using the Excel solver and interpreting reports.

CONTENTS Optimality at the corner points A little sensitivity analysis Slack variables Minimization models Surplus variables Types of constraints Self-Test 1
Template Exercise Pages
Exercise 1 Exercise 2 Exercise 3 Exercise 4 Exercise 5 Exercise 6 Exercise 7

Self-Test 2 Self-Test 3

warranties of quality, accuracy, correctness, or fitness of this work for a particular risk as to the quality , accuracy and correctness of this work. This work may be opyright must be retained. However, no attempt may be made to unlock, unprotect, of any other work. All rights reserved by Dan DuPort.

esired % in cell E1 - make the presentation a little smaller than your screen size if you want to make notes You should also minimize the Excel ribbon !

o save your work by saving this workbook in Excel)

e it to obtain a good understanding of the siness situations, and then solving them ects of LP: Shadow Price, Reduced Cost,

SEE WHAT'S IN THE MARGIN

The margins are where the instructor can provide their own cont They are also where the student can place notes. Every worksheet has margins on the right, and underneath.

INDEX binding coefficient constraint decision variable feasible solution feasibility region LHS linear programming non-binding objective function optimal solution parameter RHS slack solution surplus Z function

ALSO YOU CAN CREATE YOUR OWN EXERCISES OR CONSTR

The worksheets that follow (C1 - Template) give instruction on ho

en size if you want to make notes in the margins.

e the Excel ribbon !

nstructor can provide their own content - spin on LP. dent can place notes.

ns on the right, and underneath.

OUR OWN EXERCISES OR CONSTRUCT YOUR OWN WORKSHEETS !!!

(C1 - Template) give instruction on how to work with the template

L_DIGIT An Introduction to

Linear Programming

Business situations can often be expressed in terms of mathematical expressions. A set of these expressions is calle that the system models the situation, or is a model of the situation. The object of studying the mathematical model o regarding the situation. Obtaining this information solves the problem of deciding on just what to do, so the inform

Suppose a business sells two products, P1 and P2 , and makes a profit of $7 on P1 and $6 on P2. An equation that rep where x1 represents the quantity of P1 sold, x2 represents the quantity of P2 sold, and Z represents the total profit and multiplication is assumed by concatenation. You can think of P1 as being a basket ball, and P2 as being a soccer bal

The symbols x1 and x2 are variables. Because they will be used to make a decision, they are called decision variabl 7x1 and 6x2 are terms in the equation. Terms are expressions that are separated by + or signs. One could say that i reality a symbol that represents a function, and it should not be thought of as a variable, at least in the sense that a nu by the variation caused by substitution of numbers for x1 and x2. The equation is better thought of as a formula; her notation. In general, a model will contain decision variables, x1, x2,..,x where , in our study, is generally less Another reason is that it is more precise, and more instructive, to talk about these models using subscripts. In worki representative of the quantities they represent, such as B, for the number of basket balls produced, and S for the num

The numbers 7 and 6 are coefficients, constant values that are multipliers in front of the variables that appear in the represent known values that dont change in the situation. In this equation, the coefficients represent profit. If the s is described with the 7.5 in place of 7 in the first term. Because of this, coefficients can be thought of as varying, ho

This equation models the situation, and is said to be a model of the situation. Note that both x1 and x Z = 7x1 + 6x2 x1 , x2 0

It might be awkward to think of a non-integer number of a product. 3.5 balls might not be an appropriate quantity. However, if days. We dont require x1 and x2 to be integers, for now. At a later time, we will discuss what happens when we have an integer requirem with negative quantities of products.

of these expressions is called a system. We think of a system as representing the actual situation. We say ng the mathematical model of a business situation is to obtain information so that a decision can be made ust what to do, so the information is called a solution to the model.

. An equation that represents the total profit from the items sold is Z = 7x1 + 6x2 represents the total profit and is equal to 7 times x1 plus 6 times x2 ; as being a soccer ball.

y are called decision variables. Variables are placeholders for numbers; we can substitute numbers for them. signs. One could say that in this equation, total profit is given in terms of the profit from P1 and P2! Z is in at least in the sense that a number could be substituted for it. It does vary, however, but its variation is fixed thought of as a formula; here, it is the formula for profit. There are numerous reasons to use subscript n our study, is generally less than 12. In real world situations could be in the hundreds or thousands. ls using subscripts. In working with small models in practice, it is OK to use variables that are more produced, and S for the number of soccer balls produced.

e variables that appear in the terms. The coefficient of x1 in the term 7x1 is 7. Coefficients are constants that ents represent profit. If the situation changed, for example the profit from P1 increased to 7.5, a new situation be thought of as varying, however, they are not considered variables. They are called parameters.

and x2 are required to be 0 so the model becomes

quantity. However, if we think of x1 as the rate of production of balls, then 3.5 balls per day has meaning, it means 7 balls in two when we have an integer requirement. However, it is a requirement that x1 and x2 are positive. That is, we will never be working

L_DIGIT Z ## 7*B6 + 6* B7

45
40

X1 X2

C1 # C2 C3 C4 C5 C6 C7 C8

LHS 4*B6 + 3*B7

LE

RHS 120

35
30

25
20

15

The inequality representing the restriction on resources is called a7 constraint. It has a left 0 17 6 hand side, 6 LHS , which in this case is an expression with 2 terms, 14.86 0 and a RHS, the right hand side, the constant on the right hand side of the constraint inequality. We will see that it is necessary to write all constraints in a similar manner, with the simplified linear expression on the left, and the RHS as a single constant. x1 x2
C1 0 30 40 0 50 0
-5

10 5 0 5 15

Model data will C2be put into the solver tool in the cells in the top left hand corner. For the time being, the solver tool c B6 cell is used instead of x1 and B7 is used instead of x2 . So the Z function , here Z = 7x1 + 6x2 C3 expression is entered. You never enter anything in B6 or B7; these cells are reserved for use later
C4

Theres probably more to most business situations than the information given by just a profit that each P1 is made from 4 lb. (pounds) of rubber, and each P2 is made C5 Current Z from 3 lb. of rubber and that the company has 104 as C1 136.5 6.5 be made, are restricted by 4x1 + 3x2 120, written above 4*B6 + 3*B7 LE 120. LE in the spreadsheet stands for les

C6 expression is entered. There is space for 8 constraints, labeled C1 thru C8. Each constraint's expression and line graphed on the lines with their expressions when working with two or more constraints. C7 C8

Now the model is:

Z = 7x1 + 6x2 st where st is subject to abbreviated. 4x1 + 3x2 120 x1 , x2 0

Exercise: Change the constraint to 5x1 + 2x2 100. How to do it:


1

Select D7. You'll see = 4*B6 + 3*B7 in the entry line. Simply change the 4 to 5 and the 3 to 2 and hit enter. Now change the RHS (G7) to 100 and hit enter. Hit the GRAPH button, and new constraint will be displayed.

Change C1 back to 4*B6 + 3*B7 LE 120 and continue in the top left box on the next page.

25

35

45

d corner. For the time being, the solver tool consists of the entry cells colored in yellow, and the chart to the right. The + 6x2 , is entered in terms of B6 and B7 as Z = 7*B6 + 6*B7. If you place the cursor on B3 you will see how the are reserved for use later-on by the Excel solver.

given by just a profit function. So lets add something that gives more information about the situation. Let us assume rom 3 lb. of rubber and that the company has 120 lb. of rubber available. So x1 and x2, the number of P1 and P2 that can Increment

6.500 LE in the spreadsheet stands for less than or equal to, "". IF you place the cursor on D7 you will see how the ch constraint's expression and line graphed on the chart inherits the color of its label. This makes it easy to match the constraint

where st is subject to abbreviated.

the entry line. Simply Now change the

APH button, and

the right. The 3 you will see how the

tion. Let us assume that can

match the constraint

L_DIGIT Z ## 7*B6 + 6* B7

60

50

X1 X2

C1 # C2 C3 C4 C5 C6 C7 C8

LHS 5*B6 + 2*B7

LE

RHS 100
40

30

Notice that your new constraint passes through (0,50) and (20,0).

20

0 12 7 6 10.21 0 Notice that all the points with x1 between 0 and 20, and

x2 between 0 and 50 satisfy the constraint. Notice that all the other points in the plane do not x1 x2 satisfy the constraint.
C1 0 20 50 0

10

0 -5 5 15

C2 In general, constraints can be inequalities with or , or equalities with =. In the spreadsheet C3

" is used to represent a maximum requirement and the constraints RHS represents a quantity of reso requirement is a maximum demand for a product; for example, x C4 is used to represent a minimum requirement, and = is used to represent an exact amount require
C5

Current Z 71.5 6.5 represents how much rubbe The coefficients of 5x1 + 2x2 100 are 5 and 2. 136.5 5 is the coefficient of x1 and C6 C7

2 is the coefficient of x2 and represents how much rubbe

The restriction that both x1 and x2 are positive, written as x1, x2 0, is also a constraint, actually two con These are called non-negativity constraints. You will find that non-negativity constraints are not counte C8 Thus our example is thought of as having only one constraint.

Take a point below the constraint line, like (5,10).


1 What happens when you put (5,10) into the constraint equation 5x1 + 2x2 100.

You get 5*5 + 2*10 = 25 + 20 = 45 for the LHS. For sure 45 100. Thus (5,10) satisfies the constraint. Feel free to put in and graph more constraints, using the cells D8 thru D14 for the LHSs, and E7 thru E14 for the RHSs, the constants. For instance, try 3x1 + 3x2 50.

25

35

45

or equalities with =. In the spreadsheet we use "LE", "GE" for or . constraints RHS represents a quantity of resource available, as in this e xample. Another example of a maximum product; for example, x1 12. is used to represent an exact amount requirement. More on these later.
Increment 6.500 how much rubber is used in producing one unit of P ; and represents 1

and represents how much rubber is used in producing one unit of P 2. 0, is also a constraint, actually two constraints, namely x1 0 and x2 0. negativity constraints are not counted when you count the constraints in a model.

LHS. For sure 45

raints, using the cells 4 for the RHSs, the

L_DIGIT
60

Z ##

7*B6 + 6* B7
50

X1 X2

C1 # C2 C3 C4 C5 C6 C7 C8

LHS 4*B6 + 3*B7

LE

RHS 120

40

30

(1,2) is a feasible solution with value of Z = 7(1) + 6(2) = 19


0 22 7 6 (30,0) is a feasible solution with value of 18.57 Z0 = 7(30) + 6(0) = 210

20

10

(20,30) is not a feasible solution because 4(20) + 3(30) = 170 > 120 x1 x2 0 (1,-2) is not a feasible solution because -2 < 0 C1 0 50 -5 5 15 38 0 So far, weve C2 modeled the situation. Given any situation, a firm would like to know the best way to profit from it, and

achieve as much profit, Z, as possible. So the profit equation in this model is called an objective function C3 much of P1 and how much of P2 should be made so that their profit is the greatest. This new information about maximization is added to the model definition: C4
C5 C6

Maximize Z = 7x1 + 6x2 st Current Z 4x1 + 3x2130 120 x1 , x2 0

Increment 6.500

Model Solution C7 We solve a model by finding values for all the variables in it that satisfy all the constraints simultaneously, while the pa C8 number of decision variables in the model. They are called feasible solutions of the model. Taken together, the feasib this region is the triangle formed by the line 4x1 + 3x2 = 120, the X1 axis, and the X2 axis. In our example model, = 2 and the feasible solutions are ordered pairs (x1, x2) such that 4x1 value of the feasible solution (x1, x2).

Model Solution

We solve a model by finding values for all the variables in it that satisfy all the constraints simultaneously, while the parameters 1 remain constant. These values are ordered -tuples, were is the number of decision variables in the model. They are called feasible solutions of the model. The set of all feasible solutions of the model is called the feasibility region of the model.

25

35

45

ke to know the best way to profit from it, and this is exactly why we are modeling it. The objective of the firm is to objective function, thinking of Z as a function of the two variables x1 and x2. The firm must decide on how

Increment

the constraints simultaneously, while the parameters remain constant. These values are ordered -tuples, were is the of the model. Taken together, the feasible solutions form the region of feasibility of the model. In the above model

) such that 4x1 + 3x2 120 and x1, x2 0. Z evaluated at any such (x1, x2) is referred to as the

l the variables in it that while the parameters tuples, were is the el. They are called feasible sible solutions of the model

of the firm is to must decide on how

tuples, were is the el. In the above model

L_DIGIT Z ## 7*B6 + 6* B7

45
40

X1 X2

C1 # C2 C3 C4 C5 C6 C7 C8

LHS 4*B6 + 3*B7

LE

RHS 120

35
30

25
20

A small amount of algebra to follow:


02 17 7 2 120 4x1 6 divide by 3 4x1 + 3x 120 so 3x now 14.86 0 3x2 120 4x1 so 6x2 240 8x1 I multiplied by 6 3 3

15 10 5

Z = 7x1 + 6x2 7x x1 x2 -8x1 = 240 - x1 0 1 +240 -5 5 15 C1 0 40 30 0 C2 Because our models will only involve the Maximization or Minimization of an objective function, an optimal solutio

called a solution of the model. For the Maximization case, it is a feasible solution with the greatest solution value; f C3 solution value. A solution of a model is used in a decision that the company can take; often it is a decision to produce resources that minimize cost. In our example, the solution of the model is x1 = 0, x2 = 40, and the value of the solution C4

C5 Current Z Models can have multiple Increment We write "the " because it is the only solution, it is unique. solutions, as we will see. The so 104 6.500 as I've done in the box on the left to get that: Z 240 - x1 C6 C7

which is maximum only when x1 is 0. Happily, we don't have to use this sort of algebraic wrestling to solve models.

The solution tells us that in this situation, it is more profitable to make P 2 , and that we might want to just make number of P1C8 as the product might be valuable to marketing both products. Thus, we might introduce another constra of P2. So x1 x2/2 and so, 2x1 x2 and so, 0 x2 - 2x1 . This gives us a new model, listed above in

NEW MODEL Max Z = 7x1 + 6x2 st 4x1 + 3x2 120 -2x1 + x2 0 x1 , x2 0

Note the 1 is not written in front of x2 in the second constraint but it is there; you must train yourself to recognize it. See if you can put in the new constraint in cells D8 and E8. Remember the negative sign in front of the 2. Graph your work. Where is the feasible region for this model?

25

35

45

n of an objective function, an optimal solution of the model is a best feasible solution of the mod el , and it is often just le solution with the greatest solution value; for t he Minimization case, it is a feasible solution with the smallest any can take; often it is a decision to produce some number of products that maximize profit or use certain amounts of = 40, and the value of the solution is Z = 7(0) + 6(40) = 240.

Increment ave multiple solutions, as we will see. The solution of this model is obtained by re-writing the constraint and substitution

sort of algebraic wrestling to solve models. It's easier than that.

, and that we might want to just make P2 and abandon making P1. However, perhaps the firm needs to make a certain cts. Thus, we might introduce another constraint just on the number of P1 to produce, say no less than of the number ew model, listed above in the top right box.

the second constraint

n cells D8 and E8. he 2. Graph your

, and it is often just certain amounts of

traint and substitution

eds to make a certain han of the number

L_DIGIT

Linear Models

A linear model is a model in which each expression is linear, i.e.. every term in each expression is either a constant Programming is the process of finding a solution of a linear model which includes the Maximization or Minimizati such a model involving non-linear expressions. We visit that later. The meaning of the word programming linear models. In linear programming we deal only with models that have a linear objective function and linear con are called Maximization models or Minimization models.

Planning with linear models

A coefficient in the objective function or in a constraint, or the RHS of a constraint, is a parameter that can be varied case of a maximization model, the coefficients in the objective function, the profits, are often not known with great an issue as in these models the objective function coefficients represent costs. Its often necessary to determine the as the original model. This range is called the range of optimality. We can also use this range of optimality to find o the optimal solution of the model. On the other hand, we might have the opportunity to obtain more (or less) of a pa know the effect of this on the optimal solution and optimal solution value. This study is called sensitivity analysis, a programming - planning with linear models. For now, well only address how to solve (two variable) models. These graphical solutions are limited to linear programming models with only two decision variables. We study the solutions of all linear programming models, regardless of the number of variables.

Graphical Solution of a Maximization Model

Let's take a situation where 2 products are produced from the same resource and labor pool. There are numerous situ machines, where one constraint comes from the amount of metal available, and the other, the amount of time each p available and different types of meals that can be prepared from the food, each type taking a different amount of tim

Suppose that limited amounts of labor and material are given by: 120 lb. (pounds) of material, and 50 hr. (hours) of labor available each work day. Suppose further that it takes 3 lb. of material and 4 hr. of labor to make product P1 and Let x1 = number of P1 produced and x2 = number of P2 produced. Finally, assume that the profit on e The linear programming model is formulated as: max Z = 4x1 + 5x2 st 3x1 + 6x2 120 lb. of material 4x1 + 2x2 70 hr. x1 , x2 0

ression is either a constant or the product of a constant and (the first power of) a single variable. Linear aximization or Minimization of an objective function. Non-linear programming is the process of solving programming is to be taken to be planning; thus linear programming is the process of planning with ve function and linear constraints. The objective function is always either maximized or minimized. They

arameter that can be varied to alter a model to represent similar situations that might be possible. In the ften not known with great accuracy. In the case of a minimization model, its a cost accuracy that might be ecessary to determine the range of these parameters which give the altered model the same optimal solution ange of optimality to find out how to adjust the price of a product, or cost of a resource, without changing btain more (or less) of a particular resource - and thus change the RHS of one of the constraints; wed like to alled sensitivity analysis, and we will do that in the next chapter. Doing it exemplifies the idea of linear wo variable) models. In the case of models with two variables, solutions can be illustrated graphically. on variables. We study these carefully, as the ideas involved give rise to analogous ideas that apply to the

ol. There are numerous situations which fit this mold, for instance metal being formed on two different the amount of time each product spends being formed. Another standard situation is an amount of food g a different amount of time to prepare.

and 6 lb. of material and 2 hr. of labor to make the other product, P2. assume that the profit on each P1 is 4 euros, and the profit on each P2 is 5 euros.

L_DIGIT OUR MODEL

Max Z = 4x1 + 5x2 st 3x1 + 6x2 120 4x1 + 2x2 70 x1 , x2 0 What is the feasibility region of this model? It consists on all the points (x 1,x2) that satisfy all the constraints - simultaneously. They must satisfy: 3x1 + 6x2 120 and 4x1 + 2x2 70 and x1 , x2 0 You can see that this is the area below the blue line and also below the brown line, and of course, above the X1 axis and to the right of the X 2 axis.

Increment 4.500 It's actually quite easy to see it. It involves the mysterious dotted line in the graphs displayed. In two variable LP, the objective function, Z, is a linear function of two variables, x1 and x2 , which means that the points satisfying the function will form a plane in x X2 x Z three dimensional space. M = { (x1, x2, z) | z = 4x1 + 5x2 and x1, x2 0 } is a plane. I've put a graphic of it in the box, top rig

What's the solution of the model ?

It is the triangular wedge coming out of the origin (0,0,0). Drop Current Z the wedge down through the X1xX2 plane until the Z value is 20. 94.5 see the intersection of the triangle with the X1xX2 plane is the line with slope -4/5. You can see this in the figure just to the right. dotted line in the graph above is the representation of this intersecting line. Notice the slopes are the same, the next page). Moving the dotted line away from the origin (0,0) and parallel to itself corresponds to pushing the triangul further down into the X1xX2 plane. As this is done, the Z value continually increases; at each increase all the points along the line the same Z value. By moving the dotted line far enough away from the origin, it will leave the feasibly region. The last po leaves the region is a solution of the model.

Drop the triangle down through the X1xX2 plane until the Z value is 20. The intersection of the triangle with the X1xX2 plane is the line with
Increment

In two variable LP, the objective e points satisfying the function will form a plane in the X1 s a plane. I've put a graphic of it in the box, top right.

xX2 plane until the Z value is 20. You'll /5. You can see this in the figure just to the right. The otice the slopes are the same, -4/5. (Slope is reviewed on to itself corresponds to pushing the triangular wedge ases; at each increase all the points along the line give t will leave the feasibly region. The last po int that it

until the Z value is 20. plane is the line with

L_DIGIT
40

Z ##

4*B6 + 5* B7
35

X1 X2

C1 # C2 # C3 C4 C5 C6 C7 C8

LHS 3*B6 + 6*B7 4*B6 + 2* B7

LE LE

RHS 120 70

30

25

20

15

OUR MODEL
0 23.63 19 0

x1 x2 0 C1 0 20 -5 5 15 40 0 C2goes 0 thru the point (5,0) 35 The dotted line and (0,4). At both points, and at each point along the line, the value of Z is 20 18 0 the iso-line of the objective function Z, "iso" meaning equal value. In this with the Z-plane at Z = 20. This line is called of this line is -4/5. C3 By moving it away from the origin parallel to itself, the slope remains the same, and all points along

Max Z = 4x1 + 5x2 4 st 3x1 + 6x2 120 4x1 + 2x2 70 x 1 , x2 0

10

than before you moved it. Look at the Z-plane. You can see that Z gets higher as you move away from the origin. Thu point in the feasible region touched by the iso-line will give the maximal value of Z over the region, which is the optim C4
C5 USE THE INCREASE BUTTON TO MOVE THE Current Z 94.5 ISO Increment 4.500

C6 Since Z = 4x1 + 5x2 , a line with slope equal to -4/5 will be an iso-profit line of Z, the value of Z will be the same evaluated at any p is the slope and b is the X2 intercept. So if m = -4/5, the Z value of any point on the line is 4x1+ 5(-4x1 C7 line. Can you check that out on the graph by moving the iso-line? Notice that none of the points on that line are feasible. S point where constraint lines intersect, the optimal solution will be at an intersection point of the constraints of the model C8 Finding them involves wrestling with some algebra, or reading them off the graph, or using a computer algorithm. For now, we another way of determining the optimal solution is to locate all corner points, and by substituting the values of each corne

Recall that the objective function is of the form Z = a1*x1 + a2*x2. The slope of the objective function at a particular value of Z, say a is the change in the X2 value for every unit change in the X1 value of the line a0 = a1*x1 + a2*x2 1
1 Re-write this in the slope intercept form:

x2 = - a1/a2*x1 + a0/a2 = m*x1 + b And check that as x1 changes from k to k+1, x2 changes from m*k + b to m(k+1) +b = m*k + m + b so for every unit change in x1, x2 changes by m*k + m +b (m*k + b) = m So every objective function Z = a1*x1 + a2*x2 has infinity many iso lines, lines where the Z value remains constant, say a0 over all points on the line; each line has slope m = - a1/a2 and x2 intercept b = a0/a2

15

25

35

45

t each point along the line, the value of Z is 20. This is because the line represents the intersection of the X1xX2 plane function Z, "iso" meaning equal value. In this case, Z is a profit function, so the line is called an iso-profit line. The slope e slope remains the same, and all points along it in its new position will give the same value of Z, but a higher value of Z higher as you move away from the origin. Thus as you move the iso line through the feasible region and out of it, the last value of Z over the region, which is the optimal solution of the model. Iso lines are also referred to as contour lines.
Increment

USE THE DECREASE BUTTON TO MOVE THE ISO PROFIT LINE TOWARD THE ORIGIN

the value of Z will be the same evaluated at any point along the line. This is because the line can be written as x2 = mx1 + b, where m + 5(-4x1/5 + b) = 4x1 - 5(4x1/5) + 5b = 4x1 - 4x1 + 5b = 5b. If b = 45, say, then the iso-value is 225 for any point along the none of the points on that line are feasible. Since any last point that the iso-line touches while leaving the feasible region must be a ction point of the constraints of the model. The intersection points are called extreme points, and sometimes corner points. ph, or using a computer algorithm. For now, we'll be content with just reading the intersecting points from the graph. Note that and by substituting the values of each corner point into the equation for Z, observe which corner point leads to a maximal value of Z.

*x2. cular value of Z, say a 0 change in the X1 value

has infinity many iso over all points

of the X1xX2 plane profit line. The slope ut a higher value of Z n and out of it, the last as contour lines.

+ b, where m 5 for any point along the asible region must be a es corner points. the graph. Note that to a maximal value of Z.

L_DIGIT Z ## 4*B6 + 5* B7

X1 X2

C1 # C2 # C3 C4 C5 C6 C7 C8

LHS 3*B6 + 6*B7 4*B6 + 2*B7

LE LE

RHS 120 70

OUR MODEL
0 23.63 19 0

Max 4 Z = 4x1 + 5x2 st 3x1 + 6x2 120 4x1 + 2x2 70 x ,x 0 x1 x2 1 2


C1

0 20 40 0 C2constraints 0 35 - there are 3 corner points. You In our model the intersect at 3 points 18 0 top left to bottom right: I include the algebra here as a refresher. From C3 1. Corner point #1 is the intersection of the line 3x1+ 6x2 = 120 with the X C4 POINT IS (0,20). The value of Z at that point is 4*0 + 5*20 = SO THE CORNER C5 2. Corner point #2 is the intersection of 3x1 + 6x2 =Current 120 withZ 4x 94.5

C6

getting 9x1 = 90 so that x1 = 10. By substituting x1 = 10 into the first equation C7 SO THE CORNER POINT IS (10,15). The value of Z at that point is 4*10 + 5*1

C8 3. Corner point #3 is the intersection of the line 4x1 + 2x2 = 70 with the X SO THE CORNER POINT IS (17.5,0). The value of Z at that point is 4*17.5 + 5*

40

35

30

25

20

15

10

0 -5 5 15 25 35

there are 3 corner points. You can find the values of these points by using a little algebra or ju left to bottom right:

= 120 with the X2 axis. To find it, replace x1 with 0 in 3x1 + 6x2 = 120 to get 3*0 + 6x2 Z at that point is 4*0 + 5*20 = 100

Increment =Current 120 withZ 4x1 + 2x2 = 70 we'll multiply the latter equation by 3, the former by 4.500

= 10 into the first equation, 3*10 + + 6x2 = 120, so that 6x2 = 120-30 = 90, and x of Z at that point is 4*10 + 5*15 = 115

= 70 with the X1 axis. To find it, replace the x2 in 4x1+ 2x2 = 70 with 0 to get 4x of Z at that point is 4*17.5 + 5*0 = 70

CORNER POINTS :

#1: (0,20). The value of Z at that point is


4*0 + 5*20 = 100 1
1

#2: (10,15). The value of Z at that point is 4*10+ 5*15 = 115 #3: (17.5,0). The value of Z at that point is 4*17.5 + 5*0 = 70
#2 gives the largest value of Z and it is therefore the solution of the model.

35

45

points by using a little algebra or just read them off the graph.

= 120 to get 3*0 + 6x2 = 120 ; 6x2 = 120 ; x2 = 120/6 = 20

by 3, the former by -1, and add.

3 * (4x1 + 2x2 = 70) => -1* (3x1 + 6x2 = 120) =>

12x1 + 6x2 -3x1 - 6x2

-1* (3x1 + 6x2 = 120) => 30 = 90, and x2 = 90/6 = 15.

-3x1 - 6x2 9x1+ 0x2

= 70 with 0 to get 4x1 + 2*0 = 70 ; 4x1 = 70 ; x1 = 17.5

at that point is

Z at that point is

f Z at that point is

alue of Z and it is n of the model.

120/6 = 20

+ 6x2 = 210 6x2 = -120

6x2 = -120 + 0x2 = 90

L_DIGIT Z ## 4*B6 + 5*B7


40

X1 X2

C1 # C2 # C3 C4 C5 C6 C7 C8

LHS 3*B6 + 6*B7 4*B6 + 2* B7

LE LE

RHS 120 70

35

30

25

20

OUR MODEL
0 23.63 19 0

15

x1 x2 0 20 0 -5 5 15 40 0 C2 0 35 If we change the coefficients of the objective function Z, the slope of the iso-profit line (dotted line) will change and w 18 0 region at a corner C3 point other than (10, 15), the optimal solution we got before making the change. Try changing the C1

Max Z = 4x1 + 5x2 4 st 3x1 + 6x2 120 4x1 + 2x2 70 x 1 , x2 0

10

coefficient of x1 to 2. Change it and re-graph. Use the increase button to move the iso-profit line thru the feasibility corner point #1, C4 (0, 20). Now try changing the slope of Z to a bit less than -2 (the slope of the C2 line) by changing the profit line thru the feasibility region to see that the last point that it touches before leaving the region is the corner po other corner points, that these Z values are indeed the maximum ones. Changing the slope of Z corresponds to twistin
C5 Increase the slope of Z, the iso-profit line gets flatter, so corner point #1 becomes C6 Current Z 94.5 Increment 4.500

In the case of a profit objective function Z = a 1x1 + a2x2 where a1= unit profit from P 1 and a2 = unit profit from P C7 decreasing the profits which are represented by the coefficients. Note that you can increase or decrease the slope of Z in t Decreasing a1 or increasing a2 will make the Z iso-profit line flatter. Changing the coefficients of the Z function is a part of the stu C8 the model is to changes in the profits of the products. This tells us, for instance, that if we can change the unit profit f mistaken about the real profit from P 1 and it is closer to 7 than 4, then we're still doing the right thing in making 10 P

The slope of the iso-line of any linear model is negative because it "slants" from the upper left to the lower right. The same is true of a constraint line of a constraint. In our model, the slope of the C1 constraint line is -3/6 = -1/2 and the slope of the C2 constraint line 1 is -4/2 = -2. The slope of Z is -4/5. 1 Note that when a line has a negative slope: Increasing the slope makes the slope closer to 0, making the line flatter, closer to horizontal Decreasing the slope makes the slope further from 0, making the line steeper, closer to vertical When a line has positive slope, interchange "increasing" and "decreasing" in the above. What happens when the slope of Z is the same as the slope of one of the constraint lines ? In this case, there are two corner points that are the solutions and all the points on the constraint line connecting the
15 25 35 45

profit line (dotted line) will change and when we move it out away from the origin, it just might leave the feasible before making the change. Try changing the slope of Z to a bit more than -1/2 (the slope of the C1 line) by changing the profit line thru the feasibility region to see that the last point that it touches before leaving the region is 2 (the slope of the C2 line) by changing the coefficient of x1 to 13. Re-graph. Use the increase button to move the iso hes before leaving the region is the corner point #3, (17.5, 0). Note that in these two cases the Z values are smaller at the Changing the slope of Z corresponds to twisting the triangular plane talked about on page 7.
Increment

Decrease the slope of Z, the iso-profit line gets steeper, so corner point #3 becomes maximal.

= unit profit from P2 , the business part of increasing or decreasing the coefficients of Z corresponds to increasing or u can increase or decrease the slope of Z in two ways. Increasing a1 or decreasing a2 will make the Z iso-profit line steeper. he coefficients of the Z function is a part of the study called sensitivity analysis. By doing it, we can find how sensitive the solution of e, that if we can change the unit profit from P1 to 7, then (10, 15) will still be the optimal solution. It also tells us that if we are ill doing the right thing in making 10 P1 and 15 P2. In fact, we can be mistaken about the profit from P1 all the way until it's more than

s negative because it t. The same is true of a odel, the slope of the C1 of the C2 constraint line

er to 0, making the line

ther from 0, making the

me as the slope of one of wo corner points that are aint line connecting the

t leave the feasible 1 line) by changing the e leaving the region is utton to move the isoalues are smaller at the

onds to increasing or

sensitive the solution of s us that if we are e way until it's more than

L_DIGIT Slack Variables

We can express an inequality "" as an equality by using what are called slack variables. We can rewrite C C1 : 3x1 + 6x2 + s1 = 120

where here s1 is a slack variable, and is 0. The 1 in s1 comes from the idea that s1 goes along with the 1 of the constraint. Similarly, C2 : 4x1 + 2x2 + s2 = 70

The value of a slack variable is the amount of the resource that is not used. In our example with optimal solution (1 substituting the optimal solution into the constraint 3x1 + 6x2 and subtracting that from 120, the RHS. Doing so g s1 = 120 - ( 3*10 + 6*15 ) = 0

We do this subtraction simply because at the point (x1 , x2 ) we use exactly 3x1 + 6x2 lbs. of material, and we have You can see that the slack for C2 is 0 also. s1 = 0 and s2 = 0. The slack for these constraints is 0 because these constraint lines are binding they each contain an are binding constraints and will have 0 slack. Constraints not containing an optimal solution point are called

For example, when we changed the model by changing the Z equation coefficients of X1 to 13, we get an optimal so Finding the slack:

For C1: s1 = 120 - ( 3*17.5 + 6*0 ) = 120 - 52.5 = 67.5 lbs. of material left over. binding.

For C2:

Note: In more advanced treatments of LP, the inequalities are replaced with equalities and the slack variables are inc form. For example, Max Z = 4x1 + 5x2 + 0s1 + 0s2 st 3x1 + 6x2 + s1 = 120 4x1 + 2x2 + s2 = 70 x 1 , x 2 , s1 , s2 0

TRY SELF

is in standard form.

es. We can rewrite C1: 3x1 + 6x2 120 as

oes along with the 1st constraint, C1. It represents the amount by which the solution misses fulfilling the RHS

mple with optimal solution (10, 15), the amount of material not used is found by m 120, the RHS. Doing so gives

bs. of material, and we have started with the RHS lbs. of the material.

contain an optimal solution point. Any constraints containing an optimal solution point lution point are called non-binding, and will have non-zero slack.

1 to 13, we get an optimal solution of (17.5,0) so C1 does not contain the optimal solution point.

For C2:

s2 = 70 - (4*17.5 + 2*0) = 70 - 70 = 0.

C2 is binding, C1 isn't binding., it's non-

nd the slack variables are included in the equations. When this is done, the model is said to be in standard

Y S E L F - T E S T #2

the RHS

L_DIGIT Z ## 4*B6 + 5* B7

40

35

X1 X2

C1 # C2 # C3 C4 C5 C6 C7 C8

LHS 3*B6 + 6*B7 4*B6 + 2*B7

GE GE

RHS 30 120 70
25

20

15

OUR MODEL
0 29.25 23 0 4 Min Z = 4x1 + 5x2 5

10

x1 x2 0 20 40 C1 0 20 40 0 C2 model 0 comes into play when 35 the cost of doing something is to be minimized. This could be the cost of prepar The Minimization amounts of vitamins, or other properties of the 18 0 ingredients, F 1 and F2, given by the number of these supplied by a single unit of F and F2. Each unit C3 of F1 might supply 3 units of nitrogen, and each unit of F 2, 6 units of nitrogen; and at least 120 units of nitrogen The 4x1 + 2x2 70 constraint would say that each unit of F 1 supplies 4 units of sulpher and each unit of F function coefficients C4 represents the cost of each unit of F 1 and F2 being 4 and 5, respectively. Notice that I have used the same

st 3x1 + 6x2 120 4x1 + 2x2 70 x 1 , x2 0

C6 For the minimization problem, the feasible region is the area arising outward from the intersection of the constraints and is ge C7 of the red line. The last point(s) touched by the iso-cost line as it moves toward the origin is the optimal solut is also to the right the least value of Z is the optimal solution. As in the maximization model, the corner points are the possible solutions. The corn C8 If the slope of Z is just a little more (the Z iso-line is flatter) than the slope of the line 3x solution is (10,15). line is steeper) than the slope of 4x1 + 2x2 = 70, which is -2, then the optimal solution will be (0,50). See the upper right box for m

Increase the C5 slope of Z, the line gets flatter, so corner point #3 becomes minimal.

Current Z
117

Increment
4.500

For the solution to the Minimization model: Place the ISO-LINE in the feasible region and move it towards the origin. Move the iso-line toward the origin. Locate the last point passed when leaving the feasible region. For the Minimization model, the point giving the smallest value of Z is 1 the optimal solution.
1

A little sensitivity analysis :


What should the coefficient of x1 be to assure that only x1 is used and no x2 is used (x2=0). Find this by asking what the slope of Z should be to get the Z iso-line to leave the feasibility range at the point (40,0). By observation, the slope should be slightly more than the slope of the constraint line 3x1 + 6x2 = 120.

Remember that the slope of Z = a1 x1 + a2 x2 is -a1 / a2. And that the slope of a1 x1 + a2 x2 = Any Constant is -a1 / a2. So the slope of 3x1 + 6x2 = 120 is -3/6 = -1/2. Since, in Z = 4x1 5x2 , a2 = 5, we need a1 so that -a1/5 > -1/2. So we need a1 > 5/2.
60 80 100

TRY THIS BY MAKING a1= 2.6 and graph the model.

o be minimized. This could be the cost of preparing a certain mixture from ingredients. The constraints could represent required the number of these supplied by a single unit of F1 or F2. For instance, fertilizer could be a mixture of two types of base fertilizers, F nits of nitrogen; and at least 120 units of nitrogen must be in the mixture; this is the 3x1 + 6x2 120 constraint. of sulpher and each unit of F2 supplies 2 units of sulpher, and at least 70 units of sulpher must be in the mixture. The objective Notice that I have used the same lines as in the previous maximum problem but the feasible region is different.

Decrease the slope of Z, the iso-line gets steeper, so corner point #1 becomes minimal.

rom the intersection of the constraints and is generally unbounded. In this example, it is the area to the right of the blue line that it moves toward the origin is the optimal solution, just the reverse of what happens in the Maximization model. The point(s) with corner points are the possible solutions. The corner points here are (0,35), (10,15), and (40,0). With the slope of Z = -4/5, the han the slope of the line 3x1 + 6x2 = 120, which is -1/2, then the point (35,0) will be optimal. If the slope of Z is a little less (the Z iso olution will be (0,50). See the upper right box for more discussion like this. It is called sensitivity analysis.

and move it towards origin. Locate the last


smallest value of Z is

is used and t the slope of Z should be nge at the point (40,0). more than the slope of

a1 / a2.

/2. Since, in Z = 4x1 +

d represent required pes of base fertilizers, F 1

ure. The objective le region is different.

t #1 becomes minimal.

of the blue line that model. The point(s) with 4/5, the is a little less (the Z iso -

L_DIGIT Surplus Variables

We can express an inequality " " as an equality by using what are called surplus variables. We can rewrite C C1 : 3x1 + 6x2 - s1 = 120

where here s1 is a surplus variable, and is 0. As with slack variables, the 1 in s1 comes from the idea that s over fulfills the RHS of the constraint. Similarly, C2 : 4x1 + 2x2 - s2 = 70

The value of a surplus variable is the amount of the ingredient which is more than required. In our example with op as in the method for finding slack, substitute the optimal solution into the constraint 3x1 + 6x2 but now subtract 12 s1 = ( 3*10 + 6*15 ) - 120 = 0 We do this subtraction simply because at the point (x1 , x2 ) we provide exactly 3x1 + 6x2 units of the ingredient You can see that the surplus for C2 is 0 also. s1 = 0 and s2 = 0. The surplus for these constraints is 0 because these constraint lines are binding they each contain are binding constraints and will have 0 surplus. Constraints not containing an optimal solution point are called

For example, when we changed the model on Page 11 by changing the Z equation coefficients of x1to 2, we get an o Finding the surplus:

For C1: s1 = ( 3*40 + 6*0 ) - 120 = 0 units of nitrogen than required.

For C2:

s2= 70 - (

As with the Maximization model, In more advanced treatments of LP, the inequalities are replaced with equalities c signs in front of their "s" variable, and that the " " inequalities will have positive signs in front of their "s" variab Min Z = 4x1 + 5x2 + 0s1 + 0s2 st 3x1 + 6x2 - s1 = 200 4x1 + 2x2 - s2 = 100 x 1 , x 2 , s1 , s2 0 is in standard form.

TRY SELF

ables. We can rewrite C1: 3x1 + 6x2 120 as

mes from the idea that s1 goes along with the 1st constraint, C1. It represents the amount by which the solution

red. In our example with optimal solution (10, 15), but now subtract 120, the RHS. Doing so gives

of the ingredient, and we have specified that we needed 120 units of it.

contain an optimal solution point. Any constraints containing an optimal solution point solution point are called non-binding, and will have non-zero surplus.

icients of x1to 2, we get an optimal solution of (40,0) so C2 does not contain the optimal solution point.

= 70 - (4*40 + 2*0) = 70 - 160 = -90.

C1 is binding,

C2 isn't binding, it's non-binding.

re replaced with equalities containing the surplus variables. Note that the " " inequalities will have negative ns in front of their "s" variables.

T R Y S E L F - T E S T #3

e negative

L_DIGIT Z ## 4*B6 + 5* B7

40

35

X1 X2

C1 C2 C3 C4 C5 C6 C7 C8

# # # #

LHS 3*B6 + 6*B7 4*B6 + 2*B7 B7 5*B6 - 3*B7

LE LE LE GE

RHS 30 120 70 10 25 0
20

15

OUR MODEL
0 23.63 19 0

x1 x2 0 20 40 C1 0 20 40 0 C2 0 35 So far, we have mostly dealt with constraints which have negative slope. These are the most common ones and, 18 0 model. Two other common constraints are the demand constraint and th minimal quantities in the cost Minimization C3 10 variable is less than0 a constant. We view the demand as a threshold that we do not want to breach, and not as a quot 40 10 generating from the X1 or X2 axis. If the demand for x2 is 10, then the constraint is x2 10. (See constraint 4 (C4)) C4 18 0 0 29.16666667 C5 Current Z Increment 94.5 4.500 C6

Max Z = 4x1 + 5x2 st 4 3x1 + 6x2 120 4x1 + 2x2 70 x2 10 5x1 - 3x2 0 x1 , x2 0

10

The general conditional constraint arises when we want to express a simple relationship between x1 and x2 ; simple in the sin C7 we can write 6 / 10 #P1 / #P2 = x1 /x2 . So that, cross multiplying, we get 6x2 10x1 => 10x1 10 P2 made. Then Care must be exercised in observing the feasible region when it is bounded by these types of constraints. In this case, 5 C8 constraint line (between the x1 axis and the constraint line) is the contributing area to the feasible region. In general, many constraints can arise that do not appear at first to be linear. After some algebraic wrestling, they might linear approximating equations may be found as substitutes; but this generally restricts the feasible space to be smaller re

We view the demand as a threshold that we do not want to breach, and not as a quota that we want to meet. These constraints are vertical or horizontal lines generating from the x1 or1x2 axis. If the demand 1 is x2 10. (See for x2 is 10, then the constraint 1 Constraint 4 (C4)) 1
Suppose that at least 6 P1 must be made for every 10 P2 made. Then we can write 6/10 #P1 / #P2 = x1/x So that, cross multiplying, we get 6x2 10x1

=>
=>
60 80 100

10x1 - 6x2 0
5x1 - 3x2 0 (See C4)

. These are the most common ones and, as said before, the RHSs represent resources in the Maximize profit model and constraints are the demand constraint and the general conditional constraint. A demand constraint states that a t we do not want to breach, and not as a quota that we want to meet. These constraints are vertical or horizontal lines 10. (See constraint 4 (C4))

lationship between x1 and x2 ; simple in the sin ce that it can be written linearly. Suppose that at least 6 P1 must be made for every tiplying, we get 6x2 10x1 => 10x1 - 6x2 0 => 5x1 - 3x2 0 (See Constraint 4 (C4)) these types of constraints. In this case, 5 x1 - 3x2 0 so that X2 (5/3)*X1 and we see that the area to the right of the area to the feasible region. After some algebraic wrestling, they might be able to be expressed linearly. In the cases where they can't be expressed linearly, restricts the feasible space to be smaller re gions than those given by the original constraints.

d that we do not that we want to al or horizontal xis. If the demand

made for every 10 = x1/x2.

mize profit model and

al or horizontal lines

must be made for every

to the right of the

e expressed linearly,

L_DIGIT Z ## 6*B6 + 4*B7

16

14

X1 X2

C1 # C2 # C3 C4 C5 C6 C7 C8

LHS 10 *B6 + 10*B7 LE 7*B6 +3*B7 LE

RHS 100 42

12

10

Self Test #1
0 7.5 6 4 5 0 A company has two assembly lines that it

uses to make two products. Weekly resource constraints are: assembly line 1 100 hours assembly line 2 x1 x2 42 hours
Weekly production usage of the assembly 10 0 lines for the two products are:
C2 C1 0 10

0
0 2 4 6

product 1 :

C3 and

0 14 6 10 hours on line 10

7 hours on line 2 10 hours on line 1 3 hours on line 2


Current Z 30

The solution is at the intersection o which is (3,7)

C4 product 2 :

and
C5 C6

The profit for product 1 is $6 per unit, and the profit for product 2 is $4 per unit. Formulate the model and solve it using C7 graphical analysis.
C8

Increment 5.00

Constraint Lines Increment C1 C2 C3 C4 C5 C6 C7 C8 Blue Brown Green Purple Aqua Gold Lt Blue Red 1 1

10

12

solution is at the intersection of the two constraint lines C1 & C2

Increment

L_DIGIT Z ## 100*B6 + 200*B7

12

10

X1 X2

C1 # C2 # C3 # C4 C5 C6 C7 C8

LHS 8.5*B6 + 10*B7 LE 10*B6 + 30*B7 LE B6 LE

RHS 81 200 6

Self Test #2 The Woody Furniture Company produces 12 and 0 tables from two resources, labor benches and wood. The company has 81 hours of labor and 200 pounds of wood available each day. Each bench requires 8.5 hours of labor and 10 pounds of wood. Each table requires x1 x2 10 hours of labor and 30 pounds of wood. C1 benches 0 The demand for is limited and8.1 so the 10 to make more than 06 company doesn't want benches per day. C2 0 6.666666667 The profit derived from each bench is $100 C3 and from each table6$200. The company 0 10 wants to determine6 the number of chairs and benches to produce each day in order to C4 maximize profit. a) Formulate a linear programming model for Current Z C5 this situation b) Find the approximate solution to this C6 model by using graphical analysis c) Use your approximate solution to C7 determine the slack values for all the constraints
1200 20 0 0 6 # 200
2

0
0 5 10

b) The solution is at the intersection o c) Slack for C1 is 81 - (8.5*6 + 10*3) slack for C3 = 6 - 6 = 0 d) They can get by with just 150 lbs o

Increment 150.00

C8 d) What can you say about the amount of wood

Constraint Lines Increment C1 C2 C3 C4 C5 C6 C7 C8 Blue Brown Green Purple Aqua Gold Lt Blue Red 1 1 1

15

20

25

e solution is at the intersection of the C1 & C3 constraint lines (6,3) ack for C1 is 81 - (8.5*6 + 10*3) = 0 ; slack for C2 = 200 - (10*6 + 30*3) = 50 ck for C3 = 6 - 6 = 0 ey can get by with just 150 lbs of wood -- they have wood left over.

L_DIGIT Z ## 0.15*B6 + 0.09*B7

2.5

X1 X2

C1 # C2 # C3 C4 C5 C6 C7 C8

LHS 4*B6 + 9*B7 GE 0.5*B6 + 3*B7 GE

RHS 24 6

1.5

Self Test #3
0 2.7 0 0.09 A breakfast cereal company makes cereal 1.6 0 from several ingredients. Two of the ingredients, oats and rye, provide vitamins C and D. The company wants to know how many ounces of oats and rye it should x1 include in each box of x2 cereal to meet the C1 0 2.666666667 minimum requirements of 24 milligrams of 6 0 vitamin C and 6 milligrams of vitamin D while C2 An0 2 minimizing cost. ounce of oats 12 contributes 4 milligrams of vitamin C and 0 0.5 C3 milligrams of vitamin D; an ounce of rye contributes 9 milligrams of C and 3 milligrams of C4 D. An ounce of oats costs $0.15, and an ounce of rye costs $0.09. Current Z a) Formulate a linear programming model for 0.24 this situation C6 C5
0.5

0 0 2 4 6

b) The solution is at (0,24/9) c) The surplus at C1 is 4*0 + 9*24 at C2 it is .5*0 + 3*24/9 = 8 m

Increment 0.12

b) Solve this model C7 by using graphical analysis


C8

c) Determine the surplus values for all the constraints

Constraint Lines Increment C1 C2 C3 C4 C5 C6 C7 C8 Blue Brown Green Purple Aqua Gold Lt Blue Red 1 1

10

12

14

ution is at (0,24/9) plus at C1 is 4*0 + 9*24/9 - 24 = 0 milligrams of C is .5*0 + 3*24/9 = 8 milligrams of D

L_DIGIT Z ## 3*B6 + 5*B7

12

10

X1 X2

C1 # C2 # C3 # C4 C5 C6 C7 C8

LHS 5*B6 + 5*B7 2*B6 + 4*B7 B6

LE LE LE

RHS 25 16 5

A bakery makes croissants and Danish 0 in large 4 3 The main ingredients 5 pastries pans. 6.667 0 sugar. They buy 25 pounds of are flour and

flour and 16 pounds of sugar each day. It takes 5 lbs of flour and 2 lbs of sugar to x1 x2 and 5 lbs of flour make a pan of croissants, 5 and 4 lbs of C1 0 5 0 sugar to make a pan of Danish. The demand 0 4 for croissantsC2 is 5 pans.
0 0 2 4

8 0 C3 5 A pan of croissants has a profit of $3, and0 a 10 pan of Danish has a 5 profit of $5. Determine C4 the number of pans of croissants and pans of

a) The solution is at the intersection b) Slack at C1 is 25 - (5*2 + 5*3) = 0

Danish to produce each day so that profit will be maximized. C5 Current Z a) Solve this model by using graphical C6 analysis. b) How much flour and how much sugar will be left unused if the optimal numbers of C8 pans of croissants and Danish are baked?
C7 20

Increment 4.00

Constraint Lines Increment C1 C2 C3 C4 C5 C6 C7 C8 Blue Brown Green Purple Aqua Gold Lt Blue Red 1 1 1

10

he solution is at the intersection of the two constraint lines (2,3) ack at C1 is 25 - (5*2 + 5*3) = 0 ; slack at C2 is 2*2+4*3 = 16

L_DIGIT Z ## 20*B6 + 70*B7

X1 X2

C1 # C2 # C3 C4 C5 C6 C7 C8

LHS 2*B6 + 3*B7 GE 0.5*B6 + 1.5*B7 GE

RHS 20 8

A drug company produces a drug from 0 4.5 20 70 Ingredient A and Ingredient B.


15.75 0

A and B both contribute antibodies X & Y 1 gram of A contributes 2 units of antibody X x1 x2 and 0.5 units of antibody Y
0 6.666666667 10 0X 1 gram of B contributes 3 units of antibody C2 0 Y 5.333333333 and 1.5 units antibody 16 0 C3 The drug must contain more than 20 units of C1
0 0 5 10

a) The solution is where the constrain b) Dropping the cost of ingredient B t C2 constraint line with x1 between

antibodie X and more than 8 units of anitbody Y C4 The cost for a gram of ingredient A is $20, C5 and the cost for a gram of ingredient B is $70.
C6 Current Z 315 Increment 45.00

a) Determine the number of grams of each C7 ingredient that must be used to produce the drug at liminal cost and still meet the C8 antibiotic requirements. b) If the cost of ingredient B drops to $60 per gram, what happens to the optimal solution

Constraint Lines Increment C1 C2 C3 C4 C5 C6 C7 C8 Blue Brown Green Purple Aqua Gold Lt Blue Red 1 1

10

15

20

e solution is where the constraint line of C2 meets the x1 axis (16,0) opping the cost of ingredient B to $60 makes the points that lie on the 2 constraint line with x1 between 4 and 16 optimal solutions

L_DIGIT Z ## 5000*B6 + 4000*B7

100 90
80

X1 X2

C1 # C2 # C3 # C4 C5 C6 C7 C8

LHS 4*B6 + B7 2*B6 + 4*B7 B7

LE LE LE

RHS 90 80 21

70 60 50
40

30

A jewelry manufacturer makes necklaces and bracelets from gold and gold-silver plate. At 0 32 of each # month, the 4000 the beginning 25.2 0 buys 90 ounces of gold and 80 manufacturer ounces of gold-silver plate to be used in production for the month. Each necklace requires 4 ounces of gold and 2 ounces of gold-silver plate. x1 x2 Each braceletC1 requires 0 1 ounce of gold and 90 4 ounces of gold-silver 23plate. The monthly 0 demand for bracelets C2 0 is no more than 21. 20 The manufacturer's profit from a necklace C3 0 21 is $5000 and the profit 40from a bracelet, $4000. 21 a) Determine the number of necklaces and bracelets to make each month in order to maximize profit. C5 b) Would it be wise for the manufacture to C6 use 35 more ounces of gold-silver plate each month if theyC7 are bought at $1000 per ounce?
C8 C4 40 0

20 10 0 0 10 20

a) The solution is at the intersection o b) The profit at the original solution is are used then the RHS of C2 chang So 5000*17.5 + 4000*20 is the m The difference in profit from the or Since 35 ounces cost $35000 the m Current Z 126000 Increment 4500.00

each month by buying and using th

Constraint Lines Increment C1 C2 C3 C4 C5 C6 C7 C8 Blue Brown Green Purple Aqua Gold Lt Blue Red 1 1 1

30

40

50

e solution is at the intersection of the C1 & C2 lines (20,10) e profit at the original solution is 5000*20 + 4000*10. If 35 more ounces of gold-silver plate e used then the RHS of C2 changes to 115, and resolving gives (17.5, 20) 5000*17.5 + 4000*20 is the maximum profit in that situation. e difference in profit from the original situation is $ 5000*(-2.5) + 4000*10 = $27500. nce 35 ounces cost $35000 the manufacturer will lose $ 35000 -27500 = $7500

ch month by buying and using the additional gold-silver plate.

s of gold-silver plate

*10 = $27500.

L_DIGIT Z ## 70*B6+45*B7

60

50

X1 X2

C1 # C2 # C3 C4 C5 C6 C7 C8

LHS 2.5*B6+ 4*B7 LE 12*B6 + 4*B7 LE

RHS 200 160

40

30

20

A clothier makes silk coats and slacks. The two resources required are wool silk and 0The 52 45 labor. clothier70 can obtain 200 square 33.68 0 yards of silk and 160 hours of labor each week. Each coat requires 2.5 square yards of silk and 12 hours of labor. Each pair of slacks requires 4 square yards of silk and 4 x1 x2 for a coat is $70, hours of labor. The profit C1 0 50 and the profit for slacks is $45.
80 0 0 of coats and pairs40 a) Determine C2 number of 13 0 slacks to make so that profit will be maximized. C3

10

0 0 10 20 30 40

a) Note that just the region under C2 b) This moves the optimal solution to The cost for this is 40*10 = 400; th Since 2250 - 1800 is a 450 gain th

C4 b) Is it wise for the clothier to obtain another 40 hours of labor each week, for $10 per hour? C5 Current Z 2357.5 C6 C7 C8

Increment 57.50

Constraint Lines Increment C1 C2 C3 C4 C5 C6 C7 C8 Blue Brown Green Purple Aqua Gold Lt Blue Red 1 1

40

50

60

70

80

te that just the region under C2 is feasible and the solution is (0,40) with value = 1800 is moves the optimal solution to (0,50) with Z value = 2250 e cost for this is 40*10 = 400; the original optimal Z value is 1800. nce 2250 - 1800 is a 450 gain that costs 400, this is wise.

h value = 1800

L_DIGIT Z ## 4*B6 + 5*B7

40

35

X1 X2

C1 C2 C3 C4 C5 C6 C7 C8

# # # #

LHS 3*B6 + 6*B7 4*B6 + 2*B7 B7 5*B6 -3*B7

LE LE LE GE

RHS 120 70 10 0

30

25

20

15

On page 12 of chapter 1 we talk of the following model:


0 23.63 19 0

10

4= 4x1 + 5x2 5 Max Z st 3x1 + 6x2 120 4x1 + 2x2 70 x2 10 5x 3x 1 x1 x2 2 0 C1 0 x1 , x2 20 40 0 a) Solve this model C2 0 35 18 0 b) Describe a C3 business situation that would 0 10 have 40 10 this model that is different from the one 0 C4 0

0 0 10 20 30 40

a) The solution is at the intersection o = (12.5,10)

described on page 12.


18 C5 C6 C7 C8

29.16666667 Current Z 94.5 Increment 4.50

Constraint Lines Increment C1 C2 C3 C4 C5 C6 C7 C8 Blue Brown Green Purple Aqua Gold Lt Blue Red 1 1 1 1

40

50

60

70

80

e solution is at the intersection of the C2 & C3 constraint lines

L_DIGIT Z ## 3*B6 + 4*B7

350

300

X1 X2

LHS C1 # B6 +B7 LE C2 # 1.25*B6 +0.85*B7LE C3 # B6 -2*B7 GE C4 C5 C6 C7 C8

RHS 150 250 0

250

200

150

Dan' Ice Cream and Yogurt sells gallon containers of ice-cream for $3.00 and gallon 0 104 3for $4.00. Dan's has 4 containers of yogurt 138.8 0 enough freezer space for 150 gallons total. A gallon of frozen yogurt costs $1.25 and a gallon of ice cream costs $.85, Dan's purchases the ice cream and yogurt for the x1 x2 and limits the week on the Friday before, C1 0 purchases of both products to $400 for150 the # 0 coming week. The manager estimates that C2 0 294.1176471 each week the restaurant sells at least twice # 0 as much ice cream as frozen yogurt.
C3

100

50

0 0 20 40 60 80 100

0 0 # 73.52941176 a) How much ice cream and how much yogurt C4 each Friday. (Assume that should Dan's buy

a) Looks like 100 gallons of ice cream b) Dan's would like the price for ice c a bit less (steeper slope) than the the iso-profit lline will leave the fe The slope of the line of C1 is -1, so Current Z 416.5 Increment 3.50

ice cream or yogurt left over at the end of Friday is given to a local school) C5

a little more than the price of yogu

b) If Dan's wanted C6 to sell only ice cream, what price should Dan's ask for a gallon of ice cream? C7
C8

Constraint Lines Increment C1 C2 C3 C4 C5 C6 C7 C8 Blue Brown Green Purple Aqua Gold Lt Blue Red 1 1 1

100

120

140

160

180

200

oks like 100 gallons of ice cream and 50 gallons of yogurt n's would like the price for ice cream make the iso-profit line have slope bit less (steeper slope) than the slope of the line of C1 so that e iso-profit lline will leave the feasible region at the point (150,0) where only ice cream is sold e slope of the line of C1 is -1, so that Dan's wants to make the price of ice cream

ittle more than the price of yogurt, say $4.01

only ice cream is sold

L_DIGIT
160

Z ##

5*B6 + 4*B7
140

X1 X2

C1 # C2 # C3 # C4 C5 C6 C7 C8

LHS B6 + B7 B6 B7

LE GE GE

RHS 150 75 30

120

100

80

60

The manager of a small grocery store would like to make the best use of its shelf space for 0 The 86 5 company brands and 4 drugs. store sells 68.4 0 generic brands, and has 150 cubic feet of space available for these products. The manager wants to allocate at least 50% of the space to company brands, and at least 20% of x1brands. x2 the space to generic What should the C1 0 150 allocation be if:
# 0 C2 brands 75 are more profitable 0 a) The company 75 150 than the generic brands C3 0 30 # b) Both brands are equally profitable 30 C4

40

20

20

40

60

80

100

a) The slope of Z is < -1 (Z line is ste so the solution is at (120,30) b) Every point on the line of C1 is a s c) Slope of Z is > -1 (Z line is flatter so the solution is at (75,75) Current Z 342 Increment 4.50

c) The generic brands are more profitable than the company C5 brands
C6 C7 C8

Contraint Lines Increment C1 C2 C3 C4 C5 C6 C7 C8 Blue Brown Green Purple Aqua Gold Lt Blue Red 1 1 1

100

120

140

160

180

200

he slope of Z is < -1 (Z line is steeper than the C1 line) o the solution is at (120,30) very point on the line of C1 is a solution ope of Z is > -1 (Z line is flatter than C1 line) o the solution is at (75,75)

L_DIGIT Z

1 0.9 0.8
0.7

X1 X2

LHS C1 C2 C3 C4 C5 C6 C7 C8

RHS

0.6 0.5 0.4


0.3

HOW IT WORKS
0 Enter the 2 variable objective function in B3 in 0 + b*B7. Enter the constraints in the form a*B6 the form a*B6 + b*B7 = c. Enter the two term constraints first. Enter the LHS of constraint i in D6+i, and the RHS in E6+i. So, constraint 1 goes in D7 & E7, etc. When x1done, x2 hit GRAPH. C1

0.2 0.1 0 0 0.2 0.4 0.6

Use the increase / decrease buttons on the bottom of the screen to move the objective C2 function away from or towards the origin by the listed increment. C3

Use the i/d buttons on the right of the screen to C4 the RHS of the associated increase/decrease constraint by the listed increment.
To use the SOLVER, C5 make sure it's added in (go to Current Z Options and add it if it isn't). It will appear at the 30 end of the DATA ribbon. Select it and simply C6 select $B$3 as the Objective , $B$6:$B$7 as the Variable Changing Cells, and then add your C7 constraints repeatedly selecting your constraint LHS, comparator, and RHS (the cells D6+i, comparator, E6+i). C8 Don't forget to select Simplex LP, and Max or Min, and unconstrained variables
Increment 2.50

Constraint Lines Increment C1 C2 C3 C4 C5 C6 C7 C8 Blue Brown Green Purple Aqua Gold Lt Blue Red 1 1

When you first come to a worksheet with an existing model, you must press the Graph button to redraw it before moving constraint lines.
0.6 0.8 1 1.2

After generating the graph, you can adjust the graph axis by right clicking on a grid line. Choose on a grid line. Choose Format Axis

L_DIGIT MAKE AN EXERCISE


Z

1
0.9 0.8

X1 X2

LHS C1 C2 C3 C4 C5 C6 C7 C8

RHS

0.7 0.6 0.5 0.4 0.3

HOW IT WORKS
0 Enter the 2 variable objective function in B3 in 0 the form a*B6 + b*B7. Enter the constraints in the form a*B6 + b*B7 = c. Enter the two term constraints first. Enter the LHS of constraint i in D6+i, and the RHS in E6+i. So, constraint 1 goes in D7 & E7, etc. When x1done, x2 hit GRAPH. C1

0.2 0.1 0 0 0.2 0.4 0.6

Use the increase / decrease buttons on the bottom of the screen to move the objective C2 function away from or towards the origin by the listed increment. C3

Use the i/d buttons on the right of the screen to C4 the RHS of the associated increase/decrease constraint by the listed increment.

YOU CAN'T MOVE THESE

To use the SOLVER, C5 make sure it's added in (go to Current Z Increment Options and add it if it isn't). It will appear at the 32.5 2.50 end of the DATA ribbon. Select it and simply C6 select $B$3 as the Objective , $B$6:$B$7 as the YOU Variable Changing Cells, and then add your YOUCAN CANPUT PUTYOUE YOUREXERCISE EXERCISETEXT TEXTIN INTHIS THISTEXT TEXTB B C7 constraints repeatedly selecting your constraint LHS, comparator, and RHS (the cells D6+i, comparator, E6+i). C8 Don't forget to select Simplex LP, and Max or Min, and unconstrained variables

Constraint Lines Increment C1 C2 C3 C4 C5 C6 C7 C8 Blue Brown Green Purple Aqua Gold Lt Blue Red 1 1

M O V E
O R D E L E T E

When you first come to a worksheet with an existing model, you must press the Graph button to redraw it before moving constraint lines.
0.6 0.8 1 1.2

O K

After generating the graph, you can adjust the graph axis by right clicking on a grid line. Choose on a grid line. Choose Format Axis

U CAN'T MOVE THESE

IMPORTANT: Using the TVLP tool requires that you protect your worksheet with passwords in a special format. Send a request to me at mail@duport.com and I will

UE EXERCISE DELETE THE CURRENT TEXT OUR EXERCISETEXT TEXTIN INTHIS THISTEXT TEXTBOOK BOX, DELETE THE CURRENT

M O V E
O R D

O K

ect your worksheet

ail@duport.com

L_DIGIT MAKE A WORKSHEET


Z

1 0.9
0.8

X1 X2

LHS C1 C2 C3 C4 C5 C6 C7 C8

RHS

0.7 0.6 0.5 0.4


0.3

0 0

0.2

TEXT BOX A

0.1 0

x1 x2 C1 C2text boxes, click top ribbon (Insert, test box) To insert C3 You can also copy & paste these text boxes. C4 C5 TEXT BOX D C6 Current Z 30

0.2

0.4

0.6

TEXT BOX C

Increment 2.50

TEXT BOX F
C7 C8

Constraint Lines Increment C1 C2 C3 C4 C5 C6 C7 C8 Blue Brown Green Purple Aqua Gold Lt Blue Red 1 1

TEXT BOX B

0.6

0.8

1.2

TEXT BOX C

Note that it is best to type in a word processor and then transfer the text - especially true if you use subscripts !

TEXT BOX E

TEXT BOX F

You might also like