Handbook of Industrial Automation - Richard L. Shell and Ernest L. Hall Part 7 ppsx

42 462 0
Handbook of Industrial Automation - Richard L. Shell and Ernest L. Hall Part 7 ppsx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Chapter 4.2 A Brief Introduction to Linear and Dynamic Programming Richard B Darst Colorado State University, Fort Collins, Colorado 2.1 2.1.1 LINEAR PROGRAMMING model of reasonable size Linear programming encompasses several activities It includes recognizing whether or not an LP model is appropriate for a speci®c situation An LP model is both a conceptual and a mathematical model for the situation If an LP model is appropriate, LP includes formulating an accurate LP model (also called simply an LP), solving the LP, and applying the solution to the LP to the situation Formulating an LP model for a situation involves three basic steps: Introduction Linear programming is a method for dealing with an exceptionally diverse class of situations A situation is usually presented in the form of a moderately amorphous mass of information by a group of one or more people who wish to do something To deal with a situation effectively, you need to understand the situation, so you know what the group wants to do Then you need to analyze the situation, so you can tell the group how to do what it wants to do Typically the goal is to make decisions to optimize an objective while satisfying constraints To understand a situation you need to formulate an accurate conceptual model for the situation; generally this encompasses stating an appropriate set of decisions that must be made, together with the objective to be optimized and the constraints which must be satis®ed The corresponding analysis is typically a process to determine which set of values for the decisions will optimize the objective while satisfying the constraints; it often involves formulating an appropriate mathematical model for the situation, solving the model and interpreting the implications of the model for the situation Linear programming (LP), is an extremely effective method for formulating both the conceptual and mathematical models Good LP software is available to solve the problem if you can formulate a valid LP 1 Specify the decision variables 2 Specify the constraints 3 Specify the objective function Quantifying an appropriate set of decisions is the crucial ®rst step to understanding a situation and to formulating a valid model for the situation; it addresses the question: What decisions need to be made in order to optimize the objective? The ®rst step in formulating an LP model for a situation helps you understand the situation by requiring you to specify an appropriate set of decision variables for the model After the decision variables are speci®ed, one tries to specify the constraints and objective function as linear functions of the decision variables Either you get an LP model or you discover where essential nonlinearities appear to be Linear programming has its theoretical side too, with algebraic and geometrical components, and var297 Copyright © 2000 Marcel Dekker, Inc 298 ious algorithms for solving LP models However, the common procedures are variations of the simplex method discovered by George Dantzig The simplex method uses elementary linear algebra to exploit the geometrical and algebraic structure of an LP; it is elegant and ef®cient Learning the rudiments of the simplex method will enable you to utilize output from LP software packages more effectively In addition to giving you a solution to your LP, or telling you that there is no solution, the software may provide you with additional information that can be very helpful if you know how to use it Theoretical concepts are useful in LP modeling While theory will not be discussed in this chapter, some theoretical concepts will appear during our discussions of the examples which are presented in the sequel Sometimes you will discover that the problem has a special structure which permits you to formulate a different type of model for the problem, one that exploits the special structure more ef®ciently Transportation problems have a special structure which has been studied from several points of view Transportation problems provide a good bridge between LP and network models Network models are associated with a diverse class of methods After using examples to introduce several types of situations to which LP can be applied, we will apply dynamic programming to some situations to illustrate how special structure and conditions can be exploited Programming has artistic and technical aspects, and like learning to paint or play a game, one learns to program by doing it Reading can help you get started, but you need to participate to become good at it As you participate you will be able to model an increasing diverse collection of situations effectively An effective model is valid, it can be solved using software that is available to you, and it will provide clear usable output with which to make your decisions Finding an optimal solution to a complicated problem may well depend on recognizing whether LP or some other special structure can be used to model your situation accurately Often, the ®rst part of a solution is to determine whether there is a valid LP model for your situation If you decide that a valid LP model can be constructed, then either ®nd special structure that will let you to use a signi®cantly faster algorithm or construct an ef®cient LP model Otherwise, look for special structure in the situation which will permit you to use some known modeling strategy Examples of types of situations which can be modeled using LP will be discussed below The examples Copyright © 2000 Marcel Dekker, Inc Darst begin with some information being provided, followed by an LP model and a brief discussion of the situation Often there are several valid LP models for a situation If you model the same situation on different days, even your decision variables may be quite different because you may be emphasizing different aspects of the situation A different focus may well result in a model with different constraints and a different objective function You may wish to formulate and solve your own models for these situations; do not be surprised if what you get differs from what you see here The basic ingredients of linear programming are introduced in the ®rst three examples 2.1.2 Examples 1±3 Example 1 A Production Problem Information Provided An organization has an abundance of two types of crude oil, called light crude and dark crude It also has a re®nery in which it can process light crude for 25 dollars per barrel and dark crude for 17 dollars per barrel Processing yields fuel oil, gasoline, and jet fuel as indicated in the table below Input Output Light crude Fuel oil Gasoline Jet fuel Dark crude 0.21 0.5 0.25 0.55 0.3 0.1 The organization requries 3 million barrels of fuel oil, 7 million barrels of gasoline, and 5 million barrels of jet fuel Understanding the Situation: Interpreting the Information Provided Part of programming is interpreting what people are trying to tell you and feeding back your impressions to those people until you believe you understand what they are trying to tell you For example, the entry 0.21 in this table seems to imply that each unit of light crude oil which you process produces 0.21 units of fuel oil If the objective is to process enough oil to meet the listed demands at minimum processing cost, then we wish to determine how much light and dark crude should be processed to meet the requirements with minimal processing cost To begin recall the three steps in formulating an LP model: 1 2 3 Specify the decision variables Specify the constraints Specify the objective function Linear and Dynamic Programming Decision Variables We must decide how much light crude oil to process and how much dark crude oil to process A set of decision variables for Example 1 follows Let L ˆ the number of million barrels of light crude to process Let D ˆ the number of million barrels of dark crude to process The values of decision variables are numbers I cannot overemphasize the importance of doing Step 1 Specifying the decision variables as numerical valued variables forces you to focus on exactly what decisions you need to make The next two steps are to specify a set of constraints to model the requirements and to specify an appropriate objective function to model the cost, which we wish to minimize The form and order of these speci®cations depend on our choice of decision variables and our thought processes at the time when we are making the model In this example we consider the constraints ®rst Constraints I interpreted the table to imply that each million barrels of light crude processed produces 0.21 million barrels of fuel oil, etc Thus, processing L million barrels of light crude and D million barrels of dark crude produces 0:21L ‡ 0:55D barrels of fuel oil Since 3 million barrels are required, we have the constraint 0:21L ‡ 0:55D ˆ 3; this constraint is a linear equation in L and D Similar equations for gasoline and jet fuel apply Putting these equations together gives us the linear system 0:21L ‡ 0:55D ˆ 3 0:50L ‡ 0:30D ˆ 7 (fuel oil) (gasoline) 0:25L ‡ 0:10D ˆ 5 (jet fuel) Necessity of Inequality Constraints Unfortunately, because processing either type of crude oil produces at least twice as much gasoline as jet fuel, there is no way to produce 5 million barrels of jet fuel without producing at least 10 million barrels of gasoline Thus, there is no feasible solution to this linear system Consequently, we are forced to formulate our constraints as a system of linear inequalities: 0:21L ‡ 0:55D ! 3 0:50L ‡ 0:30D ! 7 0:25L ‡ 0:10D ! 5 Standard Form for Constraints I would prefer to have the constraints in the form of a system of linear Copyright © 2000 Marcel Dekker, Inc 299 equations because I know how to solve systems of linear equations, so we put them in that form by introducing surplus variables F, G, and J to denote the number of millions of barrels of surplus fuel oil, gasoline, and jet fuel produced The preceding system of linear inequalities is replaced by the following system of linear equations: 0:21L ‡ 0:55D ˆ 3 ‡ F 0:50L ‡ 0:30D ˆ 7 ‡ G 0:25L ‡ 0:10D ˆ 5 ‡ J which can be rewritten in standard form: 0:21L ‡ 0:55D À F ˆ 3 0:50L ‡ 0:30D À G ˆ 7 0:25L ‡ 0:10D À J ˆ 5 Objective Function The cost of processing L million barrels of light crude and D million barrels of dark crude is 25L ‡ 17D millions of dollars The objective function for this problem is the linear function of L and D given by the formula 25L ‡ 17D We put the pieces together in a standard form LP model below Standard Form LP Model Minimize 25L ‡ 17D subject to 0:21L ‡ 0:55D À F ˆ 5 0:50L ‡ 0:30D À G ˆ 7 0:25L ‡ 0:10D À J ˆ 5 A standard form LP has the form: minimize a linear function of the decision variables subject to a system of linear equations being satis®ed by the decision variables, plus implicit constraints which require that the decision variables be nonnegative This is the form that is processed by the simplex method Note: Unless it is speci®cally stated otherwise, the values of all decision variables are nonnegative numbers Canonical Form Some authors use the name canonical LP, or canonical form LP, to denote an LP which we have called a standard form LP Sometimes standard form or canonical form refers to a max LP with equality constraints, so be aware of these variations in terminology when you read about or discuss LP After a comment about vectors and matrices, elementary concepts from linear algebra, we will use 300 them to write the model for Example 1 in a very compact form which displays its structure Comments about Vectors and Matrices A vector is simply a list of numbers This simple concept is extremely useful both conceptually and computationally Imagine a cash register drawer with eight compartments, labelled 1 to 8, for pennies, nickels, dimes, quarters, dollar bills, 5 dollar bills, 10 dollar bills, and 20 dollar bills, respectively Suppose that I count the number of pieces of money in each compartment and write those numbers in a list If that list is …3; 5; 2; 4; 11; 4; 1; 6†, then how much money is in the drawer? If you trust my counting and your answer is $162.48, then you understand how vectors work We can either write the list as a row of numbers: a row vector, denoted [ ], or as a column of numbers: a column vector Column vectors take more space on a page, so we generally use a row format using parentheses ( ), to denote column vectors; for example, the preceding vector, representing a list of the numbers of the various items in the drawer, really looks like P Q 3 T 5 U T U T 2 U T U T 4 U T U T 11 U T U T 4 U T U R 1 S 6 A matrix is a rectangular array of numbers We can think of a matrix as a row of column vectors or as a column of row vectors when it is convenient to do so We will illustrate how one can use vectors and matrices to formulate LPs in a very compact form by discussing Example 1 from a vector±matrix perspective below Vector±Matrix Formulation of Example 1 The unit output vectors P Q P Q 0:21 0:55 R 0:5 S R 0:3 S and 0:25 0:1 provide lists of the number of units of fuel oil, gasoline, and jet fuel produced by processing one unit of light and dark crude oil, respectively Let A denote the 3  2 matrix whose columns are the unit output vectors of light and dark crude oil, let b denote the column vector of requirements, let c denote the row vector of unit processing costs, and let x denote the column vector of decision variables: Copyright © 2000 Marcel Dekker, Inc Darst P 0:21 0:55 T A ˆ R 0:5 0:25 ! L xˆ D Q U 0:3 S 0:1 P Q 3 T U b ˆ R7S 5 c ˆ ‰25; 17Š Then the LP model for Example 1 can be written as follows: Minimize subject to Example 2 cx Ax ! b; x ! 0 A Generic Diet Problem Information Provided A large institution wishes to formulate a diet to meet a given set of nutritional requirements at minimal cost Suppose that n foods are available and m nutritional components of the foods are to be considered (each of n and m denotes an arbitrary but ®xed positive integer determined by the individual situation) Label the foods f1 ; F F F ; fn and label the nutrients N1 ; F F F ; Nm The costs and nutritional characteristics of the foods, and the nutritional requirements of the diet, are provided in the following format A unit of fj costs cj money units and contains aij units of Ni ; at least bi units of Ni are required for the diet Use summation notation to formulate a compact LP model for the diet problem Summation Notation: a Compact Way to Write the Sum of n Quantities Given n quantities Q1 ; Q2 ; F F F ; Qi ; F F F ; Qn which can be added, their sum Q1 ‡ Q2 ‡ Á Á Á ‡ Qi €n ‡ Á Á Á ‡ Qn is denoted by iˆ1 Qi The index i is a symbol which represents a generic integer between 1 and n; instead of i, one can use j, or any other symbol except n, which represents the number of terms to be added Solution The n decisions are how many units of each of the foods to put in the diet The constraints are the m nutritional requirements that must be satis®ed, and the objective is to ®nd a minimal cost combination of available foods which meets the nutritional requirements Let x denote the column vector …x1 ; F F F ; xi ; F F F ; xn †, let b denote the column vector …b1 ; F F F ; bi ; F F F ; bm †, let c denote the row vector ‰c1 ; F F F ; ci ; F F F ; cn Š, and let A denote the m  n matrix which has aij in its ith row and jth column Then the LP model for Example 2 has the form Minimize subject to cx Ax ! b; x ! 0 Linear and Dynamic Programming 301 A numerical example follows Example 2a ``What's for Lunch?'' Suppose seven foods: green beans, soybeans, cottage cheese, Twinkies, vegetable juice, spaghetti and veggie supreme cheese pizza, are available Suppose that units of these foods cost 0.35, 0.2, 0.28, 0.2, 0.15, 0.99, and 2.49 dollars, respectively Suppose that four properties of each food: calories, protein, carbohydrates, and vitamins, are required to be considered, and the following properties matrix A and requirements vector b are provided: P Q 1 3 3 6 1 14 16 T0 1 4 0 0 8 8 U T U AˆT U R 1 2 3 6 0 14 14 S 6 2 2 Q 16 T 8 U T U bˆT U R 14 S P 0 4 7 13 numbers of units available at each supply point, a list of the numbers of units desired at each demand point, and a list of the costs of shipping a unit of material from each supply point to each demand point, and an a priori constraint: total supply is equal to total demand These ®ve lists will be displayed in a transportation tableau The tableau for an example which deals with shipping truckloads of blueberries from orchards to warehouses follows Warehouses Orchards New California Arizona Colorado Mexico Supplies Washington Oregon Michigan 460 350 990 550 450 920 650 560 500 720 620 540 100 170 120 Demands 175 100 80 35 390 13 c ˆ ‰0:35; 0:2; 0:28; 0:2; 0:15; 0:99; 2:49Š The four numbers listed in a column of the matrix represent the numbers of units of the four properties in one unit of the food corresponding to that column; for instance, column three corresponds to cottage cheese, so each unit of cottage cheese contains three units of calories, four units of protein, three units of carbohydrates, and two units of vitamins A unit of pizza has been designed to meet the dietary requirements exactly A meal composed of one unit of green beans, two units of soybeans, 3/2 units of cottage cheese, and 3/4 units of Twinkie also ®ts the minimal requirements of the diet exactly; this meal costs $1.32, while pizza costs $2.49 Notice that a meal composed of one unit of spaghetti and two units of vegetable juice will also meet the requirements, at a cost of $1.29 (this meal provides two extra units of vitamins) Which of these three meals would you choose? The transportation problem is another classical example; a standard form LP model for it is developed in Example 3 Example 3 A Transportation Problem The goal of a transportation problem is to ship quantities of a material from a set of supply points to a set of demand points at minimal cost, A model for a transportation problem consists of supplying ®ve lists: a list of supply points, a list of demand points, a list of the Copyright © 2000 Marcel Dekker, Inc Total supply ˆ total demand ˆ 390 There are 12 decisions to be made; we must decide how many truckloads of blueberries to ship from each of the three supply points to each of the four demand points We replace the unit shipping costs with a list of names for the decision variables below Warehouses Orchards New California Arizona Colorado Mexico Supplies Washington Oregon Michigan X1 X5 X9 X2 X6 X10 X3 X7 X11 X4 X8 X12 Demands 175 100 80 100 170 120 35 There are three supply constraints and four demand constraints: X1 ‡ X2 ‡ X3 ‡ X4 ˆ 100 X5 ‡ X6 ‡ X7 ‡ X8 ˆ 170 X9 ‡ X10 ‡ X11 ‡ X12 ˆ 120 X1 ‡ X5 ‡ X9 ˆ 175 X2 ‡ X6 ‡ X10 ˆ 100 X3 ‡ X7 ‡ X11 ˆ 80 X4 ‡ X8 ‡ X12 ˆ 35 Put (Washington) (Oregon) (Michigan) (California) (Arizona) (Colorado) (New Mexico) 302 Darst x ˆ …X1; F F F ; X12† b ˆ …100; 170; 120; 175; 100; 80; 35† c ˆ ‰460; 550; 650; 720; 350; 450; 560; 620; 990; 920; 500; 540Š and P 1 T0 T T0 T A ˆ T1 T T0 T R0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 1 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 1 0 Q 0 0U U 1U U 0U U 0U U 0S 1 Then the blueberry example has the standard form LP model displayed below Minimize Subject to 2.1.3 cx Ax ˆ b; x ! 0 Duality An LP has a speci®c algebraic form There is a corresponding algebraic form, called the dual LP The original problem is called the primal problem, and the primal together with the dual is called a primal±dual pair; the primal is the ®rst LP in the pair and the dual LP is the second LP in the pair When an LP is a model of a ``real-world'' situation, very often there is a different (dual) perspective of the situation which is modeled by the dual LP Knowing the existence and form of the dual LP provides a vantage point from which to look for a dual interpretation of the situation; examples are provided below by exhibiting dual linear programs for Examples 1 and 3 2.1.3.1 Dual Problem for Example 1 A related problem, called the dual problem, will be introduced by considering Example 1 from a different perspective below A group has ample supplies of fuel oil, gasoline, and jet fuel which they would like to sell to the organization The group wishes to maximize income from selling 3 million barrels of fuel oil, 7 million barrels of gasoline and 5 million barrels of jet fuel to the organization The group's decisions are to determine the numbers of millions of dollars (prices), pF, pG, and pJ, to charge for a million barrels of fuel oil, gasoline, and jet fuel, respectively For algebraic reasons we write their decision variable vector in row form Copyright © 2000 Marcel Dekker, Inc y ˆ ‰pF; pG; pJŠ Then the group's objective can be expressed algebraically in the form: maximize yb, where A and b are de®ned in Example 1 For the group to be competitive, the price for the output of processing a million barrels of light crude can be no more than the processing cost; this constraint has the algebraic form 0:21pF ‡ 0:5pG ‡ 0:25pJ 25 The corresponding constraint for dark crude is 0:55pF ‡ 0:3pG ‡ 0:1pJ 17 These constraints can be written in vector±matrix form as yA c; y ! 0 Thus, the dual can be written Maximize yb Subject to yA c; y ! 0 2.1.3.2 Comment on Standard form By introducing slack variables, surplus variables, and other appropriate modi®cations, any LP can be put in standard form For instance, Example 1 showed how to write ! constraints in standard form by introducing surplus variables The dual constraints introduced above can be written in standard form by introducing nonnegative slack variables, sL and sD: 0:21pF ‡ 0:5pG ‡ 0:25pJ ‡ sL ˆ 25 0:55pF ‡ 0:3pG ‡ 0:1pJ ‡ sD ˆ 17 The objective ``Maximize yb'' is equivalent to ``Minimize y…Àb†:'' 2.1.3.3 Dual Problem for Example 3 A wholesale produce corporation wishes to buy the blueberries at the orchards and deliver the required amounts at the demand points Their objective is to maximize net income from this transaction Their decisions are prices to charge per truckload, but the prices are not all ! 0 because buying blueberries at the orchards represents negative income Referring to Example 3, put y ˆ ‰y1; y2; y3; y4; y5; y6; y7Š, where y1; y2; and y3 are 0 and the others are ! 0 The net income to be maximized is yb The constraints are that the buying price at an orchard plus the selling price at a state is no more than the cost of shipping a truckload from the orchard to the state; these 12 constraints are written algebraically as yA c Thus, the dual problem can be written Maximize yb Subject to yA c Linear and Dynamic Programming 303 We do not have the constraints y ! 0 in the dual of a standard form LP 2.1.4 Absolute Values and Integer Variables Before presenting more examples to illustrate a variety of situations which can be modeled using LP, we mention two useful concepts, absolute values and integer variables 2.1.4.1 Absolute Values The absolute value of a number is the magnitude of the difference between the number and zero The absolute value, jXj, of a number X can be expressed as the solution of an LP: jXj ˆ minimum P Subject to ÀP X P; P ! 0: or jXj ˆ minimum P ‡ N Subject to 2.1.4.2 P À N ˆ X; P ! 0; N ! 0 Integer Variables Realistic solutions to situations must often be integer valued An LP model does not require integer values for solutions; however, in many cases either the LP solution turns out to be integer valued, or one can use the LP solution to guess an integer valued solution that is good enough The de®nition of ``good enough'' depends the tools, time, and creativity available to apply to the problem Problems that were intractable for a PC a few years ago can be solved easily now Computer hardware and software that is available for a reasonable price has been getting faster and better at a rapid pace Some problems that had to be modeled carefully in order to be solvable with available tools a few years ago can be solved using a sloppy model now However, good modeling habits are worth cultivating because they enable you to deal effectively with a larger set of situations at any point in time There are two kinds of integer-value variables, INT variables and GIN variables, which are often available in LP software Each INT variable may essentially double the computational complexity of a LP model and each GIN variable may increase it at least that much Consequently, they should be used carefully Nevertheless, they can be very useful INT variables (sometimes called 0±1-valued integer variables) are variables whose values are either 0 or 1 Copyright © 2000 Marcel Dekker, Inc An INT variable can be used as a switch to switch between two possible situations The INT variable insures that at most one of the possibilities occurs in any one possible solution For example, given a positive number M, the absolute value of X in a range from ÀM to M can also be expressed using an INT variable, Z, as follows: jXj ˆ P ‡ N P!0 P MZ; N M…1 À Z† N!0 The inequalities involving Z require that at least one of P and N be equal to zero In some situations it is useful to consider ``big M'' constants, denoted by M; ``big M's'' are constants which are big enough to impose no new constraint on a problem in which they are used We illustrate this with the following example Constraints of the form ajXj ‡ y ; ˆ; or ! c where each of X and y is a linear term and each of a and c is a constant, can be put in LP format If a ˆ 0, we have an LP constraint; otherwise, there are two cases to consider, a > 0 and a < 0 In both cases, we divide the constraint by a If a > 0 we get jXj ‡ …1=a†y , ˆ, or ! c=a Putting Y ˆ …1=a†y and C ˆ c=a, the constraint becomes jXj ‡ Y ; ˆ; or ! C If a < 0, the inequalities are reversed Consequently, we have three possibilities to consider The case is the easiest The constraint jXj ‡ Y C is equivalent to the following two LP constraints u‡v‡Y C …1† and X ˆuÀv …2† To model the other two cases, jXj ‡ Y ˆ or ! C, in LP format, in addition to (2) and the appropriate modi®cation of (1) above, we use an INT variable Z and a ``big M'' in the following additional constraints: u MZ …3† M…1 À Z† …4† and v These latter two constraints that at least one of u and v be zero, consequently jXj ˆ u ‡ v General integer (GIN) variables are variables whose values are integers INT and GIN variables will be used in some of the examples 304 Example 4 Darst A Primal-Dual Pair Information Provided The Volkswagen Company produces three products: the bug, the superbug, and the van The pro®t from each bug, superbug, and van is $1000, $1500, and $2000, respectively It takes 15, 18, and 20 labor-hours to produce an engine; 15, 19, and 30 labor-hours to produce a body; and 10, 20, and 25 minutes to assemble a bug, superbug, and van The engine works has 10,000 labor-hours available, the body works has 15,000 labor-hours available, and the assembly line has 168 hours available each week Plan weekly production to maximize pro®t Solution Let B ˆ number of bugs produced per week Let S ˆ number of superbugs produced per week Let V ˆ number of vans produced per week An LP model and solution for Example 4 follow Maximize 1000 Subject to 2) 15 B + 3) 15 B + 4) 10 B + B + 1500 S + 2000 V 18 S + 20 V = 2000 The constraints for this dual problem say that the number of dollars offered to pay to rent must be enough to make Volkswagen's rental income at least as much as the pro®t it would get by using its resources to manufacture vehicles instead of renting them to BMW It turns out that the optimal objective function values for the primal and its dual are always equal A solution follows VARIABLE VALUE E 28.571430 W 000000 A 57.142860 Example 5 Percentage Constraints Information Provided A farmer requires that each of his cows receives between 16,000 and 18,000 calories, at least 2 kg of protein, and at least 3 g of vitamins per day Three kinds of feed are available; the following table lists their relevant characteristics per kilogram Feed Cost Calories Kg of protein Grams of vitamins 1 2 3 $0.8 $0.6 $0.2 3600 2000 1600 0.25 0.35 0.15 0.7 0.4 0.25 The farmer also requires that the mix of feeds contain at least 20% (by weight) feed 1 and at most 50% (by weight) feed 3 The farmer wishes to formulate a diet which meets his requirements at minimum cost Solution Let A ˆ no of kilograms of feed 1 to put in the diet Let B ˆ no of kilograms of feed 2 to put in the diet Let C ˆ no of kilograms of feed 3 to put in the diet The ®rst four constraints correspsond to the calorie, protein and vitamin requirements of the diet The last two correspond to the percentage requirements: A ! 0:2 …A ‡ B ‡ C† and C 0:5…A ‡ B ‡ C† A model appears below, followed by a solution The constraints have been adjusted to make the coef®cients integers Linear and Dynamic Programming Minimize 8 A + 6 B + 2 Subject to 2) 36 A + 20 B + 16 C 3) 36 A + 20 B + 16 C 4) 25 A + 35 B + 15 C 5) 70 A + 40 B + 25 C 6) 8 A - 2 B - 2 C >= 7) 5 A + 5 B - 5 C >= 305 4) P1 + P2 + P3 + P4 = 5 5) 3 G1 + 23 G2 + 16 G3 + 13 G4 + 46 A1 + 44 A2 + 34 A3 + 31 A4 + 53 P1 + 51 P2 + 47 P3 + 42 P4 10 C >= = >= 0 0 160 180 200 300 OBJECTIVE FUNCTION VALUE 82.4999900 OBJECTIVE FUNCTION VALUE 38.3132600 VARIABLE VALUE A 1.686747 B 2.831325 C 3.915662 Example 6 A Processing Problem Information Provided Fruit can be dried in a dryer according to the following table The dryer can hold 1 m3 of fruit Relative volume Drying hours 1 2 3 4 Grapes Apricots Plums 0.30 0.23 0.16 0.13 0.46 0.44 0.34 0.31 0.53 0.51 0.47 0.42 Formulate an LP to estimate the minimum time in which 20 m3 of grapes, 10 m3 of apricots, and 5 m3 of plums can be dried to a volume of no more than 10 m3 Solution We begin by making some simplifying assumptions The dryer will be ®lled with one kind of fruit and operated for 1, 2, 3, or 4 hours, then the dried fruit will be removed from the dryer and the dryer will be re®lled In accord with these assumptions, we have the following decision variables: Let GI ˆ no of cubic meters of grapes to dry for I hours Let AI ˆ no of cubic meters of apricots to dry for I hours Let PI ˆ no of cubic meters of plums to dry for I hours Time spent ®lling the dryer and removing dried fruit is assumed to be independent of the type of fruit being dried and the number of hours the fruit is dried Then these factors do not need to be explicitly incorporated into the model Minimize G1 + 2 G2 +3 G3 +3 A3 + 4 A4 + P1 + 2 P2 Subject to 2) G1 + G2 + G3 + G4 = 3) A1 + A2 + A3 + A4 = Copyright © 2000 Marcel Dekker, Inc + 4 G4 + A1 + 2 A2 + 3 P3 + 4 P4 20 10 VARIABLE VALUE G1 000000 G2 000000 G3 20.000000 G4 000000 A1 6.250004 A2 000000 A3 3.749996 A4 000000 P1 5.000000 P2 000000 P3 000000 P4 000000 A1 and A3 are not integer valued However, if we change A1 to 6 and A3 to 4, then we get an integervalued feasible solution with objective function value of 83 The objective function value of any integer valued solution will be an integer Since 83 is the smallest integer which is ! 82:5, we know that changing A1 to 6 and A3 to 4 provides use with an optimal integer valued solution Example 7 A Packaging Problem Information Provided The Brite-Lite Company receives an order for 78 ¯oor lamps, 198 dresser lamps, and 214 table lamps from Condoski Corp Brite-Lite ships orders in two types of containers The ®rst costs $15 and can hold two ¯oor lamps and two table lamps or two ¯oor lamps and two table lamps and four dresser lamps The second type costs $25 and can hold three ¯oor lamps and eight table lamps or eight table lamps and 12 dresser lamps Minimize the cost of a set of containers to hold the order Solution Let CIJ = no of containers of type I to pack with mix J; I ˆ 1; 2; J ˆ 1; 2 Minimize 15 C11 + 15 C12 + 25 C21 + 25 C22 Subject to 2) 2 C11+ 2 C12 + 3 C21 ! 78 3) 4 C11 + 2 C12 + 8 C21 + 8 C22 ! 214 4) 4 C12 + 12 C22 ! 198 OBJECTIVE FUNCTION VALUE 852.500000 VARIABLE VALUE C11 000000 C12 21.000000 C21 12.000000 C22 9.500000 306 Darst This solution is not integer valued; however, it puts six dresser lamps in the half carton of type 2 packed with mix 2 and no other listed packing option will allow six dresser lamps in one carton Consequently, I could put C22 ˆ 10, increase the cost to 865, and claim that I now have the optimal solution But claiming does not necessarily make it optimal Is there a better solution? Using GIN variables, I found a better solution The best integer-valued solution is C11 ˆ 4, C12 ˆ 20, C21 ˆ 10 and C22 ˆ 10, with objective function value 860; 5 may seem to be a trivial number of dollars, but if we are shipping different products and we are talking about hundreds of thousands of dollars, the difference might be signi®cant to you Example 8 LP Can Model Diminishing Return Thresholds Information Provided The Model-Kit Company makes two types of kits They have 215 engine assemblies, 525 axle assemblies, 440 balsa blocks, and 560 color packets in stock Their earthmover kit contains two engine assemblies, three axle assemblies, four balsa blocks, and two color kits; its pro®t is $15 Their racing kit contains one engine assembly, two axle assemblies, two balsa blocks, and three color kits; its pro®t is $9.50 Sales have been slow and Sears offers to buy all that Model-Kit can supply using components in stock if Model-Kit will sell all earthmover kits over 60 at a $5 discount and all racing kits over 50 at a $3 discount Determine which mix of model kits to sell to Sears to maximize pro®t using components in stock Solution The numbers 60 and 50 are thresholds for earthmover and racing kits As production increases across the threshold, the return per unit diminishes Let E and R denote the number of earthmover and racing kits to sell to Sears Let E1 denote the number of earthmover kits to be sold at the regular price and let E2 denote the number to be sold for $5 less: E2 ˆ E À E1 Let R1 and R2 play similar roles for racing kits Maximize 15 E1 + 10 E2 + 9.5 R1 + 6.5 R2 Subject to 2) 2 E + R

Ngày đăng: 10/08/2014, 04:21

Tài liệu cùng người dùng

Tài liệu liên quan