operations research methods

52
OPERATIONS RESEARCH METHODS: RELATED PRODUCTION, DISTRIBUTION, AND INVENTORY MANAGEMENT APPLICATIONS B. D. CRAVEN University of Melbourne S. M. N. ISLAM Victoria University March 2005

Upload: ctsak

Post on 27-Oct-2014

123 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Operations research methods

OPERATIONS RESEARCH METHODS:

RELATED PRODUCTION, DISTRIBUTION, AND INVENTORY MANAGEMENT APPLICATIONS

B. D. CRAVEN

University of Melbourne

S. M. N. ISLAM

Victoria University

March 2005

Page 2: Operations research methods

ii

Page 3: Operations research methods

iii

PREFACE Business managements make daily decisions on many issues, suchas how much and where to produce, for which market, what prices toset, and how much stock to keep. Mathematical models can help tomake the best decisions, among the possible alternatives. The objective of this book is to present a survey of selectedOperations Research methods, and some of their applications tomanagerial decision making, concerning production, inventory,distribution, and integrated supply chain modelling. Also included arelisting of some computer programs to compute operations researchmodels.1

Operations Research (O.R.) has been termed The Science ofBetter. A problem in the real world is modelled, usually in mathematicalterms, then mathematical techniques, together with data analysis andcomputational algorithms, are applied, in order to find ways to do thejob better. The word Operations derives from the many successfulapplications of O.R. to military operations in the 1940s. But, sincethen, most O.R. applications have been to peaceful activities, especiallyto business management, of which planning industrial production, andscheduling airlines, and other transportation, have been prominent. Thename Management Science denotes the same discipline, with someemphasis on business management. Practitioners of OperationsManagement will find many of these techniques relevant. The areas ofLogistics, Supply Chain Management, Decision Sciences, andManufacturing Management deal with similar applications.2

This book is concerned with O.R. methods. The commencing chapter(numbered chapter 0 - computers count up from zero) gives a generaldiscussion of model building, various examples of their applications, andsome discussion of the limitations of some models. It is suggested thatan O.R. practitioner should understand the models and the techniques,and, while using computers and computer packages extensively, shouldnot depend on them to decide a model (possibly inappropriate) to use. Chapter 1 discusses linear programming . As well as themathematics, section 1.16 on cost data discusses when such modelsare appropriate, and what sort of data must be sought. Chapter 2 discusses dynamic programming, and several of its manyapplications, to capital budgetting and to a rental problem. The effectof random elements is also considered. Chapter 3 discusses the critical path method. Chapter 4 discusses planning over time. This includes discussion ofinterest rates and present value, effect of inflation, risk-averse utility,decision trees and planning over time, and forecasting. A conciseintroduction to the use of spreadsheets for such planning andcalculations is given in chapter 9. Chapter 5 discusses inventory, presenting various versions of

2 See Ragsdale (2001), and Gass and Harris (2001), for various such applications.

1 Some programs written in FORTRAN AND GAMS are included.

Page 4: Operations research methods

iv

economic order quantity, with applications including seasonal demand,discounting, and the issues that arise when inventory and productionmust be managed together, as especially in supply chain management. Chapter 6 outlines the topic of networks, which often arise inplanning models. Chapter 7 discusses various methods for nonlinear optimization ,and lists some of their applications. Although many models aredescribed by linear equations, nonlinear models are also often needed. Chapter 8 discusses simulation techniques, with applications toqueue, inventory and storage models, and also to networks models.Often simulation can obtain results, when no exact formulas arepossible. The discussion of simulation methods, both those based onevents and those planned on a time scale, should enable a user tounderstand what a computer package for simulation should be doing,and perhaps write his own simulation program. In chapter 9, a number of related computer programs are listed. For these various methods and applications, the basic methods andprimary applications are presented, together with some reviews ofrecent developments. In comparison with some other books on the methods of OperationsResearch, the present book gives a concise account of the methods andapplications. A moderate mathematical background is assumed (somecalculus and matrix algebra). A reader is assumed to want tounderstand the methods, and the modelling assumptions made, ratherthan leave it all to a computer package. Some aspects that may beinnovative include the following:

• A detailed discussion (in chapter 0) of O.R. modelling, including the difficulties involved, and various areas of application to real problems. • A discussion (section 1.16) of cost data, replacing the common (inadequate) assumption that everything is linear. • Various topics (in chapter 4) concerning planning over time, i including discussion of riak-averse utility, and stability analysis. • Some critical discussion (sections 5.11 and 5.12) of supply chain models. • Some critical discussion (sections 7.19 and 7.20) of multiobjective optimization, and of optimization when the usual convexity assumptions fail. This book presents phases and aspects of applied operationsresearch studies with the emphasis on business, logistics, and operationmanagement applications. This book includes many examples ofapplications of operations research methods in those areas. It can beused as a text or a reference for a course on operations managementand logistics/supply chain management at the Masters or Doctoral leveland a text for undergraduate students in operations research. It will alsobe of importance to corporate executives, academics, practitioners,and business consultants.

Page 5: Operations research methods

v

TABLE OF CONTENTS

Chapter 0 Introduction to Operations Research and Applications0.1 Mathematical models for management 10.2 Some reference books 20.3 Initial example 30.4 Check-list, when setting up an Operations Research model 30.5 Some other examples of Operations Research models in business 60.6 Importance of model building, and limitations of computers 110.7 Why the name? 120.8 The usefulness of spreadsheets 120.9 Presentation of conclusions and recommendations 12

Chapter 1 Linear Programming1.1 Introduction - management models 141.2 Standard form for a linear program 161.3 Idea of simplex method 161.4 Simplex tableaus 171.5 Information from tableau 181.6 Two-phase method 191.7 Unsigned variables 201.8 Revised simplex method 201.9 Dual linear program 221.10 Dual properties 231.11 Sensitivity 251.12 Dual simplex method 251.13 Jumps in shadow costs 261.14 Integer linear programming 271.15 Transportation problem 291.16 Cost data (piecewise linear cost function) 331.17 Some exercises on linear programming 361.18 Computer input/output for linear programming 401.19 A note on interior-point methods 43Appendix: Some theory of linear programming 44

Chapter 2 Dynamic Programming2.1 Introduction 462.2 A routing problem 462.3 Why does this work? 472.4 Forward analysis 482.5 An investment (or capital budgetting) problem 482.6 A model for inventory and production 492.7 A rental problem 512.8 Stochastic inventory 522.9 Some exercises and examples 53

Page 6: Operations research methods

vi

Chapter 3 Critical Path Method3.1 Introduction 553.2 Example of CPM 553.3 Method of calculation 563.4 Example of computer output 573.5 Alternative presentation 583.6 Random variation in time durations 593.7 Exercises 59

Chapter 4 Planning over Time, Uncertainty and Forecasting4.1 Present value 614.2 Annual cost and rate of return 624.3 Allowing for inflation? 624.4 Different interest rates 634.5 Decision trees 644.6 Risk-averse utility 684.7 Decision tree examples and exercises 694.8 Stability over time 704.9 Indifference curves 714.10 Forecasting and exponential smoothing 72

Chapter 5 Inventory Management5.1 What is inventory? 745.2 Economic order quantity 745.3 Inventory model for constant sales rates 755.4 Inventory model for variable demand 765.5 Sequencing a number of products 775.6 What stock to carry of a critical component? 785.7 Managing inventory and production together 785.8 Seasonal demand 805.9 Discounted and floor prices 805.10 The newsboy problem 815.11 Supply chain management 815.12 Examples of supply chain models 835.13 Some exercises 85

Chapter 6 Network Planning6.1 Why networks? 866.2 Idea of out-of-kilter algorithm 876.3 Idea of a shortest-path algorithm 886.4 Idea of Ford-Fulkerson transportation method 886.5 Branch and bound 896.6 Remarks on mixed-integer linear programming 926.7 Job-shop scheduling 926.8 Examples 94

Chapter 7 Nonlinear Optimization Methods7.1 Introduction 95

Page 7: Operations research methods

vii

7.2 Separable programming 957.3 Convergence and convergence rate 967.4 Lagrange multipliers 977.5 Sensitivity 997.6 Computing an iterative algorithm 997.7 Descent methods 1007.8 Fletcher-Reeves algorithm 1017.9 Davidon-Fletcher-Powell (DFP) algorithm 1017.10 Example 1027.11 Linesearch 1037.12 Descent methods and stability 1057.13 Constrained minimization 1067.14 Sequential unconstrained minimization technique (SUMT) 1077.15 Projected gr5dient 1077.16 Quadratic programming by Wolfe's method 1087.17 Further comments on constrained mimimization 1097.18 Multiobjective optimization 1127.19 Invexity 1137.20 Some applications of nonlinear programming 114

Chapter 8 Simulation8.1 Idea of simulation 1158.2 Queue and storage models 1158.3 Examples of simulation 1188.4 Getting pseudorandom numbers 1208.5 Some simulation models 1228.6 Some other methods and models 122 Chapter 9 Some Computer Programs9.1 Remarks on computer programs for O. R. problems 1259.2 Using spreadsheets 1269.3 Using Excel Solver 1299.4 An example of a GAMS package for capital budgetting 131

9.5 Introduction to the FORTRAN programming language 1339.6 A linear programming package lpZSq 1389.7 Documentation for the linear programming package lpZSq 1449.8 A FORTRAN program for critical path 1479.9 A program for one application of dynamic programming 1519.10 FORTRAN programs to illustrate methods for unconstrained optimization 153

Bibliography 160

Page 8: Operations research methods

1

Chapter 0 INTRODUCTION TO OPERATIONS RESEARCH AND APPLICATIONS

0.1 Mathematical models for management A business firm must make decisions on many issues relating toproduction, distribution, consumers, shareholders, informationprocessing, employees, society, pricing etc..These decisions typicallyconcern production and inventory planning, sales forecasting, capitalbudgeting, investment planning, materials requirement planning,locational decisions, personnel management and planning, pricing,distribution, management and planning, integrated supply chain orlogistics management and planning, as they affect the several parts ofthe firm. These questions are sometimes considered under the headingof Operations Management. Business decision making requires the choice of the best decisionamong alternatives, or at any rate a decision that gives a substantialimprovement. The objectives may be revenue maximisation, costminimisation, satisfactory performance regarding social responsibility,shareholder value maximisation, etc., or sometimes the survival of thefirm in adverse circumstances. The decisions are constrained byrequirements such as budget and resource constraints. Methods ofOperations Research (O.R.) are well adapted to such decision making inbusiness. Applications of OR to business management have beendiscussed in different disciplines such as Management Science,Operations Management, Logistics Management, Supply ChainManagement, and Decision Sciences. In Operations Research, we set up and use mathematical models,usually related to questions of planning in business, industry, ormanagement. Any model of a real-life situation must simplify it greatly,by picking out those factors we think important for our purpose, andneglecting the rest. Otherwise, we can't calculate, or predict. (Newtonapproximated the sun and earth by masses concentrated at points.This approximation succeeded). We must consider whether we havewe made a right selection. What check or validation is possible? To put our model in mathematical terms makes us formulate ourideas precisely - what exactly are we assuming? - and so we are lesslikely to make hidden assumptions without knowing it. Moreover, oncewe have a model in mathematical terms, we can manipulate iteffectively using concise mathematical language. Also calculations,using a computer, are more readily set up. The model results provideuseful information for making business decisions. The factors we recognize, as affecting the situation, consist of (i)external factors ("exogenous factors"), which we regard as inputs tothe system, and whose effects we shall study, (ii) factors the model

Page 9: Operations research methods

2

tries to explain ("output", "dependent", or "endogenous" factors), and(iii) factors we shall neglect. For example, if we are hired by a firm todetermine the level of production that will maximize profits, then profitbecomes an "output" for the system, and market factors become the"inputs". But, for an economist who wants to explain production levels,profit could be an internal variable (internal to the system beingstudied, neither an input nor an output). We should be clear what is theaim of our investigation. It often falls to the O.R. investigator to clarifythe objective. This involves much discussion with the propounder of theproblem, to find out "where the shoe is really pinching". For example, itcould be irrelevant to optimize a production schedule, if the realproblem is labor relations. We can fall on our face by neglecting some essential factors. Acentury ago, some mathematicians proved that aeroplanes wereimpossible; they had neglected the essential "boundary layer", whereviscosity of the air plays an essential role. Likewise, in a businessmodel, it is possible to omit an essential factor - for example theremay be an upper bound on certain resources, which must not beforgotten. This course has to present examples from books; however, ina real-world situation, always go and see for yourself (the factory floor,or the airport, or whatever) if you possibly can - it is usually differentfrom what was supposed.

0.2 Some reference books (a few out of the many published.) The codes <DG> etc. are here for cross-referencing. Note that a book such as <DG>, which includes discussion ofbuilding suitable models, is of more value to an O.R. practitioner than abook that mainly presents the computational algorithms. In practice,the calculations are done on computers; however, one needs someunderstanding of the algorithms, otherwise one never knows whetherthe computer is producing sense or nonsense.<DG> H.C. Daellenbach, J.A. George, D.C.. McNickle, 1984 (1st. ed.)or 1978 (2nd. ed.). Introduction to Operations Research (Allyn &Bacon). <a good balance between model building and the mathematics><HW> R. Hesse and E. Woolsey, 1980. Applied Management Science(a quick and dirty approach), (Science Research Associates).

<good for practical " real-world" details of application><B+> K.H. Bradshaw and others, 1982. An Operations ResearchCasebook (Longman Cheshire). <the source of many miniproject topics for an O. R. course> J.C. Ecker and M. Kupferschmid, 1988.Introduction to OperationsResearch (Wiley). <MD> M.J.C. Martin and R.A. Denison, 1971. Case Exercises inOperations Research ,(Wiley-Interscience)

Page 10: Operations research methods

3

<a good source of many project topics> E.A. Bender, 1970. An introduction to mathematical modelling(Wiley/Interscience). H.A. Taha, 1982. Operations Research (Macmillan).

<better on calculation examples than model building> B. Srinavasan and C.L. Sandblom, 1989, Quantitative Analysis forBusiness Decisions (McGraw-Hill).

<includes some useful examples of decision trees> <SDK> M. Syslo, N. Deo, J. Kowalik,1983. Discrete OptimizationAlgorithms with Pascal Programs, (Prentice-Hall). <See especially chapter 3: Optimization on Networks> <WS> R.E.D.Woolsey and H. Swanson, 1969, 1975.OperationsResearch for Immediate Application A Quick and Dirty Manual, (Harper &Row). <see especially chapters 6 and 7><MW> S. Makridakis and S. C. Wheelwright, 1989. ForecastingMethods for Management (Wiley). This list is not meant to exclude other, and more recent, textbooks.Reference may be made to Thompson and Thore (1992), Ragsdale(2001), and Vollman et al. (2005), listed in the bibliography, for moreexamples of O. R. models in management. But it is not recommendedto use a text that is mainly a manual for a particular computer package(see section 0.6).

0.3 Initial example Think of a factory, whose running cost (which is to be minimized)is a function of various production variables (how much do we make ofwhich product on which machine for which market?), subject toconstraints (limits on material resources, labor, time available, marketrequirements). This may (but need not always) reduce to a linearprogramming model). Note that we must, later, be specific as to whatwe mean by cost. The following check-list (in 0.4) applies specificallyto linear programming models, but also gives general guidance insetting up other kinds of O.R. models.

0.4 Check-list, when setting up an Operations Research model The stages of an applied operations research study have been listed as follows (following Taha, 1992):

a. defining the research or the policy problemb. developing the operations research model for the relevantsystemc. implementing/solving the model numerically by some suitablealgorithms and computer programsd. undertaking validation tests of the model and its resultse. analysing the implications of the model results for actions ordecisions related to the issues under the study.

Page 11: Operations research methods

4

A more detailed check-list is as follows:

(1). Find out what the problem really is! It won't come to you packagesin mathematical terms. Ask simple, relevant questions. Go and see foryourself. "Obvious" assumptions can be wrong.

(2) What are the variables of the problem? What, in fact, can youvary? If you seek to optimize, what is the objective function? Or arethere several ? Check that the variables relate to the decisions thatmust be made. Would they give us enough information to act on? Manyvariables cannot be negative. What alternatives are possible?

(3) List the constraints. They often include: input constraints(restrictions or requirements on raw materials), capacity constraints(e.g. available machine time, pipeline capacity, storage available, rateat which a product can be made), materials balance ("what goes inmust come out", e.g. old inventory + production - part used to makenew product = new inventory + deliveries to customers), outputconstraints (requirements, or limits, on sales, production, or rate ofreturn). Check that units of measurement are consistent, or makethem so. (A factory once measured its storage tank capacities in cubicfeet, but its flow rates - inconsistently - in gallons per minute. Formathematical modelling, the flow rates were converted to cubic feetper hour - to avoid hopeless confusion. Today, SI units (metres,kilograms,. etc.) would be preferred).

(4) What data are needed? You may need all your tact to get it! Exactfigures may be unobtainable, or make little sense; maybe get upper andlower estimates instead. Are the cost figures you get relevant ? If youare planning production schedules, then likely costs of raw materialsand energy enter; wages may or may not, depending on the time scaleof planning.

(5) Check out a simplified example! So, find any blunders in yourmodel, or your computer program, before you risk your reputation. Andget quickly a "ballpark estimate" to please the boss ! (Don't befrightened of a rough "back of envelope" calculation for this limitedpurpose - if you can do it quickly !) Do the results make practicalsense? Are the computations, perhaps, only telling you what everyonein tbe industry has known for twenty years ?

(6) Compute the full model. Often it is better to start from presentoperating conditions, and try to improve them, rather than start fromscratch. What can be recommended for action (expressed in practical

Page 12: Operations research methods

5

terms, not mathematical symbols) ? Note the importance of writing areport, intelligible to management. Don't expect managers to cope witha schedule of how much to make of which product, if it is expressed as: x⁄ = 17.5 x‹ = 29.7

and so on !Instead, tell the, in their language ! Something like: Daily production schedule Dinguses 17.5 tonnes

Whatsits 29.7 tonnes and so on.

(7) Model Validation and Verification. In Gass and Harris (2001, p. 865), model validation is defined asthe process of determining how well the outputs of a mathematicalmodel of real-world problem conform to reality. Model validation isoften synonymously used with other terms such as model verificationand model testing. Model validation is one of the important steps of anO.R. study. In an applied O.R. study, the reliability of the O.R. model andits results need to be tested. For this purpose, the usual modelvalidation criteria can be adopted. According to Hazell and Norton(1986, p. 269) model validation and its purposes are as follows“"Validation of model is a process that leads to (1) a numerical reportof the models fidelity to the historical data, (2) improvements of themodel as a consequence of imperfect validation, (3) a qualitativejudgment on how reliable the model is for its stated purposes, and (4) aconclusion (preferably explicit) for the kinds of uses it should not beused for"

Several criteria can be used to test the validation of a model (seeGass and Harris, 2001; Labys, 1982; Taha, 1992; Hazell and Norton,1986) at three levels of validation tests: descriptive, analytical andexperimental. Three different types of validation criteria are applied tothese three levels of validation tests (although 2 types of validationsare suggested in Gass and Harris (2001) which are face validity andpredictive validity) (see Kresge 1980 for further details):(i) Descriptive validation criteria: The attainment of the objectives of the model. The appropriateness of the model structure and the plausibility of results.(ii) Analytical validation criteria: The plausibility and characteristics of models and their results. The robustness of the results. (iii) Experimental validation criteria: Methodological tests of model documentation. Cost and efficiency in model, storage, transfer and extension. Tests for accuracy and efficiency of implementation as well as cost of and efficiency in the software transfer, storage and extension.

Page 13: Operations research methods

6

The above is a detailed set of model validation criteria for O.R.models. In a real life O.R. study often some simple validation tests areused (Hazell and Norton, 1986): plausibility of results, and comparisonsof model results with actual or historical results, and other modelresults. Also, it is important to compare the model predictions with anindependent set of observations. Those may be observations from adifferent time period, from the period whose data were used toestimate the parameters of the model.

(8) What happens if something changes? Murphy's law makes sure it does ! How sensitive are yourconclusions to small changes in the data ? (The jargon phrases are"post-optimality analysis" for linear programming, or (more generally)"sensitivity analysis".) If your recommendation is very sensitive to aparticular item of data, or a particular assumption, find this out beforeit finds you out! If you calculate a linear programming model, it is seldom goodenough to just present an optimum schedule! Consider also whathappens if some likely things change. For example, a sales target forsome product may have been set; but would it be profitable to increaseit by a few percent, even though the distribution costs would then alsoincrease ? Also, there may (quite often) be several other schedules,alternative to the calculated optimum schedule, which are nearly asgood; and sometimes these alternatives should be presented to amanagement. They may want to take additional factors into account -such as qualitative factors, that could not be included in themathematical model.

(9) Try to persuade the management to put your recommendations intoeffect. This can be the hardest part ! If they do, observe carefullywhat happens. Get some feedback of information. Should your modelthen be altered ?

0.5 Some other examples of Operations Research models in business There will be many such in later chapters. Chapter 1 discussesvarious linear programming examples. For the present, consider -without going into details - the following additional examples ofOperations Research models in business, including supply chainquestions.

(a ) A management must choose between several plans for futureaction. For example, do they start at once to produce their new productline ? Or do they conduct a market survey first ? That gives them,hopefully, better information, but runs the risk of letting a competitor

Page 14: Operations research methods

7

get in first. The various possibilities may be shown on a diagram calleda decision tree. In this diagram, a branch divides into two or morebranches whenever the management must take some decision (goahead, or not? how much to make?), or whether the external worlddecides it for them (the new product sells like hot cakes, or only a fewpeople want to buy it?) Based on this diagram, some evaluation ofalternative courses of action can be made. Of course, one isestimating uncertain things (how likely is it that the sales will go up by50% for the new product?), and such estimates have to be rough. Butone is better off analysing even rough information in a systematic andquantitative way, than just relying on intuition - or optimism - to putthe picture together. (See Chapter 4)

(b) Planning industrial operations over months or years, as well ascomparing alternatives as in a, needs to be done systematically. Adollar now is worth more than a dollar at some future date. (Evenwithout inflation, money can still earn interest.) So one has to discountfuture payments or receipts, to an extent depending on the timeinterval, to allow for this. One may thus calculate a present value ofoperations that will happen gradually over time. A variant of this is tocalculate a (percentage) rate of return - a measuring stick for howprofitable or productive the planned operations will be (see Chapter 4). Such calculations are often, and usefully, done using a spreadsheetprogram on a desktop computer, so that all the relevant figures arehandily displayed, say with years as columns and various kinds ofpayments or receipts as rows. This makes it easy to vary someparameter, such as some interest rate, and see what will happen. Sucha presentation also allows another important aspect, called cash flow,to be checked. A business must have enough money coming in, fromsomewhere, to meet its essential obligations in each year. (A firm maygo bankrupt now, for lack of cash flow this year, even though itsprospects for future years appear bright.)

(c) Network models are often useful. This may describe some actualnetwork, of pipelines for oil or water, or an electrical or telephonenetwork, or a network of routes for road transport, whose performance(and bottlenecks !) must be analysed. However, scheduling problemscan often be described by networks. If a number of tasks have to bedone in a suitable order (you can't put the roof on the building until youhave built some walls !), then a network can describe the scheduling.Thus, each line (or "pipe", or arc) of the network could represent atask, and each dot (or "junction", or node) of the network represents atime of completion. One may then calculate how soon the wholeproject could be completed, and which are the "bottlenecks" (seeChapters 3 and 6).

Page 15: Operations research methods

8

(d) Inventory means things kept in store - whether raw materials, orproducts partly made ("in-process inventory"), or completed products.If the firm has no inventory of raw materials, then an interruption tosupply will stop production - and starting and stopping is expensive(even, sometimes, disastrous !). If there is no inventory of finishedproducts, then the customers can't get the products when they needthem (and then do they buy them from another firm ?), or the firm'sproduction is further disrupted by starting and stopping to matchvarying demand for the products. But carrying inventory costs money;not only do storage facilities, and wages of people to run them, costmoney, but (often, most importantly) the cost of the materials held instock has to be borrowed from the bank, and costs bank charges. Howshould these conflicting requirements be balanced ? Guesswork usuallygets it wrong ! (Many firms have spent far too much in connection withinventory, keeping far too much, or far too little.) However,mathematical models are available, and these things can be calculated(see Chapter 5).

(e) Rail trucks, carrying raw materials for a factory, come to a goodsyard to be unloaded. Their rate of arrival is somewhat variable; and therate at which they can be handled is also somewhat variable. The usualresult is that some queue builds up of trucks, waiting to be unloaded.That costs money - and the situation is even worse, if the materials areperishable ! Similar queues arise in many other situations, including(for example):

Passengers, and baggage, arriving at airline counters;Telephone calls coming into a telephone exchange;

Waiting to use specialized machines in a factory. Mathematical models are available for various kinds of queues, ifsomething is known (or can be measured) about variabilities, as well asaverage rates. It is these quantities that make the differences, notwhether the queue is of people or rail trucks or telephone calls. Themathematics is very close to that for inventories (see Section 8.1).

(f) Many scheduling problems, including some questions of inventorymanagement, scheduling production and employment, budgetting forcapital expenditure between several projects, have the common (andawkward) feature that the number of possibilities is very great, far toomany to make a list of them to compare. Suppose that the schedulingcan be put on a time scale (weeks or months, say), or at any rate put inorder (number off the alternative investment projects 1,2,3,...).Suppose also that the "cost" (maybe actual cost, or some otherquantity such as waste product, to be minimized), adds up over thedifferent "times". Then a technique called dynamic programming can

Page 16: Operations research methods

9

often be used, to avoid listing an impossible number of possibilities.Under the "adds up" assumption, one may calculate from each "time"to the next, instead of listing all possible schedules. Roughly stated, theproduction (or whatever) for "today" depends on past history, only tothe extent that it is summed up in the production (or whatever) for"yesterday" (see Chapter 3).

(g ) The property just stated (not needing to look further back than"yesterday") may be thought of as a "short memory" property.(Technically, it is called the Markovian property). This propertyhappens, quite often, with stochastic systems - those including somerandom elements - in particular with many queues, and inventorysystems where (as usual) there is some variability in demand for theproducts. Of course, it does not always happen; but, when it does, itusually makes some calculations possible.

(h) The order of scheduling tasks in a workshop - say, when variousjobs must be scheduled on successive machines - often leads to jobshop scheduling problems, involving integers (in which order should alist of jobs be done), rather than continuous variables. For some ofthese practical problems, there are good techniques; for some others,there are only rough approximations (see Chapter 6).

(i) Suppose the yield (ratio of useful output to raw material input)for some industrial process must be maximized, subject to someconstraints (it is no use blowing up the factory, or making the reactionvessel freeze solid !). Usually, the functions here are nonlinear, so thatlinear programming does not apply. Sometimes, such a problem can bereformulated, using different variables, to allow linear programming tobe used as an approximation. But, quite often, there is too muchnonlinearity in the problem to allow this simplification. There are adiversity of methods for calculating such nonlinear problems. Questionsof sensitivity to changes in the data are also important (see Chapter 7).

(j) Optimization is not only about maximizing profit or minimizing cost,but can, and often should, consider environmental variables as well. Forexample, a model may include a constraint which sets an upper boundto air or water pollution. Or an environmental variable may beassigned a cost, and included in the cost function that is to beminimized.

(k) A model for optimal waste management was given by Sahoo, Kim,Kim, Kraas, and Popov (2005). If only vehicle travel time is minimized,the model is a mixed integer linear program (MILP). Thus (see Chapter1 and Section 6.6), the model is described by linear equations, but

Page 17: Operations research methods

10

some of them may only take integer values. A more complicatedversion of the model also seeks to minimize the number of vehicles, andbalance the workload. Of course, there must be some compromisebetween these different objectives. While there are various computerprograms for MILP, they may not be suitable for this specializedproblem. The authors use several heuristic (approximate) methods,including a clustering algorithm to generate the initial routes, related tothe travelling salesman problem, and also a simulated annealing method(see Section 8.4) to improve the result.

(l) Various models for supply chain have been given recently. One, byde Kok, Janssen, van Donemalen, van Wachem, Clerkx and Peeters(2005) is cited in section 5.12. The variability of demand increases asone moves back through the stages of the production process. Theauthors propose a model, with linear equations describing inventory.However, their main concern is to reduce time lags in the planningprocess. Another supply chain model, by Troyer, Smith, Marshall, Yaniv,Tayur, Barkman, Kaya and Liu (2005), seeks to improve the proportionof deliveries that are on time, over a network of factories and dealers,while reducing inventories. Here, inventories must be held at variousplaces in the network, with appropriate levels of safety stock (seechapter 5 for what this means for a single inventory). But the demandsmust be propagated down the network (see Section 5.11.)

(m) Metty, Harlan, Samelson, Moore, Schnweur, Raskina, Schneur,Kanner, Potts and Robbins (2005) gave a model for a suppliernegotiation process in the telecommunications industry. This led againto a MILP model. Hicks, Madrid, Milligan, Pruneau, Kanaley, Dumas, Lacroix,Desrisoers and Soumis (2005) gave a MILP model for scheduling the useof aircraft which are shared between several firms. This modelcontained many zero-one variables (taking value 1 when the aircraft isused for a particular journey, and 0 otherwise). The (heavy)computational requirement was reduced by partitioning the MILP intosmaller subprograms, having only a few variables in common. So theproblem was handled by optimizing the subprograms, thenimproving the values of the common variables, then repeating theprocess. Kuchta, Newman and Topal (2005) gave a MILP model forscheduling production at an iron mine, to meet demands from the millsthat process it. Here, zero-one variables occur, taking value 1 if aparticular block is mined at a particular time, and otherwise zero. LeBlanc, Hill, Greenwell and Czesnat (2005) developed adistribution model, involving different warehouses and shippingdistances, to minimize the total shipping, holding and handling costs,using a linear programming model.

Page 18: Operations research methods

11

0.6 Importance of model building, and limitations of computers Any course on Operations Research must detail various standardmodels, and methods to analyse and calculate with them. But one mustnot impose a standard model on a real-world situation, if it does not fit.It may well happen that no standard model is of any relevance, to aparticular real situation. One must learn, and be prepared, to set up amodel, to fit the real situation. To practice this, one should alsoundertake project work on specific problems. Most Operations Research investigations involve seriouscomputation, and many computer packages are available, e.g. for linearprogramming. But it is important not to allow an available package todetermine the model to be used. The computer output may be verymisleading if you do not know what model, or assumptions, are builtinto the package, or if you do not know, even in outline, whatcomputational method is being used. Indeed, if a very rough, quick,pencil-and-paper calculation can be done, it may provide a useful check(are we out by a factor of ten?), as well as giving some answer to animpatient boss or client. One instance of misuse of a computer package was cited byGreenberg (1987). A factory had a two-year supply of unsaleable redwidgets in its warehouse, and more being made, because thecomputer-based production and inventory control system said theyshould be made. The system was not documented, to they did notunderstand it. Eventually, it was found that an order for blue widgetshad been received, but it was entered by mistake as a large order forred widgets. This caused a special production order to replenish thestock of red widgets, and a spurious forecast demand for red widgets,so even more were called for. The mistaken order was corrected, butthe system did not recover from the mistake. One source of projects (of moderate size) is An OperationsResearch Casebook, by K. H. Bradshaw, D. N. Foster, B. R. Smith, and G.A. Vignaux (Longman Cheshire, Melbourne, 1982). Many actualapplications of operations research may be found in journals, especiallyJournal of the Operational Research Society and Interfaces. Howeverthose in Interfaces are often large models, involving large sets of dataand heavy computation. A student is advised to start on some smallermodels, found in the older literature. A few examples are the following:

K. Kolesar, 1975, Determining the relation between fire engine travel times andtravel distances in New York city, Operations Research 23 (4), 614.W. T. Ziemba, C. Parkan and R. B rooks-Hill, 1974. Calculation of investmentportfolio with risk-free borrowing and lending, Management Science 21, 209-222.R. Juseret, Long term optimization of electrical system generation by convexprogramming, 1978. Mathematical Programming Study 9, 186-195.A. Prékopa and T. Szántai, Flood control reservoir system design using stochasticprogramming, 1978. Mathematical Programming Study 9, 138-151.B. D. Craven, Mathematical Programming and Control Theory, 1978. Chapman & Hall,

Page 19: Operations research methods

12

London.S. K. Singh, A function for size distribution of incomes, 1976. Econometrica 44, 963-970.R. P. O'Neill, M. Williard, B. Wilkins and R. Pike, 1979. A mathematicalprogramming model for allocation of natural gas, Operations Research 27, 857.

0.7 Why the name ? Operations Research takes its name from the application ofscientific methods to the planning of military operations, by Britain andU.S.A., during the 1939-1945 war. However, the ideas and methodshave long since been applied to the arts of peace. Other names, such as Management Science and IndustrialEngineering, describe very similar disciplines.

0.8 The usefulness of spreadsheets A spreadsheet program is often useful for data input (e.g. to alinear programming package, see section 1.18 for an example), or fordata output for presentation, from the computation of an O. R. model.The basic principles of a spreadsheet are quite simple (see section 9.2),and the complications (especially graphical presentations) can belearned later, as and when required. However, the computational features of spreadsheet programs haveserious limitations, and often more specialized computer programs arepreferable (e.g. programs for linear programming or nonlinearoptimization.) Moreover, a model that is easy to set up on a spreadsheet may be aninadequate model. Nothing substitutes for the pencil-and-papermodelling, before going near the computer.

0.9 Presentation of conclusions and recommendations It is the responsibility of an Operations Research consultant(whatever label he/she wears) to present the results intelligibly to theclient, without assuming the client is already familiar with thetechnicalities. (It is always the job of a mathematician to explainhimself/herself to the client, rather than the other way about.)Usually, both a written report and an oral presentation are required.The following notes relate to a written report, what it should contain,and how it should be arranged, so as to be acceptable to a businessmanagement.

The layout of a report should be something like the following: SUMMARY (or OVERVIEW (on a single page; no math symbols!) Introduction and objectives Summary of findings and conclusions Summary of recommendations (perhaps cross-referenced to main report)

Page 20: Operations research methods

13

MAIN REPORT (maximum nine pages)Problem definition

Method (but relegate math. technicalities to an appendix) Assumptions made (list assumptions - so that your work is checkable) Analysis of data Findings and conclusions (some graphical, or spreadsheet, presentation may be useful)

Recommendations (some specific things to do)APPENDICES (as the problem requires; put here such

things as extensive tables of data, computer output, mathematical formulation, e.g. of a linear programming

model.) The stated limitation on the size of the Summary (one page, for

the big boss), and the Main Report (maximum 9 pages), are important.Do not expect managers to read masses of material! Don't expect themto read mathematical symbols, when these are not essential! Forexample, do not present the results of a linear programming optimizationas x1 = 123.45 , x2 = 17.4 , etc. .

Instead present some table of recommended quantities, with names thatthe management will be familiar with, for example:

PRODUCTION SCHEDULE 123.5 tons of Wotsernames, 17.4 tons of Gizmos, etc (putting in whatever the names of the products really are). Do not present spurious precision in the conclusions - consider how

accurate the data are! Also, a spreadsheet presentation is oftenpersuasive.

The names given for headings are not set in concrete; vary them tosuit the topic.

There must be (usually in an appendix) enough relevant mathematicaldetail to enable the calculations to be checked, or repeated with somechanges. For example, for a linear programming model, there must be alist of variables, and the problem description in some form - a datamatrix, maybe on a spreadsheet, can be better than pages of equations.

Note carefully that the data for a real-world problem is ofteninadequate (then, often, you must make assumptions, and state clearlywhat you have assumed), and may contain items that are irrelevant, ormisleading (you must use some judgement !)

A report must be typed, using any available word processor. You don'thave to use a computer program to do diagrams; graphs can be pastedin the report. However, spreadsheet programs, such as Excel, have someuseful graphics capability. And the added neatness of graphs done with acomputer program is a selling point, as well as a requirement by journaleditors.

Page 21: Operations research methods

14

Chapter 1 LINEAR PROGRAMMING

1.1 Introduction : management models To introduce linear programming, consider the following two models.

Model A Allocation of production to machines Six products can bemade on each of two machines.The following tables show, for eachcombination of product and machine, the production rate (expressed ashours per ton) and the cost ($ per ton); also the demand in tons foreach product. Also shown are the variables, x⁄, x¤, ..., chosen todenote the amount (tons) of each product to be made on eachmachine. The hours available are 780 hours on machine 1, and 3077hours on machine 2. A schedule is required, by which the requirementscan be met at minimum total cost.

Production rate Cost Demand Variables (hours/ton)($/ton) (tons)Mach.1 Mach.2 Mach.1 Mach.2

Product 1 .228 .119 36.0 44.2 2929 x⁄ x‡Product 2 .228 .119 42.4 36.2 9420 x¤ x°Product 3 .231 .132 34.5 38.4 1655 x‹ x·Product 4 .231 .132 41.0 30.2 8978 x› x⁄‚Product 5 .182 .112 22.1 21.4 2989 xfi x⁄⁄Product 6 .182 .112 28.5 13.4 2977 xfl x⁄¤

There is a constraint for each product (x⁄ + x‡ = 2929 for the firstproduct), and a constraint for each machine (.228x⁄+.228x¤+.231x‹+.231x›+.182xfi+.182xflˆ780 for machine 1);and all the variables xj are nonnegative. The constraints need to be laidout tidily in rows and columns (thus as a matrix) - or there will beconfusion, especially when entering data into a computer program.

The use of dots for zeros is unconventional, but helps the eyeconsiderably. The objective function to be minimized is 36.0x⁄ + 42.4x¤ + ... + 13.4x⁄¤ .

Page 22: Operations research methods

15

x⁄ x¤ x‹ x› xfi xfl x‡ x° x· x⁄‚ x⁄⁄ x⁄¤1 1 . . . . . 1 . . . . . =29292 . 1 . . . . . 1 . . . . =94203 . . 1 . . . . . 1 . . . =16554 . . . 1 . . . . . 1 . . =89785 . . . . 1 . . . . . 1 . =29896 . . . . . 1 . . . . . 1 =29777 .228 .228 .231 .231 .182 .182 . . . . . . ˆ 7808 . . . . . . .119 .119.132 .132 .112 .112 ˆ3077

Model B The Novelty Company makes Thingos, Dinguses and Whatsits.Each Thingo takes 1.5 hours to make, and requires 4.5 kg of rawmaterial I and 950 g of raw material II. Each Dingus takes 4.6 hours tomake, and requires 2.0 kg of raw material I and 100 g of raw materialII. Each Whatsit takes 2.1 hours to make, and requires 11.0 kg of rawmaterial I and 240 g of raw material II. The net profit (= sale priceminus costs) for each Thingo is $220, for each Dingus is $150, foreach Whatsit is $270. The Company has available 25 hours, 130 kg ofraw material I, and 26 kg of raw material II. What is the maximumprofit they can make, and how do they do it ? Suppose they make x⁄ Thingos, x¤ Dinguses, and x‹ Thingos.Then x⁄ ˜ 0, x¤ ˜ 0 and x‹ ˜ 0, since negative amounts have no meaninghere. The restrictions on time, raw material I, and raw material II,require the following constraints to be satisfied: 1.5x⁄ + 4.6x¤ + 2.1x‹ ˆ 25, 4.5x⁄ + 2.0x¤ + 11.0x‹ ˆ 130, 950x⁄ +100x¤ +240x‹ ˆ26000.Subject to these constraints, the objective function 220x⁄ + 150x¤ + 270x‹is to be maximized. So there is a linear programming problem: Maximize 220x⁄ + 150x¤ + 270x‹ subject to x⁄ ˜ 0, x¤ ˜ 0, x‹ ˜ 0, 1.5x⁄ + 4.6x¤ + 2.1x‹ ˆ 25 , .45x⁄ + .20x¤ + 1.10x‹ ˆ 13.0 , .95x⁄ +.10x¤ + .24x‹ ˆ 26.0 . Observe that, in a linear program, the objective function and theconstraint functions are linear, and the veariables are nonnegative .The constraints may be equalities, ˆ inequalities, or ˜ inequalities.[Note also , in Model B, that the second and third constraints have beenscaled (multiplying by 0.1 and 0.001 respectively), so as to make thelargest coefficient in each constraint not too far from 1 is absolutevalue; this helps the accuracy of computation.] Linear programming applies to many other situations; otherexamples are given in later sections.

Page 23: Operations research methods

16

1.2 Standard form for a linear program The inequalities are converted to equalities by putting in extravariables. Thus, in Model B, the inequality1.5x⁄ + 4.6x¤ + 2.1x‹ ˆ 25becomes 1.5x⁄ + 4.6x¤ + 2.1x‹ + x› = 25,where x› is a nonnegative slack variable . Thus Model B becomes: Minimize 220x⁄ + 150x¤ + 270x‹ + 0x› + 0xfi + 0xfl subject to x⁄, x¤, x‹, x›, xfi, xfl ˜ 0, 1.5x⁄ + 4.6x¤ + 2.1x‹ + x› = 25.0 , .45x⁄+ .20x¤ + 1.10x‹ + xfi = 13.0 , .95x⁄ + .10x¤ + .24x‹ + xfl = 26.0 .Note that each constraint now has a variable with coefficient 1, thatoccurs nowhere else (thus, x› in the first constraint). Thus there is aninitial feasible solution (feasible means satisfying the constraints) x› =25.0, x› = 13.0, xfl = 26.0, all other xj = 0. (Notice that there are herejust as many nonzero xj (three) as there are constraints.) If thecoefficients in these constraInts are laid out as a matrix, thus x⁄ x¤ x‹ x› xfi xfl 1.5 4.6 2.1 1 . . 25 .45 .20 1.10 . 1 . 13 .95 .10 .24 . . 1 26 then this matrix contains a unit matrix (here, columns 4,5,6). This isnecessary in order to start the simplex method - see Section 1.3). If a model has a ˜ constraint, for example 3x⁄ + 4x¤ ˜ 12, then anegative slack variable is introduced, to convert to an equality, thus 3x⁄ + 4x¤ - xnegslack = 12. But this is not enough, since a termwith coefficient +1 is needed, to provide the unit matrix. So anartificial variable is added; thus, 3x⁄ + 4x¤ - xnegslack + xartificial=12.But xartificial is not part of the original problem; so a penalty cost term+Mxartificial must be added to the objective function (to be minimized).Here, M is a large enough positive number, so that minimizing theobjective function will get rid of the artificial variable. Consider now anequality constraint, say 3x⁄ + 4x¤ = 12. This still needs an artificialvariable (though not a slack variable), thus 3x⁄+4x¤ + xartificial= 12,with +Mxartificial in the objective function. This account standardizes on Minimization problems. Maximization(as in many textbooks) is equally good. Note that MAX 2x⁄ - 3x¤ + 5x‹is equivalent to MIN -2x⁄ + 2x¤ -+ 5x‹ .Thus, the profit coefficients-2, 2, -5 are the negatives of the cost coefficients 2, -3, 5 ; and thezj-cj (see Section 1.4) have opposite sign; and -Mxartificial is added to theobjective being maximized. [Also some books have a differentdefinition of standard form.]

1.3 Idea of simplex method The simplex method is the most widely used algorithm forcomputing linear programs. (See also Section 1.19.)

Page 24: Operations research methods

17

Consider the linear program:C: Minimize 3x⁄ + 4x¤ subject to x⁄˜0, x¤˜0, 2x⁄ + x¤ ˆ 7, x⁄ + x¤ ˜ 5.Putting this into standard form gives the (initial) tableau :

Cost coeffts 3 4 0 0 10 x⁄ x¤ x‹ x› xfi Requirement Multiplier

2 1 . 1 . 7 1 1 -1 . 1 5 -.5 zj -cj 7 6 -10 0 0 50 -3.5

Note that the cost coefficients (c⁄=3, c¤=4, etc.) are not part ofthe tableau; but we need to refer to them. Multiplier and zj-cj areexplained below. Here, x› is a slack variable, x‹ is a negative slack, andxfi is an artificial variable; M is taken here as 10, for simplicity. (Usuallya much larger number is required, like 10000, to be large enough,compared to all the other costs in the problem). Columns 4 and 5 givethe required unit matrix. The constraints solve immediately to give x›=7-2x⁄-2x¤-0x‹ andxfi=5-x⁄-x¤+x‹. (The variables x› and xfi form the initial basis. Initiallyx›=7 and xfi=5, so the objective function f = 0(7)+10(5)=50. ) Nowthe objective function equals f = 3x⁄+4x¤+0x‹+0x›+10xfi = 3x⁄+4x¤+0x‹+10(5-x⁄-x¤+x‹) = 50 - [ 10(1) -3]x⁄ - [10(1) - 4]x¤ - [10(-1)-0]x‹ = 50 - 7x⁄ - 6x¤ + 10x‹.[The numbers 7, 6, -10 are zj -cj in the tableau.]Initially x⁄=x¤=x‹=0 (nonbasic variables). Consider increasing one ofthem from zero. The fastest rate of decrease of f is obtained byincreasing x⁄ from zero. How far can x⁄ increase ? From x›=7-2x⁄˜0and xfi=5-x⁄˜0, there follows x⁄ˆ3.5 and x⁄ˆ5, hence x⁄ is taken as3.5. The new basis variables are x⁄ (replacing x›) and xfi. [The orderof the basis variables matters.] [Here, the pivot is the element incolumn 1 (new basis variable) and row 1 (the first constraint here tellswhich variable leaves the basis. Row 1 is here the pivot row.] It is now required to solve for x⁄ and xfi. Add 0.5 (equation 1) toequation 2; add -3,5(equation 1) to the zj-cj row); divide the pivot row(here, row 1) by the 2 (the pivot element). This gives x⁄ +.5x¤ +.5x› = 3.5 and .5x¤-x‹-.5x›+xfi=1.5.Solving for the new basis variables, x⁄=3.5-.5x¤-.5x› andxfi=1.5-.5x¤+x‹+.5x›. Therefore f = 3x⁄+4x¤+10xfi =25.5 -[ 3(.5)+10(.5)-4]x¤ -[3(0)+10(-1)-0]x‹ - [3(.5)+10(-.5)-0]x› =25.5 - 2.5x¤ +10x‹ + 3.5x› ;so x¤ enters the basis. Then x⁄=3.5-.5x¤˜0 and xfi=1.5-.5x¤˜0, requirethat x¤ˆ3.5/.5=7.0 and x¤ˆ1.5/.5=3; so take x¤=3; the pivot is thesecond element in column 2. And so on.

1.4 Simplex tableaus The above calculations are done systematically, using arrays ofnumbers, called tableaus. The step from each tableau to the next is

Page 25: Operations research methods

18

called an iteration. Cost coeffts 3 4 0 0 10 x⁄ x¤ x‹ x› xfi Requirement Multiplier

Tabl.1 2 1 . 1 . 7 1 1 -1 . 1 5 -.5 zj -cj 7 6 -10 0 0 50 -3.5 Tabl.2 1 .5 . .5 . 3.5 -1 . .5 -1 -.5 1 1.5 0 2.5 -10 -3.5 0 25.5 -5 Tabl.3 1 . 1 1 -1 2 . 1 -2 -1 2 3 0 0 -5 -1 -5 18 .

In tableau 1, the basis columns are 4 and 5; the cost coefficients are[c› cfi] = [0 10]. Calculate z⁄-c⁄ =[0 10] ã2õ-3=7; z¤-c¤=[0 10] ã1õ-4=6;and so on; note basic zj-cj=0. Ã1ÕThe largest positive zj-cj is z⁄-c⁄=7; so x⁄ enters the basis. Choosethe smallest nonnegative ratio among 7/2 and 5/1 [look atrequirements column and pivot column; ignore negative ratios, ifpresent, since they don't stop the variable going positive]. The firstratio is the smallest, so the first basis variable (x›) is replaced by x⁄.The pivot is shown in bold. For rows other than the pivot row, the multiplier = - (element in pivot column)/(pivot element).[Thus the multiplier for second row is -(1)/(2). ] To update the tableau, for rows other than the pivot row: new element = old element +(row multiplier)(element in same column and pivot row)

Thus, for row 2 and column 1, 1 ü 1 + (-.5)(1) = .6. The zj-cj row isupdated like any other row. Finally, the pivot row is divided by thepivot.Thus tableau 2 is obtained. The largest positive zj-cj is z¤-c¤=2.5;so x¤ enters the basis. The second basis element (xfi) leaves the basis(consider ratios 3.5/.5 and 1.5/.5). In the third tableau, all zj-cj are ˆ 0; so an optimum has beenreached. (The numbers zj-cj are called reduced costs.)

1.5 Information from tableau The optimal solution is x⁄ = 2, x¤ = 3, other xj = 0. Observe thatthe unit matrix in the initial tableau consists of columns 4 and 5 (in thatorder). The optimal inverse basis matrix then consists of columns 4and 5 in the optimal tableau. From z›-c›=-1 and zfi-cfi=-5, with c›=0and cfi=10, obtain z›=-1 and zfi=5. In the optimal tableau, columns 1and 2 form the unit matrix; columns 1 and 2 in the initial tableau from

Page 26: Operations research methods

19

the optimal basis.

Check that: ã 1 -1õã2 1õ =ã1 0õ and [3 4]ã -1õ = [-1 5] Ã-1 2ÕÃ1 1Õ Ã0 1Õ Ã-1 2Õ i.b.m. b.m. Here, [3 4] is the vector of cost coefficients for the optimal basicvariables; and the shadow costs are [z›, zfi] = [-1 5] (see below). What happens if some requirement is perturbed a little? If thesecond requirement 5 is changed to 5+h, then (using the inverse basismatrix) ãx⁄ õ = ã1 -1õã7 õ =ã2- h õ ˜ ã0õ provided hˆ2 Ãx¤ Õ Ã-1 2ÕÃ5+hÕ Ã3+2hÕ Ã0Õ h˜-1.5So the basic variables x⁄, x¤ stay basic when h varies between -1.5 and2, although the values change. Within that range, the optimal objectivefunction equals 3(2-h)+4(3+2h)=18+5h. The number 18 is alreadygiven in the optimal tableau; and 5 is the second shadow cost.

1.6 Two-phase method So far, a numerical value was given for M. If, instead, M is left as asymbol, then the zj-cj for the initial tableau for example C (in 1.3) areM-3, M-4, -M, 0,0, and the initial objective is 5M (instead of 50), withmultiplier -(M-3)/2. The second tableau obtains 0, (M-5)/2,-M, -(M-3)/2,0; objective =(3M+21)/2, and multiplier = -(M-5). The thirdtableau has zj-cj as 0, 0, -5, -1, -M+5, and objective 18. This is thebig M method, sometimes used for hand calculation. An alternative, often used in computer programs for LP, is thetwo-phase method. In phase I, M is taken as the unit of cost, and othernumbers considered negligible, so that the cost coefficients become 0,0, 0, 0, 1, and the initial objective value is 5. Phase ICost coeffts 0 0 0 0 1 x⁄ x¤ x‹ x› xfi Requirement Multiplier

Tabl.1 2 1 . 1 . 7 1 1 -1 . 1 5 -.5 zj -cj 1 1 -1 0 0 5 -.5 Tabl.2 1 .5 . .5 . 3.5 -1 . .5 -1 -.5 1 1.5 0 .5 -1 - .5 0 1.5 -1 Tabl.3 1 . 1 1 -1 2 . 1 -2 -1 2 3 zj- cj 0 0 0 0 -1 0New zj- cj 0 0 -5 -1 5

At the end of phase I, the zj-cj are all zero, except artificial columns.They must be recalculated, using the original costs, for example

Page 27: Operations research methods

20

z‹-c‹= [3 4] ã 1 õ -0 = -5 (using costs 3, 4 for basic x⁄,x¤ Ã-2 Õ and zero now instead of M )Here, by coincidence and unusually, all the (new) zj-cj happen to be ˆ 0,so the optimum has been reached. But usually some (new) zj-cj is > 0,so a phase II must follow, consisting of one or more simplex iterations.If the objective function in example C (in 1.3) is changed to x⁄ - x¤,then the tableaus become x⁄ x¤ x‹ x› xfi Requirement

2 1 . 1 . 7 1 1 -1 . 1 5 1 1 -1 . . 5

1 . 1 1 -1 2

1 1 -1 . 1 50 0 0 0 -1 0

-2 . 1 . X -5 öRecalculated

After the end of Phase I, the zj - cj row and objective value arerecalculated as shown above, for example z⁄-c⁄ = [c‹ c¤] [1] - c⁄ = [0 -1 [1] -1 = -3 .

[2] [2][Here X is no longer relevant, since the artificial column will ot be put back into the basis.

For comparison, X would be -M-1 for the big M method.] An iteration of Phase IIgives:

1 . 1 1 -1 22 1 . 1 . 7

-3 . . -1 X -7

which happens to be optimal, with x⁄=0, x¤=7, and (slack) x‹=2. (Again,X is not relevant here - although its matrix column is part if the inversebasis natrix.)

1.7 Unsigned variables A variable (z say) that is not required to be nonnegative can occurin a linear program - usually representing the change (up or down) ofa variable from its usual level. To make the simplex method work, zmust be written as z = z⁄ - z¤ with z⁄˜0 and z¤˜0. But z⁄ and z¤ mustnot both occur in a basis (3 = 3-0 and -3 = 0-3 okay, not 3 = 4-1).

1.8 Revised simplex method Usually (see model A for an example) the matrix of coefficients in alinear program is sparse, meaning that there is a high proportion ofzeros. It then becomes computationally useful to not work with thewhole simplex tableau, but only with part of it - the inverse basismatrix, with an extra row and column. The revised simplex method thussaves both data storage and computing time (multiplying uselessly byzero). But it is then necessary to record separately which variables are

Page 28: Operations research methods

21

in the basis; the whole simplex tableau is no longer available to show it.

Req Matrix Col Mult Req Matrix Col Mult Req Matrix . 50 | 0 10 | 7 | -3.5 25.5 | -3.5 10 | 2.5 | -5 18 | -1 5| 7 | 1 . | 2 | 3.5 | 0.5 . | .5 |-1 2 | 1 -1| 5 | . 1 |1 | -.5 1.5 | -.5 1 | .5 | 3 | -1 2| Basis x›,xfi Basis x⁄,xfi Basis x⁄,x¤zj- cj=7,6,-10,0,0 ; col 1 zj- cj=0,2.5,-10,-3.5,0 ; col 2 zj- cj=0,0,-5,-1,[-5] ;optimal.

In this calculation, M is taken as 10. The initial objective value,50, is obtained as in the simplex method; it is convenient here to putthe requirements column at the left. The matrix tabulated is theinverse basis matrix , so starts with a unit matrix. The top row startswith the cost coefficients for the initial basis columns. The revised simplex (unlike the simplex) regularly refers back tothe original data matrix: x⁄ x¤ x‹ x› xfi Requirement

2 1 . 1 . 7 1 1 -1 . 1 5

The cost coefficients are 3,4,0,0,10. To obtain the zj-cj for the firstrevised-simplex tableau, use the top row with the columns of thedata matrix. Thus z⁄-c⁄ = [0 10] ã2 õ - 3 = 7; others are Ã1 Õsimilar.This shows that column 1 should enter the basis. Toreconstruct column 1 of the simplex, use the inverse basis matrixwithcolumn 1 of the data matrix : ã1 0 õã2õ = ã2õ Ã0 1ÕÃ1Õ Ã1ÕThis column is marked Cols in the above revised-simplex tableau; the 7at the top is z⁄-c⁄. The pivot is chosen, in this column, as for thesimplex; and the update (of the whole matrix) is done, just as for thesimplex (except that it is a smaller matrix). [For example, 0-(3.5)(1)=-3.5] In the second revised-simplex tableau, z¤-c¤=[-3.5 10]ã1õ-4= 2.5;others are similar. Thus x¤ enters the basis. Ã1ÕColumn 2 of the simplex is reconstructed as ã.5 0õ ã1õ=ã.5õ;note thatthe column is got from the data matrix Ã-.5 1Õ Ã1Õ Ã.5ÕConsidering the ratios 3.5/.5 and 1.5/.5, the first basis variable (x›)leaves the basis, being replaced by x¤. In the update (for example) thematrix element 0.5 ü 0.5+(-1)(-.5)=1. The third tableau is optimal, since all zj-cj are ˆ 0; zfi-cfi (for theartificial column) is put in [ ], to remind that an artificial column is notconsidered for putting back in the basis. Computer programs for linear programming use the revised simplex(or some development of it that saves space by storing, not the inversematrix itself, but other information from which it can be constructed, orsome other form that is more numerically stable for large LPs), not thesimplex, to save both storage space and time. (Only integer

Page 29: Operations research methods

22

programming needs the full simplex tableau). Normally, one uses decimals, rather than vulgar fractions -otherwise denominators soon get unmanageably large. Note that thechange from simplex to revised simplex, and the change from big M totwo-phase, are separate things; the revised simplex example here usedbig M (with M=10 for convenient presentation), but could have usedtwo-phase instead. Observe also that the calculations work downcolumns rather than across rows. For this reason, some computerprograms for linear programming (e.g. Craven's program - see Section1.19, and the Minos package) enter the matrix data going downcolumns (thus not across rows, like equations), and enter only nonzeromatrix elements (and which row they are in). Alternatively, someprograms accept the data in spreadsheet format (see section 4.10);here also, only nonzero data need be entered.

1.9 Dual linear program Consider the following linear programs: Primal program in matrix language

MIN 3x⁄+4x¤+Mxfi subject to MIN cTx = [3 4 0 0 M] x 2x⁄+x¤+x› = 7, (where x = [x⁄, x¤, x‹, x›, xfi]T ) x⁄+x¤-x‹+xfi=5, ü subject to x ˜ 0, x⁄,x¤,x‹,x›.xfi ˜0 Ax = b,

[Optimum x⁄=2, x¤=3] where A = ã2 1 . 1 .õ, b=ã7õ . ï Ã1 1 -1 . 1Õ Ã5Õ

Dual program ïï (rearrange the pieces)

MAX 7w⁄ + 5w¤ subject to öö MAX bTw subject to ATw ˆ cT,

2w⁄+w¤ˆ3, w⁄+w¤ˆ4, thus MAX [7 5]ãw⁄õ subject to 0w⁄ -1w¤ˆ 0 [so w¤˜0] à w¤Õ 1w⁄+0w¤ ˆ M, [so w¤ˆM] [w⁄ w¤]ã2 1 . 1 .õ ˆ [3 4 0 0 M] ï ï [Optimum w⁄=-1,w¤=5 Ã1 1 -1 . 1Õ set z⁄=-w⁄, z¤=w¤ Note that the dual does not

MAX -7z⁄+5z¤ subject to include a constraint w ˜ 0.-2z⁄+z¤ˆ3, -z⁄+z¤ˆ4, z⁄˜0, z¤˜0.

Thus, a dual problem can sometimes be usefully rearranged. Note that,if M is very large, a constraint w¤ ˆ M has no effect.

1.10 Dual propertiesI Weak duality If x is feasible for the primal, and w is feasible for thedual, then cTx ˜ bTw.

Proof cTx - bTw = cTx - wTb = cTx - wTAb = (cT-wTA)x ˜ 0 since each vector has components ˜ 0. Remark The range of values that the primal objective takes lies entirely above the range of values that the dual objective takes (assuming x and w feasible). Suppose that the primal is minimized as x=x*, and the dual is maximized at w=w*; then cTx* ˜ bTw*.

Page 30: Operations research methods

23

II Zero Duality Gap (ZDG) cTx* = bTw* ; and w* is the vector ofshadow costs for the primal.

Proof In the optimal simplex tableau, denote by Q the inversebasis matrix, u the vector of basic variables, q the vector of costcoefficients for them. Then u = Qb; the matrix in the optimal tableauis QA; the vector of the zj-cj is cTQA-cT, which is ˆ 0 by theoptimality condition. So the vector qTQ of shadow costs is feasiblefor the dual. Since (qTQ)b = qTu = cTx*, and no w feasible for thedual can (by I) have wTb>cTx*, it follows that w*=qTb is optimal for

the dual, and cTx* = bTw*.

III Karush-Kuhn-Tucker conditions (see chapter 7). Necessaryconditions for x* to minimize the primal are that, for Lagrange

multipliers r* ˜ 0 and w*, there hold cT=w*TA + r* and r*Tx* = 0.Proof In the optimal tableau, xj>0 only for basic xj, and then r*j=cj-zj =0.So r*j = cj-zj = 0; so r*Tx = 0.

1.11 Sensitivity It is usually not enough to calculate an optimum to a linearprogram; it is also necessary to consider how sensitive the optimum isto small changes of the data. (Requirements are not all "set inconcrete"; and there can be last-minute changes to data.)

•a In 1.5, a small change to one requirement is considered; over asufficiently small right hand side range (in the example, if the secondrequirement lies between 5-1.5 and 5+2), then optimal objective =original value+(shadow cost)(change in requirement); and the samebasic variables stay optimal. (If more than one requirement changes,the shadow costs still apply, but the RHS ranges are reduced.)

•b Consider a change to a cost coefficient. (a) Change c‹ away from 0. Since x‹ is not in the optimal basis, thezj are unchanged. So all the zj-cj remain ˆ 0 (still optimal), provided thatz‹-c‹ stays ˆ0. From c‹=0 and z‹-c‹=-5 follows z‹=-5, so now z‹-c‹=-5-c‹ˆ0 provided c‹˜-5. (b) Change c⁄ away from 3. Since x⁄ is basic, the zj are changed; itis necessary to check all nonbasic zj-cj (except artificials). Thus,z‹-c‹= [c⁄ 4] ã 1 õ-0=c⁄-8ˆ0 provided c⁄ˆ8. (Hereã 1õ is column 3 of Ã-2Õ Ã-2Õthe optimal tableau in 1.4.) Similarly z›-c›=c⁄-4ˆ0 provided c⁄ˆ4. Sothe tableau is still optimal when c⁄ˆ4. (If c⁄ increases above 4, afurther simplex iteration is needed.) (c) Suppose that both c⁄ and c‹ are both functions of someparameter r. For a simple example, suppose c⁄=3+r and c¤=4-2r. Then

z‹-c‹ = [3+r 4-2r]ã 1õ-0 = 5-4r ˆ 0 provided r˜5/4; z›-c› = ... . Ã-2Õ Such a situation may arise in a profit-maximizing problem, with profit

Page 31: Operations research methods

24

coefficients p⁄ = 30-20 (thus, revenue - variable cost) and p¤ = 85-45(representing products manufactured) in the objective beingmaximized. Suppose that a unit of the first product requires 0.1 kg of acertain ingredient, and a unit of the second product requires 0.2 kg,where this ingredient costs $q per kg (currently q = $50, but mayvary). Then p⁄ = 30 - [.1q+15] and p¤ = 85 - [.2q + 35].

•c Consider the example of 1.4, with requirements changed to 7 and3.5. (The latter is on a boundary of its RHS range.). The optimal tableaunow becomes: Tabl.3 1 . 1 1 -1 3.5 . 1 -2 -1 2 0 0 0 -5 -1 -5 25.5

(Note one basic xj is zero.) But there is also another optimal tableau(got using dual simplex, see 1.12) :

Tabl.3 1 1 -1 . 1 3.5 (new) . -1 2 1 -2 0 0 0 -3 0 -7 25.5

The shadow costs are different: -1 and 5 for the first tableau, 0 and 3for the second. But also the RHS ranges are different, when thesecond requirement (b¤) varies: from 3.5 to 5.0 for the first tableau,from 0 to 3.5 for the second. If the optimal objective value isconsidered as a function of b¤, then this function is piecewise linear(thus, made up of a finite number of linear pieces), and the slopechanges when b¤=3.5 .

•d Consider adding a new column to the problem . Suppose theexample of 1.3 is modified to: Minimize 3x⁄+4x¤ (+10xfi)-7xfl subject to all xj̃ 0, and 2x⁄+x¤+x› +xfl = 7, x⁄+x¤-x‹+xfi -xfl = 5. (Including slacks x3, x4 and artificial x5).What would zfl-cfl be for tableau 3 in 1.4 (which was optimal without xfl) ?This is calculated using the shadow costs, as zfl-cfl= [-1 5]ã 1õ-(-7) =+1, so no longer optimal. Then the new Ã-1Õcolumn 6 must be calculated, applying the inverse basis matrix,to thenew column, as

ã1 -1õ ã 1õ = ã 2õ . A simplex iteration would then follow. Ã-1 2Õ Ã-1Õ Ã-3Õ

•e Consider a change in (one or more) matrix coefficients. The

constraints Ax=b, x˜0 may be written as Bu + Kv = b, where B = matrix

of basic columns, K = matrix of nonbasic columns, u = vector of basic

Page 32: Operations research methods

25

variables, v = vector of nonbasic variables. So the optimum (u*,v*)

satisfies Bu*=b, u*˜0, v*=0. Now perturb B to B+E; this will change u to

u+z, say, satisfying (B + E)(u + z) = b. If the elements of the

matrix E are "small enough", so that z is "small", and the product Ez

can be neglected, then Eu + Bz Ú 0; so z Ú -B-1Eu. In the example of

1.4, suppose the coefficient of x⁄ in the first constraint changes from 2

to 2.1 Then

B = ã2 1õ ; E = ã0.1 0õ; z Ú ã1 -1õã.1 0õã2õ . Ã1 1Õ Ã 0 0Õ Ã-1 2Õ Ã 0 0ÕÃ3Õ

1.12 Dual simplex method

In the simplex, requirements must be ˜0; feasibility is kept at all

times, but the optimality conditions are not satisfied until the last

tableau. In the dual simplex, which in fact solves the dual problem,

but using a tableau suitable for the primal, requirements may be

negative; the optimality conditions are satisfied always; but feasibility is

not fulfilled until the last tableau. Consider the example:

D: MIN x⁄+3x¤ subject to x⁄,x¤˜0, x⁄+4x¤˜8, x⁄+2x¤˜6,2x⁄+x¤˜6.

Instead of introducing artificial variables then using the simplex method,

the dual simplex may be used, writing the constraints in the form

-x⁄ -4x¤ + xslack = -8 (similarly for the others). This gives the first

two tableaus as follows:

-1 -4 1 . . | -8 ö .25 1 -.25 . . | 2

-1 -2 . 1 . | -6 üü -.5 . -.5 1 . | -2

-2 -1 . . 1 | -6 -1.75 . -.25 . 1 | -4 ö

-1 -3 0 0 0 | 0 -.25 . -.75 0 0 | 6

In the first tableau, x‹,x›,xfi form an infeasible basis. The zj-cj arecalculated as for the simplex; they are all ˆ0 (optimality conditions satisfied),so this basis is dual feasible. Choose now the row with most negativerequirement as the pivot row (shown ö). Look at the pivot row and thezj-cj row, considering the ratios -1/-1 , -3/-4, 0/1 . The smallestpositive ratio picks out column 2 to enter the basis; the pivot (-4) isshown bold in the tableau. [In a maximizing problem, choose instead thenegative ratio nearest zero. ] An ordinary simplex iteration, with thispivot, gives the second tableau shown. Consider now the parametric programming question from 1.11•c,where the second requirement (h say) is the parameter, and theoptimum is required, as this parameter varies. The tableau obtained is:

Page 33: Operations research methods

26

Tabl.3 1 . 1 1 -1 | 7-h | (optimal . 1 -2 -1 2 | -7+2h ö |3.5ˆhˆ7) 0 0 -5 -1 -5 | 21-3h

(Note that -7+2h=0 when h=3.5). If h decreases below 3.5, then x¤becomes negative. Therefore a dual simplex iteration is done, with thesecond row as the pivot row. This leads to the tableau: 1 1 -1 . 1 | h (optimal . -1 2 1 -2 | 7-2h 0ˆhˆ3.5) 0 0 -3 0 -7 | 3h

(Note that h˜0 and 7-2h˜0 provided that 0ˆhˆ3.5). This parametricoptimization could be continued, for h˜7 or for hˆ0. The dualsimplex is also used in integer linear programming.

1.13 Jumps in shadow costs Consider the following initial and optimal tableaus for a linearprogram. (This example is modified from an example in <DG>, page125, by scaling the rows, so that the largest coefficients in each roware comparable in size. Such scaling is recommended forcomputational accuracy.)

Costs -24 -20 0 0 0 0 100

12 .5 1 1 . . . .20 1 1 . 1 . . .24 1.5 1 . . 1 . .0 1.2 -.8 . . -1 1

0 144 -60 0 0 0 -100 0

6 . 1 1,5 . -.5 . .2 . . -.5 . -.5 . .

9.6 . . -2.4 . 1.5 1 -112 1 . -1 . 1 . .-408 0 0 -6 0 -14 0 -100

Suppose that the first requirement is perturbed from 12 to 12+h. Whenh=-6, the basic xj are no longer all ˜ 0; multiplying the optimal inversebasis matrix by the column vector (12+h, 20, 24, 0) gives(x¤, x›, xfl, x⁄0 = (-3, 5, 24, 18). The dual simplex can be used here;two iterations proceed from the tableau on the left to the optimaltableau on the right, (If the simplex is run again, starting with firstrequirement = 6, the same optimum is obtained, but with the rows in adifferent order).

Page 34: Operations research methods

27

. 1 1.5 . -.5 . . -3 . -2 -3 . 1 . . 6 . . -.5 1 -.5 . . 5 . -1 -2 1 . . . 8

. . -2.4 . 1.6 1 -1 24 üü . 3.2 2.4 . . 1 -1 14.4

1 . -1 . 1 . . 18 1 2 2 . . . . 12 0 0 -6 0 -14 0 -372 0 -28 -48 0 0 0 0 -288

Now consider what happens when the first requirement ischanged to 19. The dual simplex gives an optimum, x2=12, x4=0, x3=3,x1=8; with shadow costs (got from columns 3,4,5,7 ) 0, 0, -18, -2.5.But now, for comparison, let us solve this problem (with requirements19,20,24,0) using the simplex. This gives x2=12, x3=3,x6=0,x1=8, andshadow costs 0, -12, -8, 0, thus a different optimum, though with thesame optimal total cost of -432. Why the difference? Observe thateach optimum has some basic xj at zero. Using the inverse basis matrixin each case, a calculation with the optimal inverse basis matrix, andusing here a RHS parameter p, gives: x2 . . 1/2 -5/8 19 12+p/2 0 x4 = . 1 -5/6 5/24 20 = 0-5p/8 ! 0 if -24"p"0 x3 1 . -2/3 5/12 24+p 3-2p/3 0

x1 . . 1/3 5/12 0 8+p/3 0

x2 1 -2 1 . 19 3+p 0 x3 = . 3 -2 . 20 = 12-2p ! 0 if 0 " p "6 x6 . -4.8 4 -1 24+p 0+4p x1 . -2 2 . 0 8+2pThus p=0 is a boundary between the first case (where optimal cost =-432-18p, -24ˆpˆ0), and the second case (optimal cost = -432-8p,0ˆp<6). Here -18 and -8 are the respective shadow costs. As usualwith parametric linear programming, the optimal total cost is apiecewise linear function of a RHS parameter p.

1.14 Integer linear programming Often some, or all, variables in a linear program must berestricted to be integers (e.g. rolls of paper, or lengths of steel, to becut; number of people in a work schedule. There are also zero-onelinear programming problems, where some variables must be 0 or 1only, describing things that are either on or off (present or absent).Except for transportation problems (see 1.15) the usual linearprogramming algorithm does not generally give integer solutions, androunding a non-integer solution can give a very poor approximation toan optimum integer solution, when small integers are involved. (If allthe numbers are large, one would certainly round to integers, andexpect to get a usable answer.) The following is an example ofGomory's cutting-plane algorithm for integer linear programming.Unfortunately it, and also the rival branch-and-bound algorithm (seesection 6.5) are much slower that the usual (revised) simplex method,

Page 35: Operations research methods

28

and are restricted in practice to integer problems of modest size. Consider the following example: Maximize x⁄ + x¤ subject to x⁄, x¤ nonnegative integers, and to2x⁄ + x¤ ˆ 6, 4x⁄ + 5x¤ ˆ 20. The initial and final tableaus for the usualsimplex method are then:

2 1 1 . 6 1 . 5/6 -1/6 5/3 4 5 . 1 20 . 1 -2/3 1/3 8/3 -1 -1 . . . . 1/6 1/6 13/3

Since this problem is maximizing, the zj-cj in the optimal simplex tableauare ˜ 0. Consider one of the equations involving a noninteger variable, saythe second equation. (Usually the equation having the largest fractionalpart on the right hand side is chosen; but here, there is a choicebetween 2/3 and 2/3.) The equation may be rewritten as: 0.x⁄ + 0.x¤ + (1/3)x‹ + (1/3)x› = (2/3) + [2 - x¤ + x‹].Here, the left side coefficients are fractions, thus 0 ˆ coefficient < 1;this has been arranged by shifting integer multiples (like 1.x‹) to theright hand side. An optimum integer solution must satisfy (1/3)x‹ + (1/3)x› ˜ 0, hence the right hand side of the rewrittenequation is ˜ 0, hence the integer [2 - x¤ + x‹] ˜ 0, hence (1/3)x‹ + (1/3)x› ˜ (2/3).The problem is modified by adding this additional constraint; it may besimplified (multiplying by the denominator 3) to x‹ + x› ˜ 2. Thisadditional constraint is called a cutting plane, because it cuts off a partof the feasible region of the original linear program. The previous optimum now no longer satisfies all the constraints. Anew optimum may be found, using the dual simplex method. For this,the cutting plane is rewritten as -x‹ - x› + xfi = -2, in which xfi ˜ 0 is anew slack variable. The dual simplex tableau, and the result of aniteration on it, are shown as follows; the pivot element chosen is shownin bold. 1 0 5/6 -1/6 . 5/3 1 . 1 . -1/6 2 . 1 -2/3 1/3 . 8/3 ü . 1 -1 . 1/3 2 . . -1 -1 1 -2 . . 1 1 -1 2 . . 1/6 1/6 . 13/3 . . 0 . 1/6 4

There is here a choice of pivots; if row 3, column 2 is chosen instead, adifferent optimum : (x⁄,x¤,x‹,x›) = (0,4,2,0) , is obtained, in place of(2,2,0,4). The integer-optimum objective function has the same value,4, for each optimum. (When a problem involves small integers, it oftenhappens that there are more than one optimum point.) This example is unusually fortunate, in that a single cutting planeleads at once to an integer optimum. More typically, a number ofiterations are required, each introducing a cutting plane - so the tableaugrows more rows and columns. Note also that, for integer programming(though not usually for ordinary linear programming), calculations in

Page 36: Operations research methods

29

exact vulgar fractions may be required (as done here). To see what is happening geometrically, note thatx‹ + x› ˜ 2 Ä (6=2x⁄-x¤) + (20-4x⁄-2x¤) ˜ 2 Ä x⁄ + x¤ ˆ 4.The original (non-integer) optimum (x⁄,x¤) = (5/3. 8/3) does not satisfythis constraint; the new optimum (2,2) satisfies it. With the present example, if constraint 1 had been chosen, insteadof constraint 2, to generate a cutting plane, then it happens that twocutting planes would have been needed, to find an optimum. [ A (less recommended) alternative to using the dual simplex hereis to solve the linear program (a) Minimize (1/6)x1 + (1/6)x2 + Mx6 subject to the originalconstraints, and also x3 + x4 -x5 + x6 = 2. (Here x5 is a slack variable,x6 is an artificial variable, and 1/6, 1/6 come from the previous zj-cjrow, changing sign because we are switching from a maximum to aminimum problem.) The calculated numbers are the same as for thedual simplex, but there is more calculation. ]

1.15 Transportation problem As an example, suppose that 3, 8 and 2 buses are required at three

destinations A, B, and C respectively. They must come from garages P,Q, R, which can supply respectively 2, 6 and 5 buses. Note that thenumbers match: 2+6+5 = 3+8+2. The number of garages need notequal the number of destinations; it just happens to in this example. Thebuses are to be scheduled so as to minimize the total of the deliverytimes. The delivery times, for each combination of garage anddestination, are given (in units of 10 minutes) in the following table:

To A B CP 4 3 7

From Q 10 5 9R 6 8 7

Suppose that xij buses are sent from source i (thus from P, Q, orR) to destination j ( thus to A, B, or C). All the xij must be nonnegative,and in fact integers, and must satisfy the constraints:

x⁄⁄ + x⁄¤ + x⁄‹ = 2, x⁄⁄ + x¤⁄ + x‹⁄ = 3,x¤⁄ + x¤¤ + x¤‹ = 6, x⁄¤ + x¤¤ + x⁄‹ = 8,x‹⁄ + x‹¤ + x‹‹ = 5, x⁄‹ + x¤‹ + x‹‹ = 2.

The "cost" f = 4x⁄⁄ + 3x⁄¤ + 7x⁄‹ + 10x¤⁄ + 5x¤¤ + 9x¤‹ + 6x‹⁄ + 8x‹¤+ 7x‹‹is to be minimized, subject to these constraints. This problem is a linear program, except for the requirement thatall xij are integers; however, it will turn out, for a linear program of thisspecial form, that if the data are all integers, then the resulting xij will allbe integers. The problem could be solved by the simplex method, butthe tableau would be needlessly large, and would consist mostly ofzeros. More efficient computational methods are therefore required.Dantzig's stepping stone method (an adaptation of the simplex method)

Page 37: Operations research methods

30

is described here;. The alternative labelling method of Ford andFulkerson is much more efficient on a computer (see Chapter 6). If there are m sources and n destinations, then there are m+nconstraints (3+3=6) in the example above). However, these equationsare linearly dependent; in the example, the left set sum to ÛiÛjxij = 13,and so also do the right set. So one constraint is superfluous; thereshould be m+n+1 equations. The xij will be set out in a table with mrows and n columns. The supplies are put at the left, and the demandsat the top.

Table of "costs" Initial allocationA B C 3 8 2+3´

P 4 3 7 2+´ . 2+´ . 0Q 10 5 9 6+´ . 6-´ 2´ 2R 6 8 7 5+´ 3 . 2+´ 0

6 3 7

For the present, ignore the ´ terms. The minimum cost method for obtaining an initial feasible solutionbegins as follows.The cheapest cell in the first row is in column 2. Put asmuch as possible in the cell at row 1, column 2, thus MIN(2,8)=2. Thusthe first supply is reduced to 0, and the second demand to 8-2=6. Sincethere is no more room in row 1, look for the cheapest remaining cell incolumn 2; this is row2, column 2, and put as much as possible in thatcell, thus: MIN(remaining supply in row 2, remaining demand in column 2) = MIN(2,6) = 6.But now row 2 and column 2 are filled up, and it is not clear where to gonext. This difficulty arises because the supplies for rows 1 and 2 sum to6, the demand for column 2. To overcome it, perturb the supply foreach row by adding ´ to it, where ´ is considered as positive and verysmall. To keep the total demand equal to the total supply, a total of 3´(3 being the number of rows) must be added to the demandssomewhere. As shown, the 3´ is added to just one of the demands.Then 2+´=MIN(2+´,8) goes in row 1, column 2, leaving 8-(2+´)=6-´demand in column 2. Then 6-´=MIN(6+´,6-´) goes in row 2, column 2,so that a supply of 2´ remains in row 2. This goes in the cheapestavailable cell in row 2, namely column 3, leaving 2+´ demand in column3. That goes in the only available cell, namely row 3, column 2, leaving ademand of 3 remaining in row 3. That goes in the only available cell atrow 1, column 1. So all demands and supplies are accounted for, so afeasible solution is obtained. Note that there are just 5 stepping stones("occupied cells", to which some xij has been allocated, corresponding tobasic variables in the simplex method), and that 5 = number of rows + number of columns - 1. Is it optimal ? Suppose that an amount t is added to the cell in row 1,column 1. To keep the row and column totals correct, -t must be added

Page 38: Operations research methods

31

to row 1, column 2, +t to row 2, column 2, -t to row 2, column 3, +t torow 3, column 3, and -t to row 3, column 1. This path is following (someor all of the) stepping stones previously obtained. The change in total"cost" is Î = c⁄⁄t-c⁄¤t+c¤¤t-c¤‹t+c‹‹t-c‹⁄t = 4t-3t+5t-9t+7t-6t=-2t, sothe total "cost" would be reduced by increasing t from 0. The largestpossible t is chosen, subject to 2+´-t˜0´, 2´-t˜0, ´3-t˜0, hence t=2´.

Table of "costs" cij Adding t to one unoccupied cell ? cij-ui-vjA B C 3 8 2+3´ ui

P 4 3 7 2+´ t 2+´-t . 0 -2 . 0Q 10 5 9 6+´ . 6-´+t 2´-t 2 2 . .R 6 8 7 5+´ 3-t . 2+´+t 0 . 5 .

vj 6 3 7

But is row 1, column 1 the best cell to choose? To find this, dualvariables (sometimes called"fictitious costs") are calculated ; since eachrow and each column of the table represents a constraint, there are dualvariables ui for the rows and vj for the columns. They must satisfy ui +vj = cij for each occupied square. They are calculated by steppingstones; let u⁄=0; u⁄+v¤=c¤¤ gives v¤=3; u¤+v¤=c¤¤ gives u¤=2;u¤+v‹=c¤‹ gives v‹=7; u‹+v‹=c‹‹ gives u‹=0; u‹+v⁄=c‹⁄ gives v⁄=6.Then Î = [c⁄⁄-(u⁄+v¤)+(u¤+v¤)-(u¤+v‹)+(u‹+v‹)-(u‹+v⁄)]t =[c⁄⁄ - u⁄ - v⁄]t= -2t <0.For an unoccupied cell in row i and column j, cij - ui - vj would becalculated. In this example, row 1 and column 1 gives the only negativevalue, so this cell is the only choice. If cij - ui - vj ˜ 0 for all unoccupiedcells, then a minimum has been reached. (Note that the arbitrarychoice of u⁄=0 can be made, because one constraint is dependent onthe others.) How large can the change t be ? Since no xij can be negative, t mustsatisfy all of 2+´-t ˜0, 2´-t˜0, 3-t˜0. Hence, giving t the largestpossible value, t=2´. The new table is shown below left; note that row 2,column 3 has now 2´-t=0, and becomes "unoccupied". The total "cost"has decreased from 68+23´ to 68+19´, this decrease equalling theproduct of t=2´ by -[c⁄⁄-u⁄-v⁄]=2. The new ui and vj are also shown;the consequent cij-ui-vj for the three unoccupied squares are 2,4,3, all>0, so an optimum has been reached - shown below at right (nowdropping the ´s.)

With different data, more iterations may be needed; and values of t larger than "´ terms" may be found.

cij-ui-vj Optimal table 3 8 2+3´ ui2+´ 2´ 2-´ . 0 . . 2 0 2 .6+´ . 6+´ . 2 4 . 2 . 6 .5+´ 3-2´ .2+3´ 2 . 3 . 3 . 2vj 4 3 5

Page 39: Operations research methods

32

Integer solutions ? The supplies and demands were given as integers; allthe calculations added and subtracted, but never divided; so an integeroptimum schedule was obtained. This happens with transportationproblems, though not with general linear programs.

Unbalanced demands ? In the above example, suppose now that thethird source can supply 7 buses instead of 5; then total supplies =15,total demands =13, no longer balanced. To make the method work,balance must be restored by introducing an additional column (D) for a

dummy destination, having zero "costs" (because those buses do not, infact. go anywhere), and a demand of 2 (the extra supply available). Theprevious optimum can be used, as shown, to give an initial allocation.

Table of "costs" cij , and an initial allocation, for unbalanced problemA B C D 3 8 2+3´ 2

P 4 3 7 0 2+´ 2´ 2-´ . .Q 10 5 9 0 6+´ . 6+2´ . .R 6 8 7 0 5+´ 3-2´ . 2+3´ 2

Connection with linear programming A transportation problem can bewritten as a linear program: MIN cTx subject to x˜0, Ax=b, where x is avector of the elements xij. For the above example, bT=[2 6 5 3 8 2], andthe matrix A has the "structured" form:

1 1 1 . . . . . .. . . 1 1 1 . . .. . . . . . 1 1 1

1 . . 1 . . 1 . .. 1 . . 1 . . 1 .. . 1 . . 1 . . 1

The dual variables are v⁄,v¤,v‹,u⁄,u¤,u‹. The vector wTA-cT in the dualitytheory for linear programming has as elements the quantities ui+vj-cij forthe transportation problem. Thus, in fact, the u and vj are shadow costs.However, one would not use the ordinary simplex method for atransportation problem, because it would be very wasteful in time andnumbers stored.

A special case of production allocation Consider the allocation ofproduction for m products and n machines. Such a linear programmingmodel could be:

MIN Ûi,j cijxij subject to all xij ˜ 0, Ûj xij = di (i=1,2,...,m), Ûi rijxij ˆ hj (j=1,2,...,n), in which a quantity xij (tons or kg or whatever) of product i is to be madeon machine j, and total production cost is to be minimized, subject tosatisfying demands di for product i (i=1,2,...,m), and staying within theavailable time of hj hours on machine j (j=1,2,...,n), where the rate ofproduction for product i on machine j is expressed by rij tons (or kg, etc.)

Page 40: Operations research methods

33

per hour. In general, this problem required the simplex method. However,if rij = åi!j holds, for all i and j, then the problem can be scaled intotransportation form. The constraints can be rewritten as:

Ûj (åixij) = (åidi) (i=1,2,...,m); Ûi (åixij) ˆ dj/!j (j=1,2,...,n).Thus a transportation problem is obtained, in the new variables åixij. The ˆconstraints are dealt with by introducing an additional "slack row" in thetransportation table, with zero costs attached.

Note that transportation problems are commonly computed using afaster network method by Ford and Fulkerson (see Section 6.4)

1.16 Cost data (piecewise linear cost function) Every textbook of linear programming includes examples where costfigures like "cost of processing material X is $20 per ton". This assumesthat (i) the cost is known, and (ii) is exactly proportional to the quantity(tons) of the material. Life, whether or not meant to be easy, is rarely sosimple! Let us look first at (ii). The following idealized diagram gives thepicture. (Here only one product is considered, in order to get a planediagram, whereas there are usually many products to be considered.)

In the diagram, A shows the initial cost (you have to have a factoryand a machine before you can make anything); AB is a linear part of thecost curve (suitable for applying LP - note that this line does not passthrough the origin); BC is a steeper part of the curve (extra production,at overtime rates, or using more expensive raw material); the step CDshows the cost of a new and better machine; DE represents normalproduction (cheaper with the new machine), and EF overtime production.

A linear programming model can only apply to a straight-line part ofa cost curve, not to the whole curve. A cost coefficient for the LP modelis then the slope of the linear part of the cost curve. Note also that,when the same machine is changed over from making one product tomaking another, there is always a setup cost incurred, in addition to acost proportional to the amount made of the new product. Oftern, thesetup cost includes a substantial contribution from production time lost,in getting the machine properly adjusted to the new product.

Now, what do we mean by cost ? There are practical difficulties in

Page 41: Operations research methods

34

getting told (maybe no one knows, or the man who knows sees the O.R.type as a threat, and won't say). But, beyond these, there is thequestion of what kind of cost. Accountants classify cost components inseveral ways; as direct costs (directly related to the goods being made)versus indirect costs (not directly related), or as fixed costs (notvarying with level of production) and variable costs (varying with level ofproduction, often taken as proportional to it). Some examples are asfollows.

Direct costs Indirect costs Wages of production workers Purchase of food for factory canteen Cost of testing output Rates, heating, etc., for the factory Purchase of special tools Wages of cleaners

Fixed costs Variable costs Rental of factory building Cost of raw materials Manager's salary Cost of electric power to run production machines Wages of production workers (?)

Note that wages of production workers are not always a variablecost over a short time scale (the wages may well be fixed by a unioncontract, so that they will be paid, even if there is not much work to do);but wages become a variable cost over a longer time scale (over whichthe number of men employed must move up or down with the generallevel of production.)

Some examples of cost components are shown in the followingdiagrams. The abscissa is always level of production or output; theordinates are not always on the same scale. For an optimization model(such as LP) , some kind of variable costs are required. However, wemust consider what actually varies, if the changes considered in themodel are made. (For example, if we reallocated production betweendifferent machines, would this change the wages of the productionworkers, or would they be paid the same anyway? If it would not changethem, then they would not enter the cost coefficients of the LP model.)However, after optimizing the LP model, we would have to also calculatethe remaining fixed costs, for the alternative plans considered; theycould turn out to dominate. (For example, is it useful to buy very lowvariable costs - low slope in the cost curves - by incurring enormouscapital costs, of installations, machines, etc. ?) The term marginal costis also used for the slope of a linear part of a cost curve.

Page 42: Operations research methods

35

Cost curves

Remember that accountants use cost data for quite different purposes- including what to charge for the product, a means of stopping anyonepinching the cash, and for tax purposes, all essential. Often, theabsorption costing method is used. The system is divided into costcentres (e.g. departments, or machines). To each cost centre is assignedthe direct costs applicable, and also a proportion of overheads (= indirectmanufacturing costs); the proportioning may be according to hours oflabor, or e.g. machine time. But these proportions are likely to change ifwe replan the production, e.g. using a LP model; we don't want to includethe overheads in the costs for the LP. Sometimes variable costing is used,in which fixed costs (which do not depend on level of production) areseparated out. The following simple example shows the differences.(This does not look like "mathematics" ! But an O.R. person must beable to get needed data from accountants' records.)

Data Direct material $18000 Number of units made 10000 Direct labor $12000 Number of units sold 6000 Overheads:variable $15000 Sale price per unit $12 Overheads: fixed $15000Absorption method Total manufacturing cost $60000. Manufacturing cost per unit $6. Cost of goods sold (6000 x $6) $72000 Inventories at cost (4000 x $6) $24000 Sales revenue (6000 x $12) $72000 Contribution to profit (=72000-36000). $36000Variable costing method Variable costs $45000. So unit cost is $4.50. Cost of goods sold (6000 x $4.50) $27000 Inventories at cost(4000 x $4.50) $18000 Fixed costs $15000 Contribution to profit (=72000-27000-15000) $30000.

Page 43: Operations research methods

36

1.17 Some exercises on linear programming Formulate each model as a linear programming problem, with afunction to be maximized or minimized, subject to some constraints(equations or inequalities).Then convert the problem into standard formby introducing slack variables and artificial variables as required. (Ofcourse, inequalities like xj ˜ 0 are unchanged.)

LP1 A firm can make four different products. each requiring differentamounts of the inputs, which are labor (measured in man-weeks), energy(KWh), and material (tons). The data are tabulated as follows:

Product I II III IV Unit profit 4 5 9 11 (in some suitable unit) Production level x1 x2 x3 x4 units per week INPUTS TOTAL AVAILABILITIES Labor (man-weeks) 1 1 1 1 ˆ 15 Energy (KWh) 7 5 3 2 ˆ120 Material (tons) 3 5 10 15 ˆ100.

The firm wants the maximum profit it can get. Formulate as a LPproblem. What happens to the formulation if there are also minimumquantities of certain of the products which have to be supplied? (Remark:This product-mix problem is nearly formulated already. It is included tostress that variables need to be listed, with units of measurementspecified (otherwise one will get lost with a real-world problem).

LP2 Two products are produces successively on two machines. Themanufacturing times in hours per unit of each product are tabulatedbelow for the two machines. Time per unit (hours) Machine Product 1 Product 2 Product 3 Product 4 1 2 3 4 2 2 3 2 1 2

The total cost of producing 1 unit of each product is based directly onthe machine times. Assume that the cost per hour for machines 1 and 2is $10 and $15 respectively. The total hours budgeted for all theproducts on machines 1 and 2 are 500 and 380. The sales price per unitfor products 1,2,3 and 4 are $65, $70, $55, $45.

LP3 For model A in Section 1.1, use a computer program (e.g. lpZ7ap) tocompute an optimum. (Note that the data are needed in a tidy inputform, as in the second table in 1.1, before entering data into theprogram.) Then tabulate the optimum obtained in the style:

Page 44: Operations research methods

37

machine 1 machine 2 shadow cost product 1 . 2929 100.31 product 2 product 3 product 4 product 5 product 6 shadow cost Some such tabulation is essential, in order that a non-mathematician maymake sense of the output ! What then happens if the requirement for product 1 is increased, sayby 2% ? Use a computer program to find out; and see if the changerelates to shadow costs. (If it doesn't, then why not ?).

LP4 Multi-period scheduling A firm makes both thingos and whatsits.They want to plan for a year ahead, to meet the following sales targetsfor the four quarter quarter 1 2 !!!! 3 4 thingos 4000 1800 4500 3000 whatsits 2000 2500 1500 2400

They keep inventory of each product (thus, they make some in advanceof the demand). In quarter t, they make at thingos and bt whatsits; and htlabor hours are available; ht must not vary by more than 10% (up ordown) from each quarter to the next. At the end of quarter t, aftermaking the deliveries for that quarter, they have an inventory of ptthingos and qt whatsits. Each thingo requires 2 working hours to make;each whatsit requires 3 working hours to make. The initial conditions(where they start) are given as h‚ = 5000 hours, and given values of p‚and q‚ (initial inventoroes). If the variables are listed by quarters, thusa⁄, b⁄, p⁄, q⁄, h⁄, then a¤, b¤, p¤, p¤, q¤, h¤, then ..., then the matrix ofcoefficients has a "block structure" :

quarter 1 ’ 0 0 0 quarter 2 ’ ’ 0 0 where ’ is a submatrix of quarter 3 0 ’ ’ 0 coefficients (not all zero), quarter 4 0 0 ’ ’ and 0 is a zero submatrix.

Write down those constraints which affect the second quarter; and thusverify the stated block structure. Note here that initial inventory + production - demand = final inventory(for each product and each quarter); and that ht is linked by inequalitiesto ht-1. (Such "block structures" are typical for linear programmingmodels for multi-period scheduling.)

LP5 The following example was given by Trustrum (1971). Solve it bothby the simplex method, and by the revised simplex method, and write

Page 45: Operations research methods

38

down the dual problem. Minimize x1 + 6x2 + 2x3 -x4 + x5 -3x6 subject to all xj̃ 0, and x1 + 2x2 + x3 + 5x6 = 3, -3x2 + 2x3 + x4 + x6 = 1, 5x2 + 3x3 + x5 -2x6 = 2.(Remark: Is it necessary in this example to introduce more variables inorder to have an initial basis ? This example is cited to show thisfeature.)

LP6 Solve the following transportation problem. (Note that there may,very likely, be more than one optimum. And epsilons may be essential!) An efficiency expert (?) has rated four candidates Ci for four jobs Jj asfollows. Find the optimal assignment of candidates to jobs (so as tomaximize the sum of the ratings).

J1 J2 J3 J4 C1 6 9 5 6 C2 7 1 2 4 C3 6 8 2 5 C4 1 3 9 3

LP7 Three products are processed through three different operations.

Time per unit (minutes) Operation capacityOperation Product 1 Product 2 Product 3(minutes per day) 1 1 2 1 430 2 3 0 2 460 3 1 4 0 420Net profit/unit($) 3 2 5Let x1, x2, x3 units of products 1,2,3 be produced each day. The LPmodel to maximize profit is: MAX 3x1+2x2+5x3 s.t. xj̃ 0,x1+2x2+x3ˆ430, 3x1+2x3ˆ460, x1+4x2ˆ420.(This assumes profit proportional to amount made - not always true !).The optimal tableau is 100 -.25 1 . .5 -.25 . 230 1.5 . 1 0 .5 . 20 2 . . -2 1 1 1350 4 . . 1 2 .

(i) Suppose the second "requirement" of 460 minutes per day isdecreased, by some accident to the machine. How far can we decrease itwithout upsetting the optimal schedule, and what does that cost us?(ii) Suppose a fourth product is scheduled, through the same operations,with net profit $9 per unit, and times 3,2,4 minutes, through the sameoperations. How much of the new product should we make? What wouldthe net total profit become?

Page 46: Operations research methods

39

LP8 A firm can make four products. The data for daily productionscheduling are: product 1 2 3 4 availability floor area (m™) 10 30 80 40 900 m™ labor (persons) 2 1 1 3 80 personsvariable cost ($/unit) 20 30 45 58sales revenue ($/unit) 30 50 85 90The optimal tableau (using 10 m™ and $10 as units) to maximize profit is:

10 | 1 -1 -4 . -0.6 +0.8 20 | . 1 3 1 0.4 -0.2 74 | . 0.2 1.6 . 0.68 0.16

(i) A raw material used in making products 1 and 3 is variable in price. Atpresent it costs $100 per ton (included in the above variable costs).Product 1 uses 0.1 ton, and product 3 uses 0.2 tons. Suppose the cost ofthis raw material changes to $p per ton. How far can p vary, withoutchanging the optimal schedule ? (Hint: Compare 1.11c. The first profitcoefficient is 30 - (0.1–100 + 10) when p = 100; it changes to30 - (0.1p+10), so gives 2.0 - 0.01p in $10 units.)(ii) The firm can increase its effective floor space to 1000 m™ byinstalling some new equipment, that would cost $50 per day. Shouldthey ? If so, what would be the new production schedule ?

LP9 A furniture maker wants to maximize his weekly profit. His data areas follows:

Product number : 1 2 3 4 Available Machine hours 1 3 4 3 1000 hours Wood (square metres) 4 2 6 8 2500 sq. m Profit($) per item made 20 20 50 40

A linear program (in scaled variables) to maximize profit isMAX 2x1+2x2+5x3+4x4 s.t. all xj̃ 0, x1+3x2+4x3+3x4ˆ10,4x1+2x2+6x3+8x4ˆ25. The optimal tableau is x1=4.0 | 1 -1 . 1.4 -.6 .4 x3=1.5 | . 1 1 .4 .4 -.1 15.5 | . 1 . .8 .8 .3

(i) What happens to the optimum schedule, and to the optimum profit, asthe unit profit for product 3 (at present 5) varies from 0 to Ç ?(ii) A major customer insists that 100 units of product 2 be delivered inas particular week. For that week, what are the optimum schedule andprofit?(iii) A shipping delay reduces the wood supply to 2000 sq. m. What is the

Page 47: Operations research methods

40

optimal production schedule and profit under that restriction? However,another source can supply up to 1000 sq. m at $6 per sq. m instead ofthe normal price of $4 per sq. m). How much (if any) should he buy atthat increased price?(iv) He is considering another product, which uses 4 hours of machinetime, and only 2 sq. m of wood. It would give a profit of $36 per item.Should he make any?

LP10 Solve the integer programming problem:

MAX 4x1 + 6x2 + 2x3 subject to 4x1 - 4x2 ˆ 5, -x1 + 6x2 ˆ 5, -x1 + x2 + x3 ˆ5, where x1, x2 , x3 are nonnegative integers .The optimal simplex tableau is 1 . . .3 .2 . | 2.5 . 1 . .05 .2 . | 1.25 . . 1 .25 . 1 | 6.25 . . . 2 2 2 | 30

LP11 In the example of 1.5, the basic variables x⁄ and x¤ remainedbasic when the second requirement was varied between 5.0-1.5 and5.0+2.0. Outside this range, some x jruns negative. Use the dual simplexmethod to calculate the optimum value of this linear program as afunction of the second requirement, as it varies from 3.5 down to 0.0.Also, what happens if the second requirement is increased above 7.0 ?

1.18 Computer input/output for a linear program Consider the (trivial) linear program: Minimize -3.4x⁄ -5.6x¤ +6.0x‹ subject to x⁄˜0, x¤˜0. x‹˜0, and 2.0x⁄ + 3.1x¤ ˆ 3.0, -4,5x⁄ + 6.0x¤ + 4.0x‹ ˆ 4.0 .

For Craven's LP program (lpZ - see chapter 9), the output file is asfollows. Note that the nonzero matrix elements are given sequencenumbers 0,1,2,..., to enable changes to data. Only the basic optimalvariables xj are listed, since the nonbasic variables are zero. The optimaldual variables, and the objective function value, are listed. The optimalinverse basis matrix is given, with an extra "zero row" for optimal dualvariables, and an extra "zero column" for optimal xj variables; thus theinverse basis matrix is: ã.2312 -.1195õ Ã.1734 .0721Õ (to 4 decimal, places).The zj-cj (reduced costs) are not tabulated; however this program showsthem on the screen as : 0.0000, 0.0000, -2.1017, -1.7572, -0.0254. Sample output fileSeqNo Row Col Entry 0 -1 1 2.000000 1 2 1 -4.500000 2 -1 2 3.100000 3 2 2 6.000000 4 -2 3 4.000000 5 -1 4 1.000000 6 -2 5 1.000000 7 0 0 .000000

Page 48: Operations research methods

41

C( 1 )= -3.4C( 2 )= -5.6C( 3 )= 2C( 4 )= 0C( 5 )= 0B( 1 )= 3 -1B( 2 )= 4 -1

OptimumX 1 = .215799614643X 2 = .828516377651Dual 1 = -1.75722543353Dual 2 = -.0254335260086Objective = -5.37341040462

W( 0 0 ) -5.3734 W( 0 1 ) -1.7572 W( 0 2 ) -.0254 W( 1 0 ) .2158 W( 1 1 ) .2312 W( 1 2 ) -.1195 W( 2 0 ) .8285 W( 2 1 ) .1734 W( 2 2 ) .0771

With this program, the matrix can also be saved for future use, in the format: 2 , 5 , 3 , 5 , 7 0 ,-1 , 1 , 2 1 , 2 , 1 ,-4.5 2 ,-1 , 2 , 3.1 3 , 2 , 2 , 6 4 ,-2 , 3 , 4(The first line records the number of different kinds of data, for setting up arrays.)

The following page shows the format for data input. This can be doneeither by keyboard entry (nonzero matrix elements only), or byspreadsheet input.

Page 49: Operations research methods

42

Page 50: Operations research methods

43

1.19 A note on interior-point methods Consider a linear program, in standard form, with m constraints and nvariables; typically, n is considerably larger than m. The simplex methodmoves from vertex to vertex, thus along the boundary of the feasible region,which is a polyhedron in n-dimensional space. The number of vertices islarge, but usually only a few need to be visited. While an example existswhere all the vertices are visited, the number of iterations of the simplexmethod, for typical industrial planning models, typically averages about 2m,though there is much variation about this average. Would it be quicker to take a more direct path through the interior of thefeasible region? There are more recent interior-path methods which do this,and they are often found useful for large linear programs, which in any caserequire heavy computation on big computers. Usually they are implementedas central-path methods. The basic idea is discussed below. However, theirefficiency depends on the details of how the computation is arranged. When the dimension n of the space is large, most of the( n-dimensional)volume is close to the boundary. Consider, for example, a hypercube (the n-dimensional analog of a cube), defined by: C = {x = (x1, x2, ..., xn) : 0 ˆ xj ˆ 1, j=1,2,...,n},and another hypercube inside it: Cå = {x = (x1, x2, ..., xn) : å/2 ˆ xj ˆ 1 - å/2, j=1,2,...,n},where å is small positive. The n-dimensional volume of the part of C not inCå is 1 - (1-å)n , which approaches 1 as n becomes large. Thus, in largedimension, keeping close to the boundary may in fact be passing through alarge part of the volume. Consider now a linear program, in standard form: MIN cTx subject to Ax = b, x ˜ 0,where A is a matrix with m rows and n columns. If the KKT conditions for aminimum are added, this gives: Ax = b, x ˜ 0, ATy + z = c, z ˜ 0, xi zi = 0 (i=1,2,...,n). (PD)(This is called a primal-dual formulation, sin c e y and z are the variables ofthe dual linear program, and the added constraints are those of the dualprogram.) The system (PD) is linear except for the nonlinear constraintsxi zi = 0., and these divide the computation into separate branches,depending on which subsets of the xi are nonzero. Consider then a modification of (PD): Ax = b, x > 0, ATy + z = c, z > 0, xi zi = µ (i=1,2,...,n), (PDµ)in which µ is a positive parameter. The system (PDµ) can be solved quicklyby Newton's method (see Section 7.3), giving a solution (x*(µ),y*(µ)). Thecentral path is the graph of x*(µ) against µ. Of course, x*(µ) is onlycomputes for a chosen set of values of µ = µ0 > µ1 > µ2 > ... tending to 0.Efficient computation requires a balance between the steps in µ (say, how tgchoose µj+1/µj) and the precision of computing each x*(µj).

Newton's method, to find a zero of a vector function F(w), generates asequence w0, w1, w2, ... F(wj=1) Ú F(wj) + G(wj) (wj+1 - wj) = 0to determine the step wj+1 - wj . Here G(wj) is the gradient of F at wj .

Page 51: Operations research methods

44

Page 52: Operations research methods

45