OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques...

294
Department of Decision Sciences OPTIMISATION OF RESOURCES Only study guide for DSC3702 University of South Africa Pretoria

Transcript of OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques...

Page 1: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

Department of Decision Sciences

OPTIMISATION OF RESOURCES

Only study guide for

DSC3702

University of South AfricaPretoria

Page 2: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

c©1998 Department of Decision Sciences

ACKNOWLEDGEMENTSRevised edition 1999, 2001, 2003, 2004, 2007, 2008, 2009,2012All rights reserved

Typeset in LATEX

Printed and distributed by theUniversity of South AfricaMuckleneuk, Pretoria

DSC3702/1/2012

Cover: Oos-Transvaal, Laeveld (1928) (“Eastern Transvaal, Lowveld”) J.H. Pierneef

J.H. Pierneef is a well-known South African artist. Permission for the use of thiswork was kindly granted by the Schweickerdt family.

The tree structure is a recurring theme in various branches of decision sciences.

Page 3: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

Contents

Study Unit 1 The Problem 3

1.1 Preview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.2 Introducing John . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.3 Introducing Knotty Pine Products . . . . . . . . . . . . . . . . . . . . . . . . 4

1.4 What John saw and heard . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.5 Action John . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Study Unit 2 The data 9

2.1 Visiting the accountant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.2 Visiting the purchasing manager . . . . . . . . . . . . . . . . . . . . . . . . . 15

2.3 Visiting the production manager . . . . . . . . . . . . . . . . . . . . . . . . . 15

2.4 Visiting the sales manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Study Unit 3 The model 19

3.1 Formulating the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Study Unit 4 The computer 25

4.1 Now the computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Study Unit 5 The solution 31

5.1 Studying the solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

5.2 The objective function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

5.3 The variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

5.3.1 Status of variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

iii

Page 4: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

DSC3702 CONTENTS

5.3.2 Shadow costs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

5.4 The constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

5.4.1 Status of constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

5.4.2 Shadow prices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

5.5 The ranging analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

5.5.1 Ranging analysis for objective function coefficients . . . . . . . . . . . . 41

5.5.2 Ranging analysis for right-hand sides of constraints . . . . . . . . . . . . 42

Study Unit 6 Summary and problems 45

6.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

6.2 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

6.3 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Study Unit 7 The simplex method 59

7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

7.2 Revision of basic principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

7.3 Bounded variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

Study Unit 8 The Simplex Method – using the computer 71

8.1 From tableau to solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

8.2 From tableau to ranging analysis . . . . . . . . . . . . . . . . . . . . . . . . 76

8.2.1 Objective coefficient ranges . . . . . . . . . . . . . . . . . . . . . . . . . 79

8.2.2 Right-hand side ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

Study Unit 9 Special LP models 87

9.1 Special LP models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

9.2 Infeasible LP models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

9.3 Alternative solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

9.4 Unbounded LP models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

9.5 Degenerate solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

iv

Page 5: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

CONTENTS DSC3702

Study Unit 10 Parametric analysis 105

10.1 Parametric analysis of an objective function coefficient . . . . . . . . . . . . 106

10.2 Parametric analysis of the right-hand side of a constraint . . . . . . . . . . . 108

Study Unit 11 Summary and problems 117

11.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

11.2 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

11.3 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

Study Unit 12 Formulating models and solving them with LINGO 131

12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

12.2 Using LINGO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

12.3 A diet problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

12.4 A transportation problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

12.5 A marketing problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

Study Unit 13 Summary and problems 163

13.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

13.2 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

13.3 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

Study Unit 14 Integer constrained problems 181

14.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

14.2 Types of integer programming models . . . . . . . . . . . . . . . . . . . . . 182

14.3 Rounding off the solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

14.4 An integer constrained example . . . . . . . . . . . . . . . . . . . . . . . . . 183

14.5 The branch-and-bound method . . . . . . . . . . . . . . . . . . . . . . . . . 188

14.6 Integer solution with LINDO and LINGO . . . . . . . . . . . . . . . . . . . 197

Study Unit 15 Integer programming models 199

15.1 Binary variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

15.2 A capital budgeting problem . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

v

Page 6: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

DSC3702 CONTENTS

15.3 A fixed-cost problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204

15.4 A set-covering problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

15.5 Either/or constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

15.6 If/then constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216

15.7 Sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

15.8 Heuristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

Study Unit 16 Summary and problems 221

16.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

16.2 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

16.3 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

Study Unit 17 Models with multiple objectives 235

17.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236

17.2 A production-scheduling problem . . . . . . . . . . . . . . . . . . . . . . . . 237

17.3 Setting priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240

17.4 A marketing problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

17.5 An integer problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248

Study Unit 18 Summary and problems 253

18.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

18.2 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

18.3 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256

Study Unit 19 The final message 261

19.1 Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262

19.2 Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266

19.3 John’s report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269

vi

Page 7: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

CHAPTER 1

An example from actual practice

Theme:

Identification of a practical problem in a furniture factory.

Aim of the chapter

After completing this chapter you should be able to

• design a model for a product mix problem;

• solve the model using the computer package, LINDO ;

• analyse the results;

• make recommendations for implementing the solution in the form of a written re-port.

Page 8: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,
Page 9: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

StudyUnit 1

The Problem

Theme:

Identification of a practical problem in a furniture factory.

Contents1.1 Preview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.2 Introducing John . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.3 Introducing Knotty Pine Products . . . . . . . . . . . . . . . . . 4

1.4 What John saw and heard . . . . . . . . . . . . . . . . . . . . . . 5

1.5 Action John . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Learning objectives

After completing this study unit you should be able to

• fully understand the background to the problem being investigated and be able tobriefly convey it orally.

3

Page 10: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

4 STUDY UNIT 1 THE PROBLEM

The problem

1.1 Preview

In this chapter we shall introduce you to John Ramokgadi so that you can learn from hisexperience. We shall place him in an ideal environment, that is, an environment whereproblems abound, but with a structure that allows for the application of operations re-search or quantitative management techniques and the implementation of these results.

You will see how John discovers a problem, how he identifies and formulates it, how hebuilds a model and solves it, how he questions and analyses his results, how he commu-nicates his findings and “sells” his ideas to management and how his model eventuallyforms part of the decision-making process of the business in which he is employed.

1.2 Introducing John

John is an operations researcher. He is employed by Knotty Pine Products but not as aresearcher, as a cleaner. He has to prove his abilities to management.

Before telling you what John saw and heard, let us inform you about Knotty Pine.

1.3 Introducing Knotty Pine Products

Knotty Pine has its own plantations, factories and outlets. The furniture factory, knownas Knotty Pine Products, manufactures solid pine furniture. John finds himself at thisfactory which we will discuss in this section. The factory is an independent unit in theconglomerate with its own management, and trades with the other branches of KnottyPine to its own advantage.

The factory consists of a number of departments: Finance, Personnel, Production, Pur-chasing, Sales and Administration. Each department is subdivided into sections. Johnfinds himself at the head of the cleaning section, which is part of Administration. Pro-duction, for example, consists of the machine section and the joining and finishing sec-tion.

Let us consider the production process. The wood required is purchased by the purchas-ing department. This department is responsible for supplying the correct quantity andquality of wood to Production at the correct time. All the sawing and planing is donein the machine section. The wood is sawn into standard forms for legs, table tops, seats,backrests, etcetera. These parts are handled further in the joining and finishing sectionwhere they are joined together, sanded down and varnished to form pieces of furniture.

Page 11: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

1.4. WHAT JOHN SAW AND HEARD 5

The sales department then distributes the completed furniture according to contract tovarious wholesalers and the outlets of Knotty Pine.

The following items of furniture are manufactured: round tables in two sizes and rectan-gular tables in two sizes (six and ten seaters in both cases), two types of chairs (one veryelegant and the other more popular) and buffets. Various combinations of furniture aregrouped together and sold as dining room suites, but items are available separately.

1.4 What John saw and heard

John soon became acquainted with many people and learned how the factory operated.

John’s observations on the factory floor set him thinking. Here he often saw the work-ers hanging around doing nothing. At other times he heard the in-fighting between thebig shots on the factory floor. The sales manager, Vincent Bahule, was there regularly,fighting for more of a certain type of furniture. Mark Sterling, the production manager,would say that he and his workers only had two hands each and the machines were soold that they were always broken. He was doing the best he could under the current cir-cumstances. New machines and more workers were the answer. Arand Mopani, the ac-countant, would then join the party: “If you at Production were more productive andyou at Sales sold more of the correct type of furniture, our profit situation would be bet-ter. Then you could have as many machines as you liked. But times are bad and youwill have to make the best use of what you’ve got”. In the background he would hear theworkers from the joining and finishing section moaning and groaning because they had towork non-stop while the workers in the machine section were sitting around doing noth-ing. The situation usually exploded when Penny du Pont from Purchasing announcedthat the last consignment of wood that she had ordered would be late: “You know how Istruggle with the suppliers and you always need more wood at the last minute!”

John couldn’t understand why there were so many problems. Things could surely im-prove, considering the entire set-up, the quality of the workers and the great demand fortheir furniture. The potential was there, it just had to be applied correctly. Apparentlythe greatest problem was that the production output did not match the sales require-ment. Even if it did, the accountant was dissatisfied with the small profit yield.

This was a planning problem and John’s intuition told him that this could not be toohard to solve. There had to be a combination that would satisfy the requirements andconstraints of all departments, even that of the accountant. Then he realised that thiswas a classical LP∗1 problem of allocating scarce resources to economic activities.

1∗ LP: Generally used abbreviation for linear programming (say: El Pee).

Page 12: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

6 STUDY UNIT 1 THE PROBLEM

1.5 Action John

John wants to take action immediately, but realises that he must know exactly what theproblem is before he can even try to solve it. A vague idea of the problem will achievenothing. To try and solve all possible problems in one go is also not only impossible, butundesirable.

He realises that his problem must be restricted to the combination of products (in thiscase, types of furniture) to be manufactured. Initially it will be best to concentrate onthe short term. He decides to work with a four-week period, as Production revises itsproduction plan every four weeks according to the sales obligations of the factory. Hemust then make the best decision using only the resources presently available.

If he considers the resources to be constant, what can be changed? Not prices, as theyare fixed contractually in the short term. Nor costs, as wage changes, less wastage, etcetera,cannot be accomplished overnight. The only things he can juggle with are the quantitiesof the various products that are manufactured. But is this possible? What determinesthese quantities? Will juggling with them help?

The sales department has to deliver certain quantities of products according to contracts.Some contracts require a minimum quantity, others a maximum, others are unlimited inthe sense that the market is unsaturable and the dealer expects to sell everything thatKnotty Pine can deliver.

What other factors still restrict the quantities of products, especially those products forwhich the market is unsaturable? Production capacity, of course, as there are limits towhat the factory can produce per month. What determines these limits? Production hasonly a limited number of workers and machines to perform the work and the quantity ofwood supplied by Purchasing is also limited.

There must be at least one feasible combination of products to be manufactured withinall these constraints. There will hopefully, not only be one such combination, but many.

All these combinations will satisfy all the constraints, but remember – the goal of everysection and department and obviously also the reason for the existence of the factory, isto make money, or rather to maximise profits.

His first priority is to summarise the problem and to note which data he requires. Theresulting summary follows.

Page 13: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

1.5. ACTION JOHN 7

The problem1. I want to establish how many of each of the following seven items

to manufacture during the next month:i. Ten-seater round tables,ii. Six-seater round tables,iii. Ten-seater rectangular tables,iv. Six-seater rectangular tables,v. Elegant chairs,vi. Popular chairs,vii. Buffets.These are my decision variables.

2. The quantities selected must maximise profits from sales.This is my objective function.i. I need the profit margin of each of the seven products.

3. Quantities are restricted by the following:i. availability of wood,ii. man-hours available in the production sections,iii. machine-hours available in the production sections, andiv. the quantities of each product required according to the sales

contracts.These are my constraints.

4. I require data on:i. quantity of wood in cubic meters (m3) available for the next

planning period,ii. quantity of wood necessary for the production of one unit of each

of the seven products,iii. the man-hours available in each production section,iv. the man-hours required in each production section to produce one unit,v. the machine-hours available in each production section,vi. the machine-hours available in each production section to produce one

unit, andv. the data for all the sales contracts.

John is a little worried about where he will obtain the data.Just then a thought strikes him:“We have a budgeting system and the information I need is similar to the informationneeded to draw up a budget. My first visit must be to the accountant. He should be ableto supply at least three-quarters of my answers. The Sales and Purchasing managers willsupply the rest, as their contracts are available in writing. Should there be anything else,the Production manager in the factory will be an excellent source of information.”

A person undertaking a project similar to John’s, must not lose sight of his position inthe organisation. John’s findings will influence the functioning of departments other thanhis own.

Page 14: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

8 STUDY UNIT 1 THE PROBLEM

Someone working in a planning or consulting capacity mostly only has staff authority∗2,which means that he has to advise a manager or decision-maker in another department orsection about a decision-making problem in that department. In the end it is not the ad-visor or consultant who has to make the final decision, but the person whom he advised.The latter has to shoulder the responsibility of his decision. If the consultant does nothave the co-operation of the other person and has not involved him in the construction ofthe model from the outset, the other person is unlikely to attach any value to the model,nor is he likely to use it. Furthermore, a manager may feel threatened by the consultant’smeddling in his affairs. The manager may feel that the consultant is trespassing on histerrain and is criticising someone with years of experience. He has a valid point and bothparties must realise that each one is an expert in his own terrain. They should and mustcombine their knowledge and experience to find better solutions to problems.

With this in mind, John decides to involve the managers in the following way. He willpersuade them to tell him about all their production problems. Then he will tell themabout LP and how he thinks it can help them. He must sell LP. If he succeeds in this,they will ask him for assistance instead of him having to offer it. Then he must get theminvolved in the modelling process, pooling their knowledge and experience and givingthem confidence in the model.

Let us suppose that he succeeds in this difficult task and manages to obtain the full co-operation of the managers and is given all the information he needs. In the following sec-tions we will examine the origin of this information.

2∗Line authority includes the right to give orders and to enforce decisions. For example, a managerhas line authority over his subordinates. Staff authority is a supporting authority. It is restricted inthe sense that it does not include the right to give orders. A person with staff authority supports, givesadvice and makes recommendations. The source of his authority is usually his expertise in a specificarea.

Page 15: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

StudyUnit 2

The data

Theme:

Discussion of how the data needed for a model of a problem may be obtained.

Contents2.1 Visiting the accountant . . . . . . . . . . . . . . . . . . . . . . . . 10

2.2 Visiting the purchasing manager . . . . . . . . . . . . . . . . . . 15

2.3 Visiting the production manager . . . . . . . . . . . . . . . . . . 15

2.4 Visiting the sales manager . . . . . . . . . . . . . . . . . . . . . . 17

Learning objectives

On completion of this study unit the student must

• understand and be able to define various accounting terms;

• have appreciation for the contribution that people from other disciplines can maketo the modelling process and be able to describe it orally;

• be aware of the kind of data to which people from other departments in a businesshave access and be able to describe it orally.

9

Page 16: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

10 STUDY UNIT 2 THE DATA

2.1 Visiting the accountant

The profit of a business, in simple terms, is calculated as the difference between its in-come and the costs incurred to create that income. However, when it comes to decision-making and planning, as when drawing up a budget, this broad outline is no longer ap-propriate. Then one must classify the expenditure or costs of the business according tofunction such as production costs (the costs incurred in the production of a product),marketing costs (the costs associated with advertising and selling a product or service),administrative costs (the costs associated with managing and administering the busi-ness) and financial costs (the costs associated with the financial activity of the business,for example, interest on loans).

The production costs are considered to be made up of direct material costs (the costsof raw materials used to make the final product, for example, wood, in the case of fur-niture), direct labour costs (the costs of labour directly involved in making the fin-ished product from the raw materials, for example, the wages of the production workers)and production overhead costs (all costs, except direct material and direct labour,involved in the manufacture of a product, for example, rent, electricity, land and prop-erty taxes, insurance, depreciation, indirect material such as cleansing agents, indirectlabour such as wages of foremen and supervisors, etcetera. These costs are incurred soas to make production possible and cannot be expediently associated with any particularunit or batch of units because they are common to all the units manufactured).

Each cost item may be further classified as fixed, variable or semi-variable. Fixed costsare costs that remain constant even though the volume of production changes. Exam-ples are land and property taxes, straight-line depreciation (where equipment depreciatesaccording to a fixed percentage and is therefore not dependent on the utilisation of equip-ment) and salaries of persons not directly involved in production. Variable costs vary indirect proportion to changes in the volume of production. If, for example, the volume ofproduction doubles, then these costs will also double. Examples are direct material costs,machine repair costs and depreciation computed on a usage basis.

Semi-variable costs are costs that vary, but not in direct proportion to the volume ofproduction. For example, maintenance costs, where a portion of the costs is representedby standby costs that are fixed irrespective of whether the machines are used or not, anda portion of the costs is variable and depends on how often the machines are used. Asemi-variable cost item is usually separated into two components, one fixed and the othervariable.

When a decision has to be taken, one cannot usually use the cost figures obtained fromthe accounting records of the business without adjusting them to the requirements of thespecific problem. The figures are adjusted for a specific purpose and are only of valuein that specific situation. The first step in this adjustment process is to separate the ac-counting data into relevant and irrelevant costs. The relevant costs are costs that willbe influenced or changed by the decision and the irrelevant costs are costs that will notbe influenced by the decision.

Page 17: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

2.1. VISITING THE ACCOUNTANT 11

Getting back to John’s problem – he requires the profit per production unit to enablehim to decide which combination of products should be manufactured so as to maximisethe net profit, given that the number of production workers and the number of machineson the factory floor are fixed. Although John wishes to maximise the profit of the busi-ness, it is not necessary for him to consider all the income and expenditure of the factory,as he need only consider that which will be influenced by his decision. All fixed costs andall income from sources other than sales (for example, income from investments) are im-mediately excluded. What remains are the variable costs (according to their definition)and the income from production, which is the same as the sales revenue. The questionnow is whether all variable costs are relevant to John’s problem.

Consider the cost of direct material. A table requires more wood than a popular chair.The quantity of wood required will therefore change if the product mix changes. Whatabout direct labour? A table requires more labour hours than a chair, but there are afixed number of production workers. Each worker works 42,5 hours a week irrespectiveof whether he makes chairs, tables or buffets. Even if a worker sits and does nothing forhalf an hour due to a bottleneck elsewhere on the production line, he still gets paid forthat half-hour. The point is that, at the end of his 42,5 hour working week, the workerwill receive the wage at which he was appointed, irrespective of what he was doing dur-ing this time. Our decision is not concerned with the number of workers employed or thelength of the working week or the wages of the workers. These are all fixed factors. ForJohn’s problem, direct labour is thus not a relevant cost. What about the variableproduction overhead costs? John must consider each item that forms part of the produc-tion overhead costs separately. If, for example, an item is dependent on how often a ma-chine is used, it is relevant. An example is the variable part of the maintenance costs ofmachines.

The figure that John will use in his model as the unit profit of a product is not the sameas the accountant’s unit profit. John’s figure is the difference between the price of theproduct and the relevant costs associated with the manufacture of one unit of the prod-uct. The accountant’s unit profit is usually the difference between the selling price ofthe product and all the manufacturing costs, also the fixed costs that are assigned to theproduct at some predetermined rate. The value of John’s objective function will also notbe the profit of the business. To calculate the profit of the business, all non-relevant in-comes and costs that remain constant in the problem situation must still be added to orsubtracted from the value of the objective function. Remember this.

Let us now study the calculation of the unit profit for a ten-seater round table in detail.We need the selling price, the direct material costs and the variable production overheadcosts. The selling price is fixed at R3 800 and is determined by the total manufacturingcosts of the table and the current market conditions. According to Knotty Pine’s salescontracts, these prices are fixed, but may be changed at specific dates at a month’s no-tice.

The direct material costs are calculated as the price of the wood used to manufacturethe table. The average quantity of wood used to manufacture a ten-seater round table

Page 18: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

12 STUDY UNIT 2 THE DATA

is 0,1328 m3 and the price of the pine currently in stock and on order is R5 000 per m3.The direct material costs of the table are thus 0,1328 × R5 000 = R664.

The variable overhead costs are calculated at R50,00 per machine-hour and R75,00 perteam-hour in the joining and finishing section. These overhead costs include the costs ofelectricity, machine repair and maintenance, cleansing agents, sandpaper, etcetera. Therate of R50,00 is determined theoretically as it is seldom possible to link this cost directlywith the manufacture of a specific product. (Consider the cost of replacing the wearingparts of a machine.) In such cases the consultant must accept the allocation by the ex-perts – the accountants and cost accountants.

The standard time required to manufacture a table is usually determined through mea-surement. In a large business the accountant would possibly already have done this, ashe requires it for his planning and budgets. Otherwise a work-study officer may havemade these calculations as part of a project to increase the productivity of the produc-tion workers. In any event, the chances are good that such figures are already available.If not, the necessary measurements must be taken and the average values calculated.

In John’s case the accountant had these figures available. The following table shows, foreach machine in the machine section, the number of minutes required on average to dothe sawing and planing for a single round ten-seater table.

Machine MinutesBench-saw 50Thickness-planer 40Planer 13Router 41Tenon-saw 8Band-saw 15Spray gun 6

A team of four labourers (one trained artisan and three workers) requires, on average, sixhours to do all the joining and finishing work on the table.

The total variable overhead costs allocated to a ten-seater round table are thus:

(50 + 40 + 13 + 41 + 8 + 15 + 6)/60 × R50,00 + 6 × R75,00 = R594,16.

John will use the following figure for the unit profit of a ten-seater round table in hismodel∗1:

1∗The blocked format used here (and further on) is widely used by accountants to present figure datain a compact manner – just as scientists use formulae for shorthand. The figures inside a block are anexposition of the figure just above the block. In this example the relevant costs of R1 402,34 are the sumof the direct material costs and the variable overhead costs, that is R664,00 + R594,16. The unit profit,R2 396,87, is the difference between the two figures outside the block, that is the selling price, R3 800,minus the relevant costs, R1 402,34.

The block format makes it possible to do two sums in one. It can, of course, be extended further andone can have a block within a block within a block, etcetera.

Page 19: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

2.1. VISITING THE ACCOUNTANT 13

Selling price R3 800,00Less: Relevant costs R1 402,34Direct material costs R664,00(0,1328 × R5 000)Variable overhead costs R594,16(173/60 × R50,00 + 6 × R75,00)Unit profit R2 396,58

Exercise 2.1

Use the data below to determine the unit profit figures for the other six products.

ProductSelling price Wood per unit Joining and finishing

(in R) (in m3) time per unitin team-hours

Ten-seater round table 3 800 0,1328 6,000Six-seater round table 2 932 0,0907 5,000Ten-seater rectangular table 3 472 0,1352 6,500Six-seater rectangular table 2 843 0,0942 5,600Elegant chair 787 0,0142 1,300Popular chair 500 0,0114 0,867Buffet 3 968 0,1265 7,200

Machine-time per unit (in minutes)Product

Machine Six-seater Ten-seater Six-seaterround table rectangular table rectangular table

Bench-saw 40 35 30Thicknesser 25 42 26Planer 10 12 9Router 34 30 26Tenon-saw 6 7 5Band-saw 11 1 1Spray gun 5 6 4

Page 20: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

14 STUDY UNIT 2 THE DATA

Machine-time per unit (in minutes)Product

Machine Elegant chair Popular chair BuffetBench-saw 12 6 60Thicknesser 4 4 45Planer 9 7 14Router 13 7 52Tenon-saw 5 4 16Band-saw 7 0 13Spray gun 2 1 8

ProductSix-seater Ten-seater Six-seater

round rectangular rectangulartable table table

Selling price 2 932,00 3 472,00 2 843,00Less: Relevant costs 937,67 1 274,33 975,00

Direct material costs 453,50 676,00 471,00Variable overhead costs 484,17 598,33 504,17

Unit profit 1 994,33 2 197,67 1 867,00

ProductElegant Popular Buffetchair chair

Selling price 787,00 500,00 3 968,00Less: Relevant costs 211,83 146,03 1 345,83

Direct material costs 71,00 57,00 632,50Variable overhead costs 140,83 89,03 713,33

Unit profit 575,17 353,97 2 622,17

Page 21: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

2.2. VISITING THE PURCHASING MANAGER 15

2.2 Visiting the purchasing manager

John gathers from his conversation with the purchasing manager that the availability ofwood poses no problem. The largest portion of pine used, is obtained from Knotty PinePlantations. They are usually able to provide the required quantities. On the rare occa-sions that Knotty Pine Products was unable to obtain sufficient wood from Knotty PinePlantations, it had always been possible to supplement the shortage by purchasing wood,albeit at a dearer price, from other suppliers. Therefore, provided Purchasing is informedin good time, Production can be sure of getting as much wood as they require.

The question now is whether it is necessary to include the raw material requirement inthe model. An additional constraint will increase the size of the model and make it moredifficult to solve. What is the benefit of including it in the model? Sufficient quantities ofwood from Knotty Pine Plantations could sometimes be a problem. In such a case, woodcan be purchased at a dearer price from another source, but this will result in an increasein the direct material costs. The result may be that, in order to maximise profit, moreproducts using less wood and less products using more wood should be manufactured.This then is a factor that will indeed influence the composition of the product mix.

John subsequently decided to only build the availability of wood from Knotty Pine Plan-tations into his model at present. The model will then be able to indicate the few caseswhen wood must be purchased from another source. It may supply information that canbe used to decide whether it will be profitable to do so and to determine how this willchange the composition of the product mix.

There are usually 100 m3 of wood available for production. John obtained the figures forthe quantities of wood required for each product from the accountant.

2.3 Visiting the production manager

The following machines are in the machine section:

• four bench-saws,

• three thicknesser-planers,

• two planers,

• three routers,

• two tenon-saws and

• two band-saws.

Two operators are necessary to operate each machine. The one is a trained artisan andhe is assisted by an unskilled worker. Although a machine is on the factory floor for 24

Page 22: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

16 STUDY UNIT 2 THE DATA

hours a day, it is only operational while the operators are present. The available machine-hours and the available man-hours, or rather team-hours, where a team consists of twooperators, are thus exactly the same. Where the machine section is involved, we willtherefore consider only the machine-hours.

The labourers work a 42,5 hour week and each machine is therefore operational for 42,5hours per week. Two of the bench-saws are giving trouble and are not available for about15% of the time. One tenon-saw and one router are also unreliable. The tenon-saw is outof order for 10% of the time and the router for 5% of the time. All the other machinesrequire only routine maintenance, which is included in the standard times that each prod-uct uses on each machine. (John obtained these figures from the accountant.)

The joining and finishing section employs 25 teams. Each team consists of one trainedartisan and three unskilled workers. Each team has its own tool box so that the avail-ability of tools is no problem. The spray gun is the only tool that is shared by all teams.This tool is manned by an artisan and one unskilled worker. The spray gun requires lit-tle maintenance and the cleaning and replacing of small spare parts are part of the dailyroutine. This is included in the time that each product requires the spray gun to be used.John decides that for the purpose of this project, the spay gun will be considered to bepart of the machine section so as to group together things that are measured in machine-hours and things that are measured in team-hours. Manual labour is measured in team-hours where each team-hour consists of four man-hours.

Exercise 2.2

Calculate the number of machine-hours available on each type of machine and the num-ber of team-hours available in the joining and finishing section over a period of four weeks.

Solution to Exercise 2.2

Number of working hours per week is 42,5. The number of working hours in four weeks is170 hours.

42,5 × 4 = 170.

(a) Bench-saws

Each bench-saw is manned for 170 hours over a period of four weeks. Two of thefour bench-saws are not available for 15% of this time, that is 25,5 hours.

0,15 × 170 = 25,5

The total number of hours available on the four bench-saws is therefore

170 × 2 + (170 − 25,5) × 2 = 629

hours.

(b) Thicknesser-planers

Number of available hours is 3 × 170 = 510 hours.

Page 23: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

2.4. VISITING THE SALES MANAGER 17

(c) Planers

Number of available hours is 2 × 170 = 340 hours.

(d) Routers

One of the routers is not available for 5% of the time.

Number of available hours is 3 × 170 − 0,05 × 170 = 501,5 hours.

(e) Tenon-saws

One of the tenon-saws is not available for 10% of the time.

Number of available hours is 2 × 170 − 0,1 × 170 = 323 hours.

(f) Band-saws

Number of available hours is 2 × 170 = 340 hours.

(g) Spray gun

Number of available hours is 1 × 170 = 170 hours.

(h) Team-hours in the joining and finishing section

Number of available hours is 25 × 170 = 4 250 hours.

2.4 Visiting the sales manager

The sales manager tells John that most of their products are sold to Knotty Pine Fur-nishers (more commonly known as KPF). There are occasionally orders from other deal-ers. These dealers do not always pay the same prices as KPF since, according to theircontract with KPF, prices may only be adjusted once every four months and then a month’snotice is required. Thus it sometimes happens that the other dealers are paying the newprice while KPF is still being supplied at the old price. At present there is no such prob-lem.

The quantities that must be supplied to the dealers within the next month are:

Product QuantityTen-seater round tablesSix-seater round tablesTen-seater rectangular tablesSix-seater rectangular tablesElegant chairsPopular chairsBuffets

Not more than 40Not more than 120Not more than 15UnlimitedUnlimitedUnlimitedDepends on the number of tables

Page 24: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

18 STUDY UNIT 2 THE DATA

The number of chairs is unlimited as chairs may be sold separately and need not neces-sarily be part of a suite. A buffet is never sold separately but is always accompanied bya table and chairs. Fifty percent of the ten-seater tables and 25% of the six-seater tablesmust be accompanied by a buffet.

Page 25: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

StudyUnit 3

The model

Theme:

Formulation of a model to represent the given problem.

Contents3.1 Formulating the model . . . . . . . . . . . . . . . . . . . . . . . . 20

Learning objectives

On completion of this study unit the student must be able to

• formulate a simple product mix problem as a linear programming model.

19

Page 26: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

20 STUDY UNIT 3 THE MODEL

3.1 Formulating the model

John’s next step is to build a mathematical model of the problem situation. He mustwrite down the objective function and all the constraints as mathematical relationships.

A starting point is giving the decision variables symbolic names. He chooses the followingnames:

RT : Number of ten-seater round tables to manufacture.RS : Number of six-seater round tables to manufacture.RcT : Number of ten-seater rectangular tables to manufacture.RcS : Number of six-seater rectangular tables to manufacture.CE : Number of elegant chairs to manufacture.CP : Number of popular chairs to manufacture.B : Number of buffets to manufacture.He could have chosen x1, x2, x3, . . . , x7, but you will agree that the above names aremore descriptive. This makes it easier to remember what each decision variable repre-sents and simplifies the interpretation of the result at the end. We are convinced that amanager with no interest in mathematics will feel less intimidated by the more descrip-tive names.

Exercise 3.1

Using the names given by John, formulate the problem as a mathematical model. Trythis yourself before studying the solution given below.

Solution to Exercise 3.1

The Model

Max P = 2 396,87RT + 1 994,45RS + 2 197,42RcT + 1 867,37RcS + 575,39CE + 353,97CP + 2 622,79B

subject to

0,1328RT + 0,0907RS + 0,1352RcT + 0,0942RcS + 0,0142CE + 0,0114CP + 0,1265B ≤ 100 [1]0,8333RT + 0,6667RS + 0,5833RcT + 0,5RcS + 0,2CE + 0,1CP + B ≤ 629 [2]0,6667RT 10 + 0,4167RS + 0,7RcT + 0,4333RcS + 0,0667CE + 0,0667CP + 0,75BT ≤ 510 [3]0,2167RT + 0,1667RS + 0,2RcT + 0,15RcS + 0,15CE + 0,1167CP + 0,2333B ≤ 340 [4]0,6833RT + 0,5667RS + 0,5RcT + 0,4333RcS + 0,2167CE + 0,1167CP + 0,8667B ≤ 501,5 [5]0,1333RT + 0,1RS + 0,1167RcT + 0,0833RcS + 0,0833CE + 0,0667CP + 0,2667B ≤ 323 [6]

0,25RT 0 + 0,1833RS + 0,0167RcT + 0,0167RcS + 0,1167CE + 0,2167B ≤ 340 [7]0,1RT 0 + 0,0833RS + 0,1RcT + 0,0667RcS + 0,0333CE + 0,0167CP + 0,1333B ≤ 170 [8]6RT + 5RS + 6,5RcT + 5,6RcS + 1,3CE + 0,867CP + 7,2B ≤ 4250 [9]

0,5RT + 0,25RS + 0,5RcT + 0,25RcS − B = 0 [10]and

0 ≤ RT ≤ 40, 0 ≤ RS ≤ 120, 0 ≤ RcT ≤ 15, RcS ≥ 0, CE ≥ 0, CP ≥ 0, BT ≥ 0;

and

Page 27: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

3.1. FORMULATING THE MODEL 21

[1 ] constraint on the quantity of wood available,

[2 ] constraint on the production time available on the four bench-saws,

[3 ] constraint on the production time available on the three thicknesser- planers,

[4 ] constraint on the production time available on the two planers,

[5 ] constraint on the production time available on the three routers,

[6 ] constraint on the production time available on the two tenon-saws,

[7 ] constraint on the production time available on the two band-saws,

[8 ] constraint on the production time available on the spray gun,

[9 ] constraint on the production time available in the joining and finishing section,

[10 ] requirement that 50% of the ten-seater tables and 25% of the six-seater tablesmust be accompanied by a buffet,

Remarks:

(a) We believe the formulation of all the relationships, except possibly the one restrictingthe buffet sales, is obvious. We shall thus only explain the buffet sales constraint.

The constraint must state mathematically that 50% of the ten-seater tables and 25% ofthe six-seater tables must be accompanied by a buffet on leaving the factory. In otherwords, the number of buffets must be exactly equal to 50% of the number of ten-seatertables (round and rectangular) plus 25% of the number of six-seater tables (round andrectangular).

Thus,B = 0,5 × (RT + RcT ) + 0,25 × (RS + RcS)

and thus0,5RT + 0,25RS + 0,5RcT + 0,25RcS − B = 0.

The last step merely rewrites the equation so that all the terms containing variables areplaced to the left of the equality sign and the single constant is placed to the right of theequality sign. Therefore

−0,5RT − 0,25RS − 0,5RcT − 0,25RcS + B = 0

would also be correct.

(b) Note that for the constraints on the available machine-hours, all values have beenconverted to hours. We could also have converted all values to minutes. It is a matterof personal taste. We feel that the eventual results will be more meaningful in hours thanin minutes - we have a better feel for how long a 3,25 hour period is than a period of 195minutes.

Page 28: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

22 STUDY UNIT 3 THE MODEL

The model is a linear programming model as all the relationships are linear. This isobvious since no squares, cubes, cross products or other funny things are present. Eachterm is either a number or a number multiplied by a symbol.

The relationships are linear, because they are divisible and additive. They are divis-ible since the total profit and the total quantity of each resource used is directly pro-portional to the quantities of products manufactured. For example, the contribution of20 buffets to the total profit is exactly twice the profit contribution of 10 buffets and 20times the profit contribution of one buffet. Similarly, twice as much wood is required tomanufacture 20 buffets as is required to manufacture 10 buffets. There are no cost orquantity savings if more of a certain product is manufactured. They are additive sincethe total profit is calculated by adding the profit contributions of the seven products, andthe quantity of each resource used is the sum of the quantities used for each product.

The model is an example of a linear product mix model.

John now believes that he is over the worst. To solve the model he has a computer athome and a program that can do the job. Tonight he will solve all Knotty Pine’s prob-lems!

The following exercise is given so that you can test whether you are capable of formulat-ing a simple product mix problem as an LP model.

Exercise 3.2

Grimm, Andersen and Co manufactures toys. A range of stuffed bears is their most pop-ular line. There are three different sized bears in the range. Papa is the brand name forthe large bear, Mama is the brand name for the middle-sized bear and Baba is the brandname for the miniature bear.

One of their sales representatives informs them that a new toy hypermarket, openingwithin a week, has agreed to purchase all the bears that they are able to produce withinthe week. There is only one requirement for the consignment, and that is that the num-ber of Babas must be at least double the number of Papas and Mamas.

There is 500 kg of stuffing and 700 m2 of material available for this objective. Fifty work-ers are available for 40 hours each during the next week. The table below indicates theresources required to manufacture one unit of each product and the selling price per unitof each product.

Product Stuffing Material Labour in Sellingin kg in m2 man-hours price

Baba 0,5 0,75 2,5 R27,00Mama 1,0 1,5 3,5 R44,40Papa 2,0 2,50 4,0 R65,00

The stuffing costs R6 per kg, the material R8 per m2, and labour R5 per hour.

The company must decide how many of each product to manufacture so as to maximise

Page 29: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

3.1. FORMULATING THE MODEL 23

profit.

Formulate the problem set out above as a linear programming model.

Solution to Exercise 3.2

Define the decision variables as

PAPAS = the number of Papas to be manufactured.

MAMAS = the number of Mamas to be manufactured.

BABAS = the number of Babas to be manufactured.

The model is:

Maximise PROFIT = 13,00PAPAS + 8,90MAMAS + 5,50BABAS

subject to

2,0PAPAS + 1,0MAMAS + 0,50BABAS ≤ 500 (STUFF )

2,5PAPAS + 1,5MAMAS + 0,75BABAS ≤ 700 (MAT )

4,0PAPAS + 3,5MAMAS + 2,50BABAS ≤ 2 000 (MAN − HRS)

−2,0PAPAS − 2,0MAMAS + 1,00BABAS ≥ 0 (MIX)

and

PAPAS ≥ 0, MAMAS ≥ 0, BABAS ≥ 0.

Remarks:

(a) The objective coefficients represent the per unit profit of each product and are cal-culated as follows:

ProductPapas Mamas Babas

Selling price 65 44,40 27,00Less: Relevant costs 52,00 35,50 21,50

Stuffing 12,00 6,00 3,00Material 20,00 12,00 6,00Labour 20,00 17,50 12,50

Unit profit 13,00 8,90 5,50

(b) The MIX constraint is determined by the ratio between the number of Babas andthe number of Papas plus Mamas. We state the ratio as:

BABAS

PAPAS + MAMAS.

This ratio must be at least two:

Page 30: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

24 STUDY UNIT 3 THE MODEL

BABAS

PAPAS + MAMAS≥ 2

or BABAS ≥ 2(PAPAS + MAMAS )

or -2PAPAS - 2MAMAS + BABAS ≥ 0.

Page 31: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

StudyUnit 4

The computer

Theme:

Using the computer to solve an LP model.

Contents4.1 Now the computer . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Learning objectives:

On completion of this study unit the student must be able to

• use the LINDO package of the prescribed book WINSTON ;

• solve a simple model using LINDO.

25

Page 32: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

26 STUDY UNIT 4 THE COMPUTER

4.1 Now the computer

John must now solve the LP model that he has built to represent Knotty Pine’s problem.As a student in the Department of Decision Sciences at Unisa, he has bought the pre-scribed book Winston Wayne: Operations Research, Applications and Algorithms and hewill use the software supplied with this book.

In this guide we will use the WINDOWS version of WINSTON’s software. LINDO willbe used now and LINGO will be introduced later.

There are, of course, many computer packages capable of solving LP models. If you wantto use such a package, you must study its manual carefully.

You were introduced to WINSTON’s software in the second-level Decision Sciences/OperationsResearch modules. The next exercise prompts you to refresh your memory on the useof LINDO. Please do not skip this exercise as it is essential that you know how to useLINDO.

Exercise 4.1

Carefully read through the instructions and hints on the use of LINDO given in the pre-scribed book WINSTON, as well as that given in the second-level modules.

Now we are ready for the computer. Before keying in his model, John must rememberthe following requirements of LINDO :

1. The model may be given a name by typing in “Title”, followed by the name.

2. Each decision variable must have a unique name consisting of a maximum of eightcharacters.

3. The objective function is keyed in by typing in “Max” or “Min”, followed directlyby the objective function, hence omitting the objective function name and the =sign.

4. The objective function line must be followed by typing in “subject to”, “s.t.” or“st”.

5. Each constraint may be given a unique name consisting of a maximum of eightcharacters. The name must be typed at the beginning of a line followed by a roundclosing bracket ) and then the constraint.

6. Decimals are keyed in by typing a full stop . and not a comma , .

7. Inequalities may be keyed in by using < or > as LINDO thereby assumes strict in-equalities ≤ and ≥.

8. LINDO assumes that all variables are non-negative, so we need not specify this.

9. Upper and/or lower bounds on variables must be keyed in after the END statementby using SUB (simple upper bound) or SLB (simple lower bound) followed by the

Page 33: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

4.1. NOW THE COMPUTER 27

variable name and bound.

The names that John chose for his decision variable are acceptable and may be used asthey are. He must still name the constraints and he chooses the following:

[1 ] : constraint on the quantity of wood.

[2 ] : constraint on the available hours on the four bench-saws.

[3 ] : constraint on the available hours on the three thicknesser-planers.

[4 ] : constraint on the available hours on the two planers.

[5 ] : constraint on the available hours on the three routers.

[6 ] : constraint on the available hours on the two tenon-saws.

[7 ] : constraint on the available hours on the two band-saws.

[8 ] : constraint on the available hours on the spray gun.

[9 ] : constraint on the available team-hours in the joining and finishing section.

[10 ] : constraint on the buffet sales.

John’s next step is to key his model into LINDO.

Exercise 4.2

Key John’s model into LINDO. Save it, print it out and check that it agrees with themodel given in the Solution to Exercise 3.1.

Solution to Exercise 4.2

Title Knotty Pine ProductsMax 2396.87RT+1994.45RS+2197.42RcT+1867.37RcS+575.39CE+353.97CP+2622.79Bsubject to1) 0.1328RT+0.0907RS+0.1352RcT+0.0942RcS+0.0142CE+0.0114CP+0.1265B<1002) 0.8333RT+0.6667RS+0.5833RcT+0.5RcS+ 0.2CE+0.1CP+B<6293) 0.6667RT+0.4167RS+0.7RcT+0.4333RcS+ 0.0667CE+0.0667CP+0.75B<5104) 0.2167RT+0.1667RS+0.2RcT+0.15RcS+0.15CE+0.1167CP+0.2333B<3405) 0.6833RT+0.5667RS+0.5RcT+0.4333RcS+0.2167CE+0.1167CP+0.8667B<501.56) 0.1333RT+0.1RS+0.1167RcT+0.0833RcS+0.0833CE+0.0667CP+0.2667B<3237) 0.25RT+0.1833RS+0.0167RcT+0.0167RcS+ 0.1167CE+0.2167B<3408) 0.1RT+0.0833RS+0.1RcT+0.0667RcS+0.0333CE+0.0167CP+0.1333B<1709) 6RT+5RS+6.5RcT+5.6RcS+1.3CE+0.867CP+7.2B<425010) 0.5RT+0.25RS+0.5RcT+0.25RcS-B=0

ENDSUB RT 40SUB RS 120SUB RcT 15

Page 34: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

28 STUDY UNIT 4 THE COMPUTER

Now let us solve the model with LINDO. We assume that you are sitting at your com-puter and have the LINDO file created in Exercise 3.1 on your screen.

Activate the SOLVE menu and select SOLVE. The question “Do Range (Sensitivity)Analysis?” appears. Select YES.

The solution to the model now appears in the REPORTS WINDOW. You can movebetween the model and the solution by choosing the relevant one from the WINDOWmenu. Print out the solution to this model.

We suggest that you always keep printouts of the model and its solution together. A so-lution is useless if you don’t know which model it solves.

Let us now study the solution to John’s model.

Printout 4.1 contains only part of the solution. The remainder is not shown here, as itwill not be discussed now.

LP OPTIMUM FOUND AT STEP 6

OBJECTIVE FUNCTION VALUE

1) 1642731.

VARIABLE VALUE REDUCED COSTRT 40.000000 -113.367027RS 120.000000 -113.887123

RCT 15.000000 -8.002806RCS 120.577812 0.000000CE 9.929732 0.000000CP 2299.095215 0.000000B 87.644455 0.000000

ROW SLACK OR SURPLUS DUAL PRICES1) 32.979858 0.0000002) 127.085670 0.0000003) 150.836334 0.0000004) 0.000000 128.4548035) 0.000000 1146.9648446) 116.321800 0.0000007) 285.588501 0.0000008) 96.052902 0.0000009) 0.000000 236.595779

10) 0.000000 104.742455

NO. ITERATIONS= 6

Printout 4.1

Page 35: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

4.1. NOW THE COMPUTER 29

What follows from the solution? Firstly, it gives us an optimal program. If the factoryproduces 40 ten-seater round tables, 120 six-seater round tables, 15 ten-seater rectangulartables, 120,578 six-seater rectangular tables, 9,93 elegant chairs, 2 299,095 popular chairsand 87,644 buffets, the profit will be R1 642 731,00. No other program that satisfies theconstraints will yield a bigger profit.

Let us consider the solution critically. The profit seems unusually large. Remember, how-ever, that this is not the actual profit of the business. To determine the actual profit, thefixed costs and the non-relevant variable costs must still be subtracted. After this compu-tation, the business may even suffer a loss.

What about the fractions in the answers? It is impractical for Production to manufac-ture 2 299,095 popular chairs. In reality the decision variables may assume only integervalues, which makes this an integer programming problem. That, however, is a differentstory. Finding an integer optimum is much harder and requires far more computing timethan finding a continuous optimum. An easier and cheaper way out is simply to round offthe values to the nearest integer. This may mean that we shall follow a sub-optimal pro-gram if we choose, for example, to manufacture 2 299 popular chairs whereas the actualoptimal integer solution requires say 2 300 popular chairs. Another possibility is that theapproximate solution may be (theoretically) infeasible as it may, for example, require 502machine-hours on the routers whereas only 501,5 hours are available.

Here we must choose between a better solution using a more complex technique (integerprogramming) and a sub-optimal solution using rounding off. In this case we can see noreason why we cannot be satisfied with the latter. Our model is only a representationof the real situation and to construct it we already have to make some assumptions andapproximations. Remember that the coefficients in the constraints and objective functionare based on estimates. After all it is not possible for every buffet that is manufactured,to use exactly 60 minutes on the bench-saw and not a minute more or less. Furthermore,such a sub-optimal decision will in any event probably be an improvement on a decisiontaken without the help of the model. As long as the model enables us to make a betterdecision than we would have been able to make without it, it has served its purpose.

Often the problem itself dictates the choice between techniques. Suppose, for example, wewish to increase the production capacity and must decide which machines to supplementand how many additional units to purchase. How would one then interpret an answer of1,5 routers? Should one buy one or two more? Here the nature of the problem requiresan integer solution.

We suggest that Knotty Pine manufactures 40 ten-seater round tables, 120 six-seaterround tables, 15 ten-seater rectangular tables, 121 six-seater rectangular tables, 10 ele-gant chairs, 2 299 popular chairs and 88 buffets. The following program might even do:40 ten-seater round tables, 120 six-seater round tables, 15 ten-seater rectangular tables,120 six-seater rectangular tables, 10 elegant chairs, 2 300 popular chairs and 90 buffets.

Something else is peculiar, and that is the ratio between the number of elegant chairs andthe number of popular chairs, and also the ratio between the total number of tables and

Page 36: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

30 STUDY UNIT 4 THE COMPUTER

the total number of chairs manufactured. If we place ten chairs at each ten-seater tableand six chairs at each six-seater table, then 313 [10+2299−10×(40+15)−6×(120+121) =313] chairs are available separately. This appears to be too many. Only ten elegant chairsare manufactured. This appears to be too few.

These figures may be correct, but they should be cleared with the sales manager. Johnasks him how they usually decide on the quantities of each type of chair to be manufac-tured. He then comments that although it is not explicitly stated in the contracts, theysee to it that each table is accompanied by a set of chairs because the dealers usually or-der a set of chairs with each table.

The sales department provides 60% of the ten-seater round tables, 40% of the ten-seaterrectangular tables, 50% of the six-seater round tables and 20% of the six-seater rectangu-lar tables with a set of elegant chairs. The remainder of the tables have popular chairs.Single chairs are also manufactured since the dealers sometimes order chairs separately.

This information implies more constraints and another computer run.

Exercise 4.3

Alter John’s model to match the number of chairs and tables. Solve the new model.

Solution to Exercise 4.3

Two constraints must be added. One to restrict the number of elegant chairs and one torestrict the number of popular chairs. Let us consider the constraint on the number ofelegant chairs.

Elegant chairs must accompany the following number of tables:

0,6×RT + 0,4×RcT + 0,5×RS + 0,2×RcS.

Each ten-seater table requires 10 chairs and each six-seater table 6 chairs. Thus the num-ber of elegant chairs to be manufactured is at least:

10×(0,6RT + 0,4RcT ) + 6×(0,5RS + 0,2RcS ).

Therefore, CE ≥ 6RT + 4RcT + 3RS + 1,2RcS.

For LINDO, this must be written with all variables on the left and a constant on theright, that is:

−6RT − 3RS − 4RcT − 1,2RcS6 + CE ≥ 0.

The constraint on the number of popular chairs is similarly deduced:

−4RT − 3RS − 6RcT − 4,8RcS + CP ≥ 0.

Call these constraints [11] and [12] respectively and add these constraints to John’s LINDOmodel.

This model has now been solved. The results of this computer run will be discussed indetail in the next section.

Page 37: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

StudyUnit 5

The solution

Theme:

Discussion of the solution to the furniture factory problem.

Contents5.1 Studying the solution . . . . . . . . . . . . . . . . . . . . . . . . . 32

5.2 The objective function . . . . . . . . . . . . . . . . . . . . . . . . 32

5.3 The variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

5.3.1 Status of variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

5.3.2 Shadow costs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

5.4 The constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

5.4.1 Status of constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

5.4.2 Shadow prices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

5.5 The ranging analysis . . . . . . . . . . . . . . . . . . . . . . . . . 40

5.5.1 Ranging analysis for objective function coefficients . . . . . . . . . . 41

5.5.2 Ranging analysis for right-hand sides of constraints . . . . . . . . . 42

Learning objectives

On completion of this study unit the student must

• understand and be able to explain the meaning of each item in the computer printedsolution to an LP model;

31

Page 38: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

32 STUDY UNIT 5 THE SOLUTION

• be able to read and explain the computer printed solution to a simple LP model.

5.1 Studying the solution

Let us take a closer look at the solution to John’s final model found in exercise 4.3 Johnused the LINDO package to solve his model. This package uses the simplex method tooptimise LP models. You learnt about the simplex method in second-level introductoryLP and we will assume that you have a basic knowledge of it. In the following sectionswe will study the computer solution in detail.

5.2 The objective function

The computer printout gives the optimal value of the objective function as:

LP OPTIMUM FOUND AT STEP 10

OBJECTIVE FUNCTION VALUE

1) 1 630 735

This means that the maximum profit when only relevant costs are considered is R1 630 735.Assume that during the four-week period the fixed costs are R550 076,88 and that theonly irrelevant costs are the direct labour costs which amount to R649 424,00. The profitof the business is then:

Income after relevant costs 1 630 735Less: Irrelevant costs 1 199 500

Fixed costs 550 076,88Direct labour costs 649 424,00

Profit 431 235,12

Things no longer look so bright. It now becomes clear why it is important for KnottyPine to manufacture an “optimal” product mix.

5.3 The variables

The optimal product mix can be read from the printout. The decision variables aregiven in the first column and their optimal value in the second column.

Page 39: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

5.3. THE VARIABLES 33

VARIABLE VALUE REDUCED COSTRT 0.000000 89.053764RS 86.328041 0.000000RCT 0.000000 59.263691RCS 236.385101 0.000000CE 542.646240 0.000000CP 1393.632568 0.000000B 80.678284 0.000000

Printout 5.1

It is interesting to compare this solution to the previous one in Printout 1.1.

The optimal solution of the first model, which ignored the relationship between the num-ber of chairs and the number of tables, indicated that 40 ten-seater round tables and 15ten-seater rectangular tables should be manufactured. For both products this was themaximum number allowed. If they were not bounded, the optimal values would surelyhave been greater. There were also very few elegant chairs, namely 9,930. In the newmodel, the solution indicates that no ten-seater tables and 542,646 elegant chairs shouldbe manufactured. It appears that the prerequisite that a certain ratio of the tables mustbe accompanied by elegant chairs, makes it unprofitable to manufacture ten-seater tables.This is something to bear in mind when considering ways of improving the profit situa-tion of the business.

5.3.1 Status of variables

Unfortunately the printout does not show the status of the variables, in other words,it does not show which variables are basic and which are non-basic. To see the statusof the variables, we must look at the final simplex tableau.

The final simplex tableau can be obtained with LINDO. Put John’s model into LINDOand solve it with SOLVE. With the model in the active window, activate the REPORTSmenu and select TABLEAU. The final simplex tableau appears in the REPORTS WIN-DOW. The basic variables are given in the second column (Basis column) and their opti-mal values in the last column.

THE TABLEAU

ROW (BASIS) RT RS RCT RCS CE CP1 ART 89.054 0.000 59.264 0.000 0.000 0.0001 SLK 2 0.015 0.000 0.016 0.000 0.000 0.0002 SLK 3 -0.012 0.000 -0.040 0.000 0.000 0.0003 SLK 4 0.142 0.000 0.168 0.000 0.000 0.0004 CE -0.774 0.000 -0.889 0.000 1.000 0.0005 CP 0.164 0.000 0.207 0.000 0.000 1.0006 SLK 7 0.054 0.000 0.066 0.000 0.000 0.0007 SLK 8 0.028 0.000 0.003 0.000 0.000 0.0008 SLK 9 0.002 0.000 0.026 0.000 0.000 0.0009 SLK 5 0.073 0.000 0.091 0.000 0.000 0.00010 B -0.109 0.000 -0.112 0.000 0.000 0.000

Page 40: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

34 STUDY UNIT 5 THE SOLUTION

11 RS 1.860 1.000 0.693 0.000 0.000 0.00012 RCS -0.295 0.000 0.860 1.000 0.000 0.000

ROW B SLK 2 SLK 3 SLK 4 SLK 5 SLK 6 SLK 71 0.000 0.000 0.000 0.000 0.000 1563.147 0.0001 0.000 1.000 0.000 0.000 0.000 0.004 0.0002 0.000 0.000 1.000 0.000 0.000 -1.114 0.0003 0.000 0.000 0.000 1.000 0.000 0.104 0.0004 0.000 0.000 0.000 0.000 0.000 6.081 0.0005 0.000 0.000 0.000 0.000 0.000 -6.361 0.0006 0.000 0.000 0.000 0.000 0.000 -0.132 1.0007 0.000 0.000 0.000 0.000 0.000 -1.274 0.0008 0.000 0.000 0.000 0.000 0.000 -0.148 0.0009 0.000 0.000 0.000 0.000 1.000 -0.217 0.00010 1.000 0.000 0.000 0.000 0.000 -0.012 0.00011 0.000 0.000 0.000 0.000 0.000 3.409 0.00012 0.000 0.000 0.000 0.000 0.000 -3.456 0.000

ROW SLK 8 SLK 9 SLK 10 SLK 12 SLK 131 0.00E+00 0.00E+00 0.20E+03 22. 1.2 0.16E+071 0.000 0.000 -0.016 -0.005 -0.002 36.1042 0.000 0.000 0.013 -0.025 -0.019 124.6823 0.000 0.000 -0.089 -0.027 0.001 181.9434 0.000 0.000 -0.590 -0.449 0.198 542.6465 0.000 0.000 1.078 0.024 -0.807 1393.6336 0.000 0.000 -0.029 0.017 0.026 135.0027 1.000 0.000 0.127 0.005 -0.039 239.4198 0.000 1.000 0.000 0.001 -0.001 94.9449 0.000 0.000 -0.048 0.041 0.050 27.29510 0.000 0.000 0.020 0.024 0.016 80.67811 0.000 0.000 -0.382 0.242 0.067 86.32812 0.000 0.000 0.463 -0.146 -0.002 236.385

The basic variables have values that are such that the constraints and sign re-quirements are met.

RT and RcT do not appear in the second column of the simplex tableau and are there-fore non-basic variables. They take on the values of their lower bounds, which in this caseis zero.

A non-basic variable will always have the value of one of its bounds. For example, ifthe variable must simply be greater than or equal to zero, it will be zero if it is non-basic.This is the general definition of non-basic, which is probably known to you. In advancedprograms (such as LINDO/LINGO) simple upper and lower bounds on variables are nothandled as constraints but as sign restrictions, or rather feasibility restrictions, and the

Betina
Highlight
Betina
Highlight
Page 41: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

5.3. THE VARIABLES 35

definition of non-basic is then extended. If a variable must lie between say 7 and 10, itmay be either 7 or 10 if it is non-basic. A basic variable is usually unequal to zero, ormore generally stated, it is unequal to its bounds.

From Printout 4.1 we see that RT, RS and RcT have values of 40, 120 and 15 respec-tively. These are the values of the upper bounds on these variables and therefore theyare non-basic variables. Check to see whether this is true by looking at the final simplextableau of John’s initial model (given in Solution to Exercise 3.1).

5.3.2 Shadow costs

Go back to Printout 5.1. The third column gives the reduced cost (also called shadowcost). The reduced costs of the basic variables are zero. This is always the case. Thereduced costs of the non-basic variables are unequal to zero. This is usually thecase. You will understand these concepts when you get to chapter 2.

The reduced cost of a non-basic variable is the amount by which the value ofthe objective function will weaken if the value of the variable is increased byone unit. If, for example, Knotty Pine decides to manufacture one ten-seater round ta-ble and the quantities of the other products change accordingly to maintain feasibility,the value of the objective function will decrease by R89,05. We talk of a reduced costsince the figure, R89,05, is the cost of a sub-optimal decision. It is optimal to manufac-ture zero ten-seater round tables, and if we manufacture one such table, it must lead to alower profit value.

Notice that the reduced cost represents a weakening in the objective function value, whichmeans a decrease for a maximisation problem and an increase for a minimisation prob-lem. Notice also that a negative reduced cost indicates a strengthening in the ob-jective function value, which means an increase for a maximisation problem and a de-crease for a minimisation problem.

An alternative definition for reduced cost is the following: The reduced cost of anon-basic variable is the amount by which the objective function coefficient of the non-basic variable concerned must be improved before that variable will become a basic vari-able in some optimal solution to the LP.

Reduced costs are so-called marginal costs, in other words, they give us the asso-ciated change in the objective function value per unit change in a variable for a smallchange in the specific variable. The word “small” indicates that a reduced cost is validover a confined range only. Consider the reduced cost of RT, which is R89,05. We cansay with certainty that if one ten-seater round table is made, the profit will decrease byR89,05. We cannot, however, say that if say 100 ten-seater round tables are made, theprofit will decrease by R8 905,00. Unfortunately LINDO gives us no indication ofthe range over which the reduced cost of a variable is valid. One must thereforebear in mind that the range is bounded, and investigate the result of larger changes in

Betina
Highlight
Betina
Highlight
Betina
Highlight
Betina
Highlight
Betina
Highlight
Betina
Highlight
Page 42: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

36 STUDY UNIT 5 THE SOLUTION

the value of a variable by additional computer runs.

5.4 The constraints

The printout gives the constraints and the value of their slack or surplus. It is al-ways advisable to name the constraints, as these constraint names will then be given inthe printout. If you do not name the constraints, then only the row numbers are given inthe printout where the constraints appear. This makes it rather difficult to interpret theprintout.

ROW SLACK OR SURPLUS DUAL PRICES1) 36.103779 0.0000002) 124.681747 0.0000003) 181.942932 0.0000004) 27.295242 0.0000005) 0.000000 1563.1473396) 135.001694 0.0000007) 239.418640 0.0000008) 94.943787 0.0000009) 0.000000 199.250961

10) 0.000000 166.59669511) 0.000000 -22.37027912) 0.000000 -1.199875

Printout 5.2

The optimal product mix does not use up all the available wood (the value of the slackon the WOOD constraint is 36,104, which means that 36,104 m3 of the 100 m3 woodis unused). It does not use up all the available hours on the bench-saws, thicknesser-planers, planers, tenon-saws, band-saws and the spray gun either, as these constraintshave positive slack values.

All the available hours on the routers and all the available man-hours in the joining andfinishing section are used up as these constraints have zero slack.

The left-hand sides of the two constraints [11] and [12] evaluate to zero. What does thismean? Let us consider [11]. Remember that this constraint specifies the relationship be-tween the number of elegant chairs and the number of tables. This constraint states thatthe difference between the number of elegant chairs manufactured and the number of el-egant chairs manufactured to form suites together with a table, must be at least zero.This constraint thus states that the number of separate chairs manufactured must be atleast zero. The activity level of a constraint can be obtained by substitutingthe values of the variables into the constraint. If this is done for this constraint,we find that its activity level is zero. This means that no separate chairs are manufac-tured. A similar argument holds for [12].

Page 43: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

5.4. THE CONSTRAINTS 37

5.4.1 Status of constraints

A constraint has a certain status, which is either binding or non-binding. The statusmust be deduced from the printout.

Before we continue, let us refresh our memories on slack and surplus variables.

Consider a ≤ constraint such as 3x + 4y ≤ 10. This can be written as an equality byadding a slack variable s1 as follows:

3x + 4y + s1 = 10.

A ≥ constraint such as 5x + 6y ≥ 12 can be written as an equality by subtracting asurplus variable s2 as follows:

5x + 6y – s2 = 12.

One will therefore always find slack in a ≤ constraint and surplus in a ≥ constraint.

When a constraint has slack (≤ constraint), the activity level of the constraint islower than its limit. This means that the constraint does not use up all the available re-source and is non-binding. WOOD[1], for example, has slack of 36,104. This representsunused wood. We also see that there are 124,682 unused hours on the bench-saws. Thismeans that a bench-saw team has no work for 124,682 hours. This is approximately 20%of the available time.

A constraint (≥ constraint) may have a surplus, which means that the activity levelof the constraint is larger than its limit. This means that the constraint more than meetsthe requirement and is non-binding.

In a binding constraint the activity level of the constraint is exactly equal to thelimit of the constraint.

The binding constraints determine the optimal values of the decision var-iables and the objective function. In this case they prevent the objective functionvalue from increasing. The factors that determine these constraints must be examined ifa larger profit is required. We see here that the product mix is determined by the numberof hours available on the routers, the number of team-hours in the joining and finishingsection, the requirement that a certain number of tables must be accompanied by buffetsand the requirement that all tables must be accompanied by a set of chairs.

If the profit is to be improved, the factors that determine these constraints must be con-sidered. Questions such as the following should be raised: “Should more routers be ac-quired? Can the amount of work required for a table/chair/buffet on a router be reduced?Is it really necessary for 50% of the ten-seater tables and 25% of the six-seater tables tobe accompanied by a buffet? What effect will it have on the demand for the other prod-ucts if these percentages are cut? Is it really necessary for each table to be accompaniedby a set of chairs, and is the ratio between the number of popular chairs and the numbersof elegant chairs to be manufactured correct?”

Betina
Highlight
Betina
Highlight
Betina
Highlight
Betina
Highlight
Betina
Highlight
Betina
Highlight
Betina
Highlight
Betina
Highlight
Betina
Highlight
Betina
Highlight
Betina
Highlight
Page 44: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

38 STUDY UNIT 5 THE SOLUTION

All of these questions can be investigated with the help of the computer. It is important,however, to remember that the model is to fulfil a supporting role only. The computercan tell us what the financial results of a certain action will be and how the product mixshould change. Production/Marketing/Management should, however, judge whether theaction is advisable and practically feasible. There may not be enough space on the fac-tory floor for another router, or a decrease in the availability of buffets may lead to adrastic reduction in the demand for six-seater rectangular tables.

5.4.2 Shadow prices

Go back to Printout 5.2. Dual prices are given in the last column. The dual price of aconstraint, also called the shadow price, is the amount by which the value ofthe objective function will strengthen if the right-hand side or limit of a con-straint is increased by one unit. This strengthening means that in a maximisationproblem, the value of the objective function will increase, and in a minimisation problemit will decrease.

We see that all the non-binding constraints, in this case the constraints with slack,have shadow prices equal to zero. This makes sense. If we obtain more of a resourcethat is not scarce, the unused amount of the resource increases, while the optimal solu-tion remains unchanged. WOOD[1] has 36,104 m3 of unused wood. If we buy more woodfor production, the amount of unused wood will increase, while there is no change in theoptimal solution.

Dual prices are called shadow prices as a shadow price indicates the maximum price atwhich it will be worthwhile to obtain an additional unit of the resource concerned. Let usexplain.

The shadow prices of the binding constraints are all unequal to zero. Considerthe constraint on routers[5]. Its shadow price is 1 563,15, which means that the objectivefunction value will increase by R1 563,15 for each additional hour of router time that ismade available. Thus, if Knotty Pine can make an extra hour available at a price lowerthan R1 563,15, it will be worthwhile to do so, otherwise not.

Similar to the shadow costs (reduced costs), the shadow prices are also marginal prices.We can say that the objective function value will strengthen by R1 563,15 per unit changefor a small increase in the right-hand side of the routers[5] constraint. Here, however,LINDO provides the range over which the shadow price will be valid. Themaximum allowable increase is given as 9,876 in the ranging analysis section of the print-out (more about this later).

Profit will increase by R1 563,15 for every extra hour of router time added. This is trueup to a maximum of 9,876 extra hours. Therefore, we can pay up to R15 437,67(9,876 × R1 563,15) for the first 9,876 extra hours that are obtained. Thereafter, the op-timal basis changes and a new shadow price will apply.

Shadow prices may be positive, negative or zero amounts.

Betina
Highlight
Betina
Highlight
Betina
Highlight
Page 45: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

5.4. THE CONSTRAINTS 39

Note the following about the signs of shadow prices:

• a ≤ constraint always has a non-negative shadow price; this is true since if theright-hand side, or limit, of the constraint increases, the constraint slackens (it be-comes less strict and thus causes an enlargement of the feasible area), which mayresult in a strengthening in the value of the objective function;

• a ≥ constraint always has a non-positive shadow price; this is true since if theright-hand side of the constraint increases, the constraint becomes stricter, whichmay result in a weakening in the value of the objective function;

• a = constraint may have a positive, a negative or a zero shadow price.

To make the interpretation of shadow prices easier, note the following:

• a positive shadow price is the amount by which the objective function valuewill strengthen if the right-hand side of the constraint is increased by one unit;

• a positive shadow price is the amount by which the objective function valuewill weaken if the right-hand side of the constraint is decreased by one unit;

• a negative shadow price is the amount by which the objective function valuewill weaken if the right-hand side of the constraint is increased by one unit;

• a negative shadow price is the amount by which the objective function valuewill strengthen if the right-hand side of the constraint is decreased by oneunit.

Exercise 5.1

Suppose that it will cost R10 000 to repair the router which is giving problems (see sec-tion 5.6). Will it be worthwhile to repair it?

Solution to Exercise 5.1

The router that is giving problems is not available for 5% of the time. If it is repaired,8,5 (0,05 × 170) extra router hours will become available per month. This means thatthe profit will increase by R13 286,78 (8,5 × R1 563,15). The increase in profit for onemonth already covers the cost of repairing the router. It will, without any doubt, beworth having it repaired.

Exercise 5.2

(a) How would you interpret the shadow price of the constraint on labour[9]?

(b) How would you interpret the shadow price of constraint [11]?

Solution to Exercise 5.2

(a) Constraint [9] is the constraint on the number of available team-hours in the joiningand finishing section.

Page 46: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

40 STUDY UNIT 5 THE SOLUTION

This constraint is binding, which means that 100% of the capacity of this section isutilised, and this restricts the level of production.

If it costs R199,25 or less to obtain additional team-hours, it will be worth increas-ing the number of available team-hours. This rate is valid for up to an additional225,99 hours (from ranging analysis).

One extra team will add 170 hours, which is less than the maximum allowable in-crease of 225,99 hours. Suppose that a skilled worker is paid R30,00 per hour andan unskilled worker R15,00 per hour.

The cost of an additional team is then R30,00 + (3 × R15,00) = R75,00 per hour.less than the additional profit of R199,25. It is therefore worthwhile to employ an-other team of workers.

(b) The constraint [11] has a negative shadow price. This means that the value ofthe objective function will decrease by R22,37 if the right-hand side of this con-straint is increased by one unit.

The constraint states that the number of separate chairs (the total number of chairs mi-nus the number of chairs supplied together with a table) must be greater than or equal tozero.

The negative shadow price indicates that it will not be worthwhile increasing the cur-rent minimum number of separate chairs above zero unless this increase is accompaniedby an additional income of at least R22,37 per unit. If Knotty Pine enters into a con-tract to manufacture 100 separate elegant chairs at the same price as they manufacturechairs with tables, the value of the objective function will decrease by 100 × R22,37 =R2 237,00. If they can, however, negotiate a price for the separate chairs that is in excessof R22,37 more than the price for chairs supplied together with tables, it will be prof-itable. This is true for up to 356 separate chairs (from the ranging analysis).

5.5 The ranging analysis

The ranging analysis indicates the range of values for the coefficients of the objectivefunction and the right-hand sides of the constraints for which the current basis will re-main optimal.

The ranging analysis is based on the assumption that only one parameter changes at anygiven time. It indicates the allowable increase and allowable decrease in the value of aparameter without the current optimal basis changing, provided that all other parame-ters remain unchanged. When we say that the current basis will not change, we do notmean that all numerical values will remain the same, but that the variables that are ba-sic will remain basic and those that are non-basic will remain non-basic. Furthermore,constraints that are binding will remain binding and those with slack or surplus will still

Page 47: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

5.5. THE RANGING ANALYSIS 41

have slack or surplus. Most of the numerical values will actually remain the same, butsome values will change.

The ranging analysis section of the LINDO printout is given in Printout 1.4 below.

RANGES IN WHICH THE BASIS IS UNCHANGED:

OBJ COEFFICIENT RANGESVARIABLE CURRENT ALLOWABLE ALLOWABLE

COEF INCREASE DECREASERT 2396.870117 89.053780 INFINITYRS 1994.449951 521.590454 17.992620

RCT 2197.419922 59.263706 INFINITYRCS 1867.369995 152.734665 68.912552CE 575.390015 49.813747 6.052891CP 353.970001 1.486361 184.749878B 2622.790039 530.308472 73.654297

RIGHTHAND SIDE RANGESROW CURRENT ALLOWABLE ALLOWABLE

RHS INCREASE DECREASE1 100.000000 INFINITY 36.1037792 629.000000 INFINITY 124.6817473 510.000000 INFINITY 181.9429324 340.000000 INFINITY 27.2952425 501.500000 9.875972 25.3199816 323.000000 INFINITY 135.0016947 340.000000 INFINITY 239.4186408 170.000000 INFINITY 94.9437879 4250.000000 225.985779 88.14498110 0.000000 90.932350 422.03469811 0.000000 356.393860 139.01020812 0.000000 548.279480 504.925140

Printout 5.3

5.5.1 Ranging analysis for objective function coefficients

The ALLOWABLE INCREASE (AI) column indicates the maximum allowable in-crease in an objective function coefficient so that the current basis remains optimal.Similarly, the ALLOWABLE DECREASE (AD) column indicates the maximum allow-able decrease in an objective function coefficient so that the current basis remainsoptimal. We will illustrate this by first considering non-basic variables and by then con-sidering basic variables.

Consider the non-basic variables RT and RcT. The current objective function coeffi-

Page 48: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

42 STUDY UNIT 5 THE SOLUTION

cient of RT is 2 396,87 with an AI of 89,05 and an AD of infinity. What does this mean?Since RT is non-basic and zero, it is not profitable to manufacture ten-seater round ta-bles. If the profit per table is reduced, RT remains non-basic and zero and it thereforeremains unprofitable to manufacture this item. If the per unit profit of RT increases byany amount up to and including 89,05, it still remains unprofitable to manufacture thisitem. If, however, it is increased by more than 89,05, the optimal basis will change. Wecannot say what the new solution will be, but can expect RT to be basic and positive inthe new solution.

In other words, the range may be used to answer questions such as: “What will happenif the price of ten-seater round tables is increased by R5? And by R10?” Remember theassumption is that all other prices and parameters remain unchanged. Thus we cannotanswer a question such as: “What will the result be if we redesign the ten-seater roundtables so that less wood is used to manufacture them?”, because not only will the profitfigure of RT change if less wood is used, but also the coefficient of RT in the WOOD[1]constraint. We are also unable to answer a question such as: “What will happen if theprices of all four types of tables change?”

Now try to evaluate for yourself the meaning of the range for the objective function coef-ficient of RcT. Answer the question: “By how much must the price of ten-seater rectan-gular tables increase before it becomes profitable to manufacture them?” Compare youranswer to the shadow cost (reduced cost) of RcT. Does it tally with what the shadowcost indicates?

Let us now consider the objective function coefficient of a basic variable, for ex-ample, the coefficient of RcS. The AI is 152,73 and the AD is 68,91. The current value ofthe unit profit figure for six-seater rectangular tables is 1 867,37. In other words, as longas the profit per six-seater rectangular table lies between R1 798,46 (1 867,37 – 68,91) andR1936,28 (1 867,37 + 68,91), the optimal basis remains as it is, provided that all otherprofit figures and parameters remain unchanged.

For example, if we increase the price of six-seater rectangular tables by R100, which isless than the allowable increase of 152,37, the profit per unit becomes R1 967,37 andKnotty Pine must still manufacture 236,385 six-seater rectangular tables and the samequantities of the other products. The value of the objective function will increase by(R100 × 236,385) R23 638,50. We do not have the information to predict how the opti-mal product mix will change if the price of six-seater rectangular tables is increased byR160. We can only say that it will differ from the current one. An additional computerrun, after changing the objective coefficient of RcS, will supply the answer.

5.5.2 Ranging analysis for right-hand sides of constraints

Firstly we study a non-binding constraint, for example wood[1]. The right-hand sideof the constraint wood[1] represents the quantity of available wood. The AI is infinityand the AD is 36,104. As long as the right-hand side of wood is 63,896 or more, the cur-

Page 49: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

5.5. THE RANGING ANALYSIS 43

rent solution is optimal. This tallies with the fact that the current optimal product mixuses 63,896 m3 of wood. Any quantity of wood exceeding this will not be used and willbe kept for the next production-planning period. If, however, less than 63,896 m3 of woodis available, the current optimal solution will no longer be feasible. It is therefore per-fectly logical that the current solution remains optimal as long as the quantity of woodis greater than or equal to 63,896. A similar argument holds for the other non-bindingconstraints.

What about the binding constraints? Let us consider the right-hand side of the routers[5]constraint. This gives the number of machine-hours on the routers and is currently 501,5.The AI is 9,876 and the AD is 25,32. Suppose, for example, the number of hours on therouters increases from 501,5 to 510, an increase of 8,5 hours. RT and RcT will remainnon-basic while the other variables will remain basic. The values of the basic variablesand the objective function may and will indeed change. We cannot predict the changesin the values of the basic variables without an additional computer run, but by using theshadow price of the routers[5] constraint, we can predict that the value of the objectivefunction will increase by (8,5 × 1 563,15) R13 286,78.

The ranging analysis also indicates how accurate our figures should be. Suppose that wemade very rough approximations and assumptions when calculating the unit profit fig-ures and we can only say that they are within R1 of the actual profit figures. The profitfigure for popular chairs is R353,97 and its allowable increase is only 1,49. This indicatesthat we may have an “incorrect” solution and we should go back and try to calculate theprofit figure more accurately. One will have to compare the cost of an incorrect solutionwith the cost of obtaining more accurate figures in order to decide whether the latter isworthwhile or not.

Exercise 5.3

(a) Suppose that Knotty Pine receives an order for 100 popular chairs not accompaniedby tables. What is the minimum price they should ask per chair? For how manysingle chairs is this price applicable?

(b) Suppose that there is only 50 m3 of wood available for the next production period.The purchasing manager can, however, obtain an additional 10 m3 of pine at a priceof R6 000 per m3. Should she do so?

(c) How does the solution change if the price of elegant chairs is increased by R40?How does the solution change if the price is increased by R60?

Solution to Exercise 5.3

(a) If we wish to plan for at least 100 popular chairs not accompanied by tables, wemust change the right-hand side of the constraint [11] to 100. The shadow priceof this constraint is –1,2. This means that the objective function will decrease byR1,20 for each unit increase in the right-hand side of the constraint. This shadowprice holds for any increase up to 548,279 (from the ranging analysis).

Page 50: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

44 STUDY UNIT 5 THE SOLUTION

Therefore, Knotty Pine must add at least R1,2 to the price of each popular chairsold on its own. This price is valid for up to 548 single chairs sold.

(b) If the right-hand side of the WOOD constraint changes to a value less than 63,896,the current basis is no longer feasible. An additional computer run with the right-hand side of the WOOD constraint set at 50 is required to answer this question.

In the new solution, WOOD is binding with a shadow price of R10 084,092. Thisshadow price is valid if the right-hand side of WOOD is increased by a maximum of12,022 and decreased by a maximum of 6,69.

The normal price of wood is R5 000 per m3. This cost was taken into account withthe calculation of the objective function coefficients of the products. Therefore, wemust only compare the extra R1 000 m3 to the shadow price of WOOD to decidewhether this purchase is worthwhile or not.

Since 1 000 < 10 084,092, we conclude that it is worthwhile for Knotty Pine to buyanother 10 m3 of wood at a price which is R1 000 more than the normal price.

(c) The objective function coefficient of CE may increase by a maximum of 49,82 with-out affecting the current optimal basis. If the price of elegant chairs increases byR40, this is less than the maximum allowable increase and the optimal solution willnot change.

Only the value of the objective function will change.

It will increase by 542,646 × R40 = R21 705,84, as 542,646 elegant chairs are made.

If the price of elegant chairs is increased by R60, the objective function coefficientof CE increases to 635,39. This increase is more than the maximum allowable in-crease and the solution will change. To determine how it will change, we must changethe objective function coefficient of CE from 575,39 to 635,39 and do another com-puter run. (Remember to change the right-hand side of WOOD back to 100!)

The new solution is:

RcS = 288,58; CE = 702,7; CP = 1 385,2; B = 72,15;

PROFIT = 1 664 924.

A total of 160 single elegant chairs are supplied.

Page 51: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

StudyUnit 6

Summary and problems

Theme:

Summary of the chapter and additional problems.

Contents6.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

6.2 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

6.3 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Learning objectives:

On completion of this study unit the student must

• understand the complete modelling process and be able to describe it orally;

• be able to formulate a simple problem as an LP model, solve it with the computerand describe and explain the solution;

• be able to use the model to investigate the effect of changes;

• be able to convey the results of an investigation in written form.

45

Page 52: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

46 STUDY UNIT 6 SUMMARY AND PROBLEMS

6.1 Summary

In this chapter we have looked at the whole linear programming process, from the recog-nition of a problem situation to the implementation of a solution. In the process we havegiven a lot of attention to the formulation of the problem and the construction of the lin-ear programming model, as well as to the analysis of the computer solution. These con-stitute two important areas in which the operations researcher can make a large contribu-tion with his knowledge of operations research techniques.

Anyone can run a computer program, but the construction of a model and the analysisof the results require expertise. We are convinced that the person who knows a techniquewell, is the person who can use it efficiently and effectively. This, then, will be our objec-tive in the following chapters, namely to equip you with knowledge and skills to enableyou to make a unique contribution in practice where it is needed.

We also showed how important it is to communicate the results of an LP investigationin the form of a written report and an oral presentation. Without this, the power of LPand, in fact, of Decision Sciences/Operations Research, is limited.

6.2 Problems

Problem 6.1

Consider the problem of the stuffed bears in Exercise 3.2. Solve the model formulated torepresent this problem with LINDO.

1. In each of the cases below try to predict as completely as possible the effect thata change in the value of a parameter will have on the solution. State in each casewhich values will change and, if possible, what the new values will be. Make thenecessary changes in the LINDO model and then establish what the effect of thechange is. Compare this with your prediction. Try to explain any differences be-tween your prediction and the LINDO outputs. (Remember to use the originalmodel in each case, in other words, after testing the effect of a change in one pa-rameter, you must change it back to its original value before changing the next pa-rameter.)

(a) How does the solution change if the selling price of PAPAS is increased by R5to R70?

(b) How does the solution change if the selling price of PAPAS is decreased by R3to R62?

(c) How does the solution change if the selling price of PAPAS is increased by R7to R72?

Page 53: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

6.3. SOLUTIONS 47

(d) How does the solution change if the selling price of MAMAS is increased by20c to R44,60?

(e) How does the solution change if the selling price of MAMAS is increased byR1,60 to R46?

(f) How does the solution change if there is only 470 kg of stuffing available andnot 500 kg?

(g) How does the solution change if there is 705 m2 of material available and not700 m2?

(h) How does the solution change if there is only 550 m2 of material available andnot 700 m2?

(i) How does the solution change if there is 750 m2 of material available?

(j) How does the solution change if an additional worker is employed for 40 hoursper week at R5 per hour?

(k) The optimal production mix includes no MAMAS. Management decides to in-clude a couple of MAMAS in the production lot even though it is sub-optimal.They feel that there should be at least 50 MAMAS in the production lot.What effect will this decision have?

(l) How does the optimal solution change if the material costs R10 per m2 andnot R8 per m2?

2. Use LINDO to obtain the necessary information and then draw graphs of the fol-lowing:

(a) The shadow price of the stuffing against the quantity of stuffing available.

(b) The optimal profit against the quantity of material available.

(c) The number of PAPAS to be manufactured against its price.

6.3 Solutions

Solution to Problem 6.1

LINDO’s solution to the model is as follows:

LP OPTIMUM FOUND AT STEP 2

OBJECTIVE FUNCTION VALUE

1) 4783.333

VARIABLE VALUE REDUCED COST

Page 54: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

48 STUDY UNIT 6 SUMMARY AND PROBLEMS

PAPAS 0.000000 0.783333MAMAS 166.666672 0.000000BABAS 600.000000 0.000000

ROW SLACK OR SURPLUS DUAL PRICESSTUFF) 33.333332 0.000000

MAT) 0.000000 3.833333MAN-HRS) 0.000000 1.050000

MIX) 266.666656 0.000000

NO. ITERATIONS= 2

RANGES IN WHICH THE BASIS IS UNCHANGED:

OBJ COEFFICIENT RANGESVARIABLE CURRENT ALLOWABLE ALLOWABLE

COEF INCREASE DECREASEPAPAS 13.000000 0.783333 INFINITYMAMAS 8.900000 2.100000 0.361538BABAS 5.500000 0.783333 1.050000

RIGHTHAND SIDE RANGESROW CURRENT ALLOWABLE ALLOWABLE

RHS INCREASE DECREASESTUFF 500.000000 INFINITY 33.333332MAT 700.000000 49.999996 100.000008

MAN-HRS 2000.000000 333.333344 133.333328MIX 0.000000 266.666656 INFINITY

(a) Prediction

If the selling price of PAPAS is increased by R5, the profit per unit will increaseby R5 from R13 to R18. This increase is less than the AI of 5,333 by which the ob-jective function coefficient of PAPAS may increase without changing the optimalbasis.

Therefore, the basic variables will remain basic. Their optimal values will also re-main unchanged. The activity levels of the constraints as a result also remain con-stant. The only change will be the value of the objective function, which will in-crease by

R5 × 76,923 = R384,615. The profit will therefore be 4 723,077 + 384,615 = R5107,692,

that is, R5 107,69 rounded off.

LINDO’s answer

As above.

Page 55: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

6.3. SOLUTIONS 49

Note that the following have also changed:

• the shadow cost of MAMAS (now 1,985);

• the shadow prices of MAT and MAN HRS (now 7,077 and 0,077);

• the range for the objective function coefficient of MAMAS (the AI is now1,985);

• the range for the objective function coefficient of BABAS (AI now 5,75 andAD now 0,1).

The values of these figures appear to depend on the values of the objective functioncoefficients relative to each other.

(b) Prediction

If the selling price of PAPAS is decreased by R3, the profit per unit decreases fromR13 to R10. This decrease is more than the AD of 0,733 by which the objectivefunction coefficient of PAPAS may decrease without changing the optimal basis.

Therefore, the solution will change. We can expect PAPAS to be non-basic andequal to zero in the new solution. More than this cannot be predicted.

LINDO’s answer

The computer output tallies with the prediction. PAPAS have become non-basicand MAMAS basic. Most of the numeric values have changed.

Notice that the lower limit of the range for the objective function coefficient ofPAPAS 12,267 (13 – 0,733) is now the upper limit of its new range (10 + 2,67).

(c) Prediction

If the selling price of PAPAS is increased by R7, the profit per unit increases fromR13 to R20. This increase is larger than the AI of 5,33 by which the objective func-tion coefficient of PAPAS can increase without changing the optimal basis.

The solution will change, but we can expect PAPAS to remain basic and greaterthan zero in the new solution. More than this cannot be predicted.

LINDO’s answer

The computer output tallies with the prediction. Nearly all the figures have changed.PAPAS are still basic, but we notice that STUFF that had slack, has now becomebinding and MAN HRS which was binding now has slack. Note that the upperlimit of the range for the objective function coefficient of PAPAS 18,333 (13 +5,333) is the lower limit of its new range (20 – 1,667).

(d) Prediction

If the selling price of MAMAS is increased by 20c, the profit per unit is increasedby 20c from R8,90 to R9,10. This increase is less than the AI of 0,254 by which

Page 56: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

50 STUDY UNIT 6 SUMMARY AND PROBLEMS

the objective function coefficient of MAMAS can increase without the optimal ba-sis changing. Nothing will change, except the shadow cost of MAMAS, which willprobably be smaller than at present, and possibly the ranges for the objective func-tion coefficients of PAPAS and BABAS.

LINDO’s answer

The prediction is correct. The shadow cost of MAMAS has declined by 20c, whichmatches exactly the increase in the objective function coefficient of MAMAS. Thelower limits of the range for the objective function coefficients of PAPAS and BABAShave increased, but the upper limits have not changed. Think about whether this islogical or not.

(e) Prediction

If the selling price of MAMAS increases by R1,60, the profit per unit will increaseto 10,50. This increase is greater than the AI of 0,254 by which the objective func-tion coefficient of MAMAS can increase without the optimal basis changing.

The solution will therefore change and we can expect MAMAS to be basic andgreater than zero in the new solution. More than this cannot be predicted.

LINDO’s answer

The prediction is correct. The basis changes with MAMAS becoming basic and PA-PAS non-basic. Most of the figures change.

Note that the upper limit of the range for the objective function coefficient of MA-MAS 9,154 (8,9 + 0,254) is now the lower limit of its new range (10,5 – 1,346).

(f) Prediction

If only 470 kg of stuffing is available, the right-hand side of the constraint STUFFchanges to 470. This decrease is more than the AD of 7,692.

The solution will thus change in its entirety. STUFF will possibly become binding.We can expect the upper limit of the new range for the right-hand side of STUFFto be equal to the present lower limit of 492,308 (500 – 7,692).

LINDO’s answer

The solution changes. STUFF becomes binding and MAMAS becomes basic. Theupper limit of STUFF is indeed 470 + 22,308 = 492,308.

(g) Prediction

If there is 705 m2 of material available, the right-hand side of the constraint MATwill increase by 5 to 705. This increase is less than the AI of 8,333 by which it mayincrease without changing the optimal basis.

Variables that are basic will remain basic and constraints with slack or surplus willnot become binding. However, we can expect the values of the variables and the

Page 57: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

6.3. SOLUTIONS 51

activity levels of the constraints to differ. To what extent, is difficult to say. Theobjective function must also increase because a constraint is slightly relaxed. Wecan use the shadow price to predict by how much. The increase will be R3,231 × 5= R16,155, therefore the profit will be R4 723,077 + R16,155 = R4 739,232.

LINDO’s answer

It tallies with the prediction. It is interesting to note that the number of PAPASin the optimal solution has increased, while the number of BABAS has decreased.This result is contrary to intuition. The shadow costs and prices and the rangesfor the objective function coefficients have not changed, neither has the range forthe right-hand side of MAT. The ranges for the right-hand sides of the other threeconstraints have changed, which indicates that these ranges depend on the values ofthe right-hand sides, relative to each other.

(h) Prediction

The right-hand side of the constraint MAT changes to 550 and the decrease of 150is more than the AD of 100.

The optimal basis will therefore change. It is difficult to say how, because we ex-pect MAT to remain binding. We also expect the present lower limit of the rangefor the right-hand side of MAT, 600, to become the upper limit of its new range.

LINDO’s answer

It is true. In the new solution MAT remains binding, but MAN HRS now has slackand PAPAS has become non-basic. The shadow price of MAT has increased to7,333. This is considerably larger than it was. This is logical as the material is now“scarcer” than it was, so that we should be prepared to pay more to obtain it.

(i) Prediction

The right-hand side of the constraint MAT changes to 750 and the increase of 50 ismore than the AI of 8,333.

The optimal basis will therefore change. We expect MAT to have slack in the newsolution and the upper limit of the present range for the right-hand side of MAT,708,333, to become the lower limit of its new range.

LINDO’s answer

The prediction is correct. MAT now has slack, while STUFF and MIX have becomebinding. MAMAS is now basic.

Surprisingly, the lower limit of the range for the right-hand side of MAT is 733,333and not 708,333. Why is this so? Our guess is that a solution exists between theoriginal one and this one, for which the limits for the range of the right-hand sideof MAT are 708,333 and 733,333. You may test whether this is true by using anyvalue between 708,333 and 733,333 as the right-hand side of MAT.

Page 58: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

52 STUDY UNIT 6 SUMMARY AND PROBLEMS

(j) Prediction

If an additional 40 man-hours become available, the right-hand side of the con-straint MAN HRS increases to 2 040. This increase of 40 is less than the AI bywhich it may increase without influencing the optimal basis. Only the values ofthe basic variables and the activity levels of the constraints with slack and sur-plus will change. The objective function will increase by R1,231 × 40 = R49,24 toR4 772,32.

We can also expect a change in the limits for the ranges of the right-hand sides ofSTUFF, MAT and MIX.

LINDO’s answer

The prediction is correct.

(k) Prediction

The shadow cost of the product MAMAS is R0,254. This means that the profit willdecrease by R0,254 for each increase of one unit in the number of MAMAS pro-duced. However, we do not know for how many MAMAS this shadow cost will ap-ply. The shadow cost may change at some point and will then be higher than 0,254.Do you agree?

If the lower bound of the decision variable MAMAS changes from 0 to 50, the profitof the new optimal solution will be at least 50 × R0,254 = R12,70 less than thecurrent maximum profit of R4 723,08. The profit will be R4 723,08− R12,70, that isR4 710,38 or less.

The optimal product mix will contain exactly 50 MAMAS and no more, as the pos-itive shadow cost indicates that more MAMAS will decrease the profit that we aretrying to maximise. We can expect the optimal quantities of the variables PAPASand BABAS and the activity levels of the constraints to change. It is impossible topredict these changes without further ado.

If the basis does not change, the shadow costs and shadow prices and the ranges forthe objective function coefficients will remain unchanged. We can expect a changein the ranges for the right-hand sides of the constraints.

LINDO’s answer

The original basis remains optimal and the figure values change as predicted.

The effect of a change in the bounds of a variable appears to follow the same pat-tern as the effect of a change in the right-hand side of a constraint. We could in-deed have modelled the requirement of at least 50 MAMAS as a constraint insteadof as a lower bound on the value of the decision variable. This would have the ad-vantage that we would be able to find the range within which the right-hand side ofthis constraint may vary without influencing the optimal basis

Page 59: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

6.3. SOLUTIONS 53

(l) Prediction

If the material costs R10 per m2 and not R8, it means that our unit profit figuresare no longer correct. They must be changed as follows:

Product Profit per unitPAPAS R13,00 – R5,00 = R8,00MAMAS R 8,90 – R3,00 = R5,90BABAS R 5,50 – R1,50 = R4,00

Three parameters of the model will change and we cannot predict the results ofthese changes. We require an additional run of the computer program with the newprofit figures.

LINDO’s answer

The optimal solution did not change.

Notice that if we had mistakenly used the ranging analysis of the objective coefficients,we would have predicted a change in the solution.

(a) We have already performed two runs with LINDO with the quantity of stuffingavailable equal to 500 kg and 470 kg respectively.

When there is 500 kg of stuffing available, the shadow price of stuffing is zero. Thisvalue applies for all quantities of stuffing greater than or equal to 492,308.

For 470 kg the shadow price is 2,2. This applies to all quantities between 466,667and 492,308.

A run with the available stuffing just less than 466,667, say 460, indicates that theshadow price of stuffing is 4,0 for all quantities between 400 and 466,667.

A run with the available stuffing just less than 400, say 360, gives a shadow price of11,00 for all quantities between zero and 400.

This information is represented graphically as shown in Figure 6.1.

Notice that the shadow price decreases as the quantity of stuffing available increases.

(b) We have already performed a few runs with different values for the quantity of ma-terial available. The following information follows from these runs.

Quantity ofmaterial available

Optimalprofit

Range Shadow priceof MAT

550 4 033,333 0,000 – 600,000 7,333700 4 723,077 600,000 – 708,333 3,231750 4 780,000 733,333 – ∞ 0,000

The first deduction that we can make is that the optimal profit increases by R7,333for each square meter increase in the quantity of material available from a quan-

Page 60: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

54 STUDY UNIT 6 SUMMARY AND PROBLEMS

50 100 150 200 250 300 350 400 450 500

2

4

6

8

10

12

14

16

11

2,2

467

Available stuffing

Shad

owpri

ceof

stuffi

ng

Figure 6.1:

tity of zero up to a quantity of 600 m2. For an increase from 600 m2 to 708,333 m2,the increase in profit is 3,231 per m2. We don’t yet know what happens between708,333 and 733,333, but from 733,333 m2 upwards, there is no increase in profit ifthe material available increases.

This tells us that the relationship between the quantity of material available andthe optimal profit is piecewise linear. In other words, if we depict it graphically, thegraph will consist of a number of straight lines with different slopes. We thereforerequire the value of the optimal profit at the points where the slopes change.

Our next step is thus to determine the optimal profit at the following points:

0; 600; 708,333; 733,333.

The optimal profit at these points are:

0; 4 400; 4 749,99 and 4 780.

These points can be plotted on a graph and joined by straight lines to represent therequired relationship:

(c) When the price of the Papa bears is R65, the objective coefficient of PAPAS is 13.At this price 76,923 Papa bears should be manufactured. This quantity is optimalfor all values of PAPAS ’ objective coefficient between 12,267 and 18,333, that is forall prices of the Papa bear between R64,267 and R70,333.

Page 61: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

6.3. SOLUTIONS 55

�4 780

708,3 733,3

300 350 400 450 500 550 600 650 700 750 800

4 300

4 350

4 400

4 450

4 500

4 550

4 600

4 650

4 700

4 750

4 800

Opti

malP

rofit

Amount of material available

Figure 6.2:

To draw the required graph we must use LINDO to determine the situation whenthe objective coefficient is larger than 18,333 and when it is lower than 12,267. Thisinvestigation yields the values in the following table.

Objectivefunctioncoefficient

Number ofPAPAS

Range forthe objectivecoefficient

Range for the price

10 0,0 -∞ – 12,267 0 – 64,26713 76,9 12,267 – 18,333 64,267 – 70,33320 100,0 18,333 – 22,000 70,333 – 74,00023 166,7 22,000 – ∞ 74,000 and higher

This is presented graphically in Figure 6.3.

Remark:

It is clear that the graphs given above contain useful management information presented

Page 62: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

56 STUDY UNIT 6 SUMMARY AND PROBLEMS

10 20 30 40 50 60 70 80 90 100

50

100

150

200

250

76,9 -

64,27174

Price of Papa bears

Num

ber

ofPap

abea

rs

Figure 6.3:

in a manner that is easy to understand. With the help of these graphs it becomes veryeasy to answer questions such as: We don’t have any stuffing in stock, what is the highestprice we should pay for new stock? What is the highest price for additional stock if wealready have 300/450/480. . . kg of stuffing in stock? What happens to our profit situa-tion if we can obtain only 300/500/700 . . . m2 of material at the current price of R8 perm2? How many Papa bears should we manufacture at a price of R60/R70/R80. . . ?

When you start using your OR in practice, you must never underestimate the value ofa graphical presentation. Draw graphs where and whenever you can. We can assure youthat you will never grow tired of doing so, since you will, time and time again, impressyour managers and clients to no end!

Page 63: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

CHAPTER 2

Understanding the computer solution

Theme:

Understanding the computer solution

Aim of the chapter

On completion of this chapter the student must be able to

• explain the theory of the simplex method;

• generate LINDO ’s outputs from the final simplex tableau and explain the meaningof the outputs;

• recognise and explain the different special cases of LP models;

• investigate all possible changes in certain parameters.

Page 64: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,
Page 65: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

StudyUnit 7

The simplex method

Theme: Description of the basic principles of the simplex method.

Contents7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

7.2 Revision of basic principles . . . . . . . . . . . . . . . . . . . . . 60

7.3 Bounded variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

Learning objectives:

On completion of this study unit the student must be able to

• explain the simplex method and how the simplex iterations are performed;

• recognise when an initial solution has to be generated artificially and explain theconcept of artificial variables;

• recognise when there are bounded variables present in a model and explain the con-cept of bounded variables;

• explain why a bounded variable may take on a non-zero value (equal to its upperbound) when it is non-basic.

59

Page 66: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

60 STUDY UNIT 7 THE SIMPLEX METHOD

7.1 Introduction

In the previous chapter much was said about the analysis of the solution to a linear pro-gramming model. We used John’s problem to show what may be deduced from the finalsolution over and above the optimal product mix. We discussed shadow costs, shadowprices and the ranging analysis, and answered some questions on these concepts so as toget a feel for what they really mean.

We already know that the ranging analysis indicates the range of values for the objectivefunction coefficients and the right-hand sides of constraints for which the current basiswill remain unchanged. From this information we can deduce how sensitive the optimalsolution and the optimal value of the objective function are to changes in the parametersof the model. An analysis of this type is referred to as a sensitivity analysis.

In practice sensitivity analysis are very important as our models represent the real worldand the real world is dynamic. Prices change, the market demand changes, the availabil-ity of raw materials varies and so forth. We also make estimates and approximationswhen building a model and we have to make sure that these approximations don’t leadto bad decisions.

To be able to do a meaningful sensitivity analysis and make decisions based on it, wemust understand the concepts of shadow cost, shadow price and ranging analysis verywell. This can only be achieved if we understand where these values come from. Thesevalues are all obtained from the optimal simplex tableau that results when the simplexmethod is used to solve an LP model. It is therefore essential for you to understand thesimplex method and how it proceeds from the model to the solution. For this reason, wewill review the simplex method in this chapter.

We will also show you how the information printed on the computer solution is deducedand/or calculated from the final simplex tableau.

Not every LP model has a unique optimal solution. There are special cases where LPmodels are infeasible or unbounded or have alternative multiple solutions or degeneratesolutions. These special cases will be discussed.

We will also consider a specific form of sensitivity analysis called parametric analysis. Inparametric analysis we investigate the effects of changes in the value of an objective func-tion coefficient or a right-hand side of a constraint over its entire range, say from minusinfinity to infinity. In this case the solution to the model can be expressed as functions ofthe parameter which is varied.

7.2 Revision of basic principles

You are already familiar with the simplex method as you learnt about it in the second-level introductory LP module. It is, however, imperative that you understand the sim-

Page 67: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

7.2. REVISION OF BASIC PRINCIPLES 61

plex method. For this reason some basic concepts of LP models and the simplex methodare given in this section. Please do not skip this section or any part of it, as it forms thebasis for the work covered in the rest of this chapter.

When an LP model is solved by means of the simplex method, the simplex method isapplied to the standard form of the LP model.

The general form of an LP model in standard form is as follows:

Maximise z = c1x1 + c2x2 + . . . + cnxn

subject to

a11x1 + a12x2+ . . . + a1nxn = b1......

am1x1 + am2x2+ . . . + amnxn = bm

and x1 ≥ 0, x2 ≥ 0, . . . ,xn ≥ 0.

Suppose that m < n and that the b’s are all greater than or equal to zero.

The model has an objective function, z, which is a linear function of the variablesx1,. . . ,xn. Each xi represents a decision that has to be taken and are thus called the de-cision variables. The values that the n variables can assume are limited by m linearconstraints as well as n sign restrictions put on the variables. The cj are known ascost coefficients although they may, depending on the system that is being modelled, infact represent unit profit or even the utility per unit. The bi are known as the require-ments or right-hand side elements or right-hand sides, and the aij are referred toas technological or activity coefficients. The cj, bi and aij (i = 1, . . . , m; j = 1, . . . ,n) are all known constants prescribed by the real system. They are also called the para-meters of the model. Their values may change as the real system changes, but are notchosen to achieve a certain objective as is the case for the decision variables.

When we talk about a solution to the LP model, we refer to a set of values for the var-iables x1, x2,. . . , xn which satisfies the set of constraints. In other words, if we replacethe variables with these values in the constraints, each constraint holds.

A feasible solution to the LP model is a solution that also satisfies the sign restric-tions.

The optimal solution is a feasible solution for which the corresponding value of theobjective function is a maximum. That is, no other feasible solution yields an objectivefunction value that is greater than the objective function value of the optimal solution.

The set of constraints of the LP model forms a set of m equations in n unknowns (or var-iables). Since there are more unknowns than equations, it follows that if the set of equa-tions is solvable, then an infinite number of solutions exist to the set of equations. Thisset of feasible solutions is known as the feasible area.

Page 68: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

62 STUDY UNIT 7 THE SIMPLEX METHOD

We define a basic solution to an LP model with n variables and m constraints as a so-lution where at least n − m of the variables have zero values. These n − m variables arecalled the non-basic variables. The other m variables, which are called the basic var-iables, have values that satisfy the m constraints. Their values may be positive, zero oreven negative. If all the basic variables are positive or zero, then the basic solution is fea-sible. The set of basic variables is called the basis.

The simplex method is based on the principle that if an LP model has a finite optimalsolution, then an optimal basic solution to the model exists. The algorithm describes amethod of proceeding from one basic feasible solution to another by replacing one of thebasic variables with a non-basic variable.

The method always starts off with a basic solution which is feasible, but usually not opti-mal (this is called the initial basic solution). It then finds another basic solution whichis also feasible, but has a larger corresponding objective function value. This process isrepeated until a basic solution is found which is feasible and cannot be improved upon.The optimal solution to the model has now been found.

To identify the entering variable, the simplex method uses an entrance rule to deter-mine which non-basic variable must be made basic in the next solution. This variable ischosen in such a way that the new solution will be a better solution than the current one.

To identify the leaving variable, an exit rule is used to determine which basic variablemust be made non-basic in the next solution. This variable is chosen in such a way thatthe new solution will still be feasible.

The simplex method is described briefly by the following steps:

Step 1: Find a feasible basic solution (initial basic solution). Eliminate the m basic var-iables from the objective function.

Step 2: Can the objective function be improved by making one of the non-basic var-iables positive? If so, identify this variable as the entering variable and go to step 3. Ifnot, stop, as the current solution is the optimal solution.

Step 3: Determine the maximum value that the entering variable may assume beforeone of the basic variables becomes zero. The corresponding variable is the leaving vari-able. Go to step 4.

Step 4: Find a new basic solution by replacing the leaving variable with the enteringvariable in the basis. Go back to step 2.

Consider the following LP model:

Page 69: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

7.2. REVISION OF BASIC PRINCIPLES 63

Maximise PROFIT = 16P1 + 12P2 + 9P3

subject to

2P1 + P2 + P3 ≤ 500

4P1 + 2P2 + P3 ≤ 700

4P1 + 3,5P2 + 2,5P3 ≤ 2 000

and

P1, P2, P3 ≥ 0.

The standard form of this model is:

Maximise PROFIT = 16P1 + 12P2 + 9P3

subject to

2P1 + P2 + P3 + S1 = 500

4P1 + 2P2 + P3 + S2 = 700

4P1 + 3,5P2 + 2,5P3 + S3 = 2 000

and

P1, P2, P3, S1, S2, S3 ≥ 0.

The simplex method must always start with a basic solution that is feasible. In the abovemodel, the slack variables are the basic variables. The initial basis is therefore S1, S2and S3 and the initial basic solution is S1 = 500, S2 = 700 and S3 = 2 000, which isobviously feasible. The simplex method will now start from this initial basis and solvethe given model.

Finding the initial basis is not always this simple.

Consider the following LP model:

Maximise PROFIT = 16P1 + 12P2 + 9P3

subject to

2P1 + P2 + P3 ≥ 500

4P1 + 2P2 + P3 = 700

4P1 + 3,5P2 + 2,5P3 ≤ 2 000

and

P1, P2, P3 ≥ 0.

The standard form of this model is:

Page 70: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

64 STUDY UNIT 7 THE SIMPLEX METHOD

Maximise PROFIT = 16P1 + 12P2 + 9P3

subject to

2P1 + P2 + P3 − S1 = 500

4P1 + 2P2 + P3 = 700

4P1 + 3,5P2 + 2,5P3 + S3 = 2 000

and

P1, P2, P3, S1, S3 ≥ 0.

S1 is a surplus variable and S3 a slack variable.

The model has three constraints, which means that there must be three basic variables,but which three? S3 is an obvious choice, but what about the other two variables? Weintroduce artificial variables, which look like slack variables.

The model is now as follows:

Maximise PROFIT = 16P1 + 12P2 + 9P3

subject to

2P1 + P2 + P3 − S1 + R1 = 500

4P1 + 2P2 + P3 + R2 = 700

4P1 + 3,5P2 + 2,5P3 + S3 = 2 000

and

P1, P2, P3, S1, S2, S3 ≥ 0.

Now R1, R2 and S3 are the obvious candidates for the feasible basic solution. But wehave a problem. R1 and R2 are artificial variables and should not be there at all. Wewant to be sure that the simplex method will remove them from the basis as soon as pos-sible and not return them to the basis later. How can one ensure that this will happen?We give each artificial variable a large negative profit contribution, that is, a very highcost, in the objective function. Since the simplex method tries to find a maximum valuefor the profit, it should get rid of R1 and R2 quickly.

Instead of choosing specific numerical values for the costs of R1 and R2, we use the sym-bol M and assume that M is a very large number. For this reason this technique is knownas the big-M method.

The model is fiddled with once more and is now called the augmented model, which isas follows:

Maximise PROFIT = 16P1 + 12P2 + 9P3 − MR1 − MR2

subject to

Page 71: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

7.2. REVISION OF BASIC PRINCIPLES 65

2P1 + P2 + P3 − S1 + R1 = 500

4P1 + 2P2 + P3 + R2 = 700

4P1 + 3,5P2 + 2,5P3 + S3 = 2 000

and

P1, P2, P3, S1, S2, S3, R1, R2 ≥ 0.

If we choose R1, R2 and S3 as the basic variables there is still one thing to do before thesimplex method can start with its iterations. The basic variables should have a coefficientof one in one equation and zero in the other equations. Hence, since R1 and R2 have co-efficients of M in the objective function, we must eliminate them from the objective func-tion.

From the first and second equations it follows that:

R1 = 500 − 2P1 − P2 − P3 + S1,

R2 = 700 − 4P1 − 2P2 − P3.

If we replace R1 and R2 with these expressions in the objective function, we get:

PROFIT= −1200M + (16 + 6M)P1 + (12 + 3M)P2 + (9 + 2M)P3 − MS1.

The resulting model that can now be solved with the simplex method is:

MaximisePROFIT = −1200M + (16 + 6M)P1 + (12 + 3M)P2 + (9 + 2M)P3 − MS1.

subject to

2P1 + P2 + P3 − S1 + R1 = 500

4P1 + 2P2 + P3 + R2 = 700

4P1 + 3,5P2 + 2,5P3 + S3 = 2 000

and

P1, P2, P3, S1, S2, S3 R1, R2 ≥ 0.

R1, R2 and S3 are the basic variables and the initial basic solution is therefore,R1 = 500, R2 = 700 and S3 = 2 000. The simplex method will now start from this initialbasis of R1, R2 and S3 and solve the given model.

The step-by-step way in which the simplex algorithm chooses a non-basic variable to en-ter the basis and chooses a basic variable to leave the basis, and the way in which theiterations are performed, was covered in the study material of the second-level introduc-tory LP module. As we assume that you are familiar with it, we advise you to find thestudy material of the second-level introductory LP module (study guide and the pre-scribed book WINSTON ) and revise the simplex method thoroughly. Make sure that youunderstand how the simplex method works.

Now go back to the first model of this section and see if you can follow how we solve itby hand.

Page 72: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

66 STUDY UNIT 7 THE SIMPLEX METHOD

The standard form of this model is:

Maximise PROFIT = 16P1 + 12P2 + 9P3

subject to

2P1 + P2 + P3 + S1 = 500

4P1 + 2P2 + P3 + S2 = 700

4P1 + 3,5P2 + 2,5P3 + S3 = 2 000

and

P1, P2, P3, S1, S2, S3 ≥ 0.

The initial set of equations (call it I0) is:

PROFIT − 16P1 − 12P2 − 9P3 = 0

2P1 + P2 + P3 + S1 = 500

4P1 + 2P2 + P3 + S2 = 700

4P1 + 3,5P2 + 2,5P3 + S3 = 2 000

P1 has the most negative coefficient(smallest) in the objective function row. Hence, P1 isthe entering variable.

Basic variable Right-hand side of equation Coefficient of P1 Ratio MinS1 500 2 250S2 700 4 175 *S3 2 000 4 500

S2 is the leaving variable.

The set of equations must now be rewritten so that the coefficient of P1 is 1 in the equa-tion containing S2 and zero in the other equations. The process by which this is done iscalled a pivot operation.

The pivot operation can be done by means of the elimination method, as follows:

Iteration 1:

• Divide the equation containing S2 by 4 so that the coefficient of P1 is 1. This gives

P1 + 0,5P2 + 0,25P3 + 0,25S2 = 175.

Call this new equation the equation for P1.

• Now P1 must be eliminated from the other equations so that its coefficient in eachof them will be zero. To do this, we use the equation for P1 as follows:

We have that

P1 + 0,5P2 + 0,25P3 + 0,25S2 = 175

and hence

Page 73: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

7.2. REVISION OF BASIC PRINCIPLES 67

P1 = 175 – 0,5P2 – 0,25P3 – 0,25S2.

Therefore, P1 can be replaced throughout by the expression on the right above.

• Calculate the new equation for PROFIT as:

PROFIT – 16(175 – 0,5P2 – 0,25P3 – 0,25S2) – 12P2 – 9P3 = 0

PROFIT – 2 800 + 8P2 + 4P3 + 4S2 – 12P2 – 9P3 = 0

PROFIT – 4P2 – 5P3 + 4S2 = 2 800.

• Calculate the new equation for S1 as:

2(175 - 0,5P2 - 0,25P3 - 0,25S2) + P2 + P3 + S1 = 500

350 - P2 - 0,5P3 - 0,5S2 + P2 + P3 + S1 = 500

0,5P3 + S1 - 0,5S2 = 150.

• Calculate the new equation for S3 as:

4(175 – 0,5P2 – 0,25P3 – 0,25S2) + 3,5P2 + 2,5P3 + S3 = 2 000

700 – 2P2 – P3 – S2 + 3,5P2 + 2,5P3 + S3 = 2 000

1,5P2 + 1,5P3 - S2 + S3 = 1 300.

The result of this pivot operation is given by the following set of equations (I1):PROFIT − 4P2 − 5P3 + 4S2 = 2 800

0,5P3 + S1 − 0,5S2 = 150

P1 + 0,5P2 + 0,25P3 + 0,25S2 = 175

1,5P2 + 1,5P3 − S2 + S3 = 1 300.

Now P3 is the entering variable.

Basic variable Right-hand side Coefficient of P3 Ratio Minof equation

S1 150 0,5 300 *P1 175 0,25 700S3 1 300 1,5 866,67

S1 is the leaving variable.

Iteration 2:

• Divide the equation for S1 by 0,5. This gives the equation for P3 as:

P3 + 2S1 – S2 = 300.

• Substitute P3 by 300 − 2S1 + S2 in the equations for PROFIT, P1 and S3.

This gives the following set of equations (I2):

Page 74: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

68 STUDY UNIT 7 THE SIMPLEX METHOD

PROFIT − 4P2 + 10S1 − S2 = 4 300

P3 + 2S1 − S2 = 300

P1 + 0,5P2 − 0,5S1 + 0,5S2 = 100

1,5P2 − 3S1 + 0,5S2 + S3 = 850.

Now P2 is the entering variable.

Basic variable Right-hand side Coefficient of P2 Ratio Minof equation

P3 300 0 –P1 100 0,5 200 *S3 850 1,5 566,67

P1 is the leaving variable.

Iteration 3:

• Divide the equation for P1 by 0,5. This gives the equation for P2 as:

2P1 + P2 – S1 + S2 = 200.

• Replace P2 by 200 – 2P1 + S1 – S2 in the equations for PROFIT,P3 and S3.

This gives the following set of equations (I3):

PROFIT + 8P1 + 6S1 + 3S2 = 5 100

P3 + 2S1 − S2 = 300

2P1 + P2 − S1 + S2 = 200

−3P1 − 1,5S1 − S2 + S3 = 550.

All the coefficients in the objective function equation are positive. This means thatthe objective function cannot be improved by making a non-basic variable positive.

We have arrived at the optimal solution which is P1 = 0, P2 = 200, P3 = 300,S1 = 0, S2 = 0, S3 = 550 and PROFIT = 5 100.

Now you should be able to understand the simplex method and how the simplex it-erations are performed. Fortunately in practice we don’t have to apply the simplexmethod manually and solve LP models by hand, as there are many computer pro-grams that can do this for us. We have already seen how this is done with LINDO.The formulated LP model is keyed in as is and LINDO then does transformations ifnecessary, rewrites the model into standard form, applies the simplex algorithm andthen finds the optimal solution. The computer does it all and you don’t have to doany more than key in the model and read and interpret the solution!

Page 75: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

7.3. BOUNDED VARIABLES 69

7.3 Bounded variables

Up to now we have considered only non-negative variables, that is, where the sign restric-tions specify that variables must be ≥ 0. Variables need not all fall into this categoryand they may be bounded from above and/or below, for example, 3 ≤ y ≤ 10.

The lower bound poses no problem as it can be changed to a ≥ 0 variable by a simpletransformation as follows:

We have 3 ≤ y ≤ 10,

and therefore 3 − 3 ≤ y − 3 ≤ 10 − 3,

which is 0 ≤ y − 3 ≤ 7.

Now let x = y − 3

and this gives 0 ≤ x ≤ 7.

This variable, x, is bounded from above by 7 and is called a bounded variable. Thequestion now arises whether the simplex method can be used to solve a model with boundedvariables.

One possibility is to accommodate the requirement x ≤ 7 by adding an additional con-straint to the model, that is, by adding x ≤ 7 as a constraint. The disadvantage of this isthat the model becomes larger and that more time will be needed to solve it. This is cer-tainly a disadvantage in a model that has, for example, 500 variables with upper boundsand 300 constraints - something which is not unusual in practice.

An alternative is to handle the upper bounds by changing the rules of the simplex methodslightly. These changes affect the choice of the leaving variable and the calculations re-quired to set up the equations or the tableaux for the next iteration.

When choosing a leaving variable, the exit rule must ensure that feasibility is maintained.Previously it was sufficient to ensure that no variable becomes negative. Now it must alsosee to it that a variable does not become larger than its upper bound.

It can easily happen that a variable becomes larger than its upper bound if we simply, ateach iteration, perform a pivot operation to substitute the leaving variable with the en-tering variable in the basis. In such a case we should not perform a pivot operation, butshould change the solution in such a way that the variable involved will take on the va-lue of its upper bound in the new solution. In this way it can happen that a non-basicvariable is not zero, but has the value of its upper bound.

However, the simplex method is based on the assumption that the value of a non-basicvariable is zero. Therefore, a method had to be found to handle a non-basic variable thatis equal to its upper bound. This is done in the following way:

Suppose the upper bound of a variable x is u. Then we can substitute the requirementx ≤ u with the equation x + x′ = u and x′ ≥ 0. The variable x′ is referred to as the

Page 76: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

70 STUDY UNIT 7 THE SIMPLEX METHOD

complementary variable of x. We do not include this equation in our set of equations, butkeep it close at hand for use when needed.

We then start with x non-basic and equal to zero. x′ does not occur in the set of equa-tions. When we come to a point where x must assume its upper bound, we substitute itwith u−x′ and we make x′ non-basic and equal to zero. Can you see that it boils down tosetting x equal to u? After this x′ appears in the equations and not x. The upper boundof x′ is also u. If, perhaps, we later reach a point where x′ must assume its upper bound,we substitute it with u − x and make x non-basic and equal to zero, and so forth. We callthis substitution process upper bound substitution.

It may therefore happen that we find a new basis by doing an upper bound substitutioninstead of a pivot operation. Sometimes we may find the new basis by doing both an up-per bound substitution and a pivot operation.

This gives the background to how the simplex method handles bounded variables. Thedetails of how this works will not be covered in this module, so you do not have to solvemodels with bounded variables by hand. For our purposes, we are happy to key the modelinto the computer and allow the package to solve it! Just remember that the boundedvariables must be specified as such when keying the model into the computer and thesyntax necessary depends on the package used.

Page 77: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

StudyUnit 8

The Simplex Method – using thecomputer

Theme:

Explanation of how the computer output is obtained from the simplex tableaux.

Contents8.1 From tableau to solution . . . . . . . . . . . . . . . . . . . . . . . 72

8.2 From tableau to ranging analysis . . . . . . . . . . . . . . . . . . 76

8.2.1 Objective coefficient ranges . . . . . . . . . . . . . . . . . . . . . . . 79

8.2.2 Right-hand side ranges . . . . . . . . . . . . . . . . . . . . . . . . . 83

Learning objectives:

On completion of this study unit the student must be able to

• deduce from the final simplex tableau, the value and the reduced cost of a variableand be able to explain their meanings;

• deduce from the final simplex tableau, the slack or surplus and the dual price of aconstraint and be able to explain their meanings;

• calculate from the final simplex tableau, the allowable objective function ranges fora non-basic variable within which the current basis remains optimal;

71

Page 78: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

72 STUDY UNIT 8 THE SIMPLEX METHOD – USING THE COMPUTER

• calculate from the final simplex tableau, the allowable objective function ranges fora basic variable within which the current basis remains optimal;

• calculate from the final simplex tableau, the allowable right-hand side ranges for aconstraint within which the current basis remains feasible.

Sections from prescribed book, WinstonChapter 5, p.227-248

8.1 From tableau to solution

Let us now solve the first model of section 7.2 with LINDO. The model is:

Maximise PROFIT = 16P1 + 12P2 + 9P3

subject to

2P1 + P2 + P3 ≤ 500

4P1 + 2P2 + P3 ≤ 700

4P1 + 3,5P2 + 2,5P3 ≤ 2 000

and

P1, P2, P3 ≥ 0.

We want to study how the computer solution is deduced from the simplex tableaux. Weneed to look at the initial and the final simplex tableaux as well as the solution. To printthese, proceed as follows:

Key the model into LINDO.

Select TABLEAU from the REPORTS menu - this gives the initial simplex tableau.

Select SOLVE from the SOLVE menu - this solves the model starting from the initialsimplex tableau.

Select TABLEAU from the REPORTS menu - this gives the final simplex tableau.

(Remember that the model must be in the display window when the menu selections aremade.)

The REPORTS window containing the initial simplex tableau, the LINDO solution andthe final simplex tableau are as follows:

THE TABLEAU

ROW (BASIS) P1 P2 P3 SLK 2 SLK 31 ART -16.000 -12.000 -9.000 0.000 0.000

CONSTR1 SLK 2 2.000 1.000 1.000 1.000 0.000CONSTR2 SLK 3 4.000 2.000 1.000 0.000 1.000CONSTR3 SLK 4 4.000 3.500 2.500 0.000 0.000

ART ART -16.000 -12.000 -9.000 0.000 0.000

Page 79: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

8.1. FROM TABLEAU TO SOLUTION 73

ROW SLK 41 0.000 0.000

CONSTR1 0.000 500.000CONSTR2 0.000 700.000CONSTR3 1.000 2000.000

ART 0.000 0.000

LP OPTIMUM FOUND AT STEP 2

OBJECTIVE FUNCTION VALUE

1) 5100.000

VARIABLE VALUE REDUCED COSTP1 0.000000 8.000000P2 200.000000 0.000000P3 300.000000 0.000000

ROW SLACK OR SURPLUS DUAL PRICESCONSTR1) 0.000000 6.000000CONSTR2) 0.000000 3.000000CONSTR3) 550.000000 0.000000

NO. ITERATIONS= 2

RANGES IN WHICH THE BASIS IS UNCHANGED:

OBJ COEFFICIENT RANGESVARIABLE CURRENT ALLOWABLE ALLOWABLE

COEF INCREASE DECREASEP1 16.000000 8.000000 INFINITYP2 12.000000 6.000000 3.000000P3 9.000000 3.000000 3.000000

RIGHTHAND SIDE RANGESROW CURRENT ALLOWABLE ALLOWABLE

RHS INCREASE DECREASECONSTR1 500.000000 200.000000 150.000000CONSTR2 700.000000 300.000000 200.000000CONSTR3 2000.000000 INFINITY 550.000000

THE TABLEAU

ROW (BASIS) P1 P2 P3 SLK 2 SLK 31 ART 8.000 0.000 0.000 6.000 3.000

CONSTR1 P3 0.000 0.000 1.000 2.000 -1.000CONSTR2 P2 2.000 1.000 0.000 -1.000 1.000

Page 80: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

74 STUDY UNIT 8 THE SIMPLEX METHOD – USING THE COMPUTER

CONSTR3 SLK 4 -3.000 0.000 0.000 -1.500 -1.000

ROW SLK 41 0.000 5100.000

CONSTR1 0.000 300.000CONSTR2 0.000 200.000CONSTR3 1.000 550.000

If we look at the first tableau, the initial simplex tableau, we see that the initial basicvariables are SLK2, SLK3 and SLK4, which are the slack variables associated with thethree constraints. The numbers 2, 3 and 4 correspond with the lines in which the con-straints appear in the LINDO model. These are the same as the slack variables S1, S2and S3, which we added to the constraints in section 7.1.2 to transform them into stan-dard form.

Let us now examine the final simplex tableau to see how LINDO ’s output is deducedfrom it.

Firstly, consider the values of the objective function and the variables.

The basis column contains the basic variables, P3, P2 and S3 (SLK4). The value ofPROFIT and the values of these basic variables are given in the last column as 5 100,300, 200 and 550 respectively.

Since P1, S1 and S2 do not appear in the basis column, they are non-basic variables andhence take on the value of one of their bounds, in this case, zero. The LINDO outputthus gives the following:

OBJECTIVE FUNCTION VALUE

1) 5100.000

VARIABLE VALUEP1 0.000000P2 200.000000P3 300.000000

ROW SLACK OR SURPLUSCONSTR1) 0.000000 (S1)CONSTR2) 0.000000 (S2)CONSTR3) 550.000000 (S3)

Next we consider the reduced costs (shadow costs).

The first row of the final simplex tableau contains the objective function and can be writ-ten in the form

PROFIT + 8P1 + 0P2 + 0P3 + 6S1 + 3S2 + 0S3 = 5 100. (1)

Page 81: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

8.1. FROM TABLEAU TO SOLUTION 75

Remember that before the simplex algorithm can be applied, the simplex method rewritesan objective function from the general form of

Maximise z = a1x1 + a2x2 + . . . + anxn(call it the general form)

to the form

z − a1x1 − a2x2 − . . . − anxn = 0 (call it the simplex form).

Let us now consider the interpretation of the coefficient of a variable in the ob-jective function in the general form:

Each coefficient in the objective function equation represents the strengthening (increasefor maximisation) for positive coefficients or the weakening (decrease for maximisation)for negative coefficients in the objective function for an increase of one unit in the associ-ated variable.

From this follows that the interpretation of the coefficient of a variable in the ob-jective function in the simplex form is:

Each coefficient in the objective function equation represents the strengthening (increasefor maximisation) for negative coefficients or the weakening (decrease for maximisation)for positive coefficients in the objective function for an increase of one unit in the associ-ated variable.

Look at equation (1) above. It is in the simplex form. The coefficient of the non-basicvariable P1 is +8. This means that the objective function will weaken (decrease in thiscase) by 8 for an increase of one unit in the associated variable. Does this ring a bell? Itshould! We discussed shadow costs before and there we had a similar definition. In fact,the shadow cost (reduced cost) of a variable tells us by how much the objective functionwill weaken if the value of the variable increases by one unit. We can now understandwhy the reduced cost of P1 is 8 on the LINDO output.

The objective function coefficients (see (1) above) of P2 and P3 are zero, as are theirreduced costs on the LINDO output. This is always the case for the objective functioncoefficient of a basic variable. (Remember a basic variable is already in the basis andhence cannot make an additional contribution to the objective function.)

The reduced cost of a variable is the coefficient of that variable in the objec-tive function row of the final simplex tableau.

Now we consider the dual prices (shadow prices).

If the right-hand side of a constraint increases by one unit, its activity level will increaseaccordingly. In the model, the value of the corresponding slack variable (or surplus vari-able) will decrease (or increase) by one unit. Consider, for example, the constraint CON-STR1. If its activity level increases to 501, then the value of its slack variable, S1, de-creases to −1, since to satisfy the original constraint, we must have that:

activity level +S1 = 500.

Page 82: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

76 STUDY UNIT 8 THE SIMPLEX METHOD – USING THE COMPUTER

In the objective function (1), the coefficient of S1 is 6, which means that if S1 decreasesby one unit, the objective function will increase by 6. Does this ring a bell? It should!We discussed shadow prices before and there we had a similar definition. In fact, theshadow price (dual price) of a constraint tells us by how much the objective function willstrengthen (weaken) if the right-hand side of the constraint increases (decreases) by oneunit. We can now understand why the dual price of CONSTR1 is 6 on the LINDO out-put.

Similarly, the dual prices 3 and 0 are deduced for CONSTR2 and CONSTR3.

The dual price of a constraint is the coefficient of the corresponding slack orsurplus variable in the objective function row of the final simplex tableau.

The ranging analysis of the objective function coefficients and the right-hand sides of theconstraints can also be obtained from the final simplex tableau, but some calculations arenecessary. This will be covered in the next section.

8.2 From tableau to ranging analysis

The ranging analysis is important in that it defines the parameter ranges over which thesolution to an LP model and deductions about the solution are valid. The use of theranging analysis, however, is limited. In order to appreciate the uses and limitations ofthe ranging analysis, one needs to understand where it comes from.

The ranging analysis is performed for two sets of parameters – the objective functioncoefficients and the right-hand sides of the constraints. For each of these parameters itprovides an interval over which this parameter may vary without the optimal simplextableau changing to such an extent that it is either no longer optimal or no longer fea-sible. A change outside such a range will render the optimal basis no longer valid. As aconsequence, deductions about the optimal solution will also no longer be valid.

To explain how the ranging analysis originates from the simplex tableaux we once againconsider the model:

Maximise PROFIT = 16P1 + 12P2 + 9P3

subject to

2P1 + P2 + P3 ≤ 500

4P1 + 2P2 + P3 ≤ 700

4P1 + 3,5P2 + 2,5P3 ≤ 2 000

and

P1, P2, P3 ≥ 0.

The step-by-step simplex solution, where we decide on which variables to pivot at eachiteration, is required, and we will do this with the help of LINDO.

Page 83: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

8.2. FROM TABLEAU TO RANGING ANALYSIS 77

Use LINDO and find the above model, which you should have saved before. If not, you’llhave to key it in again.

Select TABLEAU from the REPORTS menu - this gives the initial simplex tableau.

Initial simplex tableau, iteration 0 (call it I0)

THE TABLEAU

ROW (BASIS) P1 P2 P3 SLK 2 SLK 31 ART -16.000 -12.000 -9.000 0.000 0.0002 SLK 2 2.000 1.000 1.000 1.000 0.0003 SLK 3 4.000 2.000 1.000 0.000 1.0004 SLK 4 4.000 3.500 2.500 0.000 0.000

ART ART -16.000 -12.000 -9.000 0.000 0.000

ROW SLK 41 0.000 0.0002 0.000 500.0003 0.000 700.0004 1.000 2000.000

ART 0.000 0.000

The initial set of equations corresponding to this tableau is:

PROFIT − 16P1 − 12P2 − 9P3 = 0

2P1 + P2 + P3 + S1 = 500

4P1 + 2P2 + P3 + S2 = 700

4P1 + 3,5P2 + 2,5P3 + S3 = 2 000

P1 is therefore the entering variable and S2 is the leaving variable.

To get the next set of equations, the simplex method divides the equation for S2 by 4,

P1 + 0,5P2 + 0,25P3 + 0,25S2 = 175

and from this follows that P1 can be substituted by 175− 0,5P2− 0,25P3− 0,25S2 in theother equations. We will not do this by hand but with LINDO.

Get the model in the LINDO display window.

From the SOLVE menu, select PIVOT VARIABLE and in display box select

Variable Selection,

Use Mine,

My variable Selection - Type in P1,

OK.

Page 84: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

78 STUDY UNIT 8 THE SIMPLEX METHOD – USING THE COMPUTER

From the REPORTS menu, select TABLEAU - this gives the first simplex tableau.

First simplex table, iteration 1 (I1)

P1 ENTERS AT VALUE 175.00 IN ROW 3 OBJ. VALUE= 2800.0

THE TABLEAU

ROW (BASIS) P1 P2 P3 SLK 2 SLK 31 ART 0.000 -4.000 -5.000 0.000 4.0002 SLK 2 0.000 0.000 0.500 1.000 -0.5003 P1 1.000 0.500 0.250 0.000 0.2504 SLK 4 0.000 1.500 1.500 0.000 -1.000

ROW SLK 41 0.000 2800.0002 0.000 150.0003 0.000 175.0004 1.000 1300.000

From this tableau we see that P3 is the next variable to enter the basis and S1 (SLK2)leaves the basis.

The simplex method divides the equation for S1 by 0,5,

P3 + 2S1 − S2 = 300

and from this follows that P3 can be substituted by 300−2S1+S2 in the other equations.Once again we use LINDO. Follow the following instructions to obtain the second simplextableau:

LINDO model in display window.

SOLVE - PIVOT VARIABLE.

Variable Selection,

Use Mine,

My Variable Selection - Type in P3,

OK.

REPORTS - TABLEAU.

Second simplex tableau, iteration 2 (I2)

P3 ENTERS AT VALUE 300.00 IN ROW 2 OBJ. VALUE= 4300.0

THE TABLEAU

ROW (BASIS) P1 P2 P3 SLK 2 SLK 3

Page 85: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

8.2. FROM TABLEAU TO RANGING ANALYSIS 79

1 ART 0.000 -4.000 0.000 10.000 -1.0002 P3 0.000 0.000 1.000 2.000 -1.0003 P1 1.000 0.500 0.000 -0.500 0.5004 SLK 4 0.000 1.500 0.000 -3.000 0.500

ROW SLK 41 0.000 4300.0002 0.000 300.0003 0.000 100.0004 1.000 850.000

We see that P2 now enters the basis and P1 leaves the basis. The simplex method di-vides the equation for P1 by 0,5 and substitutes P2 by 200 − 2P1 + S1 − S2 in theother equations. We find the third simplex tableau by proceeding according to the aboveLINDO instructions.

Third simplex tableau, iteration 3 (I3)

P2 ENTERS AT VALUE 200.00 IN ROW 3 OBJ. VALUE= 5100.0

THE TABLEAU

ROW (BASIS) P1 P2 P3 SLK 2 SLK 31 ART 8.000 0.000 0.000 6.000 3.0002 P3 0.000 0.000 1.000 2.000 -1.0003 P2 2.000 1.000 0.000 -1.000 1.0004 SLK 4 -3.000 0.000 0.000 -1.500 -1.000

ROW SLK 41 0.000 5100.0002 0.000 300.0003 0.000 200.0004 1.000 550.000

This third tableau is in fact the final simplex tableau.

The above four tableaux were obtained in a step-by-step manner with LINDO, in otherwords we told the LINDO solver on which variables to pivot at each iteration. We willrefer to these tableaux in the following sections and for this reason they have been la-belled I0, I1, I2 and I3.

8.2.1 Objective coefficient ranges

Let us now look at the ranging analysis for the objective function coefficients in the abovemodel. When will a change in an objective function coefficient lead to a change in the op-

Page 86: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

80 STUDY UNIT 8 THE SIMPLEX METHOD – USING THE COMPUTER

timal basis? This will only happen if the objective function coefficient changes in such away that the current basis is no longer optimal, but it cannot affect the feasibility of thebasis. Do you agree?

How can a sub-optimal objective function be identified? Remember that the entrancerule of the simplex method states that if the objective function row of the simplex tableauhas any negative coefficients, then the objective function value can be improved. A sub-optimal objective function can therefore be identified by a negative objective functioncoefficient. An optimal objective function is characterised by the fact that all the objec-tive function coefficients are positive or zero.

To determine the range of an objective function coefficient, we have to answer the follow-ing question: “By how much can the objective function coefficient change before a coef-ficient in the objective function row of the final simplex tableau becomes negative?” Wewould like to answer this question without having to solve the problem from scratch. Wethus have to try to determine the effect of a change in an objective function coefficientin the initial simplex tableau on the objective function coefficients in the final simplextableau using only information already available.

We will first do it for a non-basic variable and then for a basic variable.

Non-basic variable P1:

The initial basis for the model is S1, S2 and S3 and hence P1 is a non-basic variable. Itscoefficient in the objective function is 16. Suppose this changes to 16 + d.

Then the objective function equation corresponding to I0 (see previous pages) changes to

PROFIT − (16 + d)P1 − 12P2 − 9P3 = 0.

At each iteration of the simplex method, a variable in the objective function equation issubstituted by one of the other equations. Let us do this and see what the result is.

At the first iteration we substitute P1 with 175− 0,5P2− 0,25P3− 0,25S2. The objectivefunction equation in I1 becomes:

PROFIT − (16 + d)(175 − 0,5P2 − 0,25P3 − 0,25S2) − 12P2− 9P3 = 0

PROFIT − d(175 − 0,5P2 − 0,25P3 − 0,25S2) − 4P2 − 5P3 + 4S2 = 2 800

PROFIT − dP1 − 4P2 − 5P3 + 4S2 = 2 800.

At the second iteration we substitute P3 with 300 − 2S1 + S2. The objective functionequation in I2 thus becomes:

PROFIT − dP1 − 4P2 − 5(300 − 2S1 + S2) + 4S2 = 2 800

PROFIT − dP1 − 4P2 + 10S1 − S2 = 4 300.

At the third iteration we substitute P2 with 200 − 2P1 + S1 − S2. In I3 the objectivefunction equation is thus:

Page 87: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

8.2. FROM TABLEAU TO RANGING ANALYSIS 81

PROFIT − dP1 − 4(200 − 2P1 + S1 − S2) + 10S1 − S2 = 4 300

PROFIT + (8 − d)P1 + 6S1 + 3S2 = 5 100.

We now see that where the coefficient of P1 had previously taken on the following set ofvalues in the consecutive objective function equations:

−16,0,0 and 8,

it has now taken on the following set of values:

−16 − d,0 − d,0 − d and 8 − d.

Note that the −d is carried over without change to every next objective function equa-tion. This is always the case for any variable. Thus, without having to do all the calcula-tions as we have done above, we could immediately have said that the objective functionequation in I3 would be

PROFIT + (8 − d)P1 + 6S1 + 3S2 = 5 100.

To maintain optimality, 8 − d must be ≥ 0.

Thus, d ≤ 8 and therefore, 16 + d ≤ 16 + 8 = 24.

The objective function coefficient of P1 can thus take on a maximum value of 24 beforethe current basis is no longer optimal. There is no limit on the minimum value that itcan assume. The ranging analysis in the previous section therefore states that for thecoefficient of P1, the AI is 8 and the AD is infinity.

Basic variable P2:

Suppose P2’s objective function coefficient changes from 12 to 12 + d. The objectivefunction equation in I0 becomes

PROFIT − 16P1 − (12 + d)P2 − 9P3 = 0.

Exactly as was the case for P1, the −d is carried over without change to every next ob-jective function equation and the objective function equation in I3 becomes:

PROFIT + 8P1 − dP2 + 6S1 + 3S2 = 5 100.

The coefficient of a basic variable must be zero in the objective function equation. There-fore, P2 must be eliminated from the objective function equation. The equation for P2is:

2P1 + P2 − S1 + S2 = 200 and hence

P2 = 200 − 2P1 + S1 − S2.

Therefore, the objective function equation becomes:

PROFIT + 8P1 − d(200 − 2P1 + S1 − S2) + 6S1 + 3S2 = 5 100

PROFIT + 8P1 − 200d + 2dP1 − dS1 + dS2 + 6S1 + 3S2 = 5 100

Page 88: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

82 STUDY UNIT 8 THE SIMPLEX METHOD – USING THE COMPUTER

PROFIT + (8 + 2d)P1 + (6 − d)S1 + (3 + d)S2 = 5100 + 200d.

For optimality we must have:

8 + 2d ≥ 0; 6 − d ≥ 0 and 3 + d ≥ 0.

d ≥ −4; d ≤ 6 and d ≥ −3.

−3 ≤ d ≤ 6

12 − 3 ≤ 12 + d ≤ 12 + 6

9 ≤ 12 + d ≤ 18.

Thus, the lower and upper limits for the objective function coefficient of P2 are 9 and 18respectively. The ranging analysis in the previous section therefore gives the AI as 6 andthe AD as 3 for the coefficient of P2.

Notice that the value of PROFIT, 5 100 + 200d, need not be greater than or equal tozero. By the way, the expression 5100 + 200d can be used to predict the change in theobjective function value when the objective function coefficient of P2 varies within itsrange. The expressions 8 + 2d; 6 − d and 3 + d can also be used to predict the changesin the shadow cost of P1 and the shadow prices of CONSTR1 and CONSTR2 when P2’sobjective function coefficient varies within its range.

Exercise 8.1

Calculate the range for the objective function coefficient of P3.

Solution to Exercise 8.1

Change P3’s objective function coefficient from 9 to 9 + d. The objective function equa-tion in I0 becomes:

PROFIT − 16P1− 12P2 − (9 + d)P3 = 0.

The objective function equation in I3 becomes:

PROFIT + 8P1 − dP3 + 6S1 + 3S2 = 5 100.

P3 is basic and to eliminate it from the objective function equation, P3 must be replacedwith:

P3 = 300 − 2S1 + S2.

The objective function equation becomes:

PROFIT + 8P1 − d(300 − 2S1 + S2) + 6S1 + 3S2 = 5 100

PROFIT + 8P1 + (6 + 2d)S1 + (3 − d)S2 = 5 100 + 300d.

For optimality we must have 6 + 2d ≥ 0 and 3 − d ≥ 0.

Thus, d ≥ −3 and d ≤ 3, so that −3 ≤ d ≤ 3.

Page 89: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

8.2. FROM TABLEAU TO RANGING ANALYSIS 83

Thus, 9 − 3 ≤ 9 + d ≤ 9 + 3, so that the objective function coefficient of P3 may varybetween 6 and 12. The AI is 3 and the AD is 3.

8.2.2 Right-hand side ranges

We shall now consider the ranging analysis for the right-hand sides of the constraints.Again we start by asking how a change in the right-hand side of a constraint can affectthe optimal basis. A change in the right-hand side of a constraint can affect only the fea-sibility of the current optimal solution. It, however, has no influence on the coefficientsin the objective function equation. How does one recognise a solution that is not feasible?It is a solution in which one or more of the variables do not satisfy the sign restrictions.In this instance it is when the right-hand side of one or more of the equations (the objec-tive function equation excluded) is negative. Remember that the right-hand sides of theequations are given in the last column of a simplex tableau.

To determine the range of the right-hand side of a constraint, we must answer the fol-lowing question: “By how much can the right-hand side of the constraint change beforethe right-hand side of one of the equations corresponding to the final simplex tableau be-comes negative?” Thus, we must determine what effect a change in the right-hand sideof a constraint in the original model will have on the right-hand sides in the final simplextableau without having to solve the model from scratch.

Let us consider CONSTR1. Suppose its right-hand side changes from 500 to 500 + d.What will the effect of this change be?

In the simplex tableau I0 the four right-hand side elements are now

0; 500 + d; 700 and 2 000.

To get I1, we divide the equation for S2 by 4. As before, we get that

P1 + 0,5P2 + 0,25P3 + 0,25S2 = 175.

We therefore substitute P1 with 175 − 0,5P2 − 0,25P3− 0,25S2 exactly as before.

Our new set of equations will be identical to the equations corresponding to the simplextableau I1, except that the right-hand side element of the first constraint will be 150 + d.(You can do the calculations by hand to check that this is indeed the case!)

To get I2, we divide the equation for S1 by 0,5. We get

P3 + 2S1 − S2 = 300 + 2d.

And now we have to substitute P3 by

300 + 2d − 2S1 + S2.

Do this and we get I2:

Page 90: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

84 STUDY UNIT 8 THE SIMPLEX METHOD – USING THE COMPUTER

PROFIT − 4P2 + 10S1 − S2 = 4 300 + 10d

P3 + 2S1 − S2 = 300 + 2d

P1 + 0,5P2 − 0,5S1 + 0,5S2 = 100 − 0,5d

1,5P2 − 3S1 + 0,5S2 + S3 = 850 − 3d.

To get I3, we divide the equation for P1 by 0,5 and get

2P1 + P2 − S1 + S2 = 200 − d.

Now we substitute P2 with

200 − d − 2P1 + S1 − S2.

We then have I3:

PROFIT + 8P1 + 6S1 + 3S2 = 5 100 + 6d

P3 + 2S1 − S2 = 300 + 2d

2P1 + P2 − S1 + S2 = 200 − d

−3P1 − 1,5S1 − S2 + S3 = 550 − 1,5d.

Now let us take a closer look at how the coefficients of d change as the set of equationsis manipulated. In the initial set of equations, d has a coefficient of 1 in the equation forCONSTR1. In all the other equations its coefficient is zero. These coefficients correspondexactly with the coefficients of S1.

In I1 d has a coefficient of 1 in the equation for CONSTR1 and in the other equations itscoefficient is zero.

Once again these coefficients correspond with the coefficients of S1.

In I2 d’s coefficients and S1’s coefficients correspond once again. They are:

10, 2, -0,5 and -3.

In I3 it is the case once again and the coefficients of d and S1 are

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

The correspondence between the coefficients of S1 and d therefore holds from one itera-tion to the next and thus we could have written down the final set of equations withouthaving to do the steps in between.

Now back to the problem at hand. For the final basis to be feasible, the right-hand sidesof the equations (the objective function equation excluded) must be greater than or equalto zero. That is:

300 + 2d ≥ 0; 200 − d ≥ 0 and 550 − 1,5d ≥ 0.

d ≥ −3002

; d ≤ 200 and d ≤ 5501,5

d ≥ −150; d ≤ 200 d ≤ 366,67.

That leads to

Page 91: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

8.2. FROM TABLEAU TO RANGING ANALYSIS 85

−150 ≤ d ≤ 200

500 − 150 ≤ 500 + d ≤ 500 + 200

350 ≤ 500 + d ≤ 700.

Thus the right-hand side of the constraint CONSTR1 can vary between 350 and 700without the current optimal basis becoming infeasible. The ranging analysis in the pre-vious section therefore gives the AI as 200 and the AD as 150 for the right-hand side ofthe first constraint.

By the way, we can now easily predict how the objective function value and the valuesof the basic variables will change if the right-hand side of a constraint varies within itsrange. If, for example, an additional 100 units of CONSTR1 becomes available, PROFITwill increase by 6 × 100, P3 will increase by 2 × 100, P2 will decrease by 100 and S3will decrease by 1,5 × 100.

Exercise 8.2

Determine the ranges for the right-hand sides of

1. CONSTR2, and

2. CONSTR3.

Solution to Exercise 8.2

Equation Coefficient of S2 Right-hand sideof equation

Equation for CONSTR1 −1 300 − dEquation for CONSTR2 +1 200 + dEquation for CONSTR3 −1 550 − d

1. Suppose that the right-hand side of CONSTR2 changes from 700 to 700 + d. Thecoefficients of d correspond to the coefficients of S2 so that the right-hand sides inI3 will be:

Thus we must have:

300 − d ≥ 0; 200 + d ≥ 0 and 550 − d ≥ 0

d ≤ 300; d ≥ −200 and d ≤ 550.

That leads to

−200 ≤ d ≤ 300

700 − 200 ≤ 700 + d ≤ 700 + 300.

Page 92: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

86 STUDY UNIT 8 THE SIMPLEX METHOD – USING THE COMPUTER

The right-hand side of CONSTR2 can therefore vary between 500 and 1 000 with-out the current optimal basis becoming infeasible. The ranging analysis of the pre-vious section therefore gives the AI as 300 and the AD as 200 for the right-handside of CONSTR2.

2. Suppose the right-hand side of CONSTR3 changes from 2 000 to2 000 + d. The co-efficients of d correspond to the coefficients of S3 so that the right-hand sides in I3will be:

Equation Coefficient of S3 Right-hand side of equationEquation for CONSTR1 0 300Equation for CONSTR2 0 200Equation for CONSTR3 1 550 + d

Thus,

550 + d ≥ 0; that is d ≥ −550;

and thus

2 000 + d ≥ 2000 − 550 = 1450.

As long as the right-hand side of CONSTR3 is greater than 1 450, the current basis willremain optimal and feasible. The ranging analysis therefore gives the AI as infinity andthe AD as 550.

Exercise 8.3

How will the optimal solution change if 800 units of CONSTR2 are available?

Solution to Exercise 8.3

If 800 units of CONSTR2 are available, the current final basis will still be optimal andfeasible. We have d = 100 and thus:

PROFIT = 5100 + 3d = 5 400

P3 = 300 − d = 200

P2 = 200 + d = 300

S3 = 550 − d = 450.

Page 93: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

StudyUnit 9

Special LP models

Theme:

Discussion of special cases of LP models, such as infeasible models, modelswith alternative optimal solutions, unbounded models and models with de-generate solutions.

Contents9.1 Special LP models . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

9.2 Infeasible LP models . . . . . . . . . . . . . . . . . . . . . . . . . 88

9.3 Alternative solutions . . . . . . . . . . . . . . . . . . . . . . . . . 90

9.4 Unbounded LP models . . . . . . . . . . . . . . . . . . . . . . . . 93

9.5 Degenerate solutions . . . . . . . . . . . . . . . . . . . . . . . . . 95

Learning objectives

On completion of this study unit the student must be able to

• recognise an infeasible LP model and explain what it means;

• recognise alternative optimal solutions to an LP model and explain what it means;

• generate alternative optimal solutions if they exist with the help of LINDO ;

• recognise an unbounded LP model and explain what it means;

• recognise degenerate solutions to an LP model and explain what it means;

87

Page 94: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

88 STUDY UNIT 9 SPECIAL LP MODELS

• understand and explain what the problems associated with degeneracy are.

9.1 Special LP models

Sections from prescribed book, WinstonChapter 4, Section 4.7; 4.8; 4.11:

In the previous sections, we considered an LP model with a unique optimal solution. Notall LP models will have a unique optimal solution. It is possible to have infeasible LPmodels, that is, models that do not have a feasible solution. LP models may also havealternative or multiple solutions, be unbounded or degenerate.

LP models giving rise to these different classes of solutions were discussed in the second-level LP module and you will need to refresh your memory on this. The following sec-tions point out some important principles of these special LP models and show you howLINDO deals with them.

9.2 Infeasible LP models

Consider the following as an example of an infeasible LP model:

Maximise PROFIT = 5P1 + 2P2

subject to

4P1 + P2 ≥ 12

5P1 + P2 ≤ 10

and

P1, P2 ≥ 0.

A graphical representation of the model is given in the following figure.

Page 95: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

9.2. INFEASIBLE LP MODELS 89

1 2 3 4 5−1

5

10

15

20

−5

−10

P2

P1

4P1 + P2 ≥ 12

5P1 + P2 ≤ 10

Figure 9.1

This clearly illustrates that the feasible area is empty (contains no points) and that thereis no solution which satisfies both constraints simultaneously.

Suppose this model is solved by hand by means of the big-M method. In the final tableau,the artificial variable of the first constraint, R1, will have a positive value. This meansthat the simplex method was not able to eliminate this artificial variable from the basisand that a feasible solution in which the artificial variable is zero, does not exist. Hencethe model has no feasible solution.

Infeasible LP models do not often occur and they are usually the result of errors in theformulation of the model.

If the model is solved with LINDO, an error message appears which states that there isno feasible solution. The message also advises that the DEBUG command must be usedfor more information. As the infeasible model is usually the result of errors in the formu-lation of the model, the DEBUG command on the SOLVE menu is a useful tool to usein finding errors. You can see how to use the DEBUG command by activating the HELPmenu and searching for the DEBUG command.

An infeasible LP model can be identified as follows:

• on a graph, the feasible area is empty;

• the final simplex tableau contains an artificial variable with a positive value;

• the LINDO solution states that the solution is infeasible.

Page 96: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

90 STUDY UNIT 9 SPECIAL LP MODELS

9.3 Alternative solutions

Consider the following as an example of an LP model with alternative or multiple opti-mal solutions:

Maximise PROFIT = 5P1 + 2P2

subject to

7,5P1 + P2 ≤ 12

2,5P1 + P2 ≤ 10

and

P1, P2 ≥ 0.

A graphical representation of the model is given in the following figure.

1 2 3 4 5−1

5

10

15

20

−5

−10

P2

P1

2,5P1 + P2 = 10

7,5P1 + P2 = 15

WINS = 0

WINS = 10

C

D

A

Figure 9.2

As the isoprofit line moves to the right, the profit increases and the maximum profit willbe obtained when the isoprofit line coincides with the line corresponding to the secondconstraint. Every point on the line segment DC is therefore optimal. The endpoints Dand C are referred to as the alternate endpoint optimal solutions, with the understandingthat these points represent the endpoints of a range of optimal solutions.

At point D the solution is P1 = 0, P2 = 10, PROFIT = 20 and at point C the solutionis P1 = 1, P2 = 7,5 and PROFIT = 20. Points on the line segment DC will have differ-ent values for P1 and P2, but PROFIT will still be 20. This illustrates an important

Page 97: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

9.3. ALTERNATIVE SOLUTIONS 91

property of alternative optimal solutions, namely that, alternative optimal solu-tions will all have the same objective function value, but will have different valuesfor the variables.

We now solve this model with LINDO. The printout of the solution and the final simplextableau are as follows:

LP OPTIMUM FOUND AT STEP 1

OBJECTIVE FUNCTION VALUE

1) 20.00000

VARIABLE VALUE REDUCED COSTP1 0.000000 0.000000P2 10.000000 0.000000

ROW SLACK OR SURPLUS DUAL PRICES2) 5.000000 0.0000003) 0.000000 2.000000

NO. ITERATIONS= 1

RANGES IN WHICH THE BASIS IS UNCHANGED:

OBJ COEFFICIENT RANGESVARIABLE CURRENT ALLOWABLE ALLOWABLE

COEF INCREASE DECREASEP1 5.000000 0.000000 INFINITYP2 2.000000 INFINITY 0.000000

RIGHTHAND SIDE RANGESROW CURRENT ALLOWABLE ALLOWABLE

RHS INCREASE DECREASE2 15.000000 INFINITY 5.0000003 10.000000 5.000000 10.000000

This solution gives P1 = 0, P2 = 10 and PROFIT = 20 and corresponds to point D onthe graph.

From the solution we see that P1 takes on the value of its bound 0 and is therefore anon-basic variable. The shadow cost of this non-basic variable P1 is zero. This meansthat an increase in the value of this variable will not influence the value of the objectivefunction and an alternative solution therefore exists with the same objective function va-lue.

The same can be seen from the final simplex tableau, that is, P1 is a non-basic variableand its coefficient in the objective function row is zero. This means that the objective

Page 98: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

92 STUDY UNIT 9 SPECIAL LP MODELS

function value will not change if this non-basic variable becomes positive and hence analternative solution exists with the same objective function value.

Let us see what happens if we allow the non-basic variable P1 to enter the basis.

Starting from the final simplex tableau created with LINDO, we proceed as follows:

Make sure that the model is in the active window.

Activate the SOLVE menu and select PIVOT.

The PIVOT box appears.

Under the heading Pivot Variable, select USE MINE.

In MY VARIABLE SELECTION, enter P1.

OK.

Close the boxes that are still active.

Activate the SOLVE menu and select SOLVE.

The result of this pivot operation is as follows:

P1 ENTERS AT VALUE 1.0000 IN ROW 2 OBJ. VALUE= 20.000

LP OPTIMUM FOUND AT STEP 3

OBJECTIVE FUNCTION VALUE

1) 20.00000

VARIABLE VALUE REDUCED COSTP1 1.000000 0.000000P2 7.500000 0.000000

ROW SLACK OR SURPLUS DUAL PRICES2) 0.000000 0.0000003) 0.000000 2.000000

NO. ITERATIONS= 3

RANGES IN WHICH THE BASIS IS UNCHANGED:

OBJ COEFFICIENT RANGESVARIABLE CURRENT ALLOWABLE ALLOWABLE

COEF INCREASE DECREASEP1 5.000000 10.000000 0.000000P2 2.000000 0.000000 1.333333

Page 99: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

9.4. UNBOUNDED LP MODELS 93

RIGHTHAND SIDE RANGESROW CURRENT ALLOWABLE ALLOWABLE

RHS INCREASE DECREASE2 15.000000 15.000000 5.0000003 10.000000 5.000000 5.000000

This solution gives P1 = 1, P2 = 7,5 and PROFIT = 20. This corresponds to point Con the graph.

It is interesting to note that in this solution, the first constraint, which is a binding con-straint (it has zero slack), has a shadow price of zero. This indicates that there are othersolutions, which use more or less of the resource, but which have the same objective func-tion value.

Alternative optimal solutions can be identified as follows:

• on a graph, the isoprofit line coincides with an entire line segment before leavingthe feasible area;

• in the final simplex tableau, a non-basic variable has a zero coefficient in the ob-jective function row;

• on the LINDO solution, a non-basic variable has a shadow cost of zero, or abinding constraint has a shadow price of zero.

9.4 Unbounded LP models

Consider the following as an example of an unbounded LP model:

Maximise PROFIT = P1 + P2

subject to

P1 − P2 ≤ 2

−4P1 + P2 ≤ 4

and

P1, P2 ≥ 0.

A graphical representation of the model is given in the following figure.

Page 100: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

94 STUDY UNIT 9 SPECIAL LP MODELS

1 2 3 4 5−1

1

2

3

4

5

6

−1

−2

P2

P1

Profit =0

Profit =4

Figure 9.3

From the graph we see that the feasible area is unbounded, which means that there isno upper bound on the values of P1 and P2. The profit increases as the isoprofit linemoves to the right, in other words, as the values of P1 and P2 increase. As P1 and P2can increase indefinitely, PROFIT can also increase indefinitely and there is therefore noupper bound on PROFIT. We say that the LP model is unbounded.

If the model is solved with LINDO, an error message appears which states that the so-lution is unbounded. It also advises that the DEBUG command must be used. As anunbounded model is usually the result of errors in the formulation of the model, the DE-BUG command can help you to find these errors.

The ratio test of the simplex method uses the coefficients of the entering variable whendetermining the leaving variable. Zero and negative coefficients of the entering variableare not considered in this process. What happens if all the coefficients of the enteringvariable are zero or negative? How is the leaving variable now determined?

Let us use an example to answer this question. Suppose we have the following set ofequations:

PROFIT − 8P1 + 6S1 + 3S2 = 5 100

P3 + 2S1 − S2 = 300

−2P1 + P2 − S1 + S2 = 200

−3P1 − 1,5S1 − S2 + S3 = 550

Page 101: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

9.5. DEGENERATE SOLUTIONS 95

P3, P2 and S3 are the basic variables and P1, S1 and S2 are the non-basic variables.The latter have zero values.

P1 is now the entering variable. If we set P1 = θ > 0, then

PROFIT − 8θ = 5 100 ⇒ PROFIT = 5 100 + 8θ

P3 = 300 ⇒ P3 = 300

−2θ + P2 = 200 ⇒ P2 = 200 + 2θ

−3θ + S3 = 550 ⇒ S3 = 550 + 3θ.

Therefore P3 remains unchanged irrespective of the value of P1, while PROFIT,P2 andS3 increase if P1 increases. Thus here is no basic variable that will become zero if P1increases. As a result, there is no upper bound on the value that P1 may assume. Thismeans that a leaving variable cannot be determined.

P1 may increase indefinitely and as a result PROFIT may also increase indefinitely. Thereis therefore, no upper bound on PROFIT and the LP model is unbounded.

An unbounded LP problem can be identified as follows:

• on a graph, the feasible area is unbounded in the direction of increasing objec-tive function value (maximisation problem) and decreasing objective function value(minimisation problem);

• in the simplex tableau, an entering variable can be found, but in the column ofthe entering variable, all values are zero or negative;

• the LINDO solution states that the solution is unbounded.

9.5 Degenerate solutions

Consider the following as an example of an LP model with a degenerate solution:

Maximise PROFIT = 3P1 + 9P2

subject to

P1 + 4P2 ≤ 8

P1 + 2P2 ≤ 4

and

P1, P2 ≥ 0.

Page 102: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

96 STUDY UNIT 9 SPECIAL LP MODELS

A graphical representation of the model is given in the following figure.

2 4 6 8 10−2

1

2

3

−1

P2

P1

P1+

2P2

=4

P1 +4P2 =

8

Profit =18

Profit =0

Figure 9.4

The optimal solution is at point A. Point A is where three lines intercept, P1 + 4P2 = 8,P1 + 2P2 = 4 and P1 = 0. In two dimensions only two lines are needed to define apoint uniquely. Hence point A is over-determined and one of the lines is thus unneces-sary. From the graph it is clear that P1 + 4P2 = 8 lies completely outside the feasiblearea and is therefore the culprit.

In the model, the corresponding constraint P1 + 4P2 ≤ 8 is unnecessary and we saythat it is a redundant constraint. If it is omitted from the model, the feasible area wouldnot change. The presence of a redundant constraint indicates that the model has adegenerate solution.

The simplex method in selecting the leaving variable, selects the variable that will be-come zero the soonest as the entering variable is increased. Suppose two or more var-iables become zero at exactly the same time. Well, only one of them may leave the basisand we may therefore select any one of them as the leaving variable. The others remainbasic and will have zero values in the new basic solution. Such a solution, in which one or

Page 103: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

9.5. DEGENERATE SOLUTIONS 97

more of the basic variables are zero, is known as a degenerate solution. This seems to beacceptable, but can cause problems.

Let us consider the model given above. We will solve this model in a step-by-step mannerwith LINDO, in other words, we will tell the LINDO solver on which variables to pivotat each iteration.

The initial simplex tableau is as follows:

THE TABLEAU

ROW (BASIS) P1 P2 SLK 2 SLK 31 ART -3.000 -9.000 0.000 0.000 0.0002 SLK 2 1.000 4.000 1.000 0.000 8.0003 SLK 3 1.000 2.000 0.000 1.000 4.000

ART ART -3.000 -9.000 0.000 0.000 0.000

From this it follows that P2 is the entering variable and we have a choice between S1(SLK 2) and S2 (SLK 3) as the leaving variable. Suppose we choose S1. The result ofthe first pivot is (iteration 1):

SLK 2 ENTERS AT VALUE 0.00000E+00 IN ROW 2 OBJ. VALUE= 18.000

LP OPTIMUM FOUND AT STEP 4

OBJECTIVE FUNCTION VALUE

1) 18.00000

VARIABLE VALUE REDUCED COSTP1 0.000000 1.500000P2 2.000000 0.000000

ROW SLACK OR SURPLUS DUAL PRICES2) 0.000000 0.0000003) 0.000000 4.500000

NO. ITERATIONS= 4

RANGES IN WHICH THE BASIS IS UNCHANGED:

OBJ COEFFICIENT RANGESVARIABLE CURRENT ALLOWABLE ALLOWABLE

COEF INCREASE DECREASEP1 3.000000 1.500000 INFINITYP2 9.000000 INFINITY 3.000000

RIGHTHAND SIDE RANGESROW CURRENT ALLOWABLE ALLOWABLE

RHS INCREASE DECREASE

Page 104: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

98 STUDY UNIT 9 SPECIAL LP MODELS

2 8.000000 INFINITY 0.0000003 4.000000 0.000000 4.000000

THE TABLEAU

ROW (BASIS) P1 P2 SLK 2 SLK 31 ART 1.500 0.000 0.000 4.500 18.0002 SLK 2 -1.000 0.000 1.000 -2.000 0.0003 P2 0.500 1.000 0.000 0.500 2.000

P2 ENTERS AT VALUE 2.0000 IN ROW 2 OBJ. VALUE= 18.000

THE TABLEAU

ROW (BASIS) P1 P2 SLK 2 SLK 3

1 ART -0.750 0.000 2.250 0.000 18.0002 P2 0.250 1.000 0.250 0.000 2.0003 SLK 3 0.500 0.000 -0.500 1.000 0.000

The basic solution is now P2 = 2, S2 = 0 and PROFIT = 18. Since S2 is a basic vari-able with a zero value, this solution is degenerate.

At the next iteration, we choose P1 as the entering variable and S2 as the leaving vari-able. The result of this is (iteration 2):

P1 ENTERS AT VALUE 0.00000E+00 IN ROW 3 OBJ. VALUE= 18.000

THE TABLEAU

ROW (BASIS) P1 P2 SLK 2 SLK 3

1 ART 0.000 0.000 1.500 1.500 18.0002 P2 0.000 1.000 0.500 -0.500 2.0003 P1 1.000 0.000 -1.000 2.000 0.000

SLK 3 ENTERS AT VALUE 4.0000 IN ROW 3 OBJ. VALUE= 0.00000E+00

THE TABLEAU

ROW (BASIS) P1 P2 SLK 2 SLK 31 ART -3.000 -9.000 0.000 0.000 0.0002 SLK 2 1.000 4.000 1.000 0.000 8.0003 SLK 3 1.000 2.000 0.000 1.000 4.000

Page 105: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

9.5. DEGENERATE SOLUTIONS 99

LP OPTIMUM FOUND AT STEP 7

OBJECTIVE FUNCTION VALUE

1) 18.00000

VARIABLE VALUE REDUCED COSTP1 0.000000 1.500000P2 2.000000 0.000000

ROW SLACK OR SURPLUS DUAL PRICES2) 0.000000 0.0000003) 0.000000 4.500000

NO. ITERATIONS= 7

RANGES IN WHICH THE BASIS IS UNCHANGED:

OBJ COEFFICIENT RANGESVARIABLE CURRENT ALLOWABLE ALLOWABLE

COEF INCREASE DECREASEP1 3.000000 1.500000 INFINITYP2 9.000000 INFINITY 3.000000

RIGHTHAND SIDE RANGESROW CURRENT ALLOWABLE ALLOWABLE

RHS INCREASE DECREASE2 8.000000 INFINITY 0.0000003 4.000000 0.000000 4.000000

THE TABLEAU

ROW (BASIS) P1 P2 SLK 2 SLK 31 ART 1.500 0.000 0.000 4.500 18.0002 SLK 2 -1.000 0.000 1.000 -2.000 0.0003 P2 0.500 1.000 0.000 0.500 2.000

This is the final simplex tableau and the optimal solution is P1 = 0, P2 = 2 and PROFIT= 18. This is also a degenerate solution.

Notice that the solution in iteration 1 and the optimal solution in iteration 2 are practi-cally the same, namely P1 = 0, P2 = 2, S1 = 0, S2 = 0 and PROFIT = 18, even thoughthe bases are different. In iteration 1, P2 and S2 are the basic variables and in iteration2, P1 and P2 are the basic variables. The value of the objective function, PROFIT, isthe same, namely 18.

This clearly illustrates why degeneracy is undesirable in practice. It usually results in thesimplex method getting stuck and going through a few iterations during which the ob-jective function value does not improve and the solution does not really change. It may

Page 106: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

100 STUDY UNIT 9 SPECIAL LP MODELS

even happen that the simplex method gets stuck in a cycle from which it cannot escape.This is, however, seldom a problem in practice and fortunately the simplex method canbe modified to ensure that cycling will not occur. This will not be discussed in this mo-dule.

In practice, degeneracy always indicates redundancy. It is seldom possible to say whichconstraint is redundant as the simplex tableaux do not give us any indication of whichone it could be and we cannot turn to a graphical presentation when the model has morethan two variables.

We now solve the model directly with LINDO, in other words, we select SOLVE from theSOLVE menu and the following solution is obtained:

LP OPTIMUM FOUND AT STEP 1

OBJECTIVE FUNCTION VALUE

1) 18.00000

VARIABLE VALUE REDUCED COSTP1 0.000000 1.500000P2 2.000000 0.000000

ROW SLACK OR SURPLUS DUAL PRICES2) 0.000000 0.0000003) 0.000000 4.500000

NO. ITERATIONS= 1

RANGES IN WHICH THE BASIS IS UNCHANGED:

OBJ COEFFICIENT RANGESVARIABLE CURRENT ALLOWABLE ALLOWABLE

COEF INCREASE DECREASEP1 3.000000 1.500000 INFINITYP2 9.000000 INFINITY 3.000000

RIGHTHAND SIDE RANGESROW CURRENT ALLOWABLE ALLOWABLE

RHS INCREASE DECREASE2 8.000000 INFINITY 0.0000003 4.000000 0.000000 4.000000

The model has two constraints and in the solution only one variable has a positive value.This indicates that the solution is degenerate. In general, if a model has m constraintsand the LINDO output indicates that less than m variables are positive, then the opti-mal solution is a degenerate solution.

From our discussion above, we can deduce that a model has a degenerate solution if a ba-

Page 107: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

9.5. DEGENERATE SOLUTIONS 101

sic variable has a zero value. However, in a model with bounded variables, a degeneratesolution may result if a basic variable takes on the value of its upper bound. Hence, ingeneral, a model will have a degenerate solution if a basic variable takes on thevalue of one of its bounds.

Degeneracy seldom poses a problem in practice. Care must be taken, though, in theinterpretation of the computer solution. The shadow costs, shadow prices and rang-ing analysis must be interpreted differently in the case of a degenerate optimal solution.

Remember that in a degenerate solution there are alternative basic solutions in which thevariables and the objective function take on exactly the same values. The shadow costs,shadow prices and ranges associated with a particular solution may, however, differ fromthat of an alternative solution.

Then each shadow cost must be considered as a lower bound on the amount bywhich the objective function value will weaken if the value of the variable con-cerned is increased by one unit. Similarly, each shadow price must be considered as alower bound on the amount by which the objective function value will strengthenif the right-hand side of the constraint concerned is increased by one unit. Each rangegiven by the ranging analysis represents the smallest allowable increase and thesmallest allowable decrease for the parameter concerned. If the parameter in-creases to a value outside the range, we would expect a new solution. In degeneracy thisis not always the case as we may get the same solution although there has been a changein the basis.

These concepts are illustrated in the following exercise.

Exercise 9.4

Consider the following LP model:

Maximise W = 6X1 + 11X2 + 9X3

subject to

0,1X1 + 0,2X2 + 0,7X3 ≤ 300

0,2X1 + 0,4X2 + 0,5X3 ≤ 300

0,2X1 + 0,2X2 + 0,3X3 ≤ 150

and

X1, X2, X3 ≥ 0.

(a) Use LINDO to solve the model. Based on the ranging analysis, state what resultyou would expect if the objective function coefficient of X3 should change to 15.Make this change to your model, solve with LINDO again and check whether theresult agrees with your expectations.

(b) Based on LINDO ’s solution to the given model, what would you expect the ob-jective function value to be if you should set X3 = 1. Change the lower bound of

Page 108: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

102 STUDY UNIT 9 SPECIAL LP MODELS

X3 to 1, solve with LINDO and check whether the result agrees with your expecta-tions.

(c) Comment on the interpretation of an LP solution when the optimal basis is degen-erate.

Solution to Exercise 9.4

(a) From the LINDO output it follows that the optimal solution is X1 = 0, X2 = 750,X3 = 0 and W = 8 250.

X1 = 0 with shadow cost 0. This implies that X1 is a basic variable assuming thevalue 0 of its lower bound. Hence, this is a degenerate solution.

X2 = 750 with shadow cost 0. This implies that X2 is a basic variable.

X3 = 0 with shadow cost 5. This implies that X3 is a non-basic variable.

The objective function ranges part of the ranging analysis gives an AI of 5 and anAD of infinity for the objective function coefficient, 9, of X3. This means that theallowable range for the objective function coefficient of X3 is (−∞; 14].

If the objective function coefficient is changed to 15, it is outside this range and wewill expect the basis to change, X3 to be a basic variable, and that W will there-fore improve.

The objective function coefficient is now changed to 15 and this model is solvedwith LINDO.

The solution is now X1 = 0, X2 = 750, X3 = 0 and W = 8 250.

X1 = 0 with shadow cost 2. This implies that X1 is non-basic.

X2 = 750 and is basic.

X3 = 0 with shadow cost 0. This implies that X3 is a basic variable assuming thevalue 0 of its lower bound. Hence, this is a degenerate solution.

The solution is exactly the same as before, although the basis is different. Thisclearly illustrates that in the case of a degenerate solution, each range should beseen as the smallest interval within which the solution will not change (eventhough the basis may change). In other words, if an objective function coefficientor a right-hand side changes to a value outside of its range, the basis will changebut not necessarily the solution. We can therefore say that the range over which thesolution remains unchanged may possibly be larger than the variation range con-cerned.

(b) X3 is a non-basic variable with shadow cost 5. We would therefore expect the ob-jective function value to decrease by 5 units to 8 245 if X3 is set to 1.

We now set a simple lower bound of 1 on X3 and solve with LINDO. This yields asolution in which W = 8 242,5. The objective function value therefore decreases by

Page 109: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

9.5. DEGENERATE SOLUTIONS 103

7,5.

This clearly illustrates that in the case of a degenerate solution, each shadow cost(shadow price) should be seen as a lower limit on the amount by which the objec-tive function value will weaken (or strengthen for a shadow price) when the limit ofthe variable (or constraint) increases by one unit. In other words, the real weak-ening or strengthening may possibly be more than the amount indicated by theshadow cost or price.

(c) Both degenerate solutions in (a) above are optimal with the same objective functionvalue. Thus they are two alternative solutions, or rather two alternative optimalbases, for the given model. However, no indication of this fact is given in the objec-tive function rows, that is, by the shadow costs or prices. A person evaluating thecomputer printouts would therefore not be aware of this fact. This in itself is not aproblem, but the fact that the shadow costs and prices of the two solutions differ, isa problem. The ranges of the objective function coefficients and the right-hand sideelements will also differ. Decisions based on this information will also differ for thetwo different bases. The answer to any what-if questions should therefore be basedon another computer run, rather than on this information. This is the case for anydegenerate solution.

Degenerate solutions can be identified as follows:

• on a graph, a redundant constraint is present, in other words, a point is over-determined;

• in the final simplex tableau, a basic variable assumes the value of one of its bounds;

• in the LINDO solution, a basic variable assumes the value of one of its bounds.

Page 110: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

104 STUDY UNIT 9 SPECIAL LP MODELS

Page 111: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

StudyUnit 10

Parametric analysis

Theme:

Explanation of how parametric analysis can be used to investigate changes inan objective function coefficient or the right-hand side of a constraint.

Contents10.1 Parametric analysis of an objective function coefficient . . . . 106

10.2 Parametric analysis of the right-hand side of a constraint . . . 108

Learning objectives

On completion of this study unit the student must be able to

• perform a parametric analysis to investigate all possible changes in an objectivefunction coefficient;

• perform a parametric analysis to investigate all possible changes in the right-handside of a constraint;

• present the results of a parametric analysis in tabular form;

• present the results of a parametric analysis in graphical form.

105

Page 112: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

106 STUDY UNIT 10 PARAMETRIC ANALYSIS

Parametric analysis with LINDO

We already know that for a specific parameter the ranging analysis provides a singlerange over which the current optimal basis will remain valid. You may wonder what hap-pens if this parameter is varied over its entire range and not just over the allowable rangelisted by the ranging analysis. A parametric analysis will provide a set of ranges and so-lutions over the whole range of values that the parameter may assume.

Some LP packages are capable of doing parametric analysis. It is just a logical extensionof the ranging analysis. LINDO can only do parametric analysis of the right-hand sidesof constraints, but it does not yet support such analysis of objective function coefficients.We can, however, do parametric analysis ourselves with the help of LINDO.

The general approach is as follows: Suppose we wish to perform an analysis for a para-meter, p, over its entire range [a; b]. We solve the model for different values of p, start-ing with p = a. The associated optimal solution and allowable range, say [a; p1], are ob-tained. The model is now resolved for p = p1 and then again for p = p1 + 1. If the nextallowable range is [p1; p2], the model will be resolved for p = p2 and also for p = p2 + 1.The process is repeated until either b is reached or a point beyond which the solution ei-ther does not change or does not exist.

We need to solve the model at an endpoint of a range pi and again at a point within therange, say at point pi + 1, for the following reason:

Each endpoint of a range, pi, represents two bases, namely the optimal basis over [pi−1;pi] and the optimal basis over [pi; pi+1]. When you use LINDO to solve for p = pi, youwill get only one of the two bases. Say it is the basis for [pi−1; pi]. In order to find thebasis for [pi; pi+1] and the value of pi+1, you will need to solve the model for p set to avalue within the interval. We choose p = pi + 1.

The following examples will illustrate both the technique used when performing a para-metric analysis as well as circumstances where a parametric analysis of a parameter maybe useful.

10.1 Parametric analysis of an objective function coef-

ficient

Let us again consider the following LP model:

Page 113: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

10.1. PARAMETRIC ANALYSIS OF AN OBJECTIVE FUNCTION COEFFICIENT107

Maximise PROFIT = 16P1 + 12P2 + 9P3

subject to

2P1 + P2 + P3 ≤ 500 CONSTR1

4P1 + 2P2 + P3 ≤ 700 CONSTR2

4P1 + 3,5P2 + 2,5P3 ≤ 2 000 CONSTR3

and

P1, P2, P3 ≥ 0.

Suppose that product P2 contains a sub-component that must be bought in from an out-side contractor and that management has just put out a tender for supplying this sub-component. Thus, management is not sure at what price this component will be boughtin. As a result the per unit profit contribution of P2 is highly uncertain. In the mean-time, however, planning cannot come to a standstill and management has to have someidea of what a future production plan might look like.

This is an ideal situation for applying parametric analysis to present management withinformation relevant to all possible future scenarios.

Let us now do a parametric analysis of the objective function coefficient ofP2. Please do all computer runs suggested below yourself, otherwise the analysis willmake no sense to you. For each run, print out LINDO ’s solution and keep it at hand fora final analysis of the problem situation.

We start by solving the model with the objective function coefficient of P2 set to zero.The optimal solution gives P1 = 0, P2 = 0, P3 = 500 and PROFIT = 4 500 with AI =9 and AD = infinity. Hence, the allowable range for the coefficient of P2 is (-∞; 9].

A change in the objective function coefficient of P2 within this range, will not change thevalues of the variables. It will also have no effect on the optimal profit value because P2is zero.

Let us now see what happens if the objective function coefficient of P2 is 9.

The solution gives P1 = 0, P2 = 200, P3 = 300 and PROFIT = 4 500 with AI = 9 andAD = 0. The allowable range is [9; 18]. A change in the objective function coefficient ofP2 within this range will not change the values of P1, P2 and P3. Since P2 = 200 inthis case, the profit will increase by 200 for every unit increase above 9 in the value of thecoefficient.

We will expect these results if the coefficient of P2 is 10, a value within the allowablerange. We solve this model again and the solution gives P1 = 0, P2 = 200, P3 = 300,PROFIT = 4 700 with AI = 8 and AD = 1.

The allowable range is still [9; 18] andPROFIT = 4 700 = 4 500 + 200.

From this we can deduce that if the objective function coefficient of P2 is p and p is within

Page 114: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

108 STUDY UNIT 10 PARAMETRIC ANALYSIS

the allowable range [9; 18], the PROFIT can be calculated by means of the following gen-eral formula:

PROFIT = 4500 + 200(p − 9) = 4500 + 200p − 1 800 = 2 700 + 200p.

We now set the objective function coefficient of P2 to 18, the upper limit of the allowablerange, and solve the model again.

The solution gives P1 = 0, P2 = 200, P3 = 300, PROFIT = 6 300 with AI = 0, AD = 9and hence an allowable range of [9; 18].

The profit could have been calculated according to the formula above asPROFIT = 2 700 + 200(18) = 6 300.

The model is now solved with the coefficient of P2 set at 19, a value just above the al-lowable upper limit of 18. The solution is P1 = 0, P2 = 350, P3 = 0, PROFIT = 6 650with AI = infinity, AD = 1 and hence an allowable range of [18; ∞). As only P2 has apositive value, it is the only product that will determine the profit value. In this case, theprofit is calculated as 350 × 19 = 6 650. A change within the allowable range will haveno effect on the values of the variables, but each unit increase above 18 in the objectivefunction coefficient will be accompanied by an increase of 350 in the profit value. If theobjective function coefficient of P2 is p and p is within the allowable range [18; ∞), thenthe PROFIT can be calculated by means of the following general formula:

PROFIT = 350 × p.

The above analysis is complete since it covers the whole range of possible values for theobjective function coefficient of P2. The results can be summarised in tabular form asfollows:

Profit contribution Number of unitsof P2 P1 P2 P3 PROFITp ≤ 9 0 0 500 4 500

9 ≤ p ≤ 18 0 200 300 2 700 + 200pp ≥ 18 0 350 0 350p

Several deductions can be made from this analysis. For example, it shows that whateverthe price of the sub-component, it will not be worthwhile to produce any units of productP1. It also shows that under no circumstances will more than 350 units of product P2 ormore than 500 units of product P3 be made.

10.2 Parametric analysis of the right-hand side of a

constraint

LINDO is capable of automatically producing a parametric analysis of the right-handside of a constraint. To have LINDO parametrically vary a right-hand side value, solve

Page 115: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

10.2. PARAMETRIC ANALYSIS OF THE RIGHT-HAND SIDE OF A CONSTRAINT109

the model and then select the PARAMETRICS command from the REPORTS menu.

Let us once again consider the model given in the previous section. Suppose now thatthe model needs to be solved for planning purposes at a time when the availability ofthe material in CONSTR1 is highly uncertain and could be anything from zero to 2 000.In order to present management with information upon which they can base a decision,we could present them with a set of all possible solutions to this specific problem. Todo this, we must perform a parametric analysis of the right-hand side of CON-STR1. Please do all computer runs suggested below, otherwise the analysis will makeno sense to you.

We solve the model with LINDO and then activate the PARAMETRICS command fromthe REPORTS menu. A dialog box appears and you must select the parametric row, inthis case CONSTR1, and then select a new RHS value, say we select 2 000. If we selectthe report type as “text”, then the following results:

RIGHTHANDSIDE PARAMETRICS REPORT FOR ROW: 2

VAR VAR PIVOT RHS DUAL PRICE OBJOUT IN ROW VAL BEFORE PIVOT VAL

500.000 6.00000 5100.00P2 SLK 2 3 700.000 6.00000 6300.00

2000.00 0.000000E+00 6300.00

We see that this text report shows the entering and leaving variables for every pivot, theright-hand side value as it changes from the current value to the new right-hand side va-lue, the dual price and the objective value of the new solution, but unfortunately it doesnot give the values of the variables.

We can also select “graphics” as a report type and choose to display the graphics in ei-ther two or three dimensions. A graph representing the relationship between the objec-tive function value and the right-hand side value is then obtained. Each line in the textreport above represents a breakpoint in this piecewise linear function. You should do thisyourself so that you can see the graph.

We would like a parametric analysis that also gives the values of the variables and willtherefore do the analysis ourselves. It is similar to that done in the previous section andwill now be explained in detail.

Go back to the model given at the beginning of the previous section. We want to do ananalysis of the right-hand side of CONSTR1 from zero to 2 000 and start off by settingthe right-hand side of CONSTR1 to 0 and solving the model with LINDO. Please do thisyourself.

The result, of course, is a zero solution with P1 = 0, P2 = 0, P3 = 0 and PROFIT = 0with AI = 350 and AD = 0. Hence, the allowable range for the right-hand side of CON-STR1 is [0; 350].

Page 116: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

110 STUDY UNIT 10 PARAMETRIC ANALYSIS

Next we solve the model with the right-hand side of CONSTR1 set to 350. The onlychange to the solution is that the value of P2 is now 350 and PROFIT is now 4 200. Theallowable range for the right-hand side of CONSTR1 is still [0; 350].

Now we set the right-hand side of CONSTR1 to 351 and solve again. The solution is P1= 0, P2 = 349, P3 = 2 and PROFIT = 4 206 and the allowable range is now [350; 700].

The model is solved for the right-hand side value of CONSTR1 set to 700. The solutiongives P1 = 0, P2 = 0, P3 = 700 and PROFIT = 6 300 with AI = 0 and AD = 350. Theallowable range remains at [350; 700].

Set the right-hand side of CONSTR1 to 701 and solve again. The solution is exactly thesame as the previous one except that the allowable range is now [700; ∞).

The analysis is now complete. The analysis yielded five computer printouts, which weneed to represent in a sensible manner. This time it is more difficult to present the so-lution in tabular form, since the profit value as well as the values of the variables willchange as the right-hand side of CONSTR1 changes.

Let us start off by tabulating the results of our computer runs:

Right-hand side Number of units PROFIT Allowable rangeof CONSTR1 to be produced for the right-hand

P1 P2 P3 side of CONSTR10 0 0 0 0 [0; 350]350 0 350 0 4 200 [0;350]351 0 349 2 4 206 [350; 700]700 0 0 700 6 300 [350; 700]701 0 0 700 6 300 [700; ∞)

To generate a table that will express the profit and the values of the variables as func-tions of the right-hand side of CONSTR1, we have to do some calculations. We explainhow this is done in what follows.

In a linear model all relationships are linear and can be presented mathematically by alinear function. For example, the relationship between the right-hand side of CONSTR1,m, and the number of units of a product to be produced, say P , can be written as:

P = am + b.

In the same way, the relationship between the profit yielded and m is linear and can alsobe written in the format:

PROFIT = am + b. (Eq. 1)

This information can be used to represent the number of each product to be producedand the associated profit as a function of the right-hand side of CONSTR1, m. This mustbe done for each interval.

Let us consider the interval [0; 350].

Page 117: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

10.2. PARAMETRIC ANALYSIS OF THE RIGHT-HAND SIDE OF A CONSTRAINT111

P1 and P3 are zero throughout. We have that P2 is zero when m is 0, and P2 is 350when m is 350. It is clear that P2 = m.

For PROFIT we have that PROFIT is zero when m is zero and 4 200 when m is 350. Ifwe substitute these values in Eq. 1 above we get:

0 = a × 0 + b (Eq. 2)

and

4 200 = a × 350 + b. (Eq. 3)

From Eq. 2 it follows that b = 0.

Therefore Eq. 3 becomes:

4200 = 350a

a = 4200350

= 12.

Therefore we have PROFIT = 12 ×m.

In the interval [350; 700] we have:

• P1 = 0.

• P2 = 349 when m = 351.

• P2 = 0 when m = 700.

Therefore, if P2 = am + b, we get:

349 = 351a + b (Eq. 4)

0 = 700a + b (Eq. 5)

349 = −349a (Eq. 4 - Eq. 5)

a = −1.

Substitute a = −1 in Eq. 5.

0 = −700 + b

b = 700.

Therefore, we have P2 =−m + 700.

• P3 = 2 when m = 351.

• P3 = 700 when m = 700.

Therefore, if P3 = am + b, we get:

Page 118: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

112 STUDY UNIT 10 PARAMETRIC ANALYSIS

2 = 351a + b (Eq. 6)

700 = 700a + b (Eq. 7)

698 = 349a (Eq. 7 - Eq. 6)

a = 2.

Substitute a = 2 in Eq. 7.

700 = 1 400 + b

b = −700.

Therefore, we have P3 = 2m − 700.

• PROFIT = 4 206 when m = 351.

• PROFIT = 6 300 when m = 700.

Therefore, if PROFIT = am + b, we get:

4206 = 351a + b (Eq. 8)

6 300 = 700a + b (Eq. 9)

2 094 = 349a (Eq. 9 − Eq. 8)

a = 6.

Substitute a = 6 in Eq. 9

6 300 = 4 200 + b

b = 2 100.

Therefore, we have PROFIT = 6m + 2 100.

In the interval [700; ∞) we have:

• P1 = 0, P2 = 0, P3 = 700 and PROFIT = 6 300.

We are now ready to summarise this information in a table as follows:

Right-hand Number of unitsside of CONSTR1 to be produced

P1 P2 P3 PROFIT0 ≤ m ≤ 350 0 m 0 12m

350 ≤ m ≤ 700 0 700 − m 2m − 700 6m + 2 100m ≥ 700 0 0 700 6 300

Exercise 10.1

Use the results of the parametric analysis above to graphically present the following:

(a) The optimal profit as a function of the availability of material in CONSTR1.

(b) The numbers of P2 and P3 to be produced as a function of the availability of mate-rial in CONSTR1.

Page 119: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

10.2. PARAMETRIC ANALYSIS OF THE RIGHT-HAND SIDE OF A CONSTRAINT113

(c) The shadow price of CONSTR1 as a function of its availability.

(d) Use the graphs to write down the solution if 525 units of CONSTR1 are available.

Solution to Exercise 10.1

Note: Since all relationships are linear, drawing the graphs is very easy. All you need todo is to draw in the points representing the solutions at the endpoints of the ranges forCONSTR1 and then to join the points.

(a)

175 350 525 700 875−175

2100

4200

6300

−2100

Opt

imal

profi

t

Material available in constraint 1

(b)

Page 120: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

114 STUDY UNIT 10 PARAMETRIC ANALYSIS

175 350 525 700 875−175

350

700

1050

−350

P3

P2

Num

ber

ofpr

oduc

tsto

prod

uce

Material available in constraint 1

(c)

175 350 525 700 875

3

6

9

12

Availability of material in constraint 1

Shad

owpri

ceof

const

rain

t1

Page 121: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

10.2. PARAMETRIC ANALYSIS OF THE RIGHT-HAND SIDE OF A CONSTRAINT115

(d) P2 = 175, P3 = 350 and PROFIT = 5 250.

The above exercise illustrates that the results of a parametric analysis can easily be pre-sented graphically, thereby providing a visual summary of the findings, as well as en-abling one to read intermediate results from the graphs.

Page 122: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

116 STUDY UNIT 10 PARAMETRIC ANALYSIS

Page 123: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

StudyUnit 11

Summary and problems

Theme:

Summary of the chapter and additional problems.

Contents11.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

11.2 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

11.3 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

Learning objectives

On completion of this study unit the student must be able to

• deduce and calculate LINDO ’s outputs;

• recognise the different cases of LP models and be able to solve problems relating tothem;

• perform parametric analysis of objective function coefficients and right-hand sidesof constraints.

117

Page 124: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

118 STUDY UNIT 11 SUMMARY AND PROBLEMS

11.1 Summary

In this chapter we reviewed the simplex method as an iterative algorithm, which, startingwith a feasible basic solution, moves from one feasible basic solution to another improvedfeasible basic solution until a solution is found that cannot be improved upon further.The method moves from one basis to another by replacing a basic variable with a non-basic variable in the basis. The idea is not that you must now solve a linear programmingproblem by hand, but that you will understand how the computer gets its results.

We saw that the simplex method can indicate when a model has no feasible solution, orif the solution is unbounded – both cases should not occur in practice, and if they occur,probably indicate an error in the model. We also saw how it is possible to recognise thata model has alternative optimal solutions. You must be able to generate such alternativesolutions so that you will be able to present various options to the decision-maker, in apractical situation. We also considered the problem of degeneracy. We saw how it couldbe identified, why it is undesirable, and that it indicates redundancy in a model.

Lastly, parametric analysis was introduced as a very useful tool with which to handle un-certainty and variation, which are not under the control of the decision-maker, in an LPmodel. The examples used as illustration, are both very simple, but it should be clearthat the same kind of uncertainties and variations often occur in practice.

In the discussion we have restricted ourselves to parametric variation of a single right-hand side element and a single objective function coefficient respectively. It is also possi-ble to extend the analysis to consider simultaneous changes in these coefficients accordingto a specified pattern that can be presented by a linear function of a single parameter. Itis also possible to combine the parameterisation of the right-hand side elements and theobjective function coefficients so that they vary simultaneously as functions of the sameparameter, and to consider parametric variation of one or more of the technological coef-ficients. Furthermore, the predetermined functions representing changes in the coefficientsthat vary parametrically need not be linear. These cases are all difficult to handle and wewill not discuss this matter further in this module.

11.2 Problems

Problem 11.1

Consider the following LP model:

Maximise Z = 6X1 + 9X2 + 5X3

subject to

2X1 + 2X2 + 4X3 ≤ 11 (C1)

2X1 + 4X2 + 3X3 ≤ 16 (C2)

and

Page 125: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

11.3. SOLUTIONS 119

X1 ≥ 0 ; 0 ≤ X2 ≤ 3; X3 ≥ 0.

Use LINDO to print the initial and final simplex tableaux. Use these tableaux to gen-erate all the information that LINDO would print as final results. Show and explain allcalculations.

Problem 11.2

Consider the following LP model:

Maximise W = 28V 1 + 11V 2 + 25V 3 + 20V 4

subject to

V 1 + 2V 2 + V 3 + 4V 4 ≤ 500 (B1)

2V 1 + V 2 + 2V 3 + V 4 ≤ 600 (B2)

4V 1 + 5V 2 + 3V 3 + 4V 4 ≤ 1 000 (B3)

and

V 1, V 2, V 3, V 4 ≥ 0.

Use LINDO to find two alternative solutions to this model.

Problem 11.3

Consider the following LP model:

Maximise z = 10x1 + 5x2 + 6x3 + 3x4

subject to x1 + x2 + x3 + x4 ≤ 12 (C1)

2x1 + 2x2 + 4x3 + x4 ≤ 30 (C2)

4x1 + 3x2 + 2x3 + x4 ≤ 24 (C3)

and

x1, x2, x3, x4 ≥ 0.

(a) Do a parametric analysis of the objective function coefficient of x2. Present the re-sults in the form of a table.

(b) Do a parametric analysis of the right-hand side of the first constraint. Present theresults in the form of a table.

11.3 Solutions

Solution to Problem 11.1

The initial simplex tableau is:

THE TABLEAU

ROW (BASIS) X1 X2 X3 SLK 2 SLK 31 ART -6.000 -9.000 -5.000 0.000 0.000 0.000

Page 126: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

120 STUDY UNIT 11 SUMMARY AND PROBLEMS

C1 SLK 2 2.000 2.000 4.000 1.000 0.000 11.000C2 SLK 3 2.000 4.000 3.000 0.000 1.000 16.000

ART ART -6.000 -9.000 -5.000 0.000 0.000 0.000

The final simplex tableau is:

THE TABLEAU

ROW (BASIS) X1 X2 X3 SLK 2 SLK 31 ART 0.000 0.000 5.500 1.500 1.500 40.500C1 X1 1.000 0.000 2.500 1.000 -0.500 3.000C2 X2 0.000 1.000 -0.500 -0.500 0.500 2.500

Objection function value

The optimal value of Z is 40,5, which is read from the last column of the objective func-tion row of the final simplex tableau.

Variables

X1 = 3 and X2 = 2,5, which are read from the last column of the rows C2 and C1 of thefinal simplex tableau.

X3 = 0 since X3 is a non-basic variable as it does not appear in the basis column of thefinal simplex tableau and it assumes the value 0 of its lower bound.

X1 and X2 are basic variables and therefore, have reduced costs of 0.

The reduced cost of X3 is 5,5, which is the coefficient of X3 in the objective function rowof the final simplex tableau.

Constraints

The slack variables, SLK 2 and SLK 3, associated with the constraints C1 and C2 do notappear in the basis column of the final simplex tableau and are hence non-basic variablesand take on the value 0 of their lower bounds. C1 and C2 therefore have zero slack.

The dual prices of C1 and C2 are both 1,5, as SLK 2 and SLK 3 have coefficients of 1,5in the objective function row of the final simplex tableau.

Objective function ranges

X1 is a basic variable with a coefficient of 6 in the objective function of the model.Suppose this changes to 6 + d.

The objective function row in the final simplex tableau will change to:

Z − dX1 + 5,5X3 + 1,5S1 + 1,5S2 = 40,5.

X1 is basic and must be eliminated. From the C1 row of the final simplex tableau, we seethat:

Page 127: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

11.3. SOLUTIONS 121

X1 = 3 − 2,5X3 − S1 + 0,5S2

and this can be used to substitute for X1.

The objective function row becomes:

Z − d(3 − 2,5X3 − S1 + 0,5S2) + 5,5X3 + 1,5S1 + 1,5S2 = 40,5

Z + (5,5 + 2,5d)X3 + (1,5 + d)S1 + (1,5 − 0,5d)S2 = 40,5 + 3d.

To maintain optimality, we must have:

5,5 + 2,5d ≥ 0 ⇒ 2,5d ≥ −5,5 ⇒ d ≥ −2,2.

1,5 + d ≥ 0 ⇒ d ≥ −1,5.

1,5 − 0,5d ≥ 0 ⇒ 0,5d ≤ 1,5 ⇒ d ≤ 3.

Hence −1,5 ≤ d ≤ 3.

The AI for X1 is 3 and the AD is 1,5.

X2 is a basic variable with a coefficient of 9 in the objective function of the model.Suppose this changes to 9 + d.

The objective function row in the final simplex tableau will become:

Z − dX2 + 5,5X3 + 1,5S1 + 1,5S2 = 40,5.

X2 is basic and can be eliminated by substituting it with:

X2 = 2,5 + 0,5X3 + 0,5S1 − 0,5S2.

Hence:

Z − d(2,5 + 0,5X3 + 0,5S1 − 0,5S2) + 5,5X3 + 1,5S1 + 1,5S2 = 40,5

Z + (5,5 − 0,5d)X3 + (1,5 − 0,5d)S1 + (1,5 + 0,5d)S2 = 40,5 + 2,5d.

To maintain optimality, we must have:

5,5 − 0,5d ≥ 0 ⇒ 0,5d ≤ 5,5 ⇒ d ≤ 11.

1,5 − 0,5d ≥ 0 ⇒ 0,5d ≤ 1,5 ⇒ d ≤ 3.

1,5 + 0,5d ≥ 0 ⇒ 0,5d ≥ −1,5 ⇒ d ≥ −3.

Hence, −3 ≤ d ≤ 3.

The AI of X2 is 3 and the AD is 3.

X3 is a non-basic variable with a coefficient of 5 in the objective function of the model.Suppose this changes to 5 + d.

The objective function row in the final simplex tableau will become:

Z + (5,5 − d)X3 + 1,5S1 + 1,5S2 = 40,5.

To maintain feasibility, we must have:

Page 128: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

122 STUDY UNIT 11 SUMMARY AND PROBLEMS

5,5 − d ≥ 0 ⇒ d ≤ 5,5.

The AI for X3 is 5,5 and the AD is infinity.

Right-hand side ranges

C1 has a right-hand side of 11. Suppose this changes to 11 + d.

The coefficients of d correspond to the coefficients of S1 and hence from the final simplextableau we will have:

X2 = 2,5 − 0,5d

X1 = 3 + d.

To maintain feasibility we must have:

2,5 − 0,5d ≥ 0 ⇒ 0,5d ≤ 2,5 ⇒ d ≤ 5.

2,5 − 0,5d ≤ 3 ⇒ −0,5d ≤ 0,5 ⇒ d ≥ −1.

3 + d ≥ 0 ⇒ d ≥ −3.

(Remember X2 is bounded from above by 3.)

Hence, −1 ≤ d ≤ 5.

The AI for C1 is 5 and the AD is 1.

C2 has a right-hand side of 16. Suppose this changes to 16 + d.

The coefficients of d correspond to the coefficients of S2 and hence from the final simplextableau we will have:

X2 = 2,5 + 0,5d

X1 = 3 − 0,5d.

To maintain feasibility we must have:

2,5 + 0,5d ≥ 0 ⇒ 0,5d ≥ −2,5 ⇒ d ≥ −5.

2,5 + 0,5d ≤ 3 ⇒ 0,5d ≤ 0,5 ⇒ d ≤ 1.

3 − 0,5d ≥ 0 ⇒ 0,5d ≤ 3 ⇒ d ≤ 6.

Hence, −5 ≤ d ≤ 1.

The AI of C2 is 1 and the AD is 5.

The information calculated above corresponds to that printed by LINDO.

LP OPTIMUM FOUND AT STEP 3OBJECTIVE FUNCTION VALUE 1) 40.50000

VARIABLE VALUE REDUCED COSTX1 3.000000 0.000000X2 2.500000 0.000000

Page 129: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

11.3. SOLUTIONS 123

X3 0.000000 5.500000

ROW SLACK OR SURPLUS DUAL PRICES

C1) 0.000000 1.500000C2) 0.000000 1.500000

NO. ITERATIONS= 3

RANGES IN WHICH THE BASIS IS UNCHANGED:

OBJ COEFFICIENT RANGESVARIABLE CURRENT ALLOWABLE ALLOWABLE

COEF INCREASE DECREASE

X1 6.000000 3.000000 1.500000X2 9.000000 3.000000 3.000000X3 5.000000 5.500000 INFINITY

RIGHTHAND SIDE RANGES

ROW CURRENT ALLOWABLE ALLOWABLERHS INCREASE DECREASE

C1 11.000000 5.000000 1.000000C2 16.000000 1.000000 5.000000

Solution to Problem 11.2

We solve the given model with LINDO and the solution is:

LP OPTIMUM FOUND AT STEP 2OBJECTIVE FUNCTION VALUE 1) 7800.000

VARIABLE VALUE REDUCED COST

V1 100.000000 0.000000V2 0.000000 12.000000V3 200.000000 0.000000V4 0.000000 0.000000

ROW SLACK OR SURPLUS DUAL PRICES

B1) 200.000000 0.000000B2) 0.000000 8.000000B3) 0.000000 3.000000

NO. ITERATIONS= 2

Max 28V1 + 11V2 + 25V3 + 20V4subject to

Page 130: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

124 STUDY UNIT 11 SUMMARY AND PROBLEMS

B1) V1 + 2V2 + V3 + 4V4< 500B2) 2V1 + V2 + 2V3 + V4< 600B3) 4V1 + 5V2 + 3V3 + 4V4< 1000

LP OPTIMUM FOUND AT STEP 2

OBJECTIVE FUNCTION VALUE

1) 7800.000

VARIABLE VALUE REDUCED COSTV1 100.000000 0.000000V2 0.000000 12.000000V3 200.000000 0.000000V4 0.000000 0.000000

ROW SLACK OR SURPLUS DUAL PRICESB1) 200.000000 0.000000B2) 0.000000 8.000000B3) 0.000000 3.000000

NO. ITERATIONS= 2

RANGES IN WHICH THE BASIS IS UNCHANGED:

OBJ COEFFICIENT RANGESVARIABLE CURRENT ALLOWABLE ALLOWABLE

COEF INCREASE DECREASEV1 28.000000 5.333333 0.000000V2 11.000000 12.000000 INFINITYV3 25.000000 0.000000 4.000000V4 20.000000 0.000000 INFINITY

RIGHTHAND SIDE RANGESROW CURRENT ALLOWABLE ALLOWABLE

RHS INCREASE DECREASEB1 500.000000 INFINITY 200.000000B2 600.000000 66.666664 100.000000B3 1000.000000 200.000000 100.000000

The solution to the given model is therefore V 1 = 100, V 2 = 0, V 3 = 200, V 4 = 0 andW = 7 800.

It appears that V 4 is a non-basic variable with zero shadow cost. This indicates thatan alternative optimal solution exists. We can check this by printing the final simplextableau.

Select TABLEAU from the REPORTS menu and the final simplex tableau is:

Page 131: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

11.3. SOLUTIONS 125

THE TABLEAU

ROW (BASIS) V1 V2 V3 V4 SLK 2 SLK 31 ART 0.000 12.000 0.000 0.000 0.000 8.000B1 SLK 2 0.000 1.500 0.000 3.500 1.000 -0.500B2 V3 0.000 -3.000 1.000 -2.000 0.000 2.000B3 V1 1.000 3.500 0.000 2.500 0.000 -1.500

ROW SLK 41 3.000 7800.000B1 0.000 200.000B2 -1.000 200.000B3 1.000 100.000

From the basis column we see that V 4 is not a basic variable. It is therefore a non-basicvariable. Its coefficient in the objective function row is zero and this indicates that analternative optimal solution exists. To obtain an alternative solution, we must select V 4to enter the basis.

Do this by getting the model into the active window again and select PIVOT from theSOLVE menu. In the box that appears, type V 4 as the entering variable and select OK.The following appears in the REPORTS window:

V4 ENTERS AT VALUE 40.000 IN ROW 4 OBJ. VALUE= 7800.0

Now select SOLVE from the SOLVE menu and the following solution results:

LP OPTIMUM FOUND AT STEP 3

OBJECTIVE FUNCTION VALUE

1) 7800.000

VARIABLE VALUE REDUCED COSTV1 0.000000 0.000000V2 0.000000 12.000000V3 280.000000 0.000000V4 40.000000 0.000000

ROW SLACK OR SURPLUS DUAL PRICESB1) 60.000000 0.000000B2) 0.000000 8.000000B3) 0.000000 3.000000

NO. ITERATIONS= 3

From this follows that an alternative solution to the given model is:

Page 132: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

126 STUDY UNIT 11 SUMMARY AND PROBLEMS

V 1 = 0, V 2 = 0, V 3 = 280, V 4 = 40 and W = 7 800.

Solution to Problem 11.3

(a)

Objective function x 1 x 2 x 3 x 4 zcoefficient of x 2

p ≤ 7,75 2,25 0 5,25 4,5 67,57,75 ≤ p ≤ 9 0 3,6 4,8 3,6 39,6 + 3,6p∗

p ≥ 9 0 8 0 0 8p∗∗

∗z = 67,5 + 3,6(p − 7,75) (3,6 = value of X2)

= 67,5 + 3,6p − 27,9

= 39,6 + 3,6p

** x2 = 8 is the only variable with a non-zero value and hence it is the only variablethat contributes to the value of the objective function; z = 8p.

(b) The following results were obtained for the different computer runs:

Right-handside of C1

x 1 x 2 x 3 x 4 z Range for RHS of C1

p = 0 0 0 0 0 0 [0; 6]p = 6 6 0 0 0 60 [0; 6]p = 7 5 0 2 0 62 [6; 9]p = 9 3 0 6 0 66 [6; 9]p = 10 2,75 0 5,75 1,5 66,5 [9; 21]p = 21 0 0 3 18 72 [9; 21]p = 22 0 0 3 18 72 [21; ∞)

The above information is used to generate the following table that covers all possi-ble right-hand sides for the first constraint:

Right-handside of C1

x 1 x 2 x 3 x 4 z

0 ≤ p ≤ 6 p 0 0 0 10p6 ≤ p ≤ 9 12 − p 0 2p − 12 0 2p + 489 ≤ p ≤ 21 5,25 − 0,25p 0 8,25 − 0,25p 1,5p − 13,5 0,5p + 61,5p ≥ 21 0 0 3 18 72

Details of how the contents of the table was calculated is as follows:

Interval [6; 9].

x1 : 7a + b = 5

9a + b = 3

Page 133: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

11.3. SOLUTIONS 127

Subtract the first equation from the second.

2a = −2 ⇒ a = −1

b = 5 − 7a

= 5 − 7(−1)

= 12.

Therefore, x1 = 12 − p.

x3 : 7a + b = 2

9a + b = 6

Subtract the first equation from the second.

2a = 4 ⇒ a = 2

Substitute a = 2 into the first equation:

b = 2 − 7a

= 2 − 7(2)

= −12.

Therefore, x3 = 2p − 12.

z : 7a + b = 62

9a + b = 66

Subtract the first equation from the second.

2a = 4

a = 2

Substitute a = 2 into the first equation:

b = 62 − 7a

= 62 − 7(2)

= 48.

Therefore, z = 2p + 48.

Interval [9; 21].

Page 134: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

128 STUDY UNIT 11 SUMMARY AND PROBLEMS

x1 : 10a + b = 2,75

21a + b = 0 subtract first equation from second

11a = −2,75

a = −0,25

b = −21a substitute a = −0,25 into equation

= −21(−0,25)

= 5,25.

Therefore, x1 = 5,25 − 0,25p.

x3 : 10a + b = 5,75

21a + b = 3

11a = −2,75 subtract first equation from second

a = −0,25

b = 3 − 21a substitute a = −0,25 into equation

= 3 − 21(−0,25)

= 8,25.

Therefore, x3 = 8,25 − 0,25p.

x4 : 10a + b = 1,5

21a + b = 18

11a = 16,5 subtract first equation from second

a = 1,5

b = 1,5 − 10a substitute a = 1,5 into equation

= 1,5 − 10(1,5)

= −13,5.

Therefore, x4 = 1,5p − 13,5.

z : 10a + b = 66,5

21a + b = 72

11a = 5,5 subtract first equation from second

a = 0,5

b = 72 − 21a substitute a = 0,5 into equation

= 72 − 21(0,5)

= 61,5.

Therefore, z = 0,5p + 61,5.

Page 135: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

CHAPTER 3

LINGO AND APPLICATIONS

Aim of the chapter:

• distinguish between different types of LP problems;

• formulate a model for a given problem;

• solve a model with LINGO ;

• use the computer solution to a model to make recommendations.

Page 136: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

130 STUDY UNIT 11 SUMMARY AND PROBLEMS

Page 137: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

StudyUnit 12

Formulating models and solving themwith LINGO

Theme:

The formulation and solution of various types of problems.

Contents12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

12.2 Using LINGO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

12.3 A diet problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

12.4 A transportation problem . . . . . . . . . . . . . . . . . . . . . . 138

12.5 A marketing problem . . . . . . . . . . . . . . . . . . . . . . . . . 154

Learning objectives

On completion of this study unit the student must be able to do the following when giventhe description of a problem

• formulate a model which represents the problem;

• use LINGO to solve the model;

• interpret and use the computer solution;

131

Page 138: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

132STUDY UNIT 12 FORMULATING MODELS AND SOLVING THEM WITH LINGO

• decide, on the basis of the solution, whether the results make sense and whether themodel is an accurate representation of the problem.

Sections from prescribed book, WinstonChapter 3, Section 3.7; 3.8; 3.9.

12.1 Introduction

Optimisation problems abound in practice and are found in, industry, mining, banking,education, forestry, conservation and transport, for example. Linear programming is atool used to solve such optimisation problems. In chapter 1 we studied a product mixproblem.

Many other types of problems occur and can be classified into classes such as diet prob-lems, blending problems, work-scheduling problems, production-scheduling problems, in-ventory problems, investment problems, transportation problems, marketing problemsand so forth.

In this chapter we give a few examples of some of these problems.Up to now, we havebeen using the LINDO computer package to solve our LP models. The prescribed bookWINSTON also contains the package LINGOand in this chapter we will use LINGO tosolve our models.The purpose of this chapter is therefore twofold. Firstly we want to giveyou a few more examples of how linear programming can be used to solve problems inpractice, and secondly we want to show you how to solve LP models with the computerpackage LINGO.

In the given examples we work through the whole process, starting with the descriptionof the problem, then the formulation of the problem as an LP model, the solution of themodel with LINGO and the analysis of the solution. We will see that a critical evaluationof the solution tells us surprisingly much about the shortcomings or efficiency of a model.

You should always formulate the model yourself before looking at the given model. Youwill then gain experience in formulating LP models.

12.2 Using LINGO

LINGO offers more flexibility than LINDO in terms of how models are expressed. It al-lows variables and parentheses on the right-hand side of equations and inequalities. Con-straints may therefore be left in their original form and do not have to be rewritten withvariables on the left-hand side and constants on the right-hand side. This means thatconstraints may be keyed into LINGO in the exact format that they are modelled and nomanipulation of the constraints is required.

Page 139: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

12.2. USING LINGO 133

LINGO is an optimisation modelling language, which is capable of generating large mod-els with relatively few lines of input. A large number of objective function terms and con-straints can be generated by typing in only a few lines. Models representing typical LPproblems have already been written and are given in the prescribed book WINSTON andalso as sample files in the SAMPLES directory of LINGO. Later in the chapter we willdiscuss how such a sample file can be used to solve a transportation problem. When us-ing these sample files, you will get an idea of how the objective functions and constraintsof the model are programmed. This will enable you to set up your own model if you havea complicated LP model and a sample file for it does not exist.

LINGO has the ability to read data from external files and worksheets. It can also opena file that contains a LINDO model and transform it into a format acceptable to LINGOand then solve it. This means that models that were previously keyed into LINDO canbe solved with LINGO. This is done by choosing the “Import LINDO file” from the FILEmenu.

You were introduced to LINGO in the second-level Decision Sciences/Operations Re-search modules. Revise the instructions and hints on the use of LINGO given in the pre-scribed book WINSTON, as well as that given in the second-level modules.

LINGO has the following requirements, which you should bear in mind.

1. The model may not be given a name (title).

2. Comments may be included anywhere in the model as long as they are preceded byan exclamation mark ! and concluded by a semi-colon ; .

3. Each decision variable must have a unique name with a maximum length of 32characters.

4. The objective function is keyed in by typing “Max” or “Min” followed by the equal-ity sign = and then the function.

5. Constraints follow directly after the objective function and need not be preceded by“subject to” or related words.

6. Each constraint may be given a unique name with a maximum length of 32 charac-ters. Each name must be enclosed in square brackets [ ] and must be typed at thebeginning of a line before the constraint is given.

7. Constraints need not be in a specific format and variables and constants may be oneither side of the >, < or = signs.

8. Each statement must be concluded by a semi-colon ; .

9. Decimals are keyed in by typing a full stop . and not a comma , .

10. Inequalities may be keyed in by using < or > as LINGO considers it the same as ≤and ≥.

11. An asterisk * must be used to denote multiplication.

Page 140: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

134STUDY UNIT 12 FORMULATING MODELS AND SOLVING THEM WITH LINGO

12. Parenthesis may be used to define the order of mathematical operations.

13. LINGO assumes that all variables are non-negative and hence we need not specifythis.

14. The model need not be finalised by the statement “END”.

In the following sections you will see how LINGO is used to solve LP models.

12.3 A diet problem

Problem

Mr Frank Furter owns a butchery. He is well known for his sausage, which is a combina-tion of various ingredients. The sausage must satisfy certain requirements and hence theingredients must be mixed with this in mind. This problem is typical of what is known inLP as a diet problem.

Frank uses beef, pork, chicken and soya beans to make his famous sausage. The currentprices per kilogram of these ingredients, as well as their protein and fat content, are givenin the following table:

Ingredient Price(per kg)

Protein(per kg)

Fat(per kg)

BeefPorkChickenSoybeans

55,0030,0020,0017,90

0,310,250,270,41

0,120,250,190,05

To ensure the right taste and nutritional value, the sausage mix must satisfy the follow-ing requirements:

1. The mass of the beef must be at least 50% of the sausage mix.

2. The mass of the pork must be between 20% and 40% of the sausage mix.

3. The mass of the soybeans may not be more than 25% of the sausage mix.

4. The mass of the pork may not be more than one-and-a-half times the mass of thechicken.

5. The mix must contain at least 25% protein and no more than 15% fat.

Frank mixes the sausage mix daily in different order sizes depending on the orders he re-ceives. He wants to build a model that he can use to determine the quantities of ingredi-ents used for different order sizes. Obviously the model should be such that only minorchanges are necessary when the order sizes change.

Page 141: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

12.3. A DIET PROBLEM 135

Frank must also decide on the price per kilogram for his sausage. He is happy to charge aprice which covers the cost of his ingredients plus 50%.

Model

Frank must decide how many kilograms of each ingredient to use in his sausage mix fordifferent order sizes. He starts off by considering an order for 100 kilograms. He mustremember that the model he constructs must be easily adaptable for different order sizes.

Decision variables He chooses his decision variables as follows:

Beef = number of kilograms of beef used in the mix.

Pork = number of kilograms of pork used in the mix.

Chic = number of kilograms of chicken used in the mix.

Soy = number of kilograms of soybeans used in the mix.

Order = the number of kilograms of sausage ordered.

Objective function Frank wants to determine the cheapest mix that satisfies all the re-quirements. Hence his objective function is:

Minimise COSTS = 55Beef + 30Pork + 20Chic + 17,90Soy.

Constraints

The sausage mix must satisfy five requirements. These must be represented in the con-straints.

The first requirement states that the mass of beef must be at least 50% of the mix. Thiscan be represented as follows:

Beef ≥ 0,50Order.

Similarly, we can write down the requirements for the mass of pork and soybeans as:

Pork ≥ 0,20Order and Pork ≤ 0,40Order,

Soy ≤ 0,25Order.

The ratio between the mass of pork and chicken can be represented as:

Pork ≤ 1,5Chic.

The protein and fat requirements of the mix can be represented as:

0,31Beef + 0,25Pork + 0,27Chic + 0,41Soy ≥ 0,25Order,

0,12Beef + 0,25Pork + 0,19Chic + 0,05Soy ≤ 0,15Order.

The mix must consist of these four ingredients only. This means that the mass of theseingredients must make up the mass of the order size. This is represented by the followingconstraint:

Page 142: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

136STUDY UNIT 12 FORMULATING MODELS AND SOLVING THEM WITH LINGO

Order = Beef + Pork + Chic + Soy.

Frank has decided to start with an order size of 100 kilograms. The last constraint is:

Order = 100.

The LP model is:

Minimise COSTS = 55Beef + 30Pork + 20Chic + 17,90Soy

subjectto

Beef ≥ 0,50Order [BEEFMIN ]

Pork ≥ 0,20Order [PORKMIN ]

Pork ≤ 0,40Order [PORKMAX]

Soy ≤ 0,25Order [SOY AMAX]

Pork ≤ 1,5Chic [RATIO]

0,31Beef + 0,25Pork + 0,27Chic + 0,41Soy ≥ 0,25Order [PROTEIN ]

0,12Beef + 0,25Pork + 0,19Chic + 0,05Soy ≤ 0,15Order [FAT ]

Order = Beef + Pork + Chic + Soy [SAUSAGE]

Order = 100 [ORDERSIZE]

andBeef, Pork, Chic, Soy, Order ≥ 0.

If we study this model we see that it can be adapted very easily for different order sizes.Only the constraint ORDER must be changed in that the 100 must be replaced by thenew order size.

Solution

We now want to solve this model with LINGO. LINGO allows variables and constants onboth sides of a constraint and hence we can key in the model above directly. The modelin LINGO is as follows:

Min 55*Beef+30*Pork+20*Chic+17.90*Soy;subject to[BEEFMIN] Beef>0.50*Order;[PORKMIN] Pork>0.20*Order;[PORKMAX] Pork<0.40*Order;[SOYAMAX] Soy<0.25*Order;[RATIO] Pork<1.5*Chic;[PROTEIN] 0.31*Beef+0.25*Pork+0.27*Chic+0.41*Soy>0.25*Order;[FAT] 0.12*Beef+0.25*Pork+0.19*Chic+0.05*Soy<0.15*Order;[SAUSAGE] Order=Beef+Pork+Chic+Soy;[ORDERsize] Order=100;

To solve this model with LINGO, we select SOLVE from the LINGO menu. As we alsowant the ranging analysis, we must follow the SOLVE command by the RANGE com-mand from the LINGO menu. The solution to the model is:

Page 143: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

12.3. A DIET PROBLEM 137

Global optimal solution found at iteration: 8Objective value: 3915.000

Variable Value Reduced CostBEEF 50.00000 0.000000PORK 20.00000 0.000000CHIC 13.33333 0.000000SOY 16.66667 0.000000

ORDER 100.0000 0.000000

Row Slack or Surplus Dual Price1 3915.000 -1.000000

BEEFMIN 0.000000 -37.10000PORKMIN 0.000000 -13.50000PORKMAX 20.00000 0.000000SOYAMAX 8.333333 0.000000RATIO 0.000000 1.400000

PROTEIN 5.933333 0.000000FAT 0.6333333 0.000000

SAUSAGE 0.000000 17.90000ORDERS 0.000000 -39.15000

The first part of the solution gives some statistics about the solution.

From the second part of the solution follows that

50 kilograms of beef must be used in 100 kilograms of sausage,

20 kilograms of pork must be used in 100 kilograms of sausage,

13,33 kilograms of chicken must be used 100 kilograms of sausage,

16,667 kilograms of soybeans must be used 100 kilograms of sausage,

and the associated cost is R3 915.

From this it is easy to deduce that one kilogram of sausage is made up of

0,50 kilograms of beef,

0,20 kilograms of pork,

0,13 kilograms of chicken,

0,17 kilograms of soybeans,

and that the cost per kilogram is R39,15.

Page 144: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

138STUDY UNIT 12 FORMULATING MODELS AND SOLVING THEM WITH LINGO

The price per kilogram should therefore be 1,5 × R39,15 = R58,73.

This result can also be obtained by changing the ORDER constraint in the model to Or-der = 1 and solving the model again. Try this and see whether the result is the same.

Exercise 12.1

Suppose that Frank does not want to charge more than R58 per kilogram for the sausageand he is also not prepared to accept a profit of less than 50% on the cost of the ingredi-ents. What possible changes to the sausage mix can you suggest in order to decrease thecost to R38,67 per kilogram?

Solution to Exercise 12.1

The following possibilities can be considered:

1. The constraint PORKMIN has a shadow price of R−13,50 which means that if thelower bound on the pork content is increased by 1 kilogram, the cost will weaken(increase) by R13,50. It also means that if the lower bound is decreased by 1 kilo-gram, the cost will decrease by R13,50.

We want to bring about a decrease of only R0,48 (R39,15−R38,67) in the cost ofthe sausage. A decrease of 36 grams or ,036% ( 0,48

13,50= 0,036) in the lower bound on

the pork content of the mix will bring about the desired change in the cost of thesausage.

2. The constraint RATIO has a shadow price of R1,40. Increase the cost because it isa positive shadow cost.

Option (1) above may be considered. Frank will have to decide if the change will have aneffect on the taste of the sausage and if the change in taste will be small enough not torisk his good reputation.

12.4 A transportation problem

Study Winston: Chapter 7- p.360-372 and p.382-392

Problem

Garchini is a group of retail stores that sells clothes. The group has branches in Johan-nesburg, Pretoria, Bloemfontein, Durban and Cape Town.

Garchini will be introducing a new line of men’s shirts in the new season and expects thedemand for the shirts at the five branches mentioned above to be 10 000, 7 000, 4 000,5 000 and 6 000 respectively.

Three factories have tendered to supply shirts to the stores. The tender prices are as fol-lows:

Page 145: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

12.4. A TRANSPORTATION PROBLEM 139

Factory Quantity Price per shirtMidrandPort ElizabethDurban

8 00010 00015 000

R36R30R46

In addition to the cost of the shirts, Garchini has to foot the bill for the cost of trans-porting the shirts from the factories to the stores. The transportation costs have beenquoted for batches of 100 shirts. These costs, in rand per 100 shirts, from each factory toeach store, are given in the following table:

FactoryStore

Jhb Pta Bfn Dbn CptMidrand 150 180 600 700 1 200

PE 900 950 800 750 600Durban 650 720 600 50 900

The company must now decide how many shirts to order from each factory, and set up atransportation schedule which indicates from which factory to which store the shirts areto be transported. The cost of the order must be minimised. The company also wantsto determine a fixed selling price for the shirts so that the group as a whole will make aprofit of 100% on the order. The selling price of the shirts must be the same at all thestores.

Model

As the transportation costs are applicable to batches of 100 shirts, we represent the quan-tities of shirts and the supply and demand in hundreds.

The total costs to a store for a batch of 100 shirts will be made up of the cost of 100shirts plus the transportation costs of 100 shirts. For example, the total cost of an orderof 100 shirts from Midrand to Johannesburg is 36 × 100 + 150 = 3 750.

Before rushing in to formulate the model, it is helpful to visualise the problem. The fol-lowing representation will be helpful:

Page 146: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

140STUDY UNIT 12 FORMULATING MODELS AND SOLVING THEM WITH LINGO

MRD80

Supply(in 100’s)

Factory Cost Store Demand(R/100 shirts) (in 100’s)

PE100

DBN150

JHB 100

PTA 70

BFN 40

DBN 50

CPT 60

3750

4200

43004800

39003950

38003750

3600

3780

5250

5320

5200

46505500

Figure 12.1

The figure on each arrow going from a factory to a store is the total cost to the store fora batch of 100 shirts.

Decision variables

Let FiCj = the number of shirts (in hundreds) to be ordered from factory i for store j,

where i = 1, 2, 3 and j = 1, 2, 3, 4, 5. Here i = 1, 2, 3 corresponds to Midrand, PortElizabeth and Durban respectively and j = 1, 2, 3, 4, 5 corresponds to Johannesburg,Pretoria, Bloemfontein, Durban and Cape Town respectively.

Page 147: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

12.4. A TRANSPORTATION PROBLEM 141

Objective function

The total costs must be minimised.

Minimise COSTS = 3 750F1C1 + 3 780F1C2 + 4 200F1C3 + 4 300F1C4 + 4 800F1C5

3 900F2C1 + 3 950F2C2 + 3 800F2C3 + 3 750F2C4 + 3 600F2C5

5 250F3C1 + 5 320F3C2 + 5 200F3C3 + 4 650F3C4 + 5 500F3C5.

Constraints

The total number of shirts that can be ordered from each factory is restricted by thenumber of shirts that the factory can supply. For example, the total number of shirtsthat can be ordered from the Midrand factory for the five stores may not be more than8 000. This can be represented by:

F1C1 + F1C2 + F1C3 + F1C4 + F1C5 ≤ 80.

Similarly for the other two factories:

F2C1 + F2C2 + F2C3 + F2C4 + F2C5 ≤ 100,

F3C1 + F3C2 + F3C3 + F3C4 + F3C5 ≤ 150.

The total number of shirts ordered for each store may not be less than the demand atthat store. For example, the total number of shirts ordered for the Johannesburg storefrom the three factories must be at least 10 000. This can be represented by:

F1C1 + F2C1 + F3C1 ≥ 100.

Similarly for the other four stores:

F1C2 + F2C2 + F3C2 ≥ 70,

F1C3 + F2C3 + F3C3 ≥ 40,

F1C4 + F2C4 + F3C4 ≥ 50,

F1C5 + F2C5 + F3C5 ≥ 60,

Feasibility restrictions

To make sense each variable must be non-negative.

Page 148: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

142STUDY UNIT 12 FORMULATING MODELS AND SOLVING THEM WITH LINGO

The LP model is:

Minimise

COSTS = 3 750F1C1 + 3 780F1C2 + 4 200F1C3 + 4 300F1C4 + 4 800F1C5

3900F2C1 + 3 950F2C2 + 3 800F2C3 + 3 750F2C4 + 3 600F2C5

5 250F3C1 + 5 320F3C2 + 5 200F3C3 + 4 650F3C4 + 5 500F3C5

subject to

F1C1 + F1C2 + F1C3 + F1C4 + F1C5 ≤ 80 SUPPLYF1

F2C1 + F2C2 + F2C3 + F2C4 + F2C5 ≤ 100 SUPPLYF2

F3C1 + F3C2 + F3C3 + F3C4 + F3C5 ≤ 150 SUPPLYF3

F1C1 + F2C1 + F3C1 ≥ 100 DEMANDC1

F1C2 + F2C2 + F3C2 ≥ 70 DEMANDC2

F1C3 + F2C3 + F3C3 ≥ 40 DEMANDC3

F1C4 + F2C4 + F3C4 ≥ 50 DEMANDC4

F1C5 + F2C5 + F3C5 ≥ 60 DEMANDC5

and

F1C1, F1C2, F1C3, F1C4, F1C5, F2C1, F2C2, F2C3, F2C4, F2C5,F3C1, F3C2, F3C3, F3C4,F3C5 ≥ 0.

This problem is an example of a group of problems which is classified as transportationproblems. The general format of models which describe this group of problems is:

Min z =

m∑i=1

n∑j=1

cijxij

subject ton∑

j=1

xij ≤ Si i = 1, 2, . . . , m,

m∑i=1

xij ≥ Dj j = 1, 2, . . . , n,

and

xij ≥ 0 i = 1, 2, . . . , m; j = 1, 2, . . . , n.

The first m constraints are the supply constraints and the last n constraints are the de-mand constraints. The constraints may also be written as equalities when the total sup-ply equals the total demand.

Solution

We must now solve this model with LINGO. Transportation problems are LP problemsthat occur often and a model for this type of problem has already been programmed. Wewill use this pre-programmed model to solve our problem and you will soon see how easyit is.

Page 149: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

12.4. A TRANSPORTATION PROBLEM 143

We can find this program as follows:

Activate LINGO on your computer.

Select OPEN from the FILE menu.

Find the SAMPLES directory of LINGO, and select the filename Trans.lng and openthis file.

The model Trans.lng will appear in your LINGO window. The line numbers may or maynot be present, but we need them here for reference.

MODEL: 1]SETS: 2]PLANTS/P1,P2,P3/:CAP;3]CITIES/C1,C2,C3,C4/:DEM; 4]LINKS(PLANTS,CITIES):COST,SHIP; 5]ENDSETS6]MIN=@SUM(LINKS:COST*SHIP); 7]@FOR(CITIES(J):8]@SUM(PLANTS(I):SHIP(I,J))>DEM(J));9]@FOR(PLANTS(I):10]@SUM(CITIES(J):SHIP(I,J))<CAP(I));11]DATA:12]CAP=35,50,40;13]DEM=45,20,30,30;14]COST=8,6,10,9,15]9,12,13,7,16]14,9,16,5;17]ENDDATAEND

Lines 1 to 5 define the SETS needed to generate the objective function and the constraints.

Three plants (the supply points) are defined in line 2 and it is stated that each has a ca-pacity (given in the DATA section). Four cities (the demand points) are defined in line 3and it is stated that each has a demand (given in the DATA section). The LINK state-ment in line 4 creates a LINK(I,J) as I runs over all plants and J runs over all cities.LINK(1,1), LINK(1,2), LINK(1,3), LINK(1,4), LINK(2,1), LINK(2,2), LINK(2,3), LINK(2,4),LINK(3,1), LINK(3,2), LINK(3,3), LINK(3,4) are created and stored in this order, inother words the rightmost references advance more quickly. Each link has two attributes:a shipping cost per unit, COST (given in the DATA section), and the amount shipped,SHIP. ENDSETS in line 5 ends the sets section.

The objective function is defined in line 6. The product of the unit shipping costs andthe amount shipped is summed over all links.

Lines 7 and 8 define all the demand constraints by using @FOR and @SUM. These con-straints ensure that for each city, the sum of the amount shipped into the city will be atleast as large as the demand of the city. Note that the extra parenthesis after SHIP(I,J)in line 8 closes the @SUM operator and the extra parenthesis after DEM(J) closes the@FOR operator.

All the supply constraints are defined by using the @FOR and @SUM operators in lines9 and 10. They ensure that, for each plant, the total shipped out of the plant will notexceed the capacity of the plant.

Page 150: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

144STUDY UNIT 12 FORMULATING MODELS AND SOLVING THEM WITH LINGO

The data needed for the problem is given in lines 11 to 17. The capacity of each plant isgiven in line 12 and the demand of each city is given in line 13. The unit shipping costfrom each plant to each city is given in lines 14 to 16. These costs correspond to the or-dering of links as described above. ENDDATA ends the data section and END ends theprogram.

This program can be used to solve any transportation problem. All that is necessary isto change line 2 to accommodate all the supply points and line 3 to accommodate all thedemand points. The data in lines 12 to 16 must obviously be adapted for the particularproblem. Notice that the part of the program, lines 6 to 10, where the objective functionand the constraints are defined, remains unchanged.

Now we can make the necessary changes to this program so that we can solve our trans-portation problem. As our variables are represented by FiCj, we change the P’s repre-senting the plants in the given program to F’s. It is not necessary to do this and you maydecide that you wish to use the program without changing the variable representation.

The program after the changes have been made will be as follows:

MODEL:SETS:PLANTS/F1,F2,F3/:CAP;CITIES/C1,C2,C3,C4,C5/:DEM;LINKS(PLANTS,CITIES):COST,SHIP;ENDSETS

MIN=@SUM(LINKS:COST*SHIP);

@FOR(CITIES(J):@SUM(PLANTS(I):SHIP(I,J))>DEM(J));

@FOR(PLANTS(I):@SUM(CITIES(J):SHIP(I,J))<CAP(I));

DATA:CAP=80,100,150;DEM=100,70,40,50,60;COST=3750,3780,4200,4300,4800,

3900,3950,3800,3750,3600,5250,5320,5200,4650,5500;

ENDDATA

END

We now solve this model by selecting SOLVE from the LINGO menu, followed by RANGE,also from the LINGO menu. The solution is:

Page 151: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

12.4. A TRANSPORTATION PROBLEM 145

Rows= 9Vars= 15 No. integer vars= 0 ( all are linear) Nonzeros= 53Constraint nonz= 30( 30 are +- 1) Density=0.368Smallest and largest elements in absolute value= 1.00000 5500.00No. < : 3 No. =: 0 No. > : 5, Obj=MIN, GUBs <= 5

Single cols= 0

Optimal solution found at step: 15

Objective value: 1375100.

Variable Value Reduced Cost

CAP( F1) 80.00000 0.0000000E+00CAP( F2) 100.0000 0.0000000E+00CAP( F3) 150.0000 0.0000000E+00DEM( C1) 100.0000 0.0000000E+00DEM( C2) 70.00000 0.0000000E+00DEM( C3) 40.00000 0.0000000E+00DEM( C4) 50.00000 0.0000000E+00DEM( C5) 60.00000 0.0000000E+00COST( F1, C1) 3750.000 0.0000000E+00COST( F1, C2) 3780.000 0.0000000E+00COST( F1, C3) 4200.000 0.0000000E+00COST( F1, C4) 4300.000 0.0000000E+00COST( F1, C5) 4800.000 0.0000000E+00COST( F2, C1) 3900.000 0.0000000E+00COST( F2, C2) 3950.000 0.0000000E+00COST( F2, C3) 3800.000 0.0000000E+00COST( F2, C4) 3750.000 0.0000000E+00COST( F2, C5) 3600.000 0.0000000E+00COST( F3, C1) 5250.000 0.0000000E+00COST( F3, C2) 5320.000 0.0000000E+00COST( F3, C3) 5200.000 0.0000000E+00COST( F3, C4) 4650.000 0.0000000E+00COST( F3, C5) 5500.000 0.0000000E+00SHIP( F1, C1) 10.00000 0.0000000E+00SHIP( F1, C2) 70.00000 0.0000000E+00SHIP( F1, C3) 0.0000000E+00 550.0000SHIP( F1, C4) 0.0000000E+00 1150.000SHIP( F1, C5) 0.0000000E+00 1350.000SHIP( F2, C1) 0.0000000E+00 0.0000000E+00SHIP( F2, C2) 0.0000000E+00 20.00000SHIP( F2, C3) 40.00000 0.0000000E+00SHIP( F2, C4) 0.0000000E+00 450.0000SHIP( F2, C5) 60.00000 0.0000000E+00SHIP( F3, C1) 90.00000 0.0000000E+00SHIP( F3, C2) 0.0000000E+00 40.00000SHIP( F3, C3) 0.0000000E+00 50.00000SHIP( F3, C4) 50.00000 0.0000000E+00SHIP( F3, C5) 0.0000000E+00 550.0000

Page 152: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

146STUDY UNIT 12 FORMULATING MODELS AND SOLVING THEM WITH LINGO

Row Slack or Surplus Dual Price

1 1375100. 1.0000002 0.0000000E+00 -5250.0003 0.0000000E+00 -5280.0004 0.0000000E+00 -5150.0005 0.0000000E+00 -4650.0006 0.0000000E+00 -4950.0007 0.0000000E+00 1500.0008 0.0000000E+00 1350.0009 10.00000 0.0000000E+00

Ranges in which the basis is unchanged:

Objective Coefficient RangesCurrent Allowable Allowable

Variable Coefficient Increase Decrease

SHIP( F1, C1) 3750.000 550.0000 20.00000SHIP( F1, C2) 3780.000 20.00000 5280.000SHIP( F1, C3) 4200.000 INFINITY 550.0000SHIP( F1, C4) 4300.000 INFINITY 1150.000SHIP( F1, C5) 4800.000 INFINITY 1350.000SHIP( F2, C1) 3900.000 20.00000 50.00000SHIP( F2, C2) 3950.000 INFINITY 20.00000SHIP( F2, C3) 3800.000 50.00000 5150.000SHIP( F2, C4) 3750.000 INFINITY 450.0000SHIP( F2, C5) 3600.000 550.0000 4950.000SHIP( F3, C1) 5250.000 40.00000 450.0000SHIP( F3, C2) 5320.000 INFINITY 40.00000SHIP( F3, C3) 5200.000 INFINITY 50.00000SHIP( F3, C4) 4650.000 450.0000 4650.000SHIP( F3, C5) 5500.000 INFINITY 550.0000

Righthand Side Ranges

Row Current Allowable AllowableRHS Increase Decrease

2 100.0000 10.00000 90.000003 70.00000 10.00000 70.000004 40.00000 0.0 40.000005 50.00000 10.00000 50.000006 60.00000 0.0 60.000007 80.00000 90.00000 10.000008 100.0000 90.00000 0.09 150.0000 INFINITY 10.00000

The output gives the objective function value, the capacity of each factory, the demandof each city, the total costs of ordering the shirts from each factory for each city and theshipping schedule showing the quantity (in hundreds) of shirts transported from each fac-

Page 153: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

12.4. A TRANSPORTATION PROBLEM 147

tory to each city.

A graphical representation of the solution, where the figures on the arcs are the ordersizes, is:

MRD80

Supply(in 100’s)

Factory Order size Store Demand(100 shirts) (in 100’s)

PE100

DBN150

JHB 100

PTA 70

BFN 40

DBN 50

CPT 60

10

50

40

60

70

90

Figure 12.2

The total cost is R1 375 100 and a total of 32 000 shirts is ordered. The average cost pershirt is therefore 1375100

32000, that is R42,97. A profit of 100% must be made. Therefore, the

shirts must be sold at double the cost price, that is at R85,94.

Exercise 12.2

Page 154: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

148STUDY UNIT 12 FORMULATING MODELS AND SOLVING THEM WITH LINGO

After some negotiations, the Midrand factory says that it can supply another 2 000 shirts.The price of these additional shirts will, however, be R50 per shirt. Should Garchini ac-cept this offer?

Solution to Exercise 12.2

In the programmed model the demand constraints are given first, followed by the supplyconstraints. This convention is followed in the output, and hence rows 2 to 6 correspondthe demand constraints and rows 7 to 9 correspond to the supply constraints.

The supply from Midrand is found in row 7 and we see that the shadow price is R1 500.The current supply is 80 and this can be increased by 20 (remember quantities are rep-resented in hundreds). The AI given in the ranging analysis is 90. The increase of 20 istherefore acceptable and will leave the basis unchanged.

If the cost of the shirts remains unchanged, the total cost of the order will decrease byR1 500 per 100 shirts. Therefore, for 2 000 shirts, the cost saving is 20 × 1 500 = R30 000.

However, the cost per shirt is now R50 and not R36 - an increase of R14. This will causea total cost increase of R14 × 2 000 = R28 000.

The net cost saving is R30 000− R28 000 = R2 000 and Garchini should accept the offer.

Exercise 12.3

Suppose that the Durban factory can supply at most 13 000 shirts. This means that thetotal supply by the factories is 31 000, while the total demand is 32 000. The result isthat the problem has no solution if we require that the demand be met. How can youchange the model to provide for the fact that the demand cannot be met in full? Solvethe new model to make sure that your model handles this complication correctly.

Solution to Exercise 12.3

Demand cannot be met and our first attempt at providing for this is to change the de-mand constraints to ≤ constraints. To do this we change the > sign in row 8 of our pre-programmed model to a < sign.

When we solve this model, we see that this does not have the desired effect, since thecheapest solution is to order no shirts at a cost of R0,00.

We now introduce an imaginary factory, F4. It is impossible to transport shirts from afactory that does not exist, and if the solution indicates that shirts are transported fromF4 to a city, this amount will represent the shortage at that city. The total shortagemust be limited to 1 000. Hence the capacity of F4 is 1 000.

The factory does not exist and hence it does not charge for its shirts, so the cost per shirtis R0,00. Shirts cannot be transported and the transportation cost is also R0,00.

The Durban factory can supply only 13 000 shirts. Hence the capacity of F3 is now 130(in hundreds).

Page 155: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

12.4. A TRANSPORTATION PROBLEM 149

Our previous model is now changed and is as follows:

MODEL:SETS:PLANTS/F1,F2,F3,F4/:CAP;CITIES/C1,C2,C3,C4,C5/:DEM;LINKS(PLANTS,CITIES):COST,SHIP;ENDSETS

MIN=@SUM(LINKS:COST*SHIP);

@FOR(CITIES(J):@SUM(PLANTS(I):SHIP(I,J))>DEM(J));

@FOR(PLANTS(I):@SUM(CITIES(J):SHIP(I,J))<CAP(I));

DATA:CAP=80,100,130,10;DEM=100,70,40,50,60;COST=3750,3780,4200,4300,4800,

3900,3950,3800,3750,3600,5250,5320,5200,4650,5500,

0, 0, 0, 0, 0;ENDDATAEND

If this model is solved by selecting SOLVE from the LINGO menu, the solution is:

Rows= 10 Vars= 20 No. integer vars= 0 ( all are linear) Nonzeros= 69Constraint nonz= 40( 40 are +- 1) Density=0.329

Smallest and largest elements in absolute value= 1.00000 5500.00

No. < : 4 No. =: 0 No. > : 5, Obj=MIN, GUBs <= 5

Single cols= 0

Optimal solution found at step: 12

Objective value: 1322300.

Variable Value Reduced Cost

CAP( F1) 80.00000 0.0000000E+00CAP( F2) 100.0000 0.0000000E+00CAP( F3) 130.0000 0.0000000E+00CAP( F4) 10.00000 0.0000000E+00DEM( C1) 100.0000 0.0000000E+00DEM( C2) 70.00000 0.0000000E+00DEM( C3) 40.00000 0.0000000E+00

Page 156: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

150STUDY UNIT 12 FORMULATING MODELS AND SOLVING THEM WITH LINGO

DEM( C4) 50.00000 0.0000000E+00DEM( C5) 60.00000 0.0000000E+00COST( F1, C1) 3750.000 0.0000000E+00COST( F1, C2) 3780.000 0.0000000E+00COST( F1, C3) 4200.000 0.0000000E+00COST( F1, C4) 4300.000 0.0000000E+00COST( F1, C5) 4800.000 0.0000000E+00COST( F2, C1) 3900.000 0.0000000E+00COST( F2, C2) 3950.000 0.0000000E+00COST( F2, C3) 3800.000 0.0000000E+00COST( F2, C4) 3750.000 0.0000000E+00COST( F2, C5) 3600.000 0.0000000E+00COST( F3, C1) 5250.000 0.0000000E+00COST( F3, C2) 5320.000 0.0000000E+00COST( F3, C3) 5200.000 0.0000000E+00COST( F3, C4) 4650.000 0.0000000E+00COST( F3, C5) 5500.000 0.0000000E+00COST( F4, C1) 0.0000000E+00 0.0000000E+00COST( F4, C2) 0.0000000E+00 0.0000000E+00COST( F4, C3) 0.0000000E+00 0.0000000E+00COST( F4, C4) 0.0000000E+00 0.0000000E+00COST( F4, C5) 0.0000000E+00 0.0000000E+00SHIP( F1, C1) 20.00000 0.0000000E+00SHIP( F1, C2) 60.00000 0.0000000E+00SHIP( F1, C3) 0.0000000E+00 500.0000SHIP( F1, C4) 0.0000000E+00 1150.000SHIP( F1, C5) 0.0000000E+00 1300.000SHIP( F2, C1) 0.0000000E+00 50.00000SHIP( F2, C2) 0.0000000E+00 70.00000SHIP( F2, C3) 40.00000 0.0000000E+00SHIP( F2, C4) 0.0000000E+00 500.0000SHIP( F2, C5) 60.00000 0.0000000E+00SHIP( F3, C1) 80.00000 0.0000000E+00SHIP( F3, C2) 0.0000000E+00 40.00000SHIP( F3, C3) 0.0000000E+00 0.0000000E+00SHIP( F3, C4) 50.00000 0.0000000E+00SHIP( F3, C5) 0.0000000E+00 500.0000SHIP( F4, C1) 0.0000000E+00 30.00000SHIP( F4, C2) 10.00000 0.0000000E+00SHIP( F4, C3) 0.0000000E+00 80.00000SHIP( F4, C4) 0.0000000E+00 630.0000SHIP( F4, C5) 0.0000000E+00 280.0000

Row Slack or Surplus Dual Price

1 1322300. 1.0000002 0.0000000E+00 -5250.0003 0.0000000E+00 -5280.0004 0.0000000E+00 -5200.0005 0.0000000E+00 -4650.0006 0.0000000E+00 -5000.000

Page 157: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

12.4. A TRANSPORTATION PROBLEM 151

7 0.0000000E+00 1500.0008 0.0000000E+00 1400.0009 0.0000000E+00 0.0000000E+0010 0.0000000E+00 5280.000

The new ordering schedule is represented as follows:

MRD80

Supply(in 100’s)

Factory Order size Store Demand(100 shirts) (in 100’s)

PE100

DBN150

JHB 100

PTA 70

BFN 40

DBN 50

CPT 60

20

50

40

60

60

80

Figure 12.3

The associated cost is R1 322 300.

SHIP(F4,C2) = 10, which means that the Pretoria store will receive 1 000 shirts less thanits demand.

Page 158: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

152STUDY UNIT 12 FORMULATING MODELS AND SOLVING THEM WITH LINGO

Exercise 12.4

The factory at Durban has idle capacity and has indicated that it will reduce its priceif Garchini orders the total number of 32 000 shirts from them. At what price will it beworthwhile for Garchini to accept this offer?

Solution to Exercise 12.4

The cost per shirt was incorporated in the objective function coefficients. Specifically wecan say that if the Durban factory’s cost per shirt is Rx, the objective function coeffi-cients associated with factory F3 are

F3C1: 100x + 650.

F3C2: 100x + 720.

F3C3: 100x + 600.

F3C4: 100x + 50.

F3C5: 100x + 950.

If the price of the shirts were to change, five objective function coefficients would change.The result is that the ranging analysis cannot be used to answer this question.

In fact, a complicated parametric variation of five objective function coefficients is re-quired here. Unfortunately neither LINGO nor LINDO is able to do this. If we had aprogram that could do such a parametric analysis, this would be the way to go.

We could, of course, use LINDO to do the parametric analysis ourselves. However, inthis case the ranging analysis is not worth anything and we will have to use a trial-and-error approach, where we choose different values for x in a systematic way, change theobjective function coefficients in the model, and resolve the model.

Due to the simplicity of the model, however, it is also possible to follow a common-senseapproach. We can say that as long as it is true for each store that Durban can supply itsorder at a cheaper price than Midrand or Port Elizabeth can, it will also be in the inter-est of the group to order the entire batch from Durban. For example, for Johannesburg,if

100x + 650 ≤ min (3 750, 3 900) = 3 750, that is, if x ≤ 31.

The 3 750 and 3 900 above are the costs per 100 shirts ordered from Midrand and PortElizabeth respectively.

For the other stores we get:

Pretoria: 100x + 720 ≤ min (3 780, 3 950) = 3 780,

x ≤ 30,6.

Bloemfontein: 100x + 600 ≤ min (4 200, 3 800) = 3 800,

Page 159: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

12.4. A TRANSPORTATION PROBLEM 153

x ≤ 32.

Durban: 100x + 50 ≤ min (4 300, 3 750) = 3 750,

x ≤ 37.

Cape Town: 100x + 900 ≤ min (4 800, 3 600) = 3 600,

x ≤ 27.

The largest value for x that satisfies the five requirements above is 27. It will thereforeonly be worthwhile for Garchini to order the whole batch of shirts from Durban if theirprice per shirt is R27 or less.

The drawback of this approach is that we have no idea of how the ordering schedule changesfor prices between R27 and R46. A parametric analysis would have provided this infor-mation as well.

A remark about LINGO

To solve the given transportation problem, we used the pre-programmed model Trans.lng.We may be interested to see the expanded version of this programmed model, that is, onein which all the variable names and constraints are given. In other words, where opera-tors such as @FOR are expanded from their compact LINGO language format. We cando this as follows:

Get the model used to solve our original transportation problem into LINGO.

Select the GENERATE command from the LINGO menu.

Select ALGEBRAIC in the dialog box.

Select SCREEN to write the generated model to the Reports Window.

Click on GENERATE.

The Reports Window will now contain the following expanded model:

Rows= 9 Vars= 15 No. integer vars= 0 ( all are linear) Nonzeros= 53Constraint nonz= 30( 30 are +- 1) Density=0.368Smallest and largest elements in absolute value= 1.00000 5500.00No. < : 3 No. =: 0 No. > :5, Obj=MIN, GUBs <= 5

Single cols= 0

MIN 5500 SHIP(F3,C5) + 4650 SHIP(F3,C4) + 5200 SHIP(F3,C3)+ 5320 SHIP(F3,C2) + 5250 SHIP(F3,C1) + 3600 SHIP(F2,C5)+ 3750 SHIP(F2,C4) + 3800 SHIP(F2,C3) + 3950 SHIP(F2,C2)+ 3900 SHIP(F2,C1) + 4800 SHIP(F1,C5) + 4300 SHIP(F1,C4)+ 4200 SHIP(F1,C3) + 3780 SHIP(F1,C2) + 3750 SHIP(F1,C1)

Page 160: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

154STUDY UNIT 12 FORMULATING MODELS AND SOLVING THEM WITH LINGO

SUBJECT TO

2] SHIP(F3,C1) + SHIP(F2,C1) + SHIP(F1,C1) >= 1003] SHIP(F3,C2) + SHIP(F2,C2) + SHIP(F1,C2) >= 704] SHIP(F3,C3) + SHIP(F2,C3) + SHIP(F1,C3) >= 405] SHIP(F3,C4) + SHIP(F2,C4) + SHIP(F1,C4) >= 506] SHIP(F3,C5) + SHIP(F2,C5) + SHIP(F1,C5) >= 607] SHIP(F1,C5) + SHIP(F1,C4) + SHIP(F1,C3) + SHIP(F1,C2) + SHIP(F1,C1) <=808] SHIP(F2,C5) + SHIP(F2,C4) + SHIP(F2,C3) + SHIP(F2,C2) + SHIP(F2,C1) <=1009] SHIP(F3,C5) + SHIP(F3,C4) + SHIP(F3,C3) + SHIP(F3,C2) + SHIP(F3,C1) <=150

END

Note that it is also possible to generate a LINDO model from any LINGO model. To dothis, we use the GENERATE command from the LINGO menu and select LINDO in thedialog box.

We have a choice of whether we want to write the generated model to the Reports Win-dow or whether we want to write it to a filename, which we can select. We have seen thatfor the former, we select SCREEN in the dialog box. To save a generated model to a file-name, we must select FILE in the dialog box.

12.5 A marketing problem

Problem

Pretty Face is a large concern manufacturing cosmetics. They plan to launch a new cos-metic during September to coincide with spring. This will be accompanied by a specialadvertising campaign that will last for a month and for which R200 000 is budgeted. It isthe job of Sello Mabena, the marketing manager, to decide how to use this R200 000 sothat as many people as possible will be made aware of the new product.

The cosmetic will be presented as a sophisticated cosmetic aimed at the career woman.Therefore Sello wants to apportion her R200 000 so that at least 750 000 career womenwill be reached by the advertising campaign.

The plant that manufactures the cosmetic is situated in Johannesburg and about 50% ofthe output of the factory is sold in Gauteng. Therefore Sello also wants to ensure that atleast 50% of the people reached by the campaign are in Gauteng.

To keep this problem within bounds, we assume that Sello will only make use of maga-zine advertisements in her campaign and for this purpose she considers only three mag-azines. In a practical situation more magazines and other media will, of course, also beconsidered. This will enlarge the problem but should not complicate the formulationprocess.

The three magazines that Sello considers are “Thandi”, “Business Woman” and “Every

Page 161: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

12.5. A MARKETING PROBLEM 155

Week”. The following table contains figures that Sello obtained from a market researchfirm concerning the circulation of the magazines:

Thandi Business Woman Every WeekTotal number of readers 400 000 200 000 600 000Number of Gauteng readers 130 000 125 000 260 000Number of career women readers 150 000 160 000 100 000

The market research firm also established that full page advertisements (of 600 cm2)are 60% effective in “Thandi”, 70% effective in “Business Woman” and 50% effective in“Every Week”. Here effectiveness indicates the percentage of readers who read a full pageadvertisement. It is further assumed that the effectiveness of an advertisement is pro-portional to its size. An advertisement with an area of 300 cm2 in “Thandi” will, for ex-ample, be read by 30% of the readers and two full page advertisements by 120% of thereaders. The 120% implies that a reader who reads both pages is counted twice.

Sello must decide how much advertising space per edition to purchase for the campaign.“Thandi” will appear twice in September, “Business Woman” three times and “EveryWeek” four times. Advertising space costs R24 per cm2 in “Thandi”, R40 per cm2 in“Business Woman” and R20 per cm2 in “Every Week”.

The minimum size of an advertisement in “Thandi” is 50 cm2 and the maximum size is1 800 cm2. The minimum size in “Business Woman” is 100 cm2. There is no upper limiton the size. “Every Week” has no lower limit but the maximum size is 1 200 cm2.

The amount of advertising space purchased in a specific magazine will be the same foreach edition of the magazine that appears in September.

Model

Sello must decide how much advertising space in cm2 to purchase in each of the threemagazines.

Decision variables

The decision variables are:

TH = the amount of advertising space in cm2 purchased per edition of “Thandi”.

BW = the amount of advertising space in cm2 purchased per edition of “Business Woman”.

EW = the amount of advertising space in cm2 purchased per edition of “Every Week”.

Objective function

The purpose of the advertising campaign is to reach as many people as possible.

The number of people reached by each magazine, can generally be calculated by the fol-lowing formula:

Page 162: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

156STUDY UNIT 12 FORMULATING MODELS AND SOLVING THEM WITH LINGO

(efficiency per cm2) × (advertising space in cm2) × (number of readers per edition) ×(number of editions).

This gives the following:

Magazine Number of readers reached

Thandi 0,6600

× TH × 400 000 × 2 = 800TH

Business Woman 0,7600

× BW × 200 000 × 3 = 700BW

Every Week 0,5600

× EW × 600 000 × 4 = 2 000EW

The objective function is therefore:

Maximise PEOPLE = 800TH + 700BW + 2 000EW.

Constraints

The budget

The cost of the advertising space purchased may not exceed the budget, which is R200 000.

The advertising cost for each magazine is calculated as

(cost per cm2) × (advertising space in cm2 per edition) × (number of editions).

Magazine Advertising costThandi 24 × TH × 2 = 48TH

Business Woman 40 × BW × 3 = 120BW

Every Week 20 × EW × 4 = 80EW

The budget constraint is therefore given by

48TH + 120BW + 80EW ≤ 200 000.

Number of career women reached

The number of career women reached must be at least 750 000.

The number of career women reached by each magazine is calculated as

(efficiency per cm2) × (advertising space in cm2) × (number of career women readersper edition) × (number of editions).

Magazine Number of career women readers reached

Thandi 0,6600

× TH × 150 000 × 2 = 300TH

Business Woman 0,7600

× BW × 160 000 × 3 = 560BW

Every Week 0,5600

× EW × 100 000 × 4 = 333,33EW

The constraint on the number of career women reached is therefore

300TH + 560BW + 333,33EW ≥ 750 000.

Number of people in Gauteng reached

Page 163: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

12.5. A MARKETING PROBLEM 157

The number of people in Gauteng reached must be at least 50% of the total number ofpeople reached.

The number of people reached in Gauteng by each magazine is calculated as

(efficiency per cm2) × (advertising space in cm2) × (number of Gauteng readers peredition) × (number of editions).

Magazine Number of Gauteng readers reached

Thandi 0,6600

× TH × 130 000 × 2 = 260TH

Business Woman 0,7600

× BW × 125 000 × 3 = 437,5BW

Every Week 0,5600

× EW × 260 000 × 4 = 866,67EW

Therefore the constraint on the number of people in Gauteng reached is

260TH + 437,5BW + 866,67EW ≥ 0,5 × (800TH +700BW + 2 000EW ).

Feasibility restrictions

The minimum size of an advertisement in “Thandi” is 50 cm2 and the maximum size is 1800 cm2.

Hence 50 ≤ TH ≤ 1 800.

Similarly, BW ≥ 100 and EW ≤ 1 200.

The LP model is:

Maximise PEOPLE = 800TH + 700BW + 2 000EW

subject to

48TH + 120BW + 80EW ≤ 200000 BUDGET

300TH + 560BW + 333,33EW ≥ 750 000 WOMEN

260TH + 437,5BW + 866,67EW ≥ 0,5(800TH+ 700BW + 2000EW ) GAUTENG

and

50 ≤ TH ≤ 1 800; BW ≥ 100; EW ≤ 1200.

Solution

We now wish to solve this model with LINGO. Before we key in the model, we must tellyou how LINGO handles bounded variables. LINGO has variable domain functions thatplace additional restrictions on variables. Two of these functions that you may need forvariables in LP models are:

@BND(L,X,U) which limits the variable X to greater than or equal to L and less than orequal to U;

@FREE(X) which removes the default lower bound of zero on a variable, allowing it totake any positive or negative value.

Page 164: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

158STUDY UNIT 12 FORMULATING MODELS AND SOLVING THEM WITH LINGO

In our model, TH has a lower bound of 50 and an upper bound of 1 800. This will berepresented in the LINGO model as @BND(50,TH,1800).

BW has a lower bound of 100. The domain function @BND, however, also requires anupper bound and hence we choose a very large value for the upper bound, say 10 000(think about the reason for choosing this value). This is represented as @BND(100,BW,10000).

EW has an upper bound of 1 200 and implicitly the lower bound is 0. This is thereforerepresented by @BND(0,EW,1200).

The LINGO representation of our model is therefore as follows:

Guide Marketing problem;[PEOPLE] Max=800*TH+700*BW+2000*EW;[BUDGET] 48*TH+120*BW+80*EW<200000;[WOMEN]300*TH+560*BW+333.33*EW>750000;[GAUTENG]260*TH+437.5*BW+866.67*EW>0.5*(800*TH+700*BW+2000*EW);@BND(50,TH,1800);@BND(100,BW,10000);@BND(0,EW,1200);

Notice that we have also named the objective function by typing in PEOPLE in squarebrackets at the beginning of the row that contains the objective function.

The solution to the model is:

Rows= 4 Vars= 3 No. integer vars= 0 ( all are linear) Nonzeros= 14Constraint nonz= 9( 0 are +- 1) Density=0.875 Smallest and largest elementsin absolute value= 48.0000 750000.

No. < : 1 No. =: 0 No. > : 2, Obj=MAX, GUBs <= 1

Single cols= 0

Optimal solution found at step: 2

Objective value: 2289352.

Variable Value Reduced Cost

TH 50.00000 880.0244BW 1169.847 0.0000000E+00EW 715.2298 0.0000000E+00

Row Slack or Surplus Dual Price

PEOPLE 2289352. 1.000000BUDGET 0.0000000E+00 11.66677WOMEN 158521.8 0.0000000E+00GAUTENG 0.0000000E+00 -8.000139

Ranges in which the basis is unchanged:

Page 165: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

12.5. A MARKETING PROBLEM 159

Objective Coefficient Ranges

Current Allowable AllowableVariable Coefficient Increase DecreaseTH 800.0000 880.0244 INFINITYBW 700.0000 2300.000 2012.533EW 2000.000 INFINITY 963.8195

Righthand Side Ranges

Row Current Allowable AllowableRHS Increase Decrease

BUDGET 200000.0 127423.1 35114.09WOMEN 750000.0 158521.8 INFINITYGAUTENG 0.0 137083.3 92912.66

From the solution it follows that Sello must purchase 50 cm2 in “Thandi”, 1 170 cm2 in“Business Woman” and 715 cm2 in “Every Week” and will reach about 2 290 000 peoplewith this campaign.

The amount of space to be purchased is restricted by the budget and the requirementthat at least 50% of the people reached must be in Gauteng.

The entire budget of R200 000 is used, as the BUDGET constraint is a binding constraint.

The WOMEN constraint has surplus of about 158 500. Therefore the number of careerwomen reached is 908 500, that is the minimum requirement of 750 000 plus the surplus of158 500.

The GAUTENG constraint is binding. Therefore the number of people reached in Gaut-eng is exactly half the total number of people reached, that is 0,5 × 2 290 000 = 1 145 000.

The interpretation of the shadow costs and shadow prices are interesting. The units arenow not rand, but are the same as the units of the objective function, namely peoplereached.

It follows that if Sello decided to purchase 60 cm2 instead of 50 cm2 in “Thandi”, for ex-ample, the advertising campaign would reach 10 × 880,0224, that is about 8 800, fewerpeople.

For each additional rand spent on the advertising campaign, 12 more people can be reached.Sello can use this information to decide whether to use funds that were intended for otherpurposes to boost the advertising campaign.

The shadow price of the GAUTENG constraint is more difficult to interpret. This con-straint indicates how many people more than half of the total number of people, are reachedin Gauteng. If Sello allows that one person less than half of the total number of people isreached in Gauteng, she will be rewarded with the fact that eight more people will bereached than at present. This will be true for up to 137 083 people.

Page 166: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

160STUDY UNIT 12 FORMULATING MODELS AND SOLVING THEM WITH LINGO

An amount of 137 083 people is about 6% of the total number of people. One percent ofthe total number of people is 22 900. The tendency is that for each 1%, up to 6%, withwhich the constraint of 50% is relaxed, 183 200, that is 8 × 22 900, more people will bereached. This is not an exact prediction, but rather a very rough guess of what will hap-pen if we play around with the percentage. If the percentage changes, the coefficients ofthe GAUTENG constraint change. Another computer run is needed to determine the ef-fect of this.

Exercise 12.5

Do another run with LINGO to determine how many more people will be reached if theminimum percentage of people to be reached in Gauteng is relaxed from 50% to 45% ofthe total number of people reached.

Solution to Exercise 12.5

The constraint GAUTENG changes to

260TH + 437,5BW + 866,67EW ≥ 0,45(800TH +700BW + 2 000EW ).

The model with this change is solved and the result is:

Rows= 4 Vars= 3 No. integer vars= 0 ( all are linear)

Nonzeros= 14 Constraint nonz= 9( 0 are +- 1) Density=0.875

Smallest and largest elements in absolute value= 33.3300 750000.

No. < : 1 No. =: 0 No. > : 2, Obj=MAX, GUBs <= 1

Single cols= 0

Optimal solution found at step: 2

Objective value: 3237598.

Variable Value Reduced Cost

TH 444.0984 0.0000000E+00BW 689.0273 0.0000000E+00EW 1200.000 -1132.003

Row Slack or Surplus Dual Price

PEOPLE 3237598. 1.000000BUDGET 0.0000000E+00 9.395973WOMEN 169080.8 0.0000000E+00GAUTENG 0.0000000E+00 -3.489933

The new optimal solution is to purchase 444 cm2 in “Thandi”, 689 cm2 in “BusinessWoman” and 1 200 cm2 in “Every Week”. Approximately 3 240 000 people will be reached.

Page 167: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

12.5. A MARKETING PROBLEM 161

This is an increase of 0,95 million.

The number of career women reached is approximately 919 000, that is 750 000 plus thesurplus of 169 000. This is 10 500 more than the previous solution.

The number of people reached in Gauteng is exactly 45% of the total number of peoplereached, that is 0,45 × 3 240 000 = 1 458 000. This is 313 000 more than before.

Sello should prefer this solution to the previous one!

From the above solution it follows that, although the percentage of people reached inGauteng is smaller, the total number of people reached is larger. The GAUTENG con-straint still has a negative shadow price, which indicates that still more people may bereached in total if the percentage is lowered further.

Suppose Sello feels that it is more important to reach more people in Gauteng than tomaintain a percentage of 50% or 45% of the total number of people. A logical step is tochange the GAUTENG constraint so that a lower limit is set on the number of people tobe reached in Gauteng. We already have a model whereby 1 456 919 (45% of 3 237 598)people in Gauteng can be reached. We can use this as a lower limit for the GAUTENGconstraint.

Exercise 12.6

Set a lower limit of 1 457 000 on the number of people reached in Gauteng and optimisethis new model.

Solution to Exercise 12.6

The new GAUTENG constraint is 260TH + 437,5BW + 866,67EW ≥ 1 457 000.

The solution to this new model is:

Rows= 4 Vars= 3 No. integer vars= 0 ( all are linear) Nonzeros= 15 Constraint nonz=9( 0 are +- 1) Density=0.938 Smallest and largest elements in absolute value= 48.00000.145700E No. < : 1 No. =: 0 No. > : 2, Obj=MAX, GUBs <= 1

Single cols= 0

Optimal solution found at step: 3

Objective value: 3942667.

Variable Value Reduced CostTH 1800.000 -520.0000BW 146.6667 0.0000000E+00EW 1200.000 -1533.333

Row Slack or Surplus Dual PricePEOPLE 3942667. 1.000000BUDGET 0.0000000E+00 5.833333WOMEN 272129.3 0.0000000E+00GAUTENG 115170.7 0.0000000E+00

Page 168: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

162STUDY UNIT 12 FORMULATING MODELS AND SOLVING THEM WITH LINGO

The optimal solution of this new model is to purchase 1 800 cm2 in “Thandi”, 147 cm2 in“Business Woman” and 1 200 cm2 in “Every Week”. Nearly 4 million people will now bereached of whom approximately 1 million are women and approximately 1,572 million arein Gauteng. The percentage of people reached in Gauteng is about 40%.

Remark

These two exercises illustrate a very important advantage of using a model. Here a sub-jective constraint was under the control of the decision-maker. By playing around withthe model, she could get an idea of the effect of the strictness of the constraint.

Perhaps it is company policy to direct 50% of the marketing effort to Gauteng. Thismodel and playing around with it, could give management an indication of how muchthis policy “costs” them. Further, it gives the decision-maker an objective measure, whichcan be used to justify why an exception in this special case would be to the advantage ofthe company.

Page 169: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

StudyUnit 13

Summary and problems

Theme:

Summary of the chapter and additional problems.

Contents13.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

13.2 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

13.3 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

Learning objectives

On completion of this study unit the student must be able to do the following when giventhe description of a problem

• formulate a model which represents the problem;

• solve the model;

• interpret and use the computer solution;

• decide, on the basis of the solution, whether the results make sense and whether themodel is an accurate representation of the problem.

163

Page 170: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

164 STUDY UNIT 13 SUMMARY AND PROBLEMS

13.1 Summary

The formulation of an LP model is certainly the most important aspect of linear pro-gramming. Everything following from this, such as the solution to the LP model and theinterpretation of this solution, is meaningless if the formulation is not correct. It is there-fore essential that you master the art of formulation.

An LP model should always be set out in the following format:

Decision variables,

Objective function,

Constraints,

Feasibility restrictions.

Each one of these components will now be discussed.

Decision variables

It is very important that your decision variables are chosen correctly. If not, the formula-tion will be a mess!

Read through the problem and determine exactly what is asked and what deci-sions have to be made. The decision variables must be chosen to representthese decisions. When the model is solved, values are obtained for the decision var-iables and these values must be the answers to the original questions posed by the prob-lem.

The decision variables must be defined accurately in words – rather say too much thantoo little. Refer to the examples in this study guide and you will see that the decisionvariables are always very clearly written out.

For example, you may have to determine the number of units of two products that haveto be produced monthly in order to maximise profit. Here two decisions have to be madeand they can be represented by two decision variables, NA and NB. These decision var-iables should be defined as:

NA = the number of units of product A to produce monthly.

NB = the number of units of product B to produce monthly.

Definitions such as NA = product A and NB = product B, are not acceptable!

We must emphasize the importance of defining the decision variables very clearly. If theyare not defined in detail, the rest of the LP model will be meaningless as one does notknow what the model is dealing with.

Page 171: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

13.1. SUMMARY 165

Objective function

Once you have decided what the objective of the problem is and have chosen your deci-sion variables, you can write down the objective function.

The objective function is a mathematical expression that represents the rela-tionship between the decision variables and the goal (objective) under consid-eration. The objective function will therefore be a function of the decision variables andwill reflect the objective of the problem, which is usually the maximisation or minimisa-tion of something.

Constraints

Read the problem and identify the restrictions that are placed on the problem. Each re-striction should be represented by one constraint. Constraints are also func-tions of the decision variables.

In a particular constraint, comparable things must be compared. The units used in aconstraint must be the same throughout the constraint. You also have to make sure thatthe units used on the left-hand side of a constraint are the same as those used on theright-hand side of the constraint.

For example, in one constraint you cannot compare a monetary value to the quantity tobe produced. Separate constraints will have to be set up to deal with the monetary re-strictions and the quantity restrictions.

Feasibility restrictions

You must write down the validity of the decision variables, in other words, youmust write down which values each decision variable may assume.

For example, 0 ≤ NA ≤ 100, specifies that negative numbers of product A cannot be pro-duced and that no more than 100 units can be produced.

The ability to build a good model is something that one cannot master in oneday, but which must be developed and expanded upon through experience.

Remember that a model is a representation of your own subjective view of a problem sit-uation. Therefore different models may correctly portray a problem. In working throughthis module, it is quite possible that you have at times developed a model that differedfrom the given model. This does not mean that yours is wrong. Yours could even be abetter model than the one given. You must be the judge of that!

In a case where your model was different from the given model, you probably chose a dif-ferent set of decision variables. This is one of the most crucial choices one makes whenformulating a model. Our philosophy is to rather have too many variables than too few.A good choice of variables definitely simplifies the rest of the formulation process. Oftenwhen one struggles to write down the constraints, it might be advisable to just stop andtry to define the variables differently or add a few more.

Page 172: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

166 STUDY UNIT 13 SUMMARY AND PROBLEMS

Of course, when you find yourself out in the big wide world, you will find that the biggestproblem is not to write down the LP model, but to get all the relevant information andto define all the relevant relationships. This can only be learnt through real, practicalexperience. However, this module should have extended your analytical abilities, and theexperience gained here should help and guide you to ask the right questions to find theanswers to the above problems.

13.2 Problems

Formulate the following problems as linear programming models and solve the models.Use your computer solutions to decide whether your models are correct before you lookat the given solutions.

Problem 13.1

An investment problem

Lucky Fellow started his year on a very high note by winning R100 000 at Sun City. Hedecides to invest his money until he has finished his studies in five years’ time and he hasselected the following three types of investment in which to invest his money:

1. Debentures in which money can be deposited for a fixed term of two years afterwhich the capital sum and interest are paid out. The interest rate is currently 17,5%per annum. These debentures are available at the beginning of each year. The in-terest on the debenture is fixed, but Lucky expects the rates with each new issue tobe 0,5% higher than in the previous year.

2. Shares in a new company that will apply for listing on the stock exchange from thebeginning of next year. This investment will therefore be available from the begin-ning of the second year only. To obtain the maximum growth, Lucky will keep theshares until the end of the fifth year. He expects the share price to have doubled bythat time.

3. Saving certificates in which money can be deposited for a term of one year, afterwhich the capital sum with interest is paid out. The interest rate is currently 13%.He expects the interest rate to increase by 0,75% per annum.

Lucky wishes to obtain the maximum growth on his R100 000 and plans to use all amountsand interest paid out for re-investment during the five year period. However, to ensurethat he will be able to get hold of some of the money in case of an emergency, he wantsto invest at least 30% of his money in saving certificates.

Since the shares are a high risk investment, the amount invested in shares each year shouldnot be more than half the amounts invested in debentures and saving certificates.

Help Lucky to decide how much to invest in each of the three types of investment.

Page 173: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

13.3. SOLUTIONS 167

Problem 13.2

A production-scheduling problem

A company would like to find the minimum-cost production schedule for a seasonal prod-uct. The demand for the product is 2 000 units in May, 4 000 in June, 6 000 in July,6 000 in August and 2 000 in September. The product is perishable and may not be storedfor more than two months. If it is produced in April, for example, it must be sold by theend of June.

The company wants to employ a labour force from April to September to manufacturethe product. No labourers will be employed after April, nor will any be laid off beforethe end of September. It costs R600 to train a labourer. Each labourer can produce 400units per month in normal time, and if necessary, overtime is allowed with the under-standing that overtime production may not exceed 25% of the normal time production.The labourers are appointed at a wage of R2 400 per month, and are paid 1,5 times theirnormal rate for overtime.

The product is available for sale immediately after production. A unit can therefore besold in the same month in which it is produced. It costs R1,50 to place one unit in stor-age if it is not sold immediately. This is a handling charge. It costs R1,20 to keep oneunit in storage for a month.

Help the company to determine the minimum-cost production schedule.

13.3 Solutions

Solution to Problem 13.1

Model

Decision variables

At the beginning of each year, Lucky must decide on the amount to invest in the invest-ment options available at that time. The investment options available are summarisedas:

Beginning of year 1 – Debentures and saving certificates.

Beginning of year 2 – Debentures, saving certificates and company shares.

Beginning of year 3 – Debentures and saving certificates.

Beginning of year 4 – Debentures and saving certificates.

Beginning of year 5 – Saving certificates (debentures are fixed for two years).

The decision variables are

DBi = amount of money invested in debentures at the beginning of year i,

Page 174: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

168 STUDY UNIT 13 SUMMARY AND PROBLEMS

where i = 1, 2, 3, 4.

SCi = amount of money invested in saving certificates at the beginning of year i,

where i = 1, 2, 3, 4, 5.

CS2 = amount of money invested in company shares at the beginning of year 2.

Lucky can, of course, decide not to invest all his available money. This would make senseif the investment options at the beginning of a year are poor and he would rather havethe money available to invest more profitably after a year or more. This will only be rel-evant if it is not possible to invest money for one year and earn interest on it. There-fore, it is not an option that Lucky will consider and we can say that he will invest allhis available money at the beginning of each year.

Constraints

We must now consider the factors that restrict the amounts invested in each option. Thefactors are:

• the amount invested at the beginning of each year is equal to the money availablefor investment at the beginning of that year;

• the requirement that 30% of his money must be invested in saving certificates;

• the requirement that the amount invested in company shares each year must not bemore than half the amounts invested in debentures and saving certificates.

At the beginning of the first year, Lucky has R100 000 available. How much will he haveavailable at the beginning of each of the following years? A simple sketch should help usanswer this question. We draw the distribution of the investments over time and indicatethe yield of each investment at the end of its term.

InvestmentYears1 2 3 4 5. . . . . .

DB1 → → 135% . . .DB2 . → → 136% . .DB3 . . → → 137% .DB4 . . . 138%SC 1 → 113% . . . .SC 2 . → 113,75% . . .SC 3 . . → 114,5% . .SC 4 → . . . → 115,25% .SC 5 . . . . → 116%CS2 . → → → → 200%

From the sketch it can be seen that the amount paid out at the end of the first year, that

Page 175: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

13.3. SOLUTIONS 169

is the amount available for investment at the beginning of the second year, is 113% of theamount invested in saving certificates at the beginning of the first year. In terms of thedecision variables, this is 1,13SC 1.

At the end of the second year, 1,35DB1 + 1,1375SC 2 is paid out. The amounts paid outat the end of the other years can also be read from the sketch.

Constraints on the investment at the beginning of each year

At the beginning of each year the amount invested must be equal to the amount paid outat the end of the previous year.

Beginning year 1: DB1 + SC 1 = 100 000.

Beginning year 2: DB2 + SC 2+ CS2 = 1,13SC 1.

Beginning year 3: DB3 + SC 3 = 1,35DB1 + 1,1375SC 2.

Beginning year 4: DB4 + SC 4 = 1,36DB2 + 1,145SC 3.

Beginning year 5: SC 5 = 1,37DB3 + 1,1525SC 4.

Constraints for the requirement that 30% of the money invested must be insaving certificates

In each year the amount invested in saving certificates must be at least 30% of the totalinvestment in that year.

Year 1: SC 1 ≥ 0,3(DB1 + SC 1).

Year 2: SC 2 ≥ 0,3(DB1 + DB2 + SC 2 + CS2).

Year 3: SC 3 ≥ 0,3(DB2 + DB3 + SC 3 + CS2).

Year 4: SC 4 ≥ 0,3(DB3 + DB4 + SC 4 + CS2).

Year 5: SC 5 ≥ 0,3(DB4 + SC 5 + CS2).

Constraints for the requirement that the investment in company shares maynot be more than half the investment in debentures and saving certificates

In each year the amount invested in company shares may not be more than half the in-vestment in debentures and saving certificates in that year.

Year 2: CS2 ≤ 0,5(DB1 + DB2 + SC 2).

Year 3: CS2 ≤ 0,5(DB2 + DB3 + SC 3).

Year 4: CS2 ≤ 0,5(DB3 + DB4 + SC 4).

Year 5: CS2 ≤ 0,5(DB4 + SC 5).

Page 176: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

170 STUDY UNIT 13 SUMMARY AND PROBLEMS

Objective function

Lucky’s objective is to obtain the maximum growth in his investment. In other words,the amount of money paid out at the end of the fifth year must be as large as possible.

Maximise YIELD = 1,38DB4 + 1,16SC 5 + 2CS2.

Feasibility restrictions

The amount of money invested in each of the investment options must obviously be non-negative.

The LP model is:

Maximise YIELD = 1,38DB4 + 1,16SC 5 + 2CS2

subject to

DB1 + SC1 = 100 000 AMOUNTY 1

DB2 + SC2 + CS2 = 1,13SC1 AMOUNTY 2

7DB3 + SC3 = 1,35DB1 + 1,1375SC2 AMOUNTY 3

DB4 + SC4 = 1,36DB2 + 1,145SC3 AMOUNTY 4

SC5 = 1,37DB3 + 1,1525SC4 AMOUNTY 5

SC1 ≥ 0,3(DB1 + SC1) SAV INGSY 1

SC2 ≥ 0,3(DB1 + DB2 + SC2 + CS2) SAV INGSY 2

SC3 ≥ 0,3(DB2 + DB3 + SC2 + CS3+ CS2) SAV INGSY 3

SC4 ≥ 0,3(DB3 + DB4 + SC4 + CS2) SAV INGSY 4

SC5 ≥ 0,3(DB4 + SC5 + CS2) SAV INGSY 5

CS2 ≤ 0,5(DB1 + DB2 + SC2) SHARESY 2

CS2 ≤ 0,5(DB2 + DB3 + SC3) SHARESY 3

CS2 ≤ 0,5(DB3 + DB4 + SC4) SHARESY 4

CS2 ≤ 0,5(DB4 + SC5) SHARESY 5

and DB1, DB2, DB3, DB4, SC 1, SC 2, SC 3, SC 4, SC 5, CS2 ≥ 0.

Solution

This model is solved and the optimal solution is:

Rows= 15 Vars= 10 No. integer vars= 0 ( all are linear) Nonzeros= 53Constraint nonz= 49( 14 are +- 1) Density=0.321 Smallest and largestelements in absolute value= 0.300000 100000.

No. < : 4 No. =: 5 No. > : 5, Obj=MAX, GUBs <= 4

Single cols= 0

Optimal solution found at step: 6

Page 177: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

13.3. SOLUTIONS 171

Objective value: 213200.2

Variable Value Reduced Cost

DB4 3841.261 0.0000000E+00SC5 117235.7 0.0000000E+00CS2 35952.91 0.0000000E+00DB1 39548.20 0.0000000E+00SC1 60451.80 0.0000000E+00DB2 0.0000000E+00 0.2232246E-01SC2 32357.62 0.0000000E+00DB3 52351.93 0.0000000E+00SC3 37844.93 0.0000000E+00SC4 39491.19 0.0000000E+00

Row Slack or Surplus Dual Price

YIELD 213200.2 1.000000AMOUNTY1 0.0000000E+00 2.132002AMOUNTY2 0.0000000E+00 1.886728AMOUNTY3 0.0000000E+00 1.572978AMOUNTY4 0.0000000E+00 1.367070AMOUNTY5 0.0000000E+00 1.160000SAVINGSY1 30451.80 0.0000000E+00SAVINGSY2 0.0000000E+00 -0.8898313E-01SAVINGSY3 0.0000000E+00 -0.1097485E-01SAVINGSY4 0.0000000E+00 -0.4310000E-01SAVINGSY5 70126.77 0.0000000E+00SHARESY2 0.0000000E+00 0.7035497E-01SHARESY3 9145.522 0.0000000E+00SHARESY4 11889.28 0.0000000E+00SHARESY5 24585.59 0.0000000E+00

Ranges in which the basis is unchanged:

Objective Coefficient RangesCurrent Allowable Allowable

Variable Coefficient Increase DecreaseDB4 1.380000 0.9963549E-02 0.4310000E-01SC5 1.160000 0.3739696E-01 0.8315122E-02CS2 2.000000 0.5396885 0.1013408DB1 0.0 0.1105628 0.2338650E-01SC1 0.0 0.2338650E-01 0.1105628DB2 0.0 0.2232246E-01 INFINITYSC2 0.0 0.8578957E-01 2.834944DB3 0.0 0.8907405E-01 0.1097485E-01SC3 0.0 0.1097485E-01 0.3631939SC4 0.0 0.4310000E-01 4.219053

Righthand Side RangesRow Current Allowable Allowable

RHS Increase Decrease

Page 178: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

172 STUDY UNIT 13 SUMMARY AND PROBLEMS

AMOUNTY1 100000.0 INFINITY 99999.99AMOUNTY2 0.0 87009.09 113000.0AMOUNTY3 0.0 INFINITY 18291.04AMOUNTY4 0.0 INFINITY 5487.516AMOUNTY5 0.0 INFINITY 49171.18SAVINGSY1 0.0 30451.80 INFINITYSAVINGSY2 0.0 41433.34 31196.32SAVINGSY3 0.0 52351.93 3487.300SAVINGSY4 0.0 3841.261 39491.19SAVINGSY5 0.0 70126.77 INFINITYSHARESY2 0.0 8241.789 47855.00SHARESY3 0.0 INFINITY 9145.521SHARESY4 0.0 INFINITY 11889.28SHARESY5 0.0 INFINITY 24585.59

From this follows that Lucky should invest

• in debentures:

R39 548 at the beginning of year 1;

R52 352 at the beginning of year 3;

R 3 841 at the beginning of year 4.

• in saving certificates:

R 60 542 at the beginning of year 1;

R 32 358 at the beginning of year 2;

R 37 845 at the beginning of year 3;

R 39 491 at the beginning of year 4;

R117 236 at the beginning of year 5.

• in company shares:

R35 953 at the beginning of year 2.

His total yield will be R213 200.

Solution to Problem 13.2

Model

Decision variables

The decisions that have to be taken here are:

• the number of labourers to employ for the six-month period;

• the number of units of the product to manufacture in normal time;

• the number of units of the product to manufacture in overtime;

Page 179: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

13.3. SOLUTIONS 173

• the number of units to store for use in the following two months.

The decision variables are therefore:

W= the number of labourers to employ.

NTi = the number of units produced in normal time in month i,

where i = 1, 2, 3, 4, 5, 6.

OTi = the number of units produced in overtime in month i,

where i = 1, 2, 3, 4, 5, 6.

Sij = the number of units produced in month i for use in month j,

where i = 1, 2, 3, 4, 5 and j = i+1, i+2.

Objective function

The objective is to find the minimum-cost production-schedule. The total costs are madeup of the labour costs, the overtime production costs and the storage costs.

Labour costs

The labour costs comprise the training costs and the total wages paid to labourers overthe entire period of six months.

Training costs per labourer are R600.

Total wages per labourer are R2 400 × 6 = R14 400.

Labour costs for W labourers are therefore R15 000 × W .

Overtime production costs

It costs R2 400 to produce 400 units in normal time. This is R6 per unit. The overtimerate is 1,5 times the normal rate and hence the overtime rate is R9 per unit.

The total overtime production costs are therefore R9 times the number of units producedin overtime, that is R9 × (OT1 + OT2 + OT3+ OT4 + OT5 + OT6).

Storage costs

Storage costs consist of a handling cost of R1,50 and a storage cost of R1,20 per month.

In the first month, units may be produced and stored for use in months 2 and 3, rep-resented by S12 and S13 respectively. The storage cost associated with S12 is R2,70(R1,50 + R1,20) and the storage cost associated with S13 is R3,90 (R1,50 + 2× R1,20).

The costs associated with the remaining variables can be similarly deduced.

The total storage cost is therefore

2,7 × (S12 + S23 + S34 + S45 + S56) + 3,9 × (S13 + S24 + S35 + S46).

Page 180: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

174 STUDY UNIT 13 SUMMARY AND PROBLEMS

The objective function is:

Minimise COSTS = 15 000W + 9(OT1 + OT2 + OT3+ OT4 + OT5 + OT6) +

2,7(S12 + S23 + S34 + S45 + S56) + 3,9(S13 + S24 + S35 + S46).

Constraints

Demand

In each month the following relationship holds:

Normal time production + overtime production + stock beginning of month

= demand + stock end of month.

The production process only starts in the first month and there is therefore no stock atthe beginning of this month. There is also no demand in the first month and the hencethe total production will be carried over to the second and third months, that is NT1 +OT1 = S12 + S13.

Month 2: NT2 + OT2 + S12 = 2 000 + S23 + S24.

Month 3: NT3 + OT3 + S13 + S23 = 4 000 + S34 + S35.

Month 4: NT4 + OT4 + S24 + S34 = 6 000 + S45 + S46.

Month 5: NT5 + OT5 + S35 + S45 = 6 000 + S56.

Month 6: NT6 + OT6 + S46 + S56 = 2 000.

Normal time production

In normal time each labourer can produce a maximum of 400 units. Hence the total nor-mal time production can be represented by the following constraints:

Month 1: NT1 ≤ 400W .

Month 2: NT2 ≤ 400W .

Month 3: NT3 ≤ 400W .

Month 4: NT4 ≤ 400W .

Month 5: NT5 ≤ 400W .

Month 6: NT6 ≤ 400W .

Overtime production

In overtime each labourer can produce a maximum of 25% of the normal time produc-tion. Hence the total overtime production can be represented by the following constraints:

Month 1: OT1 ≤ 0,25NT1.

Month 2: OT2 ≤ 0,25NT2.

Page 181: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

13.3. SOLUTIONS 175

Month 3: OT3 ≤ 0,25NT3.

Month 4: OT4 ≤ 0,25NT4.

Month 5: OT5 ≤ 0,25NT5.

Month 6: OT6 ≤ 0,25NT6.

Feasibility restrictions

Obviously all variables must be non-negative.

The LP model is:

Minimise COSTS = 15 000W + 9(OT1 + OT2 + OT3+ OT4 + OT5 + OT6) +

2,7(S12 + S23 + S34 + S45 + S56) + 3,9(S13 + S24 + S35 + S46)

subject to

NT1 + OT1 = S12 + S13 DEMAND1

NT2 + OT2 + S12 = 2 000 + S23 + S24 DEMAND2

NT3 + OT3 + S13 + S23 = 4 000 + S34 + S35 DEMAND3

NT4 + OT4 + S24 + S34 = 6 000 + S45 + S46 DEMAND4

NT5 + OT5 + S35 + S45 = 6 000 + S567 DEMAND5

NT6 + OT6 + S46 + S56 = 2 000 DEMAND6

NT1 ≤ 400W NTPROD1

NT2 ≤ 400W NTPROD2

NT3 ≤ 400W NTPROD3

NT4 ≤ 400W NTPROD4

NT5 ≤ 400W NTPROD5

NT6 ≤ 400W NTPROD6

OT1 ≤ 0,25NT1 OTPROD1

OT2 ≤ 0,25NT2 OTPROD2

OT3 ≤ 0,25NT3 OTPROD3

OT4 ≤ 0,25NT4 OTPROD4

OT5 ≤ 0,25NT5 OTPROD5

OT6 ≤ 0,25NT6 OTPROD6

andW , NT1, NT2, NT3, NT4, NT5, NT6,OT1, OT2, OT3, OT4, OT5, OT6,S12, S13,S23, S24, S34, S35, S45, S46, S56 ≥ 0.

Solution

This model is solved and the solution is:

Page 182: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

176 STUDY UNIT 13 SUMMARY AND PROBLEMS

Rows= 19 Vars= 22 No. integer vars= 0 ( all are linear)Nonzeros= 75 Constraint nonz= 54( 42 are +- 1) Density=0.172Smallest and largest elements in absolute value= 0.250000 15000.0No. < : 12 No. =: 6 No. > : 0, Obj=MIN, GUBs <= 8

Single cols= 0

Optimal solution found at step: 9

Objective value: 164345.5

Variable Value Reduced Cost

W 8.181818 0.0000000E+00OT1 0.0000000E+00 5.836364OT2 0.0000000E+00 3.136364OT3 0.0000000E+00 1.936364OT4 818.1818 0.0000000E+00OT5 818.1818 0.0000000E+00OT6 0.0000000E+00 9.000000S12 636.3636 0.0000000E+00S23 0.0000000E+00 1.500000S34 0.0000000E+00 -0.2861023E-06S45 0.0000000E+00 1.500000S56 0.0000000E+00 13.66364S13 2636.364 0.0000000E+00S24 1909.091 0.0000000E+00S35 1909.091 0.0000000E+00S46 0.0000000E+00 13.66364NT1 3272.727 0.0000000E+00NT2 3272.727 0.0000000E+00NT3 3272.727 0.0000000E+00NT4 3272.727 0.0000000E+00NT5 3272.727 0.0000000E+00NT6 2000.000 0.0000000E+00

Row Slack or Surplus Dual Price

1 164345.5 1.000000DEMAND1 0.0000000E+00 -3.163636DEMAND2 0.0000000E+00 -5.863636DEMAND3 0.0000000E+00 -7.063636DEMAND4 0.0000000E+00 -9.763637DEMAND5 0.0000000E+00 -10.96364DEMAND6 0.0000000E+00 0.0000000E+00NTPROD1 0.0000000E+00 3.163636NTPROD2 0.0000000E+00 5.863636NTPROD3 0.0000000E+00 7.063636NTPROD4 0.0000000E+00 9.954545NTPROD5 0.0000000E+00 11.45455

Page 183: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

13.3. SOLUTIONS 177

NTPROD6 1272.727 0.0000000E+00OTPROD1 818.1818 0.0000000E+00OTPROD2 818.1818 0.0000000E+00OTPROD3 818.1818 0.0000000E+00OTPROD4 0.0000000E+00 0.7636364OTPROD5 0.0000000E+00 1.963636OTPROD6 500.0000 0.0000000E+00

From this follows that in April, May, June, July and August, the normal time productionis at 100% of its capacity, while in September the production is at 61% of capacity.

Overtime is worked only in July and August, and then the production is at the maximumallowable level.

Production units are only stored for later use at the end of the first three months.

The minimum cost associated with this production plan is R164 345,50.

The number of labourers employed is 8,18. This may be a problem as it is difficult to em-ploy part of a person!

Here rounding off to 8 or 9 is not so easy. Rounding off to 8 will mean that the currentproduction plan is no longer feasible and that more overtime work will be necessary toproduce the required quantities. Rounding off to 9 means that the current productionplan is still feasible, but there is a large increase in costs as an extra labourer has to beemployed. This will cost the firm an additional R15 000.

Here it is meaningful to compare the two alternatives. To do this we must solve the modeltwice, once with a constraint W = 8 added and once with a constraint W = 9 added.

The solution when eight labourers are employed is:

From April to August the normal time production is at 100% of its capacity, while inSeptember it is only at 62,5% of capacity. In June 400 units are produced in overtimeand in July and August 800 units, the maximum allowable number. The cost associatedwith this production-schedule is R165 120.

The solution when nine labourers are employed is:

Normal time production is at 100% of its capacity from April to August, while in Sep-tember it is only at 55,5% of capacity. No overtime is worked and the cost is R166 800,which is only R1 680 more than the cost for eight labourers. This cost is less than wewould have expected, since the cost of an extra labourer is R15 000.

If management wants to reduce the overtime hours of labourers, this production-schedulemay be to their liking.

Page 184: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,
Page 185: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

CHAPTER 4

INTEGER PROGRAMMING

Aim of the chapter:

On completion of this chapter the student must be able to

• formulate integer constrained problems as integer programming models and solvethem.

Page 186: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,
Page 187: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

StudyUnit 14

Integer constrained problems

Theme:

Introducing integer constrained models and solving them.

Contents14.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

14.2 Types of integer programming models . . . . . . . . . . . . . . 182

14.3 Rounding off the solution . . . . . . . . . . . . . . . . . . . . . . 183

14.4 An integer constrained example . . . . . . . . . . . . . . . . . . . 183

14.5 The branch-and-bound method . . . . . . . . . . . . . . . . . . . 188

14.6 Integer solution with LINDO and LINGO . . . . . . . . . . . . 197

Learning objectives

After completion of this study unit the student must be able to

• judge when rounding off the LP solution is acceptable and when the solution methodshould force the variables to assume integer values;

• explain how the branch-and-bound method is used to solve a given integer program-ming model;

• solve a given integer programming model with LINDO and LINGO.

181

Page 188: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

182 STUDY UNIT 14 INTEGER CONSTRAINED PROBLEMS

Sections from prescribed book, WinstonChapter 9, Section 9.1; 9.2; 9.3.

14.1 Introduction

Many management problems that can be formulated as linear programming models, havethe additional requirement that some or all of the variables must assume integer values.This requirement is often necessary as most things must be expressed as integers. Forexample, one cannot have 31/2 men laying bricks. Such integer constrained problemsare called integer programming problems (IP problems).

In this chapter we consider several approaches that may be used to solve IP models, namelyrounding off the solution, the branch-and-bound method, LINDO and LINGO.

Integer programming models are much more difficult to solve than linear programmingmodels. The available solution methods work well for models involving few variables. Forlarge real-world models, the solution process can be very complex, time-consuming andcostly. Even with the help of the powerful computers of today, it may not be worthwhileto solve such models. In such cases, heuristical methods may be employed to find “good”approximate solutions.

We will also look at the formulation of IP models. The use of integer variables allows oneto formulate, with a little innovation, quite a number of interesting problems. Knowledgeof this should be useful for someone who has to solve practical problems.

14.2 Types of integer programming models

There are several classifications within integer programming models:

• an all-integer programming model is a model in which all the decision variablesmust be integers;

• a binary integer programming model is a model in which all the decision var-iables are restricted to the value 0 or 1;

• a mixed integer programming model is a model in which only some of the de-cision variables are restricted to integer values (general integers and/or binary inte-gers) and the other variables may assume any non-negative values.

Page 189: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

14.3. ROUNDING OFF THE SOLUTION 183

14.3 Rounding off the solution

An LP model that results if we start with an IP model and ignore the integer restric-tions, is called the LP relaxation of the IP model.

This LP relaxation can be solved and from the context of the problem, it may be suffi-cient to just round off the figures to the nearest integers.

It is usually easy to determine whether rounding off is acceptable or not. The size of thefigures plays a role, as well as the accuracy of the parameters in the model.

Suppose, for example, that a solution to an LP model recommends that 12 468,3 cars ofa certain model should be manufactured. This figure makes no sense and an integer solu-tion is required. If the figures in the model are based on estimation, there is no sense inarguing about the merit of manufacturing 12 468 or 12 469 cars. In the end, managementwill probably choose a figure such as 12 500.

During the whole process, we should remember that people are often only in search of agood solution, which is practically feasible and close to optimality.

There are, however, cases where rounding off is not acceptable. Say, for instance, an LPsolution shows that the Boeing company should build 11,6 aeroplanes of the type 747 and6,8 aeroplanes of the type 727. The magnitude of the funds and resources tied up in this,make it advisable to determine the best possible integer solution.

Another example is a variable that can only be 0 or 1, where 0 indicates that a machineshould not be purchased and 1 that the machine should be purchased. An answer of 0,45would be meaningless. Rounding off can lead to a solution that is far from the optimalinteger solution, or that is even infeasible.

14.4 An integer constrained example

Efprod is an enterprise that manufactures heavy equipment. The E-9 and the F-6 aretwo products built in the same departments with the same equipment. There is a greatdemand for these products, and management feels that it will be able to sell everythingthat it can produce.

Each E-9 sold earns the company R18 000 in profit and each F-6 earns the companyR6 000 in profit.

Each product is machined in both departments A and B. Each E-9 needs 42,8 hours indepartment A and 20 hours in department B. Each F-6 needs 100 hours in department Aand six hours in department B. For the next month, 800 hours of machine time is avail-able in department A and 142 hours in department B.

The finished products are all tested before leaving the workshop. It takes 30 hours to test

Page 190: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

184 STUDY UNIT 14 INTEGER CONSTRAINED PROBLEMS

an E-9 and 10 hours to test an F-6. The testing is subcontracted to a specialist group inanother company. To obtain the services of this group, Efprod has to contractually agreeto use them for at least 135 hours per month.

To hold on to its position in the market, it is Efprod’s policy to build at least one F-6 forevery three E-9’s that are built.

An important client has already placed an order for five E-9’s and F-6’s (in any combina-tion) for the next month.

The model for this problem is:

Maximise PROFIT = 18 000E + 6 000F

subject to

42,8E + 100F ≤ 800 DEPTA

20E + 6F ≤ 142 DEPTB

30E + 10F ≥ 135 TEST

E − 3F ≤ 0 RATIO

E + F ≥ 5 ORDER

and

E, F ≥ 0 and integer,

where E = the number of E-9’s to be built, and F = the number of F-6’s to be built.

The feasible area for this model is illustrated graphically in figure 14.1 below. The shadedarea is the feasible area when the integer requirement is ignored. The dark dots indicateall the integer points within the feasible area. The dark dots therefore represent the ac-tual feasible area, which consists of 13 points: (3; 5), (3; 6), (4; 2), (4; 3), (4; 4), (4; 5),(4; 6), (5; 2), (5; 3), (5; 4), (5; 5), (6; 2) and (6; 3).

Page 191: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

14.4. AN INTEGER CONSTRAINED EXAMPLE 185

1 2 3 4 5 6 7 8 9 10−1

1

2

3

4

5

6

7

8

9

10

−1

−2

F

E

E − 3F = 0

E+

F=

5

42,8E + 100F = 80020E

+6F

=142

30E+

10F=

135

� �

� � �

� �

� � �

� � �

E

F

Figure 14.1

We now ignore the integer requirement and use LINDO or LINGO to solve the LP relax-ation of the model. The solution is:

E = 5,392, F = 5,692 and PROFIT = 131 215.

This is point A on figure 14.2. If we round off these figures to the nearest integers, we getthe point (5; 6), point B on figure 14.2, which is clearly not feasible.

Three other points can be obtained by rounding off the figures up or down. They are (5;5), (6; 5) and (6; 6), points C, D and E on figure 14.2. Of these, only point (5; 5) is feasi-ble.

Page 192: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

186 STUDY UNIT 14 INTEGER CONSTRAINED PROBLEMS

1 2 3 4 5 6 7 8 9 10−1

1

2

3

4

5

6

7

8

9

10

−1

−2

F

E E

F

� �

� � �

� �

� � �

� � �

��

C

BA

D

E

Figure 14.2

Hence, if we ignore the integer requirement when solving the model, and round off thefigures to feasible integer values, the solution will be to build five E-9’s and five F-6’swith an associated profit of R120 000 (18 000 × 5 + 6 000 × 5).

The optimal integer solution can be obtained graphically by moving isoprofit lines (lineswith the same slope as that of the objective function) further and further to the right,until it is no longer possible to move them further and still go through a feasible point.Figure 4.3 shows the result of this.

Page 193: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

14.4. AN INTEGER CONSTRAINED EXAMPLE 187

1 2 3 4 5 6 7 8 9 10−1

1

2

3

4

5

6

7

8

9

10

−1

−2

F

E

Profit=18E + 6F

E

F

� �

� � �

� �

� � �

� � �

F

Figure 14.3

The last integer point through which the isoprofit line moves is point F, where E = 6 andF = 3. At this point the objective function value is R126 000. This is the optimal integersolution.

This example illustrates the following important facts:

• a rounded solution is not necessarily feasible or optimal;

– a rounded solution does not necessarily lie adjacent to or close to the optimalinteger solution;

– requiring a variable to take on an integer value brings additional restrictions

Page 194: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

188 STUDY UNIT 14 INTEGER CONSTRAINED PROBLEMS

and the optimal objective function value for the linear programming modelalways sets an upper bound for the corresponding integer programming modelwhen we maximise, or a lower bound when we minimise.

14.5 The branch-and-bound method

In the previous example we solved the given problem graphically. An alternative numer-ical method would be to calculate the objective function value at each of the 13 feasiblepoints and then to simply choose the optimal solution as the point with the largest corre-sponding objective function value. This process is called complete enumeration.

This approach is, however, not practical for problems with many feasible points and thisis usually the case in practice.

It appears that a usable method should adopt a course somewhere between the simplexmethod and complete enumeration. This is exactly what the branch-and-bound methodtries to do. It examines, in a clever way, different sub-problems of the original problemin search of the optimal solution. In this way all possible feasible solutions are examinedimplicitly.

The branch-and-bound method gives a general approach to problem solving. The idea be-hind it is to repeatedly divide the feasible area into smaller, mutually exclusive sub-areasand to find an optimal solution for each sub-area. This allows one to eliminate certainsub-areas from consideration as soon as it is clear that the sub-area cannot yield a bettersolution than the current best solution.

The branch-and-bound method will now be illustrated.

Consider an integer programming problem that must be solved by the following model:

Maximise z = x1 + 5x2

subject to

11x1 + 6x2 ≤ 66

5x1 + 50x2 ≤ 225

and

x1, x2 ≥ 0 and integer.

We start by considering the LP relaxation of this model, call it P1.

P1: Maximise z = x1 + 5x2

subject to

Page 195: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

14.5. THE BRANCH-AND-BOUND METHOD 189

11x1 + 6x2 ≤ 66

5x1 + 50x2 ≤ 225

and

x1, x2 ≥ 0.

We can solve this model with LINDO or LINGO. The LINDO model is as follows:

!Integer-P1Maximise x1+5x2subject to11x1+6x2<665x1+50x2<225

The solution is x1 = 3,75, x2 = 4,125 and z = 24,375.

If the solution were integer, we would have solved the integer programming model. How-ever, the solution is not integer and the only useful information we have is that no solu-tion will yield a better objective function value than 24,375. Thus no sub-problem of thisproblem can have a higher objective function value, and 24,375 is an upper bound on thevalue of the objective function.

We divide P1 into two sub-problems. We do this by selecting any one of the variablesthat does not have an integer value, say x1.

The optimal value of x1 in P1 is 3,75. We want to eliminate this possibility without ex-cluding any feasible points. We can do this by requiring that x1 ≤ 3 or x1 ≥ 4. Thisdoes not exclude any integer value for x1, but all non-integer values between 3 and 4, also3,75.

Subsequently we create two new problems, P2 and P3.

P2 is identical to P1 except for an added constraint, x1 ≤ 3.

P3 is also identical to P1 except for an added constraint, x1 ≥ 4 :

P2: Maximise z = x1 + 5x2

subject to

11x1 + 6x2 ≤ 66

5x1 + 50x2 ≤ 225

x1 ≤ 3

and

x1, x2 ≥ 0.

P3: Maximise z = x1 + 5x2

subject to

Page 196: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

190 STUDY UNIT 14 INTEGER CONSTRAINED PROBLEMS

11x1 + 6x2 ≤ 66

5x1 + 50x2 ≤ 225

x1 ≥ 4

and

x1, x2 ≥ 0.

Figure 14.4 shows the division of the feasible region for P1.

1 2 3 4 5 6−1

1

2

3

4

5

6

7

8

9

−1

x2

x1

5x1 + 50x2 = 225

11x1 +

6x2 =

66

� �� � � ��

� �� � ��

� �� ��

� �� ��

�� �� �

P3P2 X

Figure 14.4

The feasible area of P1 is the whole area between the two axes and the lines for the twoconstraints. The feasible areas for P2 and P3 are as indicated. The feasible area for P1is thus split into two mutually exclusive sub-areas. The part that is not in P2 or P3 (Xin Figure 4.4) contains no integer points. Each feasible integer solution to P1 is either asolution to P2 or a solution to P3.

To solve P2 we must add the constraint x1 ≤ 3 to the model for P1.

Page 197: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

14.5. THE BRANCH-AND-BOUND METHOD 191

The LINDO model for P2 is as follows:

!Integer-P2

Maximise x1+5x2

subject to

11x1+6x2<66

5x1+50x2<225

x1<3

The optimal solution to P2 is x1 = 3,x2 = 4,2and z = 24.

The LINDO model for P3 is:

!Integer-P3

Maximise x1+5x2

subject to

11x1+6x2<66

5x1+50x2<225

x1>4

The optimal solution to P3 is x1 = 4, x2 = 3,667 and z = 22,333.

Figure 14.5 incorporates all the information available at this stage into a diagram. Thisdiagram is called a branch-and-bound tree. Each block is called a node and the linesthat connect the nodes are called branches.

P1

x1 = 3,75

x2 = 4,125

z = 24,375

x1 ≤ 3 x1 ≥ 4

P2 P3

x1 = 3,0 x1 = 4

x2 = 4,2 x2 = 3,67

z = 24 z = 22,33

Dangling

Figure 14.5

Neither P2 nor P3 yielded an integer solution. Now P2 and P3 must each be subdividedin a similar way to P1. At this stage the upper bound for objective function values in P2is 24, while it is 22,333 for P3. Thus P2 looks like a more promising option than P3, andso we first ignore P3 and concentrate on P2. P3, however, remains dangling, as we arenot finished with it yet.

Page 198: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

192 STUDY UNIT 14 INTEGER CONSTRAINED PROBLEMS

Now we consider P2, and must select a non-integer variable. There is only one, namelyx2.

We branch on x2 and create two new sub-problems, P4 and P5.

P4 is identical to P2 but has the added constraint, x2 ≤ 4.

P5 is also identical to P2 but with the added constraint, x2 ≥ 5.

P4: Maximise z = x1 + 5x2

subject to

11x1 + 6x2 ≤ 66

5x1 + 50x2 ≤ 225

x1 ≤ 3

x2 ≤ 4

and

x1, x2 ≥ 0.

P5: Maximise z = x1 + 5x2

subject to

11x1 + 6x2 ≤ 66

5x1 + 50x2 ≤ 225

x1 ≤ 3

x2 ≥ 5

and

x1, x2 ≥ 0.

Figure 14.6 shows how the feasible area is now split up. Note that P5 is not indicatedon this graph, as it is infeasible. There is an additional area, Y, which is eliminated andwhich contains no integer points.

The optimal solution to P4 is x1 = 3, x2 = 4 and z = 23. This is an integer solution andno other point in the feasible area of P4 can yield a better value for the objective func-tion. We say that P4 is fathomed. A sub-problem is fathomed if it has an integersolution or if no further division of the sub-problem will take place.

Page 199: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

14.5. THE BRANCH-AND-BOUND METHOD 193

1 2 3 4 5 6−1

1

2

3

4

5

6

7

8

−1

x2

x1

5x1 + 50x2 = 225

11x1 +

6x2 =

66

� �� � � ��

� �� � ��

� �� ��

� �� ��

�� ��

P3P4 X

Figure 14.6

We now have an integer solution with z = 23. We only want to search for solutions thatare better than this one, and are not interested in anything with a lower value for z.Thus 23 is a lower bound on the optimal value for the integer programming problem.

P5 is infeasible. Thus we can do nothing further with it, and it is also fathomed.

We go back to P3, which is still dangling at this stage. We see that its upper bound onthe value of z is 22,333. This is less than our current lower bound of 23. Thus there is nosense in examining P3 any further, and we say it is fathomed.

All the nodes are fathomed and we can stop. The optimal solution to the given integerproblem is the solution to P4, namely x1 = 3, x2 = 4 and z = 23.

The branch-and-bound tree corresponding to the problem is given in figure 14.7.

Page 200: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

194 STUDY UNIT 14 INTEGER CONSTRAINED PROBLEMS

P1

x1 = 3,75

x2 = 4,125

z = 24,375

x1 ≤ 3 x1 ≥ 4

P2 P3

x1 = 3,0 x1 = 4,00

x2 = 4,2 x2 = 3,67

z = 24 z = 22,33

Fathomed22,33 < 23

x1 ≤ 4 x1 ≥ 5

P4 P5

x1 = 3,0

x2 = 4,0 Infeasible

z = 23

FathomedLower bound= 23

Figure 14.7

From the foregoing it is clear that the branch-and-bound method uses the simplex methodas a tool to solve LP models in a systematic way. For large problems, literally hundredsof LP models will have to be solved. Many LP packages, such as LINDO and LINGO,have an IP component that uses this or other methods to solve IP problems. Therefore,we will not have to decide on which variables to branch and will not need to keep recordof the whole process by means of a branch-and-bound tree, as LINDO/LINGO will solvethe problem for us.

Exercise 14.1

Use the branch-and-bound method and LINDO or LINGO to solve the Efprod model ofsection 4.4.

Solution to Exercise 14.1

In section 4.4 we found the optimal solution to be E = 5,392, F = 5,692 and PROFIT =131 215.

Page 201: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

14.5. THE BRANCH-AND-BOUND METHOD 195

Suppose we choose E to branch on. Then P2 and P3 are obtained by adding the con-straints E ≤ 5 and E ≥ 6 respectively.

The solution to P2 is E = 5, F = 5,86 and PROFIT = 125 160.

The solution to P3 is E = 6, F = 3,667 and PROFIT = 130 000.

P3 seems to be the more promising option. Thus we let P2 dangle and concentrate onP3.

We branch on F and find P4 by requiring that F ≤ 3 and P5 by requiring that F ≥ 4.

The solution to P4 is E = 6,2, F = 3 and PROFIT = 129 600.

The solution to P5 is infeasible. P5 is fathomed and we continue with P4.

We branch on E and find P6 by requiring that E ≤ 6 and P7 by requiring that E ≥ 7.

The solution to P6 is E = 6, F = 3 and PROFIT = 126 000. This is an integer solu-tion and P6 is fathomed. The solution gives us a lower bound of 126 000 for the optimalprofit.

The solution to P7 is infeasible and hence P7 is fathomed.

P2 is the only remaining dangling node. The upper bound for PROFIT in P2 is 125 160,which is less than 126 000, the current lower bound. Hence we do not have to examineP2 any further and we mark it as fathomed.

The optimal solution is therefore the solution to P6.

The process is recorded in the following branch-and-bound tree:

Page 202: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

196 STUDY UNIT 14 INTEGER CONSTRAINED PROBLEMS

P1

E = 5,392

F = 5,692

z = 131 215

E ≤ 5 E ≥ 6

P2 P3

E = 5,0 E = 6,0

F = 5,86 F = 3,67

Z = 125 160 Z = 130 000

Fathomed125 160 < 126 000

F ≤ 3 F ≥ 4

P4 P5

E = 6,2

F = 3,0 Infeasible

Z = 129 600

E ≤ 6 E ≥ 7

P6 P7

E = 6

F = 3 Infeasible

Z = 126 000

FathomedLower bound= 126 000

Figure 14.8

Page 203: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

14.6. INTEGER SOLUTION WITH LINDO AND LINGO 197

14.6 Integer solution with LINDO and LINGO

Both LINDO and LINGO can solve integer programming problems. All we need to do isto key in the model correctly and the LINDO/LINGO solver will give us the solution.

LINDO has two commands for integer variables:

• GIN X limits the variable X to a general integer;

• INT X limits the variable X to a binary integer (0 or 1).

The GIN and INT commands also accept an integer value argument in place of a vari-able name. The number corresponds to the number of variables one wants to be generalintegers or binary integers. These variables must appear first in the formulation.

LINGO also has two commands for integer variables:

• @GIN(X) limits the variable X to a general integer;

• @BIN(X) limits the variable X to a binary integer (0 or 1).

We will illustrate how these commands are used as we proceed with this chapter.

Let us return to the model in section 14.5 and solve it with LINDO :

Maximise z = x1 + 5x2

subject to

11x1 + 6x2 ≤ 66

5x1 + 50x2 ≤ 225

and

x1, x2 ≥ 0 and integer.

We use the LP relaxation of the model that we used in section 4.5. At the end of thismodel we type “END”, followed by GIN statements to state that x1 and x2 must be gen-eral integers. The model for the integer programming model is:

Maximise x1+5x2

subject to

11x1+6x2<66

5x1+50x2<225

End

GIN x1GIN x2

The solution to this model is the same as that found before, namely x1 = 3, x2 = 4 andz = 23.

Now we return to the Efprod model of section 4.4 and solve it with LINGO :

Page 204: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

198 STUDY UNIT 14 INTEGER CONSTRAINED PROBLEMS

Maximise PROFIT = 18 000E + 6 000F

subject to

42,8E + 100F ≤ 800 DEPTA

20E + 6F ≤ 142 DEPTB

30E + 10F ≥ 135 TEST

E − 3F ≤ 0 RATIO

E + F ≥ 5 ORDER

and E, F ≥ 0 and integer.

If you previously used LINGO to solve the LP relaxation of the model, then you can usethe same model now and just add the @GIN statements at the end of the model to spec-ify that E and F must be general integers. If you used LINDO to solve the LP relaxationof the model previously, then you can select “Import LINDO File” from the LINGO filemenu, make the necessary corrections to this model and then add the @GIN statementsat the end of the model. Note that LINGO does not have an “END” statement beforethe @GIN statements.

The LINGO model corresponding to the integer programming model is:

Max = 18000*E+6000*f;

[DEPTA] 42.8*E+100*F<800;

[DEPTB]20*E+6*F<142;

[TEST] 30*E+10*F>135;

[RATIO] E-3*F<0;

[ORDER]E+F>5;

@GIN(E);@GIN(F);

If this model is solved, the solution is the same as that found before, namely E = 6, F = 3and PROFIT = 126 000.

Page 205: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

StudyUnit 15

Formulating Integer ProgrammingModels and solving them withLINDO and LINGO

Theme:

The formulation and solution of integer programming models.

Contents15.1 Binary variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

15.2 A capital budgeting problem . . . . . . . . . . . . . . . . . . . . 200

15.3 A fixed-cost problem . . . . . . . . . . . . . . . . . . . . . . . . . 204

15.4 A set-covering problem . . . . . . . . . . . . . . . . . . . . . . . . 207

15.5 Either/or constraints . . . . . . . . . . . . . . . . . . . . . . . . . 214

15.6 If/then constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . 216

15.7 Sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

15.8 Heuristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

Learning objectives

On completion of this study unit the student must be able to

199

Page 206: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

200 STUDY UNIT 15 INTEGER PROGRAMMING MODELS

• use binary variables to formulate logical conditions and logical constraints;

– formulate an integer programming model for a given problem;

– solve an IP model with LINDO and LINGO ;

– explain why the computer output cannot be used to do a sensitivity analysis ofa parameter;

– explain why certain IP models cannot be solved optimally, but require the useof heuristics.

15.1 Binary variables

In this section we turn our attention to a special kind of integer variables, binary var-iables. Binary variables may only assume the binary values of 0 or 1. They arealso called zero-one variables and are sometimes referred to as 0-1 variables. Usingsuch variables allows us to formulate a variety of logical conditions that are not otherwiseeasily captured. The use of zero-one variables serves as a brand new formulation tool.

We now give examples of types of problems that can be effectively modelled by using bi-nary variables.

15.2 A capital budgeting problem

The problem of capital projects is one that occurs frequently. In its simplest form, a cap-ital budgeting decision is a matter of choosing among n alternative projects in order tomaximise the return subject to budget restrictions. Each alternative must be consideredand a decision must be taken whether the project must be accepted or rejected. In otherwords, a project must be completed as a whole. For example, building only part of abridge or a power plant is not allowed. Zero-one variables make it possible to incorporatesuch yes-or-no decisions into an optimisation format. The value 1 represents the decision“yes” and the value 0 represents the decision “no”.

Consider the following example:

Problem

A business is considering six possible investment projects. Information about these projectsis given in the following table:

The business must decide which projects to choose for investment.

Page 207: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

15.2. A CAPITAL BUDGETING PROBLEM 201

Projects Initial outlay New staff Net present(R 000) needed value (R 000)

1 1 050 3 5002 1 700 5 9503 750 2 4004 300 1 1505 2 700 8 1 1006 1 750 3 750Maximumavailable

5 000 12

Model

Decision variables

In this problem, we define a zero-one variable for each decision that must be taken:

Pi =

{1 if project i is chosen,

0 if project i is not chosen,

where i = 1, 2, 3, 4, 5, 6.

Objective function

We want to maximise the net present value and hence the objective function is:

Maximise NPV = 500P1 + 950P2 + 400P3 + 150P4 + 1 100P5 + 750P6.

Note that if Pi = 1, then this objective function includes the net present value, NPV, ofproject i and if Pi = 0, then the objective function does not include the NPV of projecti. This means that whatever combination of projects is chosen, this objective functiongives the NPV of that combination of projects.

Constraints

There are only two constraints, one on the initial amount invested and one on the num-ber of new staff needed:

1 050P1 + 1 700P2 + 750P3 + 300P4 + 2 700P5 + 1 750P6 ≤ 5 000.

3P1 + 5P2 + 2P3 + P4 + 8P5 + 3P6 ≤ 12.

Feasibility restrictions

All variables are zero-one variables.

Page 208: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

202 STUDY UNIT 15 INTEGER PROGRAMMING MODELS

The integer programming model is:

Maximise NPV = 500P1 + 950P2 + 400P3 + 150P4 + 1 100P5 + 750P6

subject to

1050P1 + 1 700P2 + 750P3 + 300P4 + 2 700P5 + 1 750P6 ≤ 5 000

3P1 + 5P2 + 2P3 + P4 + 8P5 + 3P6 ≤ 12

and

P1, P2,, P3, P4, P5, P6 are zero-one variables.

Solution

The LINDO model is:

Maximise 500P1+950P2+400P3+150P4+1100P5+750P6

subject to

1050P1+1700P2+750P3+300P4+2700P5+1750P6<5000

3P1+5P2+2P3+P4+8P5+3P6<12

End

Int 6

The “INT 6” command is the INT command with an integer value argument of 6. Thefigure 6 corresponds to the number of zero-one variables in the model. Using this onecommand is easier than using six INT commands, INT P1, INT P2, . . . , INT P6.

The solution is:

LP OPTIMUM FOUND AT STEP 4 OBJECTIVE VALUE = 2433.33325FIX ALL VARS.( 4)WITH RC > 50.0000NEW INTEGER SOLUTION OF 2350.00000 AT BRANCH 0 PIVOT 7BOUND ON OPTIMUM: 2350.000

ENUMERATION COMPLETE. BRANCHES= 0 PIVOTS= 7LAST INTEGER SOLUTION IS THE BEST FOUNDRE-INSTALLING BEST SOLUTION...OBJECTIVE FUNCTION VALUE 1) 2350.000

VARIABLE VALUE REDUCED COST

P1 1.000000 -500.000000P2 1.000000 -950.000000P3 0.000000 -400.000000P4 1.000000 -150.000000P5 0.000000 -1100.000000P6 1.000000 -750.000000

ROW SLACK OR SURPLUS DUAL PRICES

Page 209: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

15.2. A CAPITAL BUDGETING PROBLEM 203

2) 200.000000 0.0000003) 0.000000 0.000000

NO. ITERATIONS= 7

BRANCHES= 0 DETERM.= 1.000E 0

Projects 1, 2, 4 and 6 should be chosen for investment. The net present value of thisinvestment plan will be R2 350 000. The constraint on the initial amount invested hasslack of 200, which means that R200 000 of the available R5 000 000 has not been in-vested. The constraint on the new staff needed is binding and that means that 12 newstaff members will be necessary.

Remark

We will now illustrate how zero-one variables can be used to enforce varioustypes of logical conditions by placing some additional requirements on the previousexample.

The additional requirements are:

1. At least two projects must be chosen.

2. Project 3 can only be chosen if project 4 has also been chosen.

3. Projects 3 and 5 may not both be chosen.

4. If project 1 is chosen, projects 3 and 4 also have to be chosen.

5. If project 2 is chosen, neither project 1 nor project 4 may be chosen.

The constraints representing these requirements will now be discussed.

1. At least two projects must be chosen. This is a logical condition that states thatat least two of the variables must assume the value 1.

The constraint P1 + P2 + P3 + P4 + P5 + P6 ≥ 2 represents this condition.

2. Project 3 can only be chosen if Project 4 has also been chosen. This type of logicalcondition is called a dependent condition.

The constraint P3 ≤ P4 enforces this dependence.

If P4 = 0, then the constraint becomes P3 ≤ 0 so that P3 is forced to zero.

If P4 = 1, then the constraint becomes P3 ≤ 1, thus allowing P3 to assume eitherthe value 0 or 1.

3. Projects 3 and 5 may not both be chosen. This is an either/or logical conditionand for such a condition, a choice has to be made between mutually exclusive alter-natives.

The constraint P3 + P5 ≤ 1 represents this either/or decision.

Page 210: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

204 STUDY UNIT 15 INTEGER PROGRAMMING MODELS

If either P3 or P5 is 1, the other one must be zero to satisfy the constraint.

4. If project 1 is chosen, projects 3 and 4 also have to be chosen. This is an if/thenlogical condition.

The constraint P3 + P4 ≥ 2P1 represents this condition.

If P1 = 0 the constraint becomes P3 + P4 ≥ 0 so that P3 and P4 can assume anyvalue, 0 or 1.

If P1 = 1, the constraint becomes P3 + P4 ≥ 2. The only solution that satisfiesthis constraint is one where P3 = P4 = 1.

5. If project 2 is chosen, neither project 1 nor project 4 may be chosen. This is also anif/then logical condition.

The constraint P1 + P4 ≤ 2(1 - P2) represents this condition.

If P2 = 0, the constraint becomes P1 + P4 ≤ 2 so that P1 and P4 can assume any va-lue, 0 or 1.

If P2 = 1, the constraint P1 + P4 ≤ 0 so that both P1 and P4 must be zero.

15.3 A fixed-cost problem

In undertaking various management activities, it is common to incur fixed costs (fixed-charge or setup costs). A fixed cost for an activity is a cost that is incurred whenever theactivity is undertaken. This cost is independent of the level of the activity. The level ofthe activity will have a variable cost associated with it. In fixed-cost problems, the ob-jective is to minimise the total costs, which is the sum of the fixed costs and the variablecosts. Fixed-cost problems are often encountered when the decision-maker must decidewhere to locate facilities (for example, warehouses, plants and buildings) and how facili-ties must be used (for example, which machines to use in the production of a product).

The following example will illustrate how fixed-cost problems should be handled.

Problem

David Masimula is the foreman in a factory. Three large machines are used for produc-tion. Every day David has to decide which of the three machines to use.

Each machine has a fixed setup cost. This means there is a fixed cost (independent of thequantity produced) associated with getting the machine ready for production. This is thesetup cost. There is also a cost associated with using the machine, which is proportionalto the quantity produced. These costs, as well as the daily capacity of each machine, aregiven in the following table:

At the end of each day all the machines are switched off.

Page 211: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

15.3. A FIXED-COST PROBLEM 205

Machine Setup cost Productioncost per unit

Daily capacity(in units)

ABC

R300R200R100

R0,50R0,40R0,70

2 1001 8003 000

Every day David receives the production requirements for that day from the productionmanager. Suppose the requirements for the day are 2 900 units.

David has to decide which machines to use and how many units to produce on those ma-chines in order to deliver the required production at minimum cost.

Model

Decision variables

We define zero-one variables to indicate whether a machine is used or not.

A =

{1 if machine A is used,

0 if machine A is not used.

B =

{1 if machine B is used,

0 if machine B is not used.

C =

{1 if machine C is used,

0 if machine C is not used.

We must also define decision variables to represent the number of units produced on eachmachine.

NA = the number of units to be produced on machine A.

NB = the number of units to be produced on machine B.

NC = the number of units to be produced on machine C.

Clearly A, B and C are integer variables. NA, NB and NC should also be integer, as it isimpossible to make half a unit on one machine and half a unit on another machine andthen say that we have a whole unit! However, the values of NA, NB and NC are rel-atively large in comparison to A, B and C and the costs associated with NA, NB andNC are relatively small in comparison to those of A, B and C. The question is there-fore whether it is really necessary to require NA, NB and NC to be integer, or whetherrounding off the final results to the nearest integers will not be good enough. We chooserounding off. If we produce one or two units more than the real integer optimal quantity,say on machine C, it costs only 70c per unit more. It is surely not worth these few centsto struggle with three additional integer variables.

Objective function

Page 212: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

206 STUDY UNIT 15 INTEGER PROGRAMMING MODELS

Our objective is to minimise the costs. The costs comprise the setup costs and the pro-duction costs.

The objective function is:

Min COSTS = 300A + 200B + 100C + 0,50NA + 0,40NB + 0,70NC.

Constraints

The production requirement for the day is 2 900 units. Hence we must have a constraintto represent this, namely:

NA + NB + NC = 2 900.

The capacity constraints must not only ensure that the production on a machine doesnot exceed its capacity, but also that production is not possible on a machine that is notswitched on. Hence we have

NA ≤ 2 100A

NB ≤ 1 800B

NC ≤ 3 000C.

Substitute 0-1 values in these constraints to make sure that you understand these if/thenlogical conditions.

The integer programming model is:

Min COSTS = 300A + 200B + 100C + 0,50NA + 0,40NB + 0,70NC

subject to

NA + NB + NC = 2 900 PROD

NA ≤ 2 100A CAPA

NB ≤ 1 800B CAPB

NC ≤ 3 000C CAPC

and

A, B and C are zero-one variables and NA, NB, NC ≥ 0.

Solution

The LINGO model corresponding to this IP model is:

!IP Fixed-cost problem;MIN = 300*A + 200*B + 100*C + 0.50*NA + 0.40*NB +0.70*NC;[PROD] NA + NB + NC = 2900;[CAPA] NA< 2100*A;[CAPB] NB<1800*B;[CAPC] NC< 3000*C;@BIN(A);@BIN(B);@BIN(C);

Page 213: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

15.4. A SET-COVERING PROBLEM 207

The solution is:

Rows= 5 Vars= 6 No. integer vars= 3 ( all are linear) Nonzeros= 16Constraint nonz= 9( 6 are +- 1) Density=0.457Smallest and largest elements in absolute value= 0.400000 3000.00

No. < : 3 No. =: 1 No. > : 0, Obj=MIN, GUBs <= 3

Single cols= 0

Optimal solution found at step: 11

Objective value: 1770.000

Branch count: 3

Variable Value Reduced Cost

A 1.000000 300.0000B 1.000000 20.00000C 0.0000000E+00 100.0000NA 1100.000 0.0000000E+00NB 1800.000 0.0000000E+00NC 0.0000000E+00 0.2000000

Row Slack or Surplus Dual Price

1 1770.000 1.000000PROD 0.0000000E+00 -0.5000000CAPA 1000.000 0.0000000E+00CAPB 0.0000000E+00 0.1000000CAPC 0.0000000E+00 0.0000000E+00

A = 1, B = 1, C = 0, which means that machines A and B are used and machine C isnot used.

NA = 1 100, NB = 1 800 and NC = 0, which means that 1 100 units are produced onmachine A and 1 800 units are produced on machine B.

The minimum cost is R 1 770.

15.4 A set-covering problem

In a set-covering problem each member of a given set (call it set 1) must be “covered”by an acceptable member of some other set (call it set 2). The objective is to minimisethe number of elements in set 2 that are required to cover all the elements in set 1. Set-covering problems are encountered in, for example, airline and airline-crew scheduling,truck routing and district-placement problems.

We consider the following set-covering problem.

Page 214: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

208 STUDY UNIT 15 INTEGER PROGRAMMING MODELS

Problem

A small air freight company provides a service between Johannesburg (JHB), Durban(DBN), Port Elizabeth (PE), Cape Town (CPT) and Bloemfontein (BFN). The followingflights are undertaken each day:

From To Flight num-ber

Duration (inhours)

CPTBFNCPTPECPTDBNDBNBFNJHBPEJHB

BFNCPTPECPTDBNPEBFNJHBBFNJHBDBN

LV001LV002LV003LV004LV005LV006LV007LV008LV009LV010LV011

11114234252

The duration of each flight includes the actual duration of the flight, as well as the timeloading freight and the average landing delays.

Each flight must be flown at least once a day.

The company employs four pilots. Pilot 1 and Pilot 2 live in Johannesburg, while Pilot 3and Pilot 4 live in Port Elizabeth.

The company has the following policies:

• The sequence of flights, known as the route, that a pilot flies each day, must startand end at his home base;

• A pilot may work at most 10 hours per day;

• A route may not include any flight more than once. A route such as LV009 – LV002– LV001 – LV002 – LV001 – LV008 is therefore not allowed.

The company pays the pilots R100 per flying hour plus R60 per takeoff.

The company wishes to assign routes to the pilots in such a way that the total remunera-tion of the pilots will be a minimum.

Model

We start off by first determining which routes are feasible.

A feasible route must satisfy the following requirements:

• it must start and end at either Johannesburg or Port Elizabeth;

Page 215: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

15.4. A SET-COVERING PROBLEM 209

• it may not take longer than 10 hours;

• it may not include a flight more than once.

The easiest is to use an illustration.Suppose we first consider all the flights starting at Johannesburg. This gives:

JHB

2

BFN

2

DBN

LV009

LV011

JHB

BFN

DBN

CPT

BFN

JHB

PE

LV009/2

LV011/2

LV002/1

LV008/4

LV006/2

LV007/3

Figure 15.2

Page 216: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

210 STUDY UNIT 15 INTEGER PROGRAMMING MODELS

The figure below each arrow is the duration of that flight.

Now we add all flights starting at Bloemfontein and Durban to these flights:

We have already identified the first feasible route, namely JHB – BFN – JHB. It may, ofcourse, be possible for the pilot to take off from Johannesburg once again to another cen-tre. Any other route starting at Johannesburg, which takes four hours or less and whichdoes not include LV009 or LV008, may therefore be linked to this route to provide an-other route. It is, however, already clear that there is no such route – the duration of allother routes starting at Johannesburg and which exclude LV009 and LV008, are alreadytaking four hours or more and are not yet back at Johannesburg.

Continuing in this way we find the following feasible routes starting at Johannesburg:

Route no. Sequence of flights Duration (in hours)1 LV009-LV008 62 LV009-LV002- LV001-LV008 83 LV009-LV002- LV003-LV010 94 LV009-LV002-LV003-LV004-LV001-LV008 105 LV011-LV006-LV010 96 LV011-LV006-LV004-LV001-LV008 107 LV011-LV007-LV008 9

A similar analysis must be followed to identify all feasible routes starting at Port Eliza-beth. This gives:

Route no. Sequence of flights Duration (in hours)8 LV004-LV003 29 LV004-LV001-LV002-LV003 410 LV004-LV001-LV002-LV005-LV006 911 LV004-LV001-LV008-LV009-LV002-LV003 1012 LV004-LV001-LV008-LV011-LV006 1013 LV004-LV005-LV006 714 LV004-LV005-LV007-LV002-LV003 1015 LV010-LV009-LV002-LV003 916 LV010-LV011-LV006 9

Notice that the sequence of flights in routes 3 and 15, 4 and 11, 5 and 16, and 6 and 12are actually equivalent. The costs of similar routes are also the same, since the durationand the number of flights involved in the two routes are the same.

We can therefore omit routes 11, 12, 15 and 16 and renumber the remaining routes. Letus now combine the two tables and, at the same time, add to the table the cost of eachroute, as well as an indication of which pilots may fly each route. The extended table fol-lows:

Page 217: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

15.4. A SET-COVERING PROBLEM 211

Route Sequence Duration Cost Availableno. (in hours) (in R) pilots1 LV009-LV008 6 720 P1, P22 LV009-LV002-LV001-LV008 8 1040 P1, P23 LV009-LV002-LV003-LV010 7 1 140 P1, P2, P3, P44 LV009-LV002-LV003-LV004-LV001-LV008 10 1 360 P1, P2, P3, P45 LV011-LV006-LV010 9 1 080 P1, P2, P3, P46 LV011-LV006-LV004-LV001-LV008 10 1 300 P1, P2, P3, P47 LV011-LV007-LV008 9 1 080 P1, P28 LV004-LV003 2 320 P3, P49 LV004-LV001-LV002-LV003 4 640 P3, P410 LV004-LV001-LV002-LV005-LV006 9 1 200 P3, P411 LV004-LV005-LV006 7 880 P3, P412 LV004-LV005-LV007-LV002-LV003 10 1 300 P3, P4

* Calculated as:

R100 × (number of hours) + R60 × (number of flights in the route).

Decision variables

We must decide which of the feasible routes to use and therefore the decision variablesare:

Ri =

{1 if route i is chosen,

0 otherwise,

where i = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12.

Objective function

We must minimise costs and the objective function is:

Min COSTS = 720R1 +1 040R2 + 1 140R3 + 1 360R4 + 1 080R5 + 1 300R6 +

1 080R7 + 320R8 + 640R9 + 1 200R10 + 880R11 + 1 300R12.

Constraints

The first set of constraints must ensure that each flight is flown at least once. FlightLV001 must be flown at least once. This means that at least one of routes 2, 4, 6, 9 or10 must be flown. This can be written in terms of the decision variables as follows:

R2 + R4 + R6 + R9 + R10 ≥ 1.

The constraints for the other flights are similar.

The next set of constraints must ensure that there are pilots available for the routes thatare chosen. Firstly, only four pilots are available, which means that at most four routescan be chosen. This is:

Page 218: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

212 STUDY UNIT 15 INTEGER PROGRAMMING MODELS

R1 + R2 + R3 + R4 + R5 + R6 + R7 + R8 +R9 + R10 + R11 + R12 ≤ 4.

Only two pilots are available for routes 1, 2 and 7, and two others for routes 8, 9, 10, 11and 12. We can therefore choose no more than two routes from group {1, 2, 7} and alsono more than two routes from group {8, 9, 10, 11, 12}. This gives two more constraints,namely:

R1 + R2 + R7 ≤ 2

R8 + R9 + R10 + R11 + R12 ≤ 2.

The IP model is:

Min COSTS = 720R1 +1 040R2 + 1 140R3 + 1 360R4 + 1 080R5 + 1 300R6 +

1 080R7 + 320R8 + 640R9 + 1 200R10 + 880R11 + 1 300R12

subject to

R2 + R4 + R6 + R9 + R10 ≥ 1 LV001

R2 + R3 + R4 + R9 + R10 + R12 ≥ 1 LV002

R3 + R4 + R8 + R9 + R12 ≥ 1 LV003

R4 + R6 + R8 + R9 + R10 + R11 + R12 ≥ 1 LV004

R10 + R11 + R12 ≥ 1 LV005

R5 + R6 + R10 + R11 ≥ 1 LV006

R7 + R12 ≥ 1 LV007

R1 + R2 + R4 + R6 + R7 ≥ 1 LV008

R1 + R2 + R3 + R4 ≥ 1 LV009

R3 + R5 ≥ 1 LV010

R5 + R6 + R7 ≥ 1 LV011

R1 + R2 + R3 + R4 + R5 + R6 + R7 + R8 + R9 + R10 + R11 + R12 ≤ 4 PILOTS

R1 + R2 + R7 ≤ 2 JHB

R8 + R9 + R10 + R11 + R12 ≤ 2 PE

andR1, R2, R3, R4, R5, R6, R7, R8, R9, R10, R11, R12 are zero-one integers.

Solution

The LINDO model corresponding to the IP model is:

!IP Set-covering problemMin 720R1+1040R2+1140R3+1360R4+1080R5+1300R6+1080R7

+320R8+640R9+1200R10+880R11+1300R12subject toLV001) R2+R4+R6+R9+R10>1LV002) R2+R3+R4+R9+R10+R12>1LV003) R3+R4+R8+R9+R12>1

Page 219: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

15.4. A SET-COVERING PROBLEM 213

LV004) R4+R6+R8+R9+R10+R11+R12>1LV005) R10+R11+R12>1LV006) R5+R6+R10+R11>1LV007) R7+R12>1LV008) R1+R2+R4+R6+R7>1LV009) R1+R2+R3+R4>1LV010) R3+R5>1LV011) R5+R6+R7>1PILOTS)R1+R2+R3+R4+R5+R6+R7+R8+R9+R10+R11+R12<4JHB) R1+R2+R7<2PE) R8+R9+R10+R11+R12<2ENDINT 12

The solution is:

LP OPTIMUM FOUND AT STEP 17 OBJECTIVE VALUE = 3420.00000FIX ALL VARS.( 4)WITH RC > 320.000NEW INTEGER SOLUTION OF 3420.00000 AT BRANCH 0 PIVOT 23BOUND ON OPTIMUM: 3420.000

ENUMERATION COMPLETE. BRANCHES= 0 PIVOTS= 23LAST INTEGER SOLUTION IS THE BEST FOUNDRE-INSTALLING BEST SOLUTION...OBJECTIVE FUNCTION VALUE 1) 3420.000

VARIABLE VALUE REDUCED COST

R1 0.000000 720.000000R2 1.000000 1040.000000R3 0.000000 1140.000000R4 0.000000 1360.000000R5 1.000000 1080.000000R6 0.000000 1300.000000R7 0.000000 1080.000000R8 0.000000 320.000000R9 0.000000 640.000000R10 0.000000 1200.00000R11 0.000000 880.000000R12 1.000000 1300.000000

ROW SLACK OR SURPLUS DUAL PRICES

LV001) 0.000000 0.000000LV002) 1.000000 0.000000LV003) 0.000000 0.000000LV004) 0.000000 0.000000LV005) 0.000000 0.000000LV006) 0.000000 0.000000LV007) 0.000000 0.000000LV008) 0.000000 0.000000

Page 220: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

214 STUDY UNIT 15 INTEGER PROGRAMMING MODELS

LV009) 0.000000 0.000000LV010) 0.000000 0.000000LV011) 0.000000 0.000000PILOTS) 1.000000 0.000000JHB) 1.000000 0.000000PE) 1.000000 0.000000

NO. ITERATIONS= 23

BRANCHES= 0 DETERM.= 1.000E 0

We see that R2 = 1, R5 = 1 and R12 = 1, which means that routes 2, 5 and 12 must beflown. The associated cost is R3 420.

Remark

Remember that in a set-covering problem, each member of a given set (set 1) must be“covered” by an acceptable member of some other set (set 2) and that the objective is tominimise the number of elements in set 2 that are required to cover all the elements inset 1. In this example, set 1 consists of the flights (LV001 to LV011) and set 2 consists ofthe routes flown by the pilots (R1 to R12).

Exercise 15.1

The optimal solution given above requires only three pilots. The company, however, wantsto use all four of the pilots. Find the optimal solution if four pilots are used and statewhat the extra cost of this will be.

Solution to Exercise 15.1

We change the PILOTS constraint to an equality constraint and solve the model again.This gives the following solution:

R2 = 1, R5 = 1, R8 = 1 and R12 = 1, which means that routes 2, 5, 8 and 12 must beflown. The cost of this is R 3 740, which is R320 more than the previous solution.

15.5 Either/or constraints

A situation often arises where at least one of two constraints must be satisfied. Such con-straints are called either/or constraints.

Assume we are given two constraints:

f(x1, x2, . . . , xn) ≤ 0 (1)

g(x1, x2, . . . , xn) ≤ 0 (2)

and at least one of these constraints must be satisfied.

Page 221: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

15.5. EITHER/OR CONSTRAINTS 215

We can formulate such either/or constraints by adding the following two con-straints to the model:

f(x1, x2, . . . , xn) ≤ My (3)

g(x1, x2, . . . , xn) ≤ M(1 - y) (4)

where y is a zero-one variable and M is a positive number chosen large enough so thatf(x1, x2, . . . , xn) ≤ M and g(x1, x2, . . . , xn) ≤ M are satisfied for all values ofx1, x2, . . . , xn that satisfy the other constraints in the problem.

To see why constraints (3) and (4) will do the trick, consider the following.

If y = 0, then

(3) becomes f(x1, x2, . . . , xn) ≤ 0, and

(4) becomes g(x1, x2, . . . , xn) ≤ M .

Hence: (1), f(x1, x2, . . . , xn) ≤ 0, is satisfied, and

(2), g(x1, x2, . . . , xn) ≤ 0 is redundant

(because of g(x1, x2, . . . , xn) ≤ M).

Constraint (2) may possibly be satisfied.

If y = 1, then

(3) becomes f(x1, x2, . . . , xn) ≤ M , and

(4) becomes g(x1,x2,. . .,xn) ≤ 0.

Hence: (2), g(x1, x2, . . . , xn) ≤ 0 is satisfied, and

(1), f(x1, x2, . . . , xn) ≤ 0, may possibly be satisfied.

Therefore, whether y = 0 or y = 1, (3) and (4) will ensure that at least one of the givenconstraints will be satisfied.

The following example illustrates the use of either/or constraints.

Suppose x1 and x2 represent the number of units of two types of products to be manu-factured respectively. Two processes are available for the production of the two productsand only one of the processes may be used. The capacity of process 1 is 24 and the ca-pacity of process 2 is 21. Assume the corresponding constraints are:

5x1 + 2x2 ≤ 24

3x1 + 4x2 ≤ 21.

These constraints can be written as:

f(x1, x2, . . . , xn) = 5x1 + 2x2 − 24 ≤ 0 (5)

g(x1, x2, . . . , xn) = 3x1 + 4x2 − 21 ≤ 0. (6)

Page 222: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

216 STUDY UNIT 15 INTEGER PROGRAMMING MODELS

Only one of these processes may be selected to manufacture the products. The followingformulation of the constraints will lead to the desired result:

5x1 + 2x2− 24 ≤ My (7)

3x1 + 4x2 − 21 ≤ M(1 - y) (8)

where y is a zero-one variable and M is a sufficiently large positive number.

If y = 0, then constraint (5) holds, while constraint (6) is made redundant by the verylarge value of M . Process 1 will therefore be selected for production.

If y = 1, then constraint (6) holds, while constraint (5) is made redundant. Process 2 willtherefore be selected for production.

Note that the constraints (7) and (8) could also have been written as:

5x1 + 2x2 ≤ 24 + My

3x1 + 4x2 ≤ 21 + M(1 - y).

Note When either/or constraints are incorporated into a model, a suitably large positivenumber must be assigned to M from the context of the problem.

15.6 If/then constraints

We may also encounter situations where we want to ensure that

if a constraint f(x1, x2, . . . , xn) > 0 is satisfied, then

the constraint g(x1, x2, . . . , xn) ≥ 0 must also be satisfied,

while

if f(x1, x2, . . . , xn) > 0 is not satisfied, then

g(x1, x2, . . . , xn) ≥ 0 may or may not be satisfied.

In other words, we want to ensure that f(x1, x2, . . . , xn) > 0 implies g(x1, x2, . . . , xn) ≥0. Such constraints are called if/then constraints.

We can formulate such if/then constraints by adding the following two con-straints to the model:

-g(x1, x2, . . . , xn) ≤ My (9)

f(x1, x2, . . . , xn) ≤ M(1 - y) (10)

where y is a zero-one variable and M is a positive number chosen large enough so that

f(x1, x2, . . . , xn) ≤ M and

-g(x1, x2,. . . , xn) ≤ M

Page 223: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

15.6. IF/THEN CONSTRAINTS 217

are satisfied for all values of x1, x2, . . . , xn that satisfy the other constraints in the model.

Notice that if f(x1, x2, . . . , xn) > 0, then (10) can be satisfied only if y = 0.

Then (9) implies -g(x1, x2, . . . , xn) ≤ 0 or g(x1, x2, . . . , xn) ≥ 0.

Thus if f(x1, x2, . . . , xn) > 0 then (9) and (10) will ensure that g(x1, x2, . . . , xn) ≥ 0,the desired result.

Now we examine the situation when f(x1, x2, . . . , xn) > 0 is not satisfied, in other wordsif f(x1, x2, . . . , xn) ≤ 0. This situation can arise with y = 1 or y = 0.

If y = 1, then (10) becomes f(x1, x2, . . . , xn) ≤ 0, and

(9) becomes -g(x1, x2, . . . , xn) ≤ M , which can result in

g(x1, x2, . . . , xn) ≥ 0

or g(x1, x2, . . . ,xn) < 0 (because g(x1, x2, . . . , xn) ≥ −M).

If y = 0, then (10) becomes f(x1, x2, . . . , xn) ≤ M , which can result in

f(x1, x2, . . . , xn) > 0 or f(x1, x2, . . . , xn) ≤ 0, and

(9) becomes -g(x1, x2, . . . , xn) ≤ 0, which is the same as

g(x1, x2, . . . , xn) ≥ 0.

To summarise, if f(x1, x2, . . . , xn) > 0 is not satisfied, then we may have g(x1, x2, . . . ,xn) ≥ 0 or g(x1, x2, . . . , xn) < 0.

The following example illustrates the use of if/then constraints.

We want to ensure that whenever x ≤ 2, then y ≤ 3.

These constraints can be written as:

f(x) = 2 - x ≥ 0

g(y) = 3 - y ≥ 0.

The corresponding if/then constraints will be

−(3 − y) ≤ Mz (11)

2 − x ≤ M(1 − z). (12)

The constraint f(x) = 2 - x > 0 can be satisfied only if z = 0.

Then the constraint (11) becomes −(3 − y) ≤ 0, which is the same as 3 − y ≥ 0, which isg(y) ≥ 0.

Therefore the constraints (11) and (12) will ensure that whenever x ≤ 2, then y ≤ 3.

Note Here again, if these if/then constraints are to be incorporated into a model, a suit-ably large number must be assigned to M from the context of the problem.

Page 224: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

218 STUDY UNIT 15 INTEGER PROGRAMMING MODELS

15.7 Sensitivity

We used sensitivity analysis extensively in linear programming. It should be noted thatthis theory of sensitivity analysis cannot be applied to integer programming. In fact,there is no well-developed theory of sensitivity analysis for IP.

To obtain the solution to an IP model, the branch-and-bound solution method is used,which solves several sub-problems. The solution to one of these sub-problems is then thesolution to the IP model. The information contained in the computer output refers to thesub-problem only and cannot be applied to the entire IP model.

The computer output given by LINDO or LINGO contains the optimal solution as wellas reduced costs, dual prices and the ranging analysis. This information refers to a sub-problem generated during the branch-and-bound solution, and it does not apply to theentire IP model. In other words, the given solution is the solution to one of many sub-problems and therefore the reduced cost, dual prices and ranges correspond to this onesolution only, and are meaningless for the IP model.

It is important to remember that the optimal solution is the only useful information givenon the computer printout. The reduced costs, dual prices and ranges are meaningless.If the sensitivity of parameters are in question, the parameters must be changed in themodel and the model must be solved again. No deductions must be made from the com-puter printout!

15.8 Heuristics

Large integer programming problems can often be formulated as wonderful models, but,even with powerful computers, may be difficult to solve by IP algorithms. It may not beworthwhile to solve such models due to the time and costs involved.

It is hoped that in the future, continued research will produce improved solution methodsfor large IP models.

In cases where it is not worthwhile to find exact IP solutions, the manager will often besatisfied with “good” approximate, although not necessarily optimal, solutions. Such so-lutions are obtained by heuristic methods.

A heuristic method involves applying intuitively appealing “rules of thumb” when solvinga model. An example of a heuristic method that everyone uses, is the rule or rules thatwe use when joining a queue in a supermarket. In order to minimise your waiting time,you may choose to stand in the shortest line. If there is more than one shortest line, youmay choose the one with the least loaded trolleys.

You may even look at the person behind the trolley and make an estimation of whetherhe/she will pay in cash, by credit card or by cheque.

Page 225: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

15.8. HEURISTICS 219

It is important to remember that a heuristic method cannot guarantee its results. It isemployed mainly for efficiency, to quickly produce what are hopefully good, if not opti-mal, results.

We will not discuss specific heuristic methods in this module. You will be able to findsuch methods in textbooks.

Page 226: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

220 STUDY UNIT 15 INTEGER PROGRAMMING MODELS

Page 227: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

StudyUnit 16

Summary and problems

Theme:

Summary of the chapter and additional problems.

Contents16.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

16.2 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

16.3 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

Learning objectives:

On completion of this study unit the student must be able to

• formulate integer constrained problems as IP models and solve them.

221

Page 228: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

222 STUDY UNIT 16 SUMMARY AND PROBLEMS

16.1 Summary

In this chapter we considered integer constrained problems and how they can be formu-lated into IP models. We also saw how zero-one variables can be used to model logicalconditions and constraints.

Solution methods, such as rounding off the solution and the branch-and-bound methodwere discussed. We used LINDO and LINGO to solve IP models.

We also noted that it is sometimes impossible to find an optimal solution to an integerconstrained problem within the given time and money constraints. In such cases, oneoption is to resort to heuristics in an attempt to find good, approximate solutions to aproblem.

16.2 Problems

Problem 16.1

Mary has a clothing factory set up at her house. She can manufacture shirts, shorts andtrousers. To manufacture each type of clothing, Mary needs the appropriate type of ma-chinery. She can rent the machinery at the following rates: shirts machinery – R600 perweek; shorts machinery – R450 per week; trousers machinery – R300 per week.

She also requires the following quantities of material and labour for each type of clothing:

Type of clothing Material (in m) Labour (in hours)Shirts 2 3Shorts 1,5 2Trousers 2 6

Each week, 150 hours of labour and 80 m of material are available.

The variable cost per item (excluding the renting cost of the machinery), and the sellingprice for each type of clothing, are:

Type of cloth-ing

Selling price Variable cost

ShirtsShortsTrousers

R54R36R68

R27R18R36

(a) How many of each type of clothing should Mary make each week to maximise herweekly profits?

Page 229: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

16.2. PROBLEMS 223

Types of clothing pro-duced

Cost of machineryrequired

ShirtsShortsTrousersShirts and shortsShirts and trousersShorts and trousersShirts, shorts and trousers

600450300750700750850

(b) Suppose the three sets of machinery have some overlap. This implies that if Marywants to produce both shirts and shorts, the rent of the machinery is less thanR600 + R450. The associated costs are given in the following table:

Reformulate the model in (a) to make provision for the sharing of the machinery. Do notsolve.

Problem 16.2

The town council of Mamepaville has put out tenders for the maintenance of the mainroads leading to the town. There are six roads and their lengths in kilometres are as fol-lows:

Road Length (in km)R1R2R3R4R5R6

50321284123

Four contractors have tendered. The following summary shows the cost per road per yearfor each tenderer:

ContractorMaintenance cost per year (in R1 000)R1 R2 R3 R4 R5 R6

C1C2C3C4

60485562

40353842

20171520

95157

47384445

30293525

The town council’s policy is to assign no more than 80 km of road to any one contractor.Also, a road is assigned to a contractor as a whole.

Design an integer programming model to assign roads to contractors in such a way thatthe total maintenance cost per year will be a minimum.

Page 230: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

224 STUDY UNIT 16 SUMMARY AND PROBLEMS

Problem 16.3

We return to the fixed-cost problem of David Masimula. He is the foreman in a factorywhere three large machines are used for production.

The working day is divided into three shifts. Each of the three machines, A, B and C,must be used at some stage during the day. The machines are, however, not available inall shifts of the day.

Machines A and B are not available in the last shift of the day since maintenance is thencarried out to prepare these machines for the next day. Each of these machines may beused only in one shift of the day. In other words, machine A must be used either in shift1 or in shift 2 but may not be used in both these shifts. Machine B is similarly restrictedto either shift 1 or shift 2 and may not be used in both these shifts. After a machine hasbeen used, it is switched off.

Maintenance on machine C is carried out in the first shift of the day, which means thatthis machine is not available in shift 1. Machine C may be used in shift 2 only or in shift3 only or in both shifts 2 and 3. If it is used in both these shifts, it is not switched off atthe end of the second shift and there is therefore no setup cost for the third shift.

The fixed setup costs, the variable production costs and the daily machine capacities aregiven in the following table:

Machine Setup cost Productioncost per unit

Daily capacity(in units)

ABC

R300R200R100

R0,50R0,40R0,70

2 1001 8003 000

Every day David receives the production requirements for the day from the productionmanager. Suppose the production requirements for the day are 1 800 for the first shift, 3000 for the second shift and 1 200 for the third shift.

David now has to decide which machines to use in each shift and how many units to pro-duce on these machines in each shift in order to deliver the required production at mini-mum cost.

Reformulate David’s model and solve it.

Page 231: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

16.3. SOLUTIONS 225

16.3 Solutions

Solution to Problem 16.1

• Model

Mary must determine how many of each type of clothing to make each week. Shemust therefore also decide which of the three types of machinery to rent.

• Decision variables Mshi =

{1 if the shirts machine is rented,

0 otherwise.

Msho =

{1 if the shorts machine is rented,

0 otherwise.

Mtro =

{1 if the trousers machine is rented,

0 otherwise.

Shi = the number of shirts to make each week.

Sho = the number of shorts to make each week.

Tro = the number of trousers to make each week.

• Objective function

Mary wants to maximise her profit. The profit on each item of clothing will be thedifference between the selling price and the variable cost. The cost of renting themachinery must be subtracted from the profit on the clothing made to obtain heractual profit. The objective function is:

Max PROFIT = 27Shi + 18Sho + 32Tros−600Mshi−450Msho−300Mtro.

• Constraints

The material and labour constraints are:

2Shi + 1,5Sho + 2Tro ≤ 80,

3Shi + 2Sho + 6Tro ≤ 150.

Shirts cannot be produced if Mary has not rented the machine needed for shirt pro-duction. This can be represented by the constraint

Shi ≤ 100Mshi.

If Mshi = 0, then the constraint becomes Shi ≤ 0 and no shirts can be produced. IfMshi = 1, then the constraint becomes Shi ≤ 100 and up to 100 shirts can be pro-duced. The figure 100 is chosen arbitrarily. The requirement for choosing this fig-ure is that it should be large enough not to exclude any possible feasible solutions.From the material constraint, it follows that the largest feasible value that Shi may

Page 232: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

226 STUDY UNIT 16 SUMMARY AND PROBLEMS

assume is 802= 40. For the labour constraint to be met, Shi may not be larger than

1503

= 50. Therefore any value greater than or equal to 40 would suffice as the coeffi-cient of Mshi.

Similarly, the following two constraints are obtained:

Sho ≤ 100Msho,

Tro ≤ 100Mtro.

• The IP model is:

Max PROFIT = 27Shi + 18Sho + 32Tro−600Mshi− 450Msho− 300Mtro

subject to

2Shi + 1,5Sho + 2Tro ≤ 80

3Shi + 2Sho + 6Tro ≤ 150

Shi ≤ 100 Mshi

Sho ≤ 100 Msho

Tro ≤ 100 Mtro

andMshi, Msho and Mtro are zero-one integers,

Shi, Sho and Tro ≥ 0.

Solution

The optimal solution is to rent the machinery for making shorts and then to make 53shorts per week. The associated profit will be R504.

1. The decision variables Shi, Sho and Tro are defined as before. We also define thefollowing decision variables:

Mshi =

{1 if only shirts are to be made,

0 otherwise.

Msho =

{1 if only shorts are to be made,

0 otherwise.

Mtro =

{1 if only trousers are to be made,

0 otherwise.

Mshisho =

{1 if both shirts and shorts are to be made,

0 otherwise.

Mshitro =

{1 if both shirts and trousers are to be made,

0 otherwise.

Page 233: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

16.3. SOLUTIONS 227

Mshotro =

{1 if both shorts and trousers are to be made,

0 otherwise.

Mall =

{1 if shirts, shorts and trousers are to be made,

0 otherwise.

The IP model is:

Max PROFIT = 27SHIRTS + 18SHORTS + 32TROUSERS −600Mshi− 450Msho−300Mtro−750Mshisho− 700Mshitro − 750Mshotro − 850Mall

subject to

2Shi + 1,5Sho + 2Tro ≤ 80

3Shi + 2Sho + 6Tro ≤ 150

Shi ≤ 100Mshi + 100Mshisho + 100Mshitro + 100Mall

Sho ≤ 100Msho + 100Mshisho + 100Mshotro + 100Mall

Tro ≤ 100Mtro + 100Mshitro + 100Mshotro + 100Mall

and Mshi, Msho, Mtro, Mshisho, Mshitro, Mshotro, Mall are zero-one integers,

Shi, Sho and Tro ≥ 0.

Solution to Problem 16.2

The decision variables are:

RiCj =

{1 if road Ri is assigned to contractor Cj,

0 otherwise,

where i = 1, 2, 3, 4, 5, 6 and j = 1, 2, 3, 4.

The IP model is:

Min COSTS = 60R1C1 + 48R1C2 + 55R1C3 + 62R1C4 + 40R2C1 + 35R2C2+ 38R2C3 + 42R2C4 + 20R3C1 + 17R3C2 + 15R3C3 + 20R3C4 +9R4C1 + 5R4C2 + 15R4C3 + 7R4C4 + 47R5C1 + 38R5C2 +44R5C3 + 45R5C4 + 30R6C1 + 29R6C2 + 35R6C3 + 25R6C4

subject to

Page 234: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

228 STUDY UNIT 16 SUMMARY AND PROBLEMS

R1C1 + R1C2 + R1C3 + R1C4 = 1

R2C1 + R2C2 + R2C3 + R2C4 = 1

R3C1 + R3C2 + R3C3 + R3C4 = 1

R4C1 + R4C2 + R4C3 + R4C4 = 1

R5C1 + R5C2 + R5C3 + R5C4 = 1

R6C1 + R6C2 + R6C3 + R6C4 = 1

50R1C1 + 32R2C1 + 12R3C1 + 8R4C1 + 41R5C1 + 23R6C1 ≤ 80

50R1C2 + 32R2C2 + 12R3C2 + 8R4C2 + 41R5C2 + 23R6C2 ≤ 80

50R1C3 + 32R2C3 + 12R3C3 + 8R4C3 + 41R5C3 + 23R6C3 ≤ 80

50R1C4 + 32R2C4 + 12R3C4 + 8R4C4 + 41R5C4 + 23R6C4 ≤ 80

and all variables are zero-one integers.

The optimal solution is:

Contractor Roads assignedC1 –C2 R2, R5C3 R1, R3C4 R4, R6

The total maintenance cost is R175 000.

Solution to Problem 16.3

David must decide in which shifts the machines should be used and how many units shouldbe produced on the machines.

The decision variables are:

A1 =

{1 if machine A is used in shift 1,

0 if not.

A2 =

{1 if machine A is used in shift 2,

0 if not.

B1 =

{1 if machine B is used in shift 1,

0 if not.

B2 =

{1 if machine B is used in shift 2,

0 if not.

C2 =

{1 if machine C is used in shift 2 only,

0 if not.

Page 235: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

16.3. SOLUTIONS 229

C3 =

{1 if machine C is used in shift 3 only,

0 if not.

C23 =

{1 if machine C is used in both shifts 2 and 3,

0 if not.

NA1 = number of units produced on machine A in shift 1.

NA2 = number of units produced on machine A in shift 2.

NB1 = number of units produced on machine B in shift 1.

NB2 = number of units produced on machine B in shift 2.

NC 2 = number of units produced on machine C in shift 2.

NC 3 = number of units produced on machine C in shift 3.

Objective function

Min COSTS = 300A1 + 300A2 + 200B1 + 200B2 + 100C2 + 100C3 + 100C23 + 0,5NA1+ 0,5NA2 + 0,4NB1 + 0,4NB2 + 0,7NC 2 + 0,7NC 3.

Constraints

(a) Production requirements

Shift 1: NA1 + NB1 = 1 800.

Shift 2: NA2 + NB2 + NC 2 = 3 000.

Shift 3: NC 3 = 1 200.

(b) Machine usage requirements

Machine A must be used either in shift 1 or in shift 2. This is represented by:

A1 + A2 = 1.

Similarly this requirement for machine B is:

B1 + B2 = 1.

Machine C may be used either in shift 2 only, or in shift 3 only or in both shifts 2and 3. This is represented by:

C2 + C3 + C23 = 1.

(c) Machine capacity requirements

The daily capacities of the machines may not be exceeded. This means that thenumber of units produced on a particular machine must not exceed the capacity ofthat machine. This is represented by:

Machine A: NA1 + NA2 ≤ 2 100.

Page 236: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

230 STUDY UNIT 16 SUMMARY AND PROBLEMS

Machine B: NB1 + NB2 ≤ 1 800.

Machine C: NC 2 + NC 3 ≤ 3 000.

(d) Shift production and capacity requirements

Not only must the capacity of a machine not be exceeded in a shift, but no pro-duction must be possible in a shift if the machine is not used in that shift. This isrepresented by:

Machine A Shift 1: NA1 ≤ 2 100A1.

Machine A Shift 2: NA2 ≤ 2 100A2.

Machine B Shift 1: NB1 ≤ 1 800B1.

Machine B Shift 2: NB2 ≤ 1 800B2.

Machine C Shift 2: NC 2 ≤ 3 000C2 + 3 000C23.

Machine C Shift 3: NC 3 ≤ 3 000C3 + 3 000C23.

(e) Feasibility requirements

A1, A2, B1, B2, C2, C3, C23 are zero-one variables.

NA1, NA2, NB1, NB2, NC 2, NC 3 ≥ 0.

The IP model is:

Min COSTS = 300A1 + 300A2 + 200B1 + 200B2 + 100C2 + 100C3 + 100C23 +

0,5NA1 + 0,5NA2 + 0,4NB1 + 0,4NB2 + 0,7NC 2 + 0,7NC 3

subject to

Page 237: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

16.3. SOLUTIONS 231

NA1 + NB1 = 1 800 PROD1

NA2 + NB2 + NC2 = 3 000 PROD2

NC3 = 1 200 PROD3

A1 + A2 = 1 USEA

B1 + B2 = 1 USEB

C2 + C3 + C23 = 1 USEC

NA1 + NA2 ≤ 2 100 CAPA

NB1 + NB2 ≤ 1 800 CAPB

NC2 + NC3 ≤ 3 000 CAPC

NA1 ≤ 2 100A1 ASFT1

NA2 ≤ 2 100A2 ASFT2

NB1 ≤ 1 800B1 BSFT1

NB2 ≤ 1 800B2 BSFT2

NC2 ≤ 3 000C2 + 3 000C23 CSFT2

NC3 ≤ 3 000C3 + 3 000C23 CSFT3

and A1, A2, B1, B2, C2, C3, C23 are zero-one variables;

NA1, NA2, NB1, NB2, NC 2, NC 3 ≥ 0.

Solution

The LINGO solution is:

Rows= 15 Vars= 12 No. integer vars= 7 ( all are linear)Nonzeros= 52 Constraint nonz= 30( 22 are +- 1) Density=0.267Smallest and largest elements in absolute value= 0.400000 3000.00No. < : 9 No. =: 5 No. > : 0, Obj=MIN, GUBs <= 7Single cols= 0

Optimal solution found at step: 14

Objective value: 3840.000

Branch count: 0

Variable Value Reduced CostA1 0.0000000E+00 0.0000000E+00A2 1.000000 0.0000000E+00B1 1.000000 0.0000000E+00B2 0.0000000E+00 0.0000000E+00C2 0.0000000E+00 0.0000000E+00C3 0.0000000E+00 0.0000000E+00C23 1.000000 0.0000000E+00NA1 0.0000000E+00 0.0000000E+00NA2 2100.000 0.0000000E+00NB1 1800.000 0.1639128E-07

Page 238: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

232 STUDY UNIT 16 SUMMARY AND PROBLEMS

NB2 0.0000000E+00 0.0000000E+00NC2 900.0000 0.0000000E+00NC3 1200.000 0.0000000E+00

Row Slack or Surplus Dual Price

1 3840.000 -1.000000PROD1 0.0000000E+00 -0.7000000PROD2 0.0000000E+00 -0.7000000PROD3 0.0000000E+00 -0.7000000USEA 0.0000000E+00 -300.0000USEB 0.0000000E+00 0.0000000E+00USEC 0.0000000E+00 -100.0000CAPA 0.0000000E+00 0.2000000CAPB 0.0000000E+00 0.1888889CAPC 900.0000 0.0000000E+00ASFT1 0.0000000E+00 0.0000000E+00ASFT2 0.0000000E+00 0.0000000E+00BSFT1 0.0000000E+00 0.1111111BSFT2 0.0000000E+00 0.1111111CSFT2 2100.000 0.0000000E+00CSFT3 1800.000 0.0000000E+00

David should allocate the machines to the shifts in the following way:

Machine A should be used in shift 2 to produce 2 100 units.

Machine B should be used in shift 1 to produce 1 800 units.

Machine C should be used in both shifts 2 and 3; 900 units to be produced in shift 2 and1 200 units to be produced in shift 3.

The associated minimum cost will be R3 840.

Page 239: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,
Page 240: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

CHAPTER 5

GOAL PROGRAMMING

Aim of the chapter:

On completion of this chapter the student must be able to

• use goal programming to generate solutions to problems with multiple objectives.

Page 241: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

StudyUnit 17

Models with multiple objectives

Theme:

The use of goal programming to accommodate multiple objectives in a model.

Contents17.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236

17.2 A production-scheduling problem . . . . . . . . . . . . . . . . . 237

17.3 Setting priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240

17.4 A marketing problem . . . . . . . . . . . . . . . . . . . . . . . . . 241

17.5 An integer problem . . . . . . . . . . . . . . . . . . . . . . . . . . 248

Learning objectives:

On completion of this study unit the student must be able to

• explain the differences between the objectives of linear and goal programming mod-els;

• explain the differences between the constraints of linear and goal programmingmodels;

• use priority values to represent the preferences of the decision-maker;

• formulate multiple objective problems as goal programming models and solve them;

235

Page 242: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

236 STUDY UNIT 17 MODELS WITH MULTIPLE OBJECTIVES

• investigate how changes in decision-makers’ objectives and preferences influence thesolutions to multiple objective problems.

17.1 Introduction

In the previous chapters we dealt with LP models and saw that they have only one objec-tive (goal) that must be optimised subject to certain constraints. In most cases the ob-jective was to maximise profit or minimise costs. In practice profit maximisation or costminimisation is not always the only objective of a business. This is often but one objec-tive. Businesses also strive to maximise their market share, to maximise the utilisation oftheir facilities, to minimise the noise and air pollution in the neighbourhood and so forth.

Hence, in the real world, decision-makers may have to consider many different objectivesthat have to be satisfied simultaneously. These objectives may be incommensurate (theyare not based on the same units of measure), which means that they cannot be directlycombined or compared. These objectives may also be conflicting in nature. The decision-maker no longer seeks to find the best possible outcome for a single objective, but at-tempts to attain a satisfactory level of achievement for several objectives.

A variety of different techniques have been developed for multiple objective decision-making, such as goal programming, multi-attribute utility analysis, analytical hierarchyprocess, etcetera. Only goal programming will be discussed here.

Goal programming is an effective technique that can be used with linear programming formodelling such multiple objective decision problems. It is a powerful tool that draws onthe tested technique of linear programming, but at the same time provides a simultane-ous solution to a system of competing objectives.

Goal programming seeks a solution that satisfies as many objectives as possible. This isin contrast to linear programming, where the solution was obtained by optimising oneobjective.

Within the goal programming model, the objectives are often conflicting, and one objec-tive can only be achieved at the expense of another. Although it may not be possible tooptimise every objective, goal programming attempts to obtain satisfactory levels of goalattainment. To be able to choose between the objectives, it is necessary to set a hierarchyof importance among the objectives, so that lower priority objectives only receive atten-tion after higher priority objectives have been dealt with.

Goal programming has been widely applied to decision problems in business, governmentand non-profit institutions. Example applications include advertising media planning,workforce planning, health care planning, transportation logistics, production-schedulingand many others.

The method of constructing a goal programming model will be illustrated by means of anexample.

Betina
Highlight
Betina
Highlight
Page 243: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

17.2. A PRODUCTION-SCHEDULING PROBLEM 237

17.2 A production-scheduling problem

Trubble and Co manufactures two products that have the following profit margins andproduction and cost requirements:

Product 1 Product 2Profit per unit (Rand)Time in department A per unit (hours)Time in department B per unit (hours)Cost of raw material per unit (Rand)

401220

201530

The cost of the raw material bought may not exceed R10 000.

During the previous month when both departments produced at normal capacity, 350hours were used in department A and 1 000 hours in department B. If these numbersof hours are considered as the upper limits on the available hours, a maximum profit ofR14 000 can be made by producing 350 units of product 1 and no units of product 2.This production schedule will use 350 hours in department A and 700 hours in depart-ment B. This leaves a slack of 300 hours in department B.

Currently management is experiencing problems with the workers and their union be-cause there have been a number of appointments, dismissals and transfers of workers be-tween the departments during the last six months to allow for changes in the productionschedule.

Management now wants to set up a production schedule for the next month so that thenumber of hours needed in each department is as close as possible to that of the previousmonth. At the same time they do not want to sustain a loss in the R14 000 profit earned.They realise that it may not be possible to satisfy all these requirements simultaneously,but wish to get as close as possible to doing so.

Model We start by writing down the objectives of Trubble and Co.

Goal 1: To use as close as possible to 350 hours in department A.

Goal 2: To use as close as possible to 1 000 hours in department B.

Goal 3: To make a profit of R14 000 or more.

Decision variables We must decide how many of each type of product to produce. Wetherefore define the following two decision variables:

NP1 = number of units of product 1 to produce.

NP2 = number of units of product 2 to produce.

For each goal, we also define two deviation variables that represent the amountby which the goals are over-achieved and under-achieved. We use an X (for excess) as

Page 244: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

238 STUDY UNIT 17 MODELS WITH MULTIPLE OBJECTIVES

the first letter of the variables representing over-achievement of goals and an L (for less)as the first letter of the variables that represent under-achievement of goals.

For goal 1 the following two deviation variables are defined:

XHRSA = number of hours more than 350 used in department A.

LHRSA = number of hours less than 350 used in department A.

Similarly we define the following deviation variables for the other two goals:

XHRSB = number of hours more than 1 000 used in department B.

LHRSB = number of hours less than 1 000 used in department B.

XPROFIT = amount of profit more than R14 000 earned.

LPROFIT = amount of profit less than R14 000 earned.

Constraints In goal programming there may be two kinds of constraints: system con-straints and goal constraints.

System constraints (so-called hard constraints) are constraints that cannot be vio-lated. These are the constraints we have encountered in LP models up to now.

In our model we only have one system constraint, namely the requirement that the rawmaterial bought may not exceed R10 000.

20NP1 + 30NP2 ≤ 10 000.

Goal constraints (so-called soft constraints) are constraints that may be violated ifnecessary. A goal constraint expresses each goal in equality form by introducing the devi-ation variables that represent the deviations from the goals.

Goal 1 specifies that as close as possible to 350 hours must be used in department A. Thegoal constraint associated with this is:

NP1 + NP2 - XHRSA + LHRSA = 350.

Similarly, we can write down the goal constraints associated with goals 2 and 3 as fol-lows:

2NP1 + 5NP2 - XHRSB + LHRSB = 1 000

40NP1 + 20NP2 - XPROFIT + LPROFIT = 14 000.

Objective function

Where the objective function of a linear programming model seeks to optimise one objec-tive, the objective function of a goal programming model seeks to minimise the devia-tions between the goals and what can actually be achieved within the given constraints.

The objective then is to minimise the undesirable deviation from the goals.

Page 245: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

17.2. A PRODUCTION-SCHEDULING PROBLEM 239

Goal 1: The number of hours used in department A must be as close as possible to 350.Hence both over-achievement, XHRSA, and under-achievement, LHRSA, of the goalare undesirable. Both these deviation variables will be included in the objective function.

Goal 2: The number of hours used in department B must be as close as possible to 1 000.Hence both over-achievement, XHRSB, and under-achievement, LHRSB, of the goalare undesirable. Both these deviation variables will be included in the objective function.

Goal 3: They want to earn a profit of R14 000 or more. Hence only the under-achievement,LPROFIT, of this goal is undesirable. Only LPROFIT will be included in the objectivefunction.

The objective function will therefore be:

Minimise DEVIATE = XHRSA + LHRSA + XHRSB + LHRSB + LPROFIT.

It is interesting to note that the decision variables NP1 and NP2 do not appear in theobjective function. We still seek, as does an LP model, to determine the unknown valuesof NP1 and NP2, but will do so indirectly by directly minimising the deviations from thegoals.

Feasibility restrictions All the variables must be non-negative.

The goal programming model is:

Minimise DEVIATE = XHRSA + LHRSA + XHRSB + LHRSB + LPROFIT

subject to

20NP1 + 30NP2 ≤ 10000 RAWMAT

NP1 + NP2 − XHRSA + LHRSA = 350 DEPTA

2NP1 + 5NP2 − XHRSB + LHRSB = 1 000 DEPTB

40NP1 + 20NP2 − XPROFIT + LPROFIT = 14 000 PROFIT

and NP1, NP2, XHRSA, LHRSA, XHRSB, LHRSB, XPROFIT, LPROFIT ≥ 0.

Solution

We can now solve this model with either LINDO or LINGO.

The solution is:

NP1 = 312,5, NP2 = 75, XHRSA = 37,5, LHRSA = 0, XHRSB = 0, LHRSB = 0,

XPROFIT = 0, LPROFIT = 0, DEVIATE = 37,5.

Therefore 312,5 units of product 1 and 75 units of product 2 must be produced.

XHRSA = 37,5 and LHRSA = 0. This means that the production schedule needs 37,5hours more than the 350 hours available in department A. Therefore, goal 1 is not at-tained.

XHRSB = 0 and LHRSB = 0. Therefore, goal 2 is attained.

Page 246: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

240 STUDY UNIT 17 MODELS WITH MULTIPLE OBJECTIVES

XPROFIT = 0 and LPROFIT = 0. The profit earned is exactly R14 000. Therefore,goal 3 is attained.

Remark

One of the deviation variables associated with a specific goal must always be zero. This isobvious since it is physically impossible to have both over-utilisation and under-utilisationof a goal at the same time.

Both the deviation variables may be zero. This happens when there is neither over-utilisationnor under-utilisation of a goal.

Hence it follows that one or both of the deviation variables associated with agoal must always equal zero.

17.3 Setting priorities

In the above example, we assumed that the objectives were all equally important. Thisis, of course, not always the case. Fortunately goal programming can handle cases wherethe goals are not equally important.

Rank the goals according to their relative importance. Assign to each goal i a priorityvalue Pi ≥ 0, so that

• Pi >> Pj (this means “much greater than”)if goal i is more important than goal j;

• Pi = Pj if goal i and goal j are equally important;

• Pi << Pj (this means “much less than”) if goal i is less important than goal j.

The priority value Pi is then used as the objective function coefficient of the deviationvariables for the i-th goal.

We illustrate this by referring back to the previous Trubble and Co. problem. Supposethat, for some reason or other, Mr Trubble has more problems with the workers in de-partment A than with those in department B. It is therefore more important for him tokeep the workload in department A constant, than it is to keep it constant in departmentB. At this stage peace on the factory floor is more critical than the profit position of thebusiness, so the profit goal has the lowest priority. To represent this ranking he choosesthe priority values P1, P2 and P3.

The objective function then becomes

Minimise DEVIATE = P1XHRSA + P1LHRSA + P2XHRSB + P2LHRSB + P3LPROFIT.

The simplex method can be modified to solve the goal programming model with thisobjective function, but we do not study this modified simplex method in this module.Instead we arbitrarily choose values for the priorities and then solve the correspondingmodel with either LINDO or LINGO.

Page 247: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

17.4. A MARKETING PROBLEM 241

For the present objective function, we arbitrarily choose P1 = 100, P2 = 20 and P3 = 1.The objective function becomes

Minimise DEVIATE = 100XHRSA + 100LHRSA + 20XHRSB + 20LHRSB + LPROFIT.

The solution to this model is:

NP1 = 250, NP2 = 100, XHRSA = 0, LHRSA = 0, XHRSB = 0, LHRSB = 0,

XPROFIT = 0, LPROFIT = 2 000, DEVIATE = 2 000.

Thus goals 1 and 2 are met, while R2 000 less profit is earned.

The arbitrary choice of priority values will be determined by the decision-maker. He will choose the priority values according to his ranking of the goals.He must decide how important one goal is relative to others. He may, for example, rate itas twice, 10 times, 100 times, etcetera, as important. He then uses this ranking as thepriority values for the goals. If, for example, he considers goal 1 to be 10 times more im-portant than goal 2, he will assign a priority value of 10 to goal 1 and a priority value ofone to goal 2.

The decision-maker may also prefer over-achievement of a goal to under-achievement ofa goal, or vice versa. He will indicate this by assigning different priorities to the variablefor over-achievement and the variable for under-achievement.

For example, the following objective function may result:

Minimise DEVIATE = 100XHRSA + 200LHRSA + 10XHRSB + 25LHRSB + 50LPROFIT.

17.4 A marketing problem

Let us take another look at the marketing problem given in section 3.5 of chapter 3. Brieflythe details are:

Sello Mabena has a budget of R200 000 for purchasing advertising space in three maga-zines. The allocation of the available money to the three magazines must be such that atleast 750 000 career women will be reached by the advertising campaign, and at least 50%of the people reached by the campaign must be in Gauteng. Her objective is to reach asmany people as possible through the campaign.

The model for Sello’s problem was formulated as follows:

Page 248: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

242 STUDY UNIT 17 MODELS WITH MULTIPLE OBJECTIVES

Maximise PEOPLE = 800TH + 700BW + 2 000EW

subject to

48TH + 120BW + 80EW ≤ 200 000 BUDGET

300TH + 560BW + 333,33EW ≥ 750 000 WOMEN

260TH + 437,5BW + 866,67EW ≥ 0,5(800TH + 700BW + 2 000EW ) GAUTENG

and

50 ≤ TH ≤ 1 800, BW ≥ 100, EW ≤ 1 200,

where

TH = the amount of advertising space in cm2 purchased per edition of “Thandi”,

BW = the amount of advertising space in cm2 purchased per edition of “Business Woman”,

EW = the amount of advertising space in cm2 purchased per edition of “Every Week”.

A detailed discussion of how the figures in the model were calculated appears in section3.5. The computer solution to the model is also given in this section.

Sello wonders what would happen if she had some control over the budget and the otherrequirements. She ponders the following questions: “Isn’t it possible to use funds in-tended for other purposes to boost the advertising campaign? Shouldn’t the requirementon the percentage of people reached in Gauteng be relaxed?” She now realises that theconstraints should not be regarded as inflexible system constraints but rather as soft con-straints from which deviations are allowed. She wants to investigate how this new ap-proach will influence her solution. Goal programming is the ideal tool for this.

Let us now formulate the goal programming model for Sello.

Model

Suppose we define Sello’s goals as follows:

Goal 1: Reach at least 2,3 million people. (Sello would have liked to say “reach as manypeople as possible”, but a target must be set, as the goal programming technique modelsdeviations from the targets. The figure of 2,3 million is chosen as this is the rounded offfigure for the total number of people reached in the LP model as given by the objectivefunction value.)

Goal 2: No more than R200 000 must be spent on the advertising campaign.

Goal 3: Reach at least 750 000 career women.

Goal 4: The number of people reached in Gauteng must be at least 50% of the total num-ber of people reached.

Decision variables

The decision variables are the same as before

Page 249: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

17.4. A MARKETING PROBLEM 243

TH = the amount of advertising space in cm2 purchased per edition of “Thandi”.

BW = the amount of advertising space in cm2 purchased per edition of “Business Woman”.

EW = the amount of advertising space in cm2 purchased per edition of “Every Week”.

The deviation variables can be defined as follows:

XP = number of people more than 2,3 million reached.

LP = number of people less than 2,3 million reached.

XB = amount of money more than R200 000 spent on the advertising campaign.

LB = amount of money less than R200 000 spent on the advertising campaign.

XW = number of career women more than 750 000 reached.

LW = number of career women less than 750 000 reached.

XG = number of people reached in Gauteng more than 50% of the total number of peo-ple reached.

LG = number of people reached in Gauteng less than 50% of the total number of peoplereached.

Objective function

The objective is to minimise the undesirable deviations from the goals.

Goal 1: Sello would not object if more than 2,3 million people were reached, but shewould not like less to be reached. Hence the under-achievement, LP, of the goal is un-desirable. This deviation variable will be included in the objective function.

Goal 2: Sello must try not to spend more than the budget amount. Hence the over-achievement,XB, of the goal is undesirable. XB will be included in the objective function.

Goal 3: Sello will be happy if at least 750 000 career women are reached. Hence the under-achievement, LW, of the goal is undesirable. LW will be included in the objective func-tion.

Goal 4: Sello will be happy if the number of people in Gauteng reached is at least 50%of the total number of people reached. Hence the under-achievement, LG, of the goal isundesirable. LG will be included in the objective function.

The objective function is:

Minimise DEVIATE = LP + XB + L + LG.

No priorities are indicated for the goals. We will therefore not assign any priority valuesto the deviation variables in the objective function.

Constraints

Goal 1 constraint:

Betina
Highlight
Page 250: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

244 STUDY UNIT 17 MODELS WITH MULTIPLE OBJECTIVES

800TH + 700BW + 2 000EW - XP + LP = 2 300 000.

Goal 2 constraint:

48TH + 120BW + 80EW - XB + LB = 200 000.

Goal 3 constraint:

300TH + 560BW + 333,33EW - XW + LW = 750 000.

Goal 4 constraint:

260TH + 437,5BW + 866,67EW - XG + LG

= 0,5(800TH +700BW + 2 000EW ).

Feasibility restrictions

50 ≤ TH ≤ 1 800, BW ≥ 100, 0 ≤ EW ≤ 1 200.

All deviation variables are non-negative.

Page 251: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

17.4. A MARKETING PROBLEM 245

The goal programming model is:

Minimise DEVIATE = LP + XB + LW + LG

subject to

800TH + 700BW + 2 000EW − XP + LP = 2 300 000 PEOPLE

48TH + 120BW + 80EW − XB + LB = 200000 BUDGET

300TH + 560BW + 333,33EW − XW + LW = 750 000 WOMEN

260TH + 437,5BW + 866,67EW − XG + LG = 0,5(800TH + 700BW + 2000EW ) GAUTENG

and50 ≤ TH ≤ 1 800, BW ≥ 100, 0 ≤ EW ≤ 1 200,

XP, LP, XB, LB,

XW, LW, XG, LG ≥ 0.

Solution

We find the LINGO model that we created in section 3.5, make the necessary changes toit, and solve.

The solution is:

Rows= 5 Vars= 11 No. integer vars= 0 ( all are linear)Nonzeros= 27 Constraint nonz= 20( 8 are +- 1) Density=0.450Smallest and largest elements in absolute value= 1.00000 0.230000ENo. < : 0 No. =: 4 No. > : 0, Obj=MIN, GUBs <= 1

Single cols= 4

Optimal solution found at step: 6

Objective value: 912.6430

Variable Value Reduced Cost

LP 0.0000000E+00 0.9142865XB 912.6430 0.0000000E+00LW 0.0000000E+00 1.000000LG 0.0000000E+00 0.3142797TH 50.00000 75.43000BW 1175.137 0.0000000E+00EW 718.7019 0.0000000E+00XP 0.0000000E+00 0.8571354E-01LB 0.0000000E+00 1.000000XW 162641.9 0.0000000E+00XG 0.0000000E+00 0.6857203

Row Slack or Surplus Dual Price

Page 252: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

246 STUDY UNIT 17 MODELS WITH MULTIPLE OBJECTIVES

DEVIATE 912.6430 1.000000P 0.0000000E+00 -0.8571354E-01B 0.0000000E+00 1.000000W 0.0000000E+00 0.0000000E+00G 0.0000000E+00 -0.6857203

Ranges in which the basis is unchanged:

Objective Coefficient Ranges

Current Allowable AllowableVariable Coefficient Increase Decrease

LP 1.000000 INFINITY 0.9142865XB 1.000000 0.4583206 1.000000LW 1.000000 INFINITY 1.000000LG 1.000000 INFINITY 0.3142797TH 0.0 INFINITY 75.43000BW 0.0 42.16550 92.00001EW 0.0 120.4774 120.4728XP 0.0 INFINITY 0.8571354E-01LB 0.0 INFINITY 1.000000XW 0.0 0.9510989E-01 0.1664929XG 0.0 INFINITY 0.6857203

Righthand Side Ranges

Row Current Allowable AllowableRHS Increase Decrease

PEOPLE 2300000. 1475968. 10647.59BUDGET 200000.0 912.6429 INFINITYWOMEN 750000.0 162641.9 INFINITYGAUTENG 0.0 275500.0 1330.926

Sello should purchase 50 cm2 advertising space per edition of “Thandi”, 1 175 cm2 peredition of “Business Woman” and 719 cm2 per edition of “Every Week”.

XP = 0 and LP = 0 and goal 1 is attained. Therefore, 2,3 million people are reached.

XB = 913 and LB = 0 and therefore goal 2 is not attained. The budget of R200 000 isexceeded by R913.

XW = 162 642 and LW = 0 and therefore goal 3 is attained. The number of career womenmore than 750 00 reached is 162 642.

XG = 0 and LG = 0 and therefore goal 4 is attained. The number of people reached inGauteng is exactly 50% of the total number of people reached.

Exercise 17.1

(a) Is it possible to reach 2,5 million people? What will the cost be? Answer these

Page 253: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

17.4. A MARKETING PROBLEM 247

questions for 3 million and for 4 million people as well.

(b) Is it possible to reach 4 million people without spending more than R200 000?

Solution to Exercise 17.1

Number of Budgeted amount Number of career Number of peoplepeople reached spent women reached in Gauteng

reached as a %2,5 million R18 055 more R200 000 240 032 more 750 000 50%3,0 million R60 912 more R200 000 433 508 more 750 000 50%4,0 million R155 427 more R200 000 873 324 more 750 000 50%

(a) The results for this exercise are determined by changing the right-hand side of thePEOPLE constraint to 2 500 000, 3 000 000 and 4 000 000 and doing reruns withthe computer. The results are tabulated below:

The amount of space to be purchased in the magazines differs for each of the aboveoptions.

It is possible to reach 2,5 million people. The cost will be R18 055 in excess of thebudgeted amount of R200 000.

It is also possible to reach 3 million and 4 million people. The cost will be R60 912and R155 427 in excess of the budgeted amount of R200 000 respectively.

(b) We now want to find a solution where the amount spent is exactly R200 000 andthe total number of people reached is exactly 4 million. We therefore want to finda solution, if at all possible, having XP, LP, XB and LB equal to zero. These de-viation variables are all highly undesirable and must all be present in the objectivefunction. We assign a high priority value, say 1 000, to them. The objective func-tion will change to

Minimise DEVIATE = 1 000XP + 1 000LP + 1 000XB +1 000LB + LW + LG.

We must also change the right-hand side of the PEOPLE constraint to 4 000 000.

This gives a solution where the total number of people reached is exactly 4 million, R9829 more than the budget of R200 000 is spent, 317 996 more than 750 000 career womenare reached and the number of people reached in Gauteng is 391 996 less than half of thetotal number of people reached. In this solution, the required number of people, 4 mil-lion, are reached, but the budget of R200 000 is exceeded by 4,9%.

We now want to find a solution where the budget is not exceeded. The deviation variableXB is now the most undesirable. Hence we must assign a very high priority value to it.We do computer runs with the objective function coefficient (the priority value) of XBincreased to values outside its allowable range as given in the ranging analysis. Variousvalues can be tried until a solution with XB = 0 is found. A priority value of 8 000 for

Page 254: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

248 STUDY UNIT 17 MODELS WITH MULTIPLE OBJECTIVES

XB gives such a solution, where exactly R200 000 is used, but now 57 333 less than 4million (that is, 1,4% less than 4 million) people are reached.

Even though it is not possible to reach exactly 4 million people while, at the same time,spending exactly R200 000, we have found two alternatives that come quite close to it.The decision-maker can now consider these alternatives.

It is interesting to note that if an ordinary LP model were used, where the budget andnumber of people reached were modelled as hard constraints, the solution would havestated that no feasible solution exists. The decision-maker would then have had no op-tions to consider.

17.5 An integer problem

Goal programming can also be applied to integer problems. We will illustrate this bymeans of an example.

A business is considering investing in five different projects. Each project has been ratedon four attributes: return on investment, costs, manpower requirements, and risk level.These ratings are given in the following table:

Project 1 Project 2 Project 3 Project 4 Project 5Return on investment 14 000 9 000 10 000 6 000 12 000Costs 5 600 4 300 5 700 5 000 4 000Manpower needed 36 54 15 29 48Risk level 3 2 4 1 1

The business has set the following four goals, listed in order of importance:

Goal 1: Achieve a return on investment of at least R35 000.

Goal 2: Limit costs to R20 000.

Goal 3: Limit manpower use to 120.

Goal 4: Limit risk level to a total of 5.

The business wants to determine which projects should be undertaken.

Model

Decision variables

The decision variables are:

Pi =

{1 if project i is undertaken,

0 if project i is not undertaken,

Page 255: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

17.5. AN INTEGER PROBLEM 249

where i = 1, 2, 3, 4, 5.

The deviation variables are:

XOI = amount by which the return on investment exceeds R35 000.

LOI = amount by which the return on investment falls short of R35 000.

XC = amount by which the costs exceed R20 000.

LC = amount by which the costs fall short of R20 000.

XM = number of people more than 120 needed.

LM = number of people less than 120 needed.

XR = amount by which the risk level exceeds a total of 5.

LR = amount by which the risk level falls short of a total of 5.

Objective function

Goal 1: Achieve a return on investment of at least R35 000. Hence only the under-achievementof this goal, LOI, is undesirable and will be included in the objective function.

Goal 2: Limit costs to R20 000. Only the over-achievement, XC, of this goal is undesir-able.

Goal 3: Limit manpower to 120. Only the over-achievement, XM, of this goal is undesir-able.

Goal 4: Limit risk level to a total of 5. The over-achievement, XR, of this goal is undesir-able.

Assign the priority values 400, 300, 200 and 100 to the four goals.

The objective function is:

Minimise DEVIATE = 400LOI + 300XC + 200XM + 100XR.

Constraints

Goal 1: 14 000P1 + 9 000P2 + 10 000P3 + 6 000P4 + 12 000P5 - XOI + LOI = 35000.

Goal 2: 5 600P1 + 4 300P2 + 5 700P3 + 5 000P4 + 4 000P5 - XC + LC = 20 000.

Goal 3: 36P1 + 54P2 + 15P3 + 29P4 + 48P5 - XM + LM = 120.

Goal 4: 3P1 + 2P2 + 4P3 + P4 + P5 - XR + LR = 5.

Feasibility restrictions

The decision variables are integers and the deviation variables are non-negative.

The goal programming model is:

Page 256: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

250 STUDY UNIT 17 MODELS WITH MULTIPLE OBJECTIVES

Minimise DEVIATE = 400LOI + 300XC + 200XM + 100XR

subject to

14000P1 + 9 000P2 + 10 000P3 + 6 000P4 + 12 000P5 − XOI + LOI = 35 000

5 600P1 + 4 300P2 + 5 700P3 + 5 000P4 + 4 000P5 − XC + LC = 20 000

36P1 + 54P2 + 15P3 + 29P4 + 48P5 − XM + LM = 120

3P1 + 2P2 + 4P3 + P4 + P5 − XR + LRK = 5

and

P1, P2, P3, P4, P5 are zero-one variables,

XOI, LOI, XC, LC, XM, LM, XR, LR ≥ 0.

Solution

The LINDO model representing this problem is:

!Goal programming - an integerexampleMinimise=400LOI+300XC+200XM+100XRsubject toROI)14000P1+9000P2+10000P3+6000P4+12000P5-XOI+LOI=35000COSTS)5600P1+4300P2+5700P3+5000P4+4000P5-XC+LC=20000MANPOWER) 36P1+54P2+15P3+29P4+48P5-XM+LM=120RISK) 3P1+2P2+4P3+P4+P5-XR+LR=5

End

INT P1INT P2INT P3INT P4INT P5

The solution is:

LP OPTIMUM FOUND AT STEP 9

OBJECTIVE VALUE = 110.123459 FIX ALL VARS.( 1) WITH RC > 0.000000E+00SET P1 TO >= 1 AT 1, BND= -250.0 TWIN= -3056. 51SET P2 TO >= 1 AT 2, BND= -3700. TWIN= -300.0 57NEW INTEGER SOLUTION OF 3700.00000 AT BRANCH 2 PIVOT 57

BOUND ON OPTIMUM: 193.5000

FLIP P2 TO <= 0 AT 2 WITH BND= -300.00000

NEW INTEGER SOLUTION OF 300.000000 AT BRANCH 2 PIVOT 57

BOUND ON OPTIMUM: 193.5000

DELETE P2 AT LEVEL 2

Page 257: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

17.5. AN INTEGER PROBLEM 251

DELETE P1 AT LEVEL 1RELEASE FIXED VARIABLESENUMERATION COMPLETE. BRANCHES= 2 PIVOTS= 65

LAST INTEGER SOLUTION IS THE BEST FOUNDRE-INSTALLING BEST SOLUTION...OBJECTIVE FUNCTION VALUE 1) 300.0000

VARIABLE VALUE REDUCED COST

P1 1.000000 300.000000P2 0.000000 200.000000P3 1.000000 400.000000P4 0.000000 100.000000P5 1.000000 100.000000LOI 0.000000 400.000000XC 0.000000 300.000000XM 0.000000 200.000000XR 3.000000 0.000000XOI 1000.000000 0.000000LC 4700.000000 0.000000LM 21.000000 0.000000LR 0.000000 100.000000

ROW SLACK OR SURPLUS DUAL PRICES

ROI) 0.000000 0.000000COSTS) 0.000000 0.000000MANPOWER) 0.000000 0.000000RISK) 0.000000 100.000000

NO. ITERATIONS= 66

BRANCHES= 2 DETERM.= 1.000E 0

Therefore the business must invest in projects 1, 3 and 5.

The first three goals are attained. The return on investment is R1 000 more than theminimum requirement of R35 000, the costs are R4 700 less than the maximum of R20000 allowed and 21 people less than the maximum of 120 are needed. Only the risk goalis not attained, with a risk level of 3 more than the maximum of 5 allowed.

Page 258: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

252 STUDY UNIT 17 MODELS WITH MULTIPLE OBJECTIVES

Page 259: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

StudyUnit 18

Summary and problems

Theme:

Summary of the chapter and additional problems.

Contents18.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

18.2 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

18.3 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256

Learning objectives

On completion of this study unit the student must be able to

• formulate multiple objective problems as goal programming models and solve them.

253

Page 260: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

254 STUDY UNIT 18 SUMMARY AND PROBLEMS

18.1 Summary

Two “shortcomings” of LP models are that they allow only one objective and that allconstraints must be strictly met. In this chapter we saw how these problems can be over-come by way of goal programming.

A goal programming model is formulated as an LP model that can then be solved withLINDO or LINGO. By playing around with the objectives and their priorities, it is possi-ble to generate different solutions to a problem. The decision-maker can then consider allthese possibilities, which show how shifts in emphasis affect the solution, and may choosethe one that suits him best.

This approach can be applied without any changes when some or all of the decision var-iables are restricted to being integers or 0–1 variables.

It should also be noted that the goal programming methodology can be applied even ifthe objective function or some of the constraints are non-linear. LINGO or GINO will beused to solve such models.

This brings the module in optimal resource allocation to an end. We have scanned onlythe tip of the iceberg. There is much more to be learnt about linear, integer and goalprogramming.

This module has provided you with good and useful tools that can be used for problem-solving. To be successful in practice, these tools will have to be combined with commonsense, your own analytical ability, consultation with experts, reading journals, etcetera.

We are confident that the knowledge and skills that you have acquired in this module,should enable you to use LP with confidence in practice. Now it’s up to you. Good luck!

18.2 Problems

Problem 18.1

A hospital employs qualified nurses as well as student nurses. The superintendent of thehospital is reviewing the staffing needs. He wants to keep running costs low while pro-viding good service. The quality of the service depends largely on the number of nursesemployed. Past experience indicates that a satisfactory level of service is achieved with atleast 200 qualified nurses. In terms of providing service, two student nurses are equivalentto one qualified nurse. Good practice also indicates that the ideal ratio of qualified nursesto student nurses is about 4 to 3.

The current budget allocates R600 000 per month for nurses. Qualified nurses earn R5000 per month, while student nurses cost the hospital R3 000 per month in salary, food,lodging and teaching expenses.

Page 261: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

18.2. PROBLEMS 255

The student nurses’ home has accommodation for 120 students.

Consider the restriction on the number of places in the student nurses’ home as the onlyhard constraint. All other relationships are goals. Assume that the following are undesir-able:

1. positive or negative deviations from the ideal qualified nurses to student nurses ra-tio;

2. under-achievement of satisfactory service;

3. over-achievement of the budget.

Formulate the problem as a goal programming model and solve it.

Problem 18.2

Currently there are three machines in a workshop with an area of 10 metres by 8 metres.If the workshop floor is represented as a 10 m × 8 m grid, then the three machines arelocated at the following (x; y) co-ordinates on the shop floor:

Machine Co-ordinates123

x = 7, y = 1x = 9, y = 5x = 2, y = 6

1 2 3 4 5 6 7 8 9 10−1

1

2

3

4

5

6

7

8

y

x

Machine 1

New Machine

Page 262: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

256 STUDY UNIT 18 SUMMARY AND PROBLEMS

A new machine has been bought and must be placed in the workshop, so that there is aminimum total distance between the new machine and the old machines. The distancemust be measured rectangularly, for example, if the location of the new machine is atthe point x = 5, y = 3, it is considered to be a distance of 4 metres from machine 1, asshown in the following sketch.

Design a goal programming model to find the ideal location for the new machine.

18.3 Solutions

Solution to Problem 18.1

Model

The goals can be defined as follows:

Goal 1: Achieve a 4 to 3 ratio of qualified nurses to student nurses.

Goal 2: Achieve a level of satisfactory service.

Goal 3: Do not exceed the budget.

Decision variables

The decision variables are:

Q= the number of qualified nurses employed.

S= the number of student nurses employed.

The deviation variables are:

XRATIO = the number of qualified nurses more than the ideal ratio.

LRATIO = the number of qualified nurses less than the ideal ratio.

XSERVICE = the number of qualified nurses more than 200 employed.

LSERVICE = the number of qualified nurses less than 200 employed.

XBUDGET = the amount more than the budgeted amount of R600 000 spent.

LBUDGET = the amount less than the budgeted amount of R600 000 spent.

Constraints

There is only one hard constraint, namely the number of student nurses in the studentnurses’ home may not exceed the number of available places. This constraint can be rep-resented by S ≤ 120. In the model we can represent this as an upper bound on S.

Goal 1 constraint:

The ideal ratio of qualified nurses to student nurses is 4 to 3. This can be written as:

Page 263: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

18.3. SOLUTIONS 257

Q : S = 4 : 3QS

= 43

3Q = 4S

Q = 43S

Q − 1,33S = 0.

The goal constraint is

Q − 1,33S − XRATIO + LRATIO = 0.

Positive and negative deviations from this goal are undesirable and XRATIO and LRA-TIO must be included in the objective function.

Goal 2 constraint:

Satisfactory service is achieved with 200 qualified nurses. Since in terms of providing ser-vice, two student nurses are equivalent to one qualified nurse, one student nurse can pro-vide half (not double) the amount of service one qualified nurse can provide.

The total amount of service provided is measured in terms of qualified nurses and is Q +0,5S. Our goal is thus Q + 0,5S ≥ 200. A quick test with Q = 0 shows that at least 400student nurses are needed if there are no qualified nurses. This proves the coefficient of0,5 for S to be correct.

The goal constraint is

Q + 0,5S − XSERVICE + LSERVICE = 200.

Over-achievement of this goal presents no problem and hence XSERVICE may be aslarge as required. Under-achievement is undesirable and we would like LSERVICE to beas small as possible. Therefore we include it in the objective function.

Goal 3 constraint:

5 000Q + 3 000S − XBUDGET + LBUDGET = 600 000.

Over-achievement of this goal is undesirable and hence only XBUDGET must be in-cluded in the objective function.

Objective function

Minimise DEVIATE = XRATIO + LRATIO + LSERVICE + XBUDGET.

Feasibility restrictions

All variables are non-negative.

The goal programming model is:

Minimise DEVIATE = XRATIO + LRATIO + LSERVICE + XBUDGET

subject to

Page 264: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

258 STUDY UNIT 18 SUMMARY AND PROBLEMS

Q − 1,33S − XRATIO + LRATIO = 0

Q + 0,5S − XSERV ICE + LSERV ICE = 200

5 000Q + 3 000S − XBUDGET + LBUDGET = 600 000

and Q ≥ 0, 0 ≤ S ≤ 120, XRATIO, LRATIO, XSERVICE, LSERVICE,

XBUDGET, LBUDGET ≥ 0.

Solution

The solution to this model indicates that 82,694 qualified nurses and 62,176 student nursesmust be employed. The service goal is not met, as in terms of service, there is a shortageof 86,218 qualified nurses.

Solution to Problem 18.2

Model

The new machine must be placed in the workshop so that there is a minimum total dis-tance between the new machine and the old machines.

Three goals can be identified and are:

Goal 1: Place the new machine as close as possible to machine 1.

Goal 2: Place the new machine as close as possible to machine 2.

Goal 3: Place the new machine as close as possible to machine 3.

Decision variables

The location of the new machine in the workshop must be found. Hence we need to de-termine the x and y co-ordinates of the new machine’s location. Two decision variablesmust be defined to represent this, namely

x = x co-ordinate of the new machine’s location.

y = y co-ordinate of the new machine’s location.

Goal 1:

The new machine will be closest to machine 1 if it were placed on top of machine 1. Thisis, of course, not possible. The x co-ordinate of the new machine will be either west oreast of 7, the x co-ordinate of machine 1. The y co-ordinate of the new machine will beeither south or north of 1, the y co-ordinate of machine 1.

We define deviation variables as follows:

w1= number of metres that x lies west of 7.

e1= number of metres that x lies east of 7.

s1= number of metres that y lies south of 1.

Page 265: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

18.3. SOLUTIONS 259

n1= number of metres that y lies north of 1.

Similar deviation variables are defined for goals 2 and 3:

w2= number of metres that x lies west of 9.

e2= number of metres that x lies east of 9.

s2= number of metres that y lies south of 5.

n2= number of metres that y lies north of 5.

w3= number of metres that x lies west of 2.

e3 = number of metres that x lies east of 2.

s3 = number of metres that y lies south of 6.

n3 = number of metres that y lies north of 6.

Constraints

Goal 1:

The deviations from point (7; 1) are represented by two goal constraints:

x + w1 – e1 = 7

y + s1 – n1 = 1.

Similarly, we find two goal constraints corresponding to each of goals 2 and 3.

Objective function

For machine 1 we want to minimise the deviation from point (7; 1). Hence the west, east,south and north deviations are undesirable, and w1, e1, s1 and n1 must be included in theobjective function.

Similarly, for machines 2 and 3. The objective function is therefore:

Minimise DISTANCE =3∑

i=1

(wi + ei + si + ni).

Feasibility restrictions

The size of the workshop is 10 m × 8 m. Hence 0 ≤ x ≤ 10 and 0 ≤ y ≤ 8. All deviationvariables are non-negative.

The goal programming model is:

Minimise DISTANCE =3∑

i=1

(wi + ei + si + ni)

subject to

x + w1– e1= 7

Page 266: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

260 STUDY UNIT 18 SUMMARY AND PROBLEMS

y + s1– n1= 1

x + w2– e2= 9

y + s2– n2= 5

x + w3– e3= 2

y + s3– n3= 6

and 0 ≤ x ≤ 10, 0 ≤ y ≤ 8 and all deviation variables ≥ 0.

This model is solved and we find that the best location for the new machine is at x = 7and y = 5. The total distance from the new machine to the other machines is 12 metres.

Page 267: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

StudyUnit 19

The final message

Theme:

Presentation of the results of the furniture problem in the form of a writtenand an oral report.

Contents19.1 Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262

19.2 Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266

19.3 John’s report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269

Learning objectives:

On completion of this study unit the student must

• understand and be able to explain the role of a report;

• be able to explain how one goes about writing a report;

• be able to list the factors which should be considered when writing a report;

• be able to list and discuss the factors which should be considered when doing anoral presentation of a report;

• be able to write a report.

261

Page 268: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

262 STUDY UNIT 19 THE FINAL MESSAGE

19.1 Report

John has done quite well so far. He has identified a problem, developed a model to repre-sent the problem, found a solution and determined that the optimal composition of theproduct mix is critical for the survival of the business. He has also used the model as abasis for experimenting and has observed that it can be used to answer several possiblequestions of the management team. However, his endeavour will be in vain if he cannotsell it to the management team. Not only must he convince them that the model and itssolution will be useful to them, he must also inspire them to use it.

John’s first and biggest problem is that no one instructed him to do the job. As a con-sequence there is no one in the management team who will fight for John and the newsystem. Even though they may all think that it is a job well done, someone has to say:“This is how we are going to do it in future”. Acceptance of John’s model will meanthat, in future, decisions will be dealt with in a new way. John needs a comrade in themanagement team.

John makes an appointment with his father-in-law and tells him what he has done. MrBell is impressed by what he hears, but he cannot react too hastily. He asks John to pre-pare a report that he can study and promises that if he is satisfied, he will arrange forJohn to give a presentation at management’s next meeting.

Before John puts pen to paper he must ask himself two questions. For whom is thereport meant and what is its purpose? One of the most difficult issues to decide uponwhen writing a report, is what to include and what to omit. The answers to the twoquestions posed above are invaluable when making such decisions, and determine thewhole approach to the report.

In John’s case the report is meant firstly for his father-in-law, managing director andowner of Knotty Teak Products, and then for the management team whom he wantsto convince to use his model. The members of the management team are from differ-ent sections in the business and their knowledge and skills are divergent in nature. Wecan, however, assume that none of them is conversant in the use of quantitative mod-els, specifically linear programming. This means that John has to pitch the report on hismodel at a level that they will understand. He should not concentrate on the technicalaspects of the model, but rather on its usage and usefulness. If, however, the report ismeant for the head of the OR section of the business, its contents would be totally differ-ent.

The objective of John’s report is not to tell the management team: “This is the opti-mal product mix”, but rather to tell them: “Here is a model that can help you to alwaysmake good decisions”. A good exercise for John is to try and state in a single sentencewhat he wants to tell the management team. Such a sentence must state the purpose ofhis investigation and what was achieved through the investigation. The purpose of the re-port then is to make the reader decide for himself that a model will be useful in decision-making.

Page 269: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

19.1. REPORT 263

Exercise 19.1

Write down a single sentence stating the purpose of John’s investigation.

Solution to Exercise 19.1

This exercise may, of course, have as many different solutions as there are readers of thisstudy guide. What is important, though, is that when it comes to writing the report, itshould bring across the intended message.

My suggestion is:

The use of a mathematical model can help the management team to persistently makegood decisions.

Now John must plan his report. A good suggestion is to start with an outline. For astart he can simply list everything he wishes to include in the report.

Exercise 19.2

Write down an outline for John’s report.

Solution to Exercise 19.2

Once again there are many possible correct answers. My suggestion is:

1. Background

2. Purpose of the investigation

3. Scope of the investigation

4. The model

5. Sources of information

6. Assumptions

7. The solution

8. Experimenting with the model

9. Conclusions

10. Recommendations

As a next step, John can refine this outline by, for example, grouping items together,changing the order of the items, and subdividing some of the items.

Page 270: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

264 STUDY UNIT 19 THE FINAL MESSAGE

John’s more detailed outline could be as follows:

1. Background

2. Purpose and scope of investigation

3. Sources of information

4. Assumptions

• Divisibility

• Additivity

• Labour costs

• Selling prices

• Demand for products

5. Model

• Decision variables

• Objective function

• Constraints

• Feasibility restrictions

• Parameters

6. Solution

7. Conclusions

8. Recommendations

Appendix A: The data

Appendix B: The model

Appendix C: The solution

Some of John’s decisions are represented in the detailed outline. The first one is that hewill give most of the technical details at the end of the report in the form of appendices.These details will therefore not increase the volume of the report itself or make it diffi-cult to read. At the same time, they will be available for anyone who may be interestedin them. John will, however, include some technical information in the report, but in de-scriptive form. This is necessary to give the reader insight into what the model entails. Ifthe report were simply intended to give an answer on how many items of each product tomanufacture, and if the managers were experienced in the use of LP models, one wouldprobably have included sections 4 and 5 above in an appendix.

Page 271: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

19.1. REPORT 265

The foregoing outline should give a good idea of the contents of John’s report. Let usnow consider the package that he should put on his Father-in-law’s desk. In general sucha package could include the following:

• a covering letter – this indicates what the report is about and gives information,for example, on when and by whom the report was requested;

• an executive summary – this states the objective of the report and gives theimportant results and recommendations; this summary should preferably not belonger than a single page; it should be written with the busy manager in mind whodoes not have time to battle through a lengthy report - after reading the summarythe manager should know exactly what the report is about and can then decidewhether he is interested in the detail and whether he wants to know more;

• a title page – this contains the title of the report and the name of the author; itmay also state to whom the report is addressed; the date of the report should alsobe given;

• a table of contents – this lists the sections of the report with page references inthe order in which they appear;

• the report itself ;

• a bibliography – a list of references to literature which contribute to the report; itcan refer to both published and unpublished material - the items are listed alpha-betically and are numbered sequentially;

• appendices – these contain all data that is not included in the report itself be-cause it could make reading the report more difficult or divert one’s attention fromimportant aspects; it usually contains items such as tables, graphs, calculations, di-agrams, questionnaires, computer printouts, etcetera;

• a distribution list – a list of all persons receiving the report; this also serves as acontrol measure to ensure that the client knows who has knowledge of the report.

All reports will not always contain all of these items. This depends on the objective andscope of the report itself. Think about what John should include with his report to hisFather-in-law and then turn to section 1.19 of this study unit where John’s report is given.You may read the report now, but remember to return to this point, as important infor-mation on the style of a report follows.

Now something on the style of a report. In former days pompous language in a reportwas quite fashionable. Today, however, we realise that communication is the main aimof a report. We also realise that communication is difficult, since what one person saysand what another one hears is often miles apart. For effective communication it is neces-sary to keep our use of language as simple and clear as possible. For example, oneshould purposefully try to use short sentences.

Another requirement is that one should remain objective. The report should be about

Page 272: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

266 STUDY UNIT 19 THE FINAL MESSAGE

facts and not personal opinions. John should, for example, not start off by justifying hisinvestigation on the grounds that he is of the opinion that there is not enough commu-nication between the managers and that he thinks that the business is not doing as wellas it could. These are perceptions and not facts. It is, however, fact that the managersare not using any modelling tools to aid their decision-making and this he can mention inhis report. It is also fact that correct usage of the model will force the managers to com-municate about the problem and to integrate all the available information. These he maymention as advantages of using the model.

In the past people tended to use the passive voice rather than the active voice in thename of objectivity. They would rather write: “A mathematical model was developedand solved” than “I have developed and solved a mathematical model”. Nowadays, how-ever, the active voice is preferable since it makes the reading-matter lively and calls forsimpler sentence construction. Although the active voice is preferred, the passive voiceremains grammatically correct and there are instances where it may still be preferable.Example are, when it is not known who performed an action, if the writer does not wishto identify the person concerned or if the writer wants to place the emphasis on the ac-tion.

A final word:

When working in practise, you will be required to write many reports. You will haveto structure each report according to the objective of the particular investigation. Theguidelines given in this section will help you to achieve this.

Many people make the mistake of modelling their reports on a sample report, with theresult that the report does not convey the desired message. Please do not do this, butplan and write your own reports. You will find that report-writing will become eas-ier with practise.

19.2 Presentation

Suppose that John’s Father-in-law informs him that he must give a presentation at thenext planning meeting. This will be the most critical phase of his project and he willhave to plan each step meticulously.

Firstly he must see to it that each manager receives a copy of his report – possibly ac-companied by the covering letter sent to his Father-in-law or, even better, a coveringletter written by his Father-in-law himself. Then John must plan his oral presentationwith the same care as he did the written report. In his presentation he will repeat muchof what already appears in the report. He must, however, take care that it is not just averbatim repetition of the written report. He will in any case probably not have enoughtime for that. In his oral presentation he should point out the most important aspectsand conclusions. He should also use the opportunity to explain some of the technical as-pects and also to discuss a few examples and graphs to illustrate what can be done with

Page 273: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

19.2. PRESENTATION 267

the model.

John must illustrate that the model does not just give an answer, but also indicates trendsand can be utilised to weigh up different alternatives. He must also explain that the modelcan be used to answer “what if . . . ” questions and to predict the consequences of deci-sions before they are implemented.

John will have to explain that the purpose of the model is not to replace the managementteam as the decision-makers, but to help them in the decision-making process. He shouldalso explain that the future usefulness of the model depends on the decision-makers’ in-put and ability to note changes in the environment, which must also lead to changes inthe model.

John will also have to think about how to bring his message across. Researchers areof the opinion that a well-prepared and fluent delivery increases the credibility of thespeaker, as well as the comprehension and retention of the message by the audience. Johnmust take care to make eye contact with individuals in the audience. The speed at whichhe talks, pauses and gestures, can all play an important role. Ideally he must also pre-pare a few slides and plan a short demonstration for interested parties afterwards.

John’s appearance is also important. If the managers usually wear suits and ties, he hasno choice but to dress in his best suit. Even his tie will have to suit the occasion.

It may sound as if we are dollying John up and turning him into someone he is not, butyou must remember, he is marketing a professional service. If he arrives at the meetingwith tousled hair and dressed in denims and takkies, he will look like a disoriented acad-emic or some or other backroom boffin. A manager in actual practice may unconsciouslywonder whether this poor unprofessional, scatter-brained soul knows anything about bigbusiness, and he may as a consequence consider anything that John says to be theoreticaland impractical.

Now we leave it to John to do the presentation. We can only hold thumbs that he will beable to convince the decision-makers that they should use models and operations researchtechniques to facilitate better decision-making. If he can succeed in this, he is home anddry.

Before we close this chapter, you need to critically study John’s report given in the fol-lowing section. It is therefore necessary to do the following exercise.

Exercise 19.3

1. Carefully and critically read through John’s report. Try to criticise the report onthe following points:

(a) Is John’s message conveyed clearly enough? Does he lead the reader to reachthe conclusion that he defined at the outset?

(b) Should less or more technical detail be included in the report? Is the technicaldetail clear enough?

Page 274: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

268 STUDY UNIT 19 THE FINAL MESSAGE

(c) Has something important been omitted?

(d) Is there anything that you would have done differently?

2. John’s report violates many of the guidelines on style. Work through the report andtry to find sentences that you can rewrite in a simpler form.

Solution of Exercise 19.3

This exercise doesn’t have a right or a wrong answer. As long as you have read John’sreport judiciously, we are happy. If you came up with a long list of criticisms, you aremost welcome to pass them on to your lecturer. That will enable us to improve John’sreport for the next round.

Page 275: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

19.3. JOHN’S REPORT 269

19.3 John’s report

Covering letter

Cleaning Section

Knotty Pine Products

Date

Mr D Bell

Managing Director

Knotty Pine Products

Dear Mr Bell

Investigation into the desirability of using a mathematical model as a tool inthe decision-making process of Knotty Pine Products.

As already discussed with you, I undertook an investigation into your business, KnottyPine Products, of my own accord.

An executive summary and a comprehensive report are attached hereto.

I shall appreciate it if you would study this report and if you agree with my findings, thatyou will give me the opportunity to make a presentation to the management team.

Thank you.

John Ramokgadi

Page 276: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

270 STUDY UNIT 19 THE FINAL MESSAGE

Executive Summary

By

John Ramokgadi

Employee

Knotty Pine Products

Investigation into the desirability of using a mathematical model as a tool inthe decision-making process of Knotty Pine Products.

The results of my investigation show that the actual profit of the business is relativelysmall. The profit relates directly to the quantities of the different types of furniture itemsto be manufactured. Therefore, it is critical for the survival of the business that thisproduct mix is optimally composed. The mathematical model that I developed can beused for this purpose.

The management team can also use this model when making other decisions such as de-termining selling prices, deciding on acceptable purchasing prices, allocation of resourcesand so forth.

I thus recommend that the management team will approve the use of a mathematicalmodel as a tool in the decision-making process of the business.

If this is approved, the following will also be necessary:

1. The management team must receive training in the application and interpretationof mathematical models and in this case linear programming models.

2. The current model must be refined and adapted to the satisfaction of everyone in-volved.

Page 277: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

Report on the desirability of

using a mathematical model

as a tool in the decision-making process

of Knotty Pine Products

by

John Ramokgadi

Employee

Knotty Pine Products

Date

Page 278: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

Contents

1. Background

2. Purpose and scope of investigation

3. Sources of information

4. Assumptions

i Divisibility

ii Additivity

iii Labour costs

iv Selling prices

v Demand for products

5. Model

i Decision variables

ii Objective function

iii Constraints

iv Feasibility restrictions

v Parameters

6. Solution

7. Conclusions

8. Recommendations

Appendix A: The data

Appendix B: The model

Appendix C: The solution

Page 279: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

19.3. JOHN’S REPORT 273

1. Background

Knotty Pine Products manufactures solid teak furniture. Currently seven differenttypes of furniture items are manufactured: two sizes of round tables, two sizes ofrectangular tables, two types of chairs and buffets. Various combinations of furni-ture items are grouped together and sold as dining room suites, but items are avail-able separately.

Production planning is done every four weeks when it is decided how many of eachfurniture item should be manufactured in the forthcoming four-week period. Deci-sions are also made on determining selling prices, deciding on acceptable purchasingprices, allocation of resources and so forth. The decisions are based on the judge-ment of the managers concerned and no modelling tools are utilised.

2. Purpose and scope of investigation

The purpose of my investigation was to determine whether the use of a mathe-matical model could assist managers in their planning. The problem is a standardproduct mix problem where different products compete for the same resources. Lin-ear programming is a technique that is widely used to solve such problems and isapplicable in this specific instance as well.

The investigation focused on determining the quantity of each product to be man-ufactured during a four-week period in order to maximise the profit generated bysales. The quantities of the resources that are available, that is wood, machines andlabour, served as inputs to the model. So also the quantities of each product re-quired according to the sales contracts. The model is used to determine the mostprofitable product mix, given these inputs from management. The model does nottry to optimise the quantities of the resources that are available, but can be used toinvestigate the effect of changes in these quantities.

3. Sources of information

I interviewed the managers to determine all factors playing a role in determiningthe product mix and to determine all figures required as inputs to the model. Thefigures for a four-week period from 20**-01-11 to 20**-02-08 were used. This dataappears in appendix A.

4. Assumptions

Some assumptions were made in the development of the model. The managers con-sidered these assumptions to be realistic. Acceptance of the first two assumptionswas necessary in order to formulate the problem as a linear programming model.

• Divisibility

It is assumed that the total profit and the total amount of each resource usedare directly proportional to the quantities of the products that are manufac-tured. There is no cost or quantity savings when more units of a specific prod-

Page 280: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

274 STUDY UNIT 19 THE FINAL MESSAGE

uct are manufactured.

• Additivity

It is assumed that the total profit can be calculated as the sum of the profitcontributions of the seven products and that the amount of each resource usedis simply the sum of the amounts used by the individual products.

• Labour costs

The labour costs are not relevant since there is a fixed number of labourers re-ceiving fixed weekly wages, irrespective of their productivity during the week.The number of labourers, the length of the working week and the labour tariffsof the labourers are considered to be fixed.

• Selling prices

All units of the same type of product that are sold, are sold at the same price.

• Demand for products

The demand for six-seater rectangular tables, elegant and popular chairs isunlimited and everything manufactured can be sold.

5. Model

My model appears in appendix B. It is a linear programming model. Such a modeltypically consists of a number of components, which are explained below.

i Decision variables

The decision variables represent the specific decisions that have to be taken,and in my model the decision variables represent the quantities of each prod-uct (furniture item) to be manufactured.

ii Objective function

The objective function is a mathematical expression, which represents therelationship between the decision variables and the goal (objective) of theproblem. The objective function reflects the goal of the model, which is max-imisation of profit. Notice that only relevant costs are included in the objec-tive function. To determine the actual profit of the business, the non-relevantcosts, being the fixed costs and the direct labour costs, must be subtracted.

iii Constraints

Constraints are mathematical expressions, which represent the restrictionsthat are placed on the problem. In my model the constraints on the numberof products that can be manufactured are the following:

– the availability of wood;

– the available hours on the different machines;

Page 281: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

19.3. JOHN’S REPORT 275

– the available team-hours in the joining and finishing section;

– the requirement that buffets may not be sold separately and that a certainpercentage of the tables must be accompanied by buffets;

– the requirement that each table must be accompanied by a set of chairsand that the two types of chairs are allocated in specific ratios to the fourtypes of tables.

iv Feasibility restrictions

The feasibility restrictions give the validity of the decision variables, in otherwords, the values that the decision variables may assume. In this case it is themaximum and minimum quantities to be supplied of each product.

v Parameters

The figures in the model are called the parameters and are calculated frommanagement inputs.

6. Solution

A computer program was used to solve the model and the solution appears in ap-pendix C.

From the solution it follows that the optimal quantities of products to be manufac-tured are as follows:

No ten-seater tables,

86 six-seater round tables,

236 six-seater rectangular tables,

543 elegant chairs,

1 394 popular chairs,

81 buffets.

The associated profit is R1 600 942,30. This figure takes only relevant costs into ac-count. If the non-relevant costs are subtracted, the actual profit is only R431 235,12.This is a disquietingly small profit for the business.

In addition to the product mix and profit, the computer solution also gives the re-duced cost of each product, the dual price of each resource and ranges for the unitprofit for each product and the available quantities of the resources within whichneither the product mix nor the reduced costs or dual prices will change.

The reduced costs indicate by how much the profit will decrease for each additionalunit of the corresponding product that is manufactured. They can be used, for ex-ample, to determine the minimum price increase that is necessary to make the pro-duction of a product which is currently not manufactured, profitable.

Page 282: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

276 STUDY UNIT 19 THE FINAL MESSAGE

The dual prices indicate by how much the profit will increase for each additionalunit of the resource that is made available. They can be used, for example, to de-termine how much can be paid for additional units of a resource.

The ranges indicate the limits within which decisions based on the information inthe printed solution are valid.

7. Conclusions

My conclusions regarding the advantages of using a model are:

• The model can help the management team in making good decisions

It should be emphasised that the model does not replace the decision-makers, butenables them to make justifiable decisions instead of decisions based on feelings ortaken at random.

The profit of the business is disquietingly small, especially when one realises thatthis is the best that the business can do. Any other feasible product mix will yielda smaller profit. The importance of manufacturing an optimal product mix is indis-putable. The question is whether the management team will be able to, time andagain, without fail, determine an optimal, or close to optimal, product mix if theydon’t use some kind of tool to help them with this decision.

• The model can be used for experimenting

Management may wish to consider various options. The model can be solved foreach of these options and the different solutions can then be compared. Manage-ment is then in a better position to choose between the different options.

• The use of a model will encourage communication between the managers

If a model is used, managers will have to discuss the problem and the model, ex-change ideas and make decisions on how to integrate all the available information.This will obviously encourage better communication between them.

• Recommendations

I recommend that the management team approves the use of a mathematicalmodel as a tool in their decision-making process.

If this is approved, the following will also be necessary:

(a) The management team must receive training in the application and interpreta-tion of mathematical models and in this case linear programming models.

(b) The current model must be refined and adapted to the satisfaction of everyoneinvolved.

Page 283: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

19.3. JOHN’S REPORT 277

Appendix A

The Data

The following data were used as inputs to the model:

1. Products

The following seven products are manufactured:

Ten-seater round tables,

Six-seater round tables,

Ten-seater rectangular tables,

Six-seater rectangular tables,

Elegant chairs,

Popular chairs,

Buffets.

2. General data

Selling price Wood per Joining and(in R) ( unit in m3) finishing per unit

(in team-hours)Ten-seater round table 1 158 0,1328 6,000Six-seater round table 864 0,0907 5,000Ten-seater rectangular table 1 132 0,1352 6,500Six-seater rectangular table 858 0,0942 5,600Elegant chair 190 0,0142 1,300Popular chair 130 0,0114 0,867Buffet 1 178 0,1265 7,200

Machine-time per unit (in minutes)Product

Machine Ten-seater Six-seater Ten-seater Six-seaterround table round table rectangular table rectangular table

Bench-saw 50 40 35 30Thicknesser 40 25 42 26Planer 13 10 12 9Router 41 34 30 26Tenon-saw 8 6 7 5Band-saw 15 11 1 1Spray gun 6 5 6 4

Page 284: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

278 STUDY UNIT 19 THE FINAL MESSAGE

Machine-time per unit (in minutes)Machine Product

Elegant chair Popular chair BuffetBench-saw 12 6 60Thicknesser 4 4 45Planer 9 7 14Router 13 7 52Tenon-saw 5 4 16Band-saw 7 0 13Spray gun 2 1 8

3. Resources

The following resources were identified:

Wood,

Four bench-saws,

Three thicknesser-planers,

Two planers,

Three routers,

Two tenon-saws,

Two band-saws,

One spray gun,

25 joining-and-finishing teams.

Resource Quantity available* Unit costWood 100 m3 R5 000 per m3

Bench-saws 629 hours R50 per hourThicknesser-planers 510 hours R50 per hourPlaners 340 hours R50 per hourRouters 501,5 hours R50 per hourTenon-saws 323 hours R50 per hourBand-saws 340 hours R50 per hourSpray gun 170 hours R50 per hourJoining and finishing teams 4 250 hours R50 per hour

* Each machine is available for four weeks at 42,5 hours per week, except for twobench-saws that are only available 85% of the time, one tenon-saw that is onlyavailable 90% of the time and one router that is only available 95% of the time.

Page 285: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

19.3. JOHN’S REPORT 279

Product QuantityTen-seater round tables Not more than 40Six-seater round tables Not more than 120Ten-seater rectangular tables Not more than 15Six-seater rectangular tables UnlimitedElegant chairs UnlimitedPopular chairs UnlimitedBuffets Depends on number of tables

4. Sales commitments

The following requirements must also be satisfied:

Ten-seater Six-seater Ten-seater Six-seaterround round rectangular rectangular

Elegant chairs 60% 50% 40% 20%Popular chairs 40% 50% 60% 80%Buffets (one) 50% 25% 50% 25%

(a) Chairs can be sold separately, but not buffets.

(b) Percentages of tables to be accompanied by units of another product.

ProductSix-seater Ten-seater Six-seater

round rectangular rectangulartable table table

Selling price 2 932,00 3 472,00 2 843,00Less: Relevant costs 937,67 1 274,33 975,17

Direct material costs 453,50 676,00 471,00Variable overhead costs 484,17 598,33 504,17

Unit profit 1 994,33 2 197,42 1 867,37

Page 286: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

280 STUDY UNIT 19 THE FINAL MESSAGE

ProductElegant Popular Buffetchair chair

Selling price 787,00 500,00 3 968,00Less: Relevant costs 211,83 146,03 1 345,83

Direct material costs 71,00 57,00 632,50Variable overhead costs 140,83 89,03 713,33

Unit profit 575,39 353,97 2 622,17

5. Irrelevant costs

The following irrelevant costs were not taken into account in the model:

Fixed costs over four weeks: 55 076,88Direct labour costs: 249 424,00Machine operators:17 trained artisans for4 × 42,5 hours @ R30 per hour

86 700,00

17 unskilled workers for4 × 42,5 hours @ R15,00 per hour

43 350,00

Joining and finishing teams:25 trained artisans for4 × 42,5 hours @ R30 per hour

127 500,00

75 unskilled workers for4 × 42,5 hours @ R15,00 per hour

191 250,00

Total irrelevant costs 304 500,88

Page 287: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

19.3. JOHN’S REPORT 281

Appendix B

The Model

Max P = 2 396,87RT + 1 994,87RS + 2 197,42RcT + 1 867,37RcS + 575,39CE +

353,97CP + 2 622,79B

subject to

0,1328RT + 0,0907RS + 0,1352RcT + 0,0942RcS + 0,0142CE + 0,0114CP + 0,1265B ≤ 100 [1]

0,8333RT + 0,6667RS + 0,5833RcT + 0,5RcS + 0,2CE + 0,1CP + B ≤ 629 [2]

0,6667RT 10 + 0,4167RS + 0,7RcT + 0,4333RcS + 0,0667CE + 0,0667CP + 0,75BT ≤ 510 [3]

0,2167RT + 0,1667RS + 0,2RcT + 0,15RcS + 0,15CE + 0,1167CP + 0,2333B ≤ 340 [4]

0,6833RT + 0,5667RS + 0,5RcT + 0,4333RcS + 0,2167CE + 0,1167CP + 0,8667B ≤ 501,5 [5]

0,1333RT + 0,1RS + 0,1167RcT + 0,0833RcS + 0,0833CE + 0,0667CP + 0,2667B ≤ 323 [6]

0,25RT 0 + 0,1833RS + 0,0167RcT + 0,0167RcS + 0,1167CE + 0,2167B ≤ 340 [7]

0,1RT 0 + 0,0833RS + 0,1RcT + 0,0667RcS + 0,0333CE + 0,0167CP + 0,1333B ≤ 170 [8]

6RT + 5RS + 6,5RcT + 5,6RcS + 1,3CE + 0,867CP + 7,2B ≤ 4250 [9]

0,5RT + 0,25RS + 0,5RcT + 0,25RcS − B = 0 [10]

− 6RT − 3RS − 4RcT − 1,2RcS + CE ≥ 0 [11]

− 4RT − 3RS − 6RcT − 4,8RcS + CP ≥ 0 [12]

and

0 ≤ RT ≤ 40, 0 ≤ RS ≤ 120, 0 ≤ RcT ≤ 15, RcS ≥ 0,

CE ≥ 0, CP ≥ 0, BT ≥ 0;

The LINDO-model:

Title Knotty Pine ProductsMax 2396.87RT+1994.45RS+2197.42RcT+1867.37RcS+575.39CE+353.97CP+2622.79Bsubject toWOOD) 0.1328RT+0.0907RS+0.1352RcT+0.0942RcS+0.0142CE+0.0114CP+0.1265B<100BENCHSAW) 0.8333RT+0.6667RS+0.5833RcT+0.5RcS+ 0.2CE+0.1CP+B<629THICKNES) 0.6667RT+0.4167RS+0.7RcT+0.4333RcS+ 0.0667CE+0.0667CP+0.75B<510

Page 288: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

282 STUDY UNIT 19 THE FINAL MESSAGE

PLANERS) 0.2167RT+0.1667RS+0.2RcT+0.15RcS+0.15CE+0.1167CP+0.2333B<340ROUTERS) 0.6833RT+0.5667RS+0.5RcT+0.4333RcS+0.2167CE+0.1167CP+0.8667B<501.5TENONSAW) 0.1333RT+0.1RS+0.1167RcT+0.0833RcS+0.0833CE+0.0667CP+0.2667B<323BANDSAWS) 0.25RT+0.1833RS+0.0167RcT+0.0167RcS+ 0.1167CE+0.2167B<340SPRAYGUN) 0.1RT+0.0833RS+0.1RcT+0.0667RcS+0.0333CE+0.0167CP+0.1333B<170M_LABOUR) 6RT+5RS+6.5RcT+5.6RcS+1.3CE+0.867CP+7.2B<4250SALESBUF) 0.5RT+0.25RS+0.5RcT+0.25RcS-B=0SALASCHE) -6RT - 3RS - 4RcT - 1.2RcS + CE > 0

SALECHP) -4RT - 3RS - 6RcT - 4.8RcS + CP > 0

ENDSUB RT 40SUB RS 120SUB RcT 15

where

RT = number of ten-seater round tables,

RS = number of six-seater round tables,

RcT = number of ten-seater rectangular tables,

RcS = number of six-seater rectangular tables,

CE = number of elegant chairs,

CP = number of popular chairs,

B = number of buffets,

to be manufactured;

and

[1] constraint on the quantity of wood available,

[2] constraint on the production time available on the four bench-saws,

[3] constraint on the production time available on the three thicknesser- planers,

[4] constraint on the production time available on the two planers,

[5] constraint on the production time available on the three routers,

[6] constraint on the production time available on the two tenon-saws,

[7] constraint on the production time available on the two band-saws,

[8] constraint on the production time available on the spray gun,

[9] constraint on the production time available in the joining and finishing section,

[10] requirement that 50% of the ten-seater tables and 25% of the six-seater tables mustbe accompanied by a buffet,

Page 289: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

19.3. JOHN’S REPORT 283

[11] requirement that 60% of the ten-seater round tables, 40% of the ten- seater rectangu-lar tables, 50% of the six-seater round tables and 20% of the six-seater rectangular tablesmust be accompanied by elegant chairs,

[12] requirement that 40% of the ten-seater round tables, 60% of the ten- seater rectangu-lar tables, 50% of the six-seater round tables and 80% of the six-seater rectangular tablesmust be accompanied by popular chairs.

(Notice that chairs may be sold separately, but buffets may not.)

Page 290: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

284 STUDY UNIT 19 THE FINAL MESSAGE

Appendix C

The Solution

Computer printout of solution

LP OPTIMUM FOUND AT STEP 10

OBJECTIVE FUNCTION VALUE

1) 1630735.

VARIABLE VALUE REDUCED COSTRT 0.000000 89.053764RS 86.328041 0.000000RCT 0.000000 59.263691RCS 236.385101 0.000000CE 542.646240 0.000000CP 1393.632568 0.000000B 80.678284 0.000000

ROW SLACK OR SURPLUS DUAL PRICESWOOD) 36.103779 0.000000

BENCHSAW) 124.681747 0.000000THICKNES) 181.942932 0.000000PLANERS) 27.295242 0.000000ROUTERS) 0.000000 1563.147339

TENONSAW) 135.001694 0.000000BANDSAWS) 239.418640 0.000000SPRAYGUN) 94.943787 0.000000M_LABOUR) 0.000000 199.250961SALESBUF) 0.000000 166.596695SALASCHE) 0.000000 -22.370279SALECHP) 0.000000 -1.199875

NO. ITERATIONS= 10

RANGES IN WHICH THE BASIS IS UNCHANGED:

OBJ COEFFICIENT RANGESVARIABLE CURRENT ALLOWABLE ALLOWABLE

COEF INCREASE DECREASERT 2396.870117 89.053780 INFINITYRS 1994.449951 521.590454 17.992620

RCT 2197.419922 59.263706 INFINITYRCS 1867.369995 152.734665 68.912552CE 575.390015 49.813747 6.052891CP 353.970001 1.486361 184.749878B 2622.790039 530.308472 73.654297

RIGHTHAND SIDE RANGESROW CURRENT ALLOWABLE ALLOWABLE

Page 291: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

19.3. JOHN’S REPORT 285

RHS INCREASE DECREASE[1] 100.000000 INFINITY 36.103779[2] 629.000000 INFINITY 124.681747[3] 510.000000 INFINITY 181.942932[4] 340.000000 INFINITY 27.295242[5] 501.500000 9.875972 25.319981[6] 323.000000 INFINITY 135.001694[7] 340.000000 INFINITY 239.418640[8] 170.000000 INFINITY 94.943787[9] 4250.000000 225.985779 88.144981

[10] 0.000000 90.932350 422.034698[11] 0.000000 356.393860 139.010208[12] 0.000000 548.279480 504.925140

Calculation of actual profit:

Income after relevant costs 1 630 735Less: Irrelevant costs 1 199 500

Fixed costs 550 076,88Direct labour costs 649 424,00

Profit 431 235,12

Problem 19.4

When writing his report, John’s objective was to convince the management team thatthe use of a mathematical model is necessary as a tool in the decision-making process ofKnotty Pine Products. Study his report again.

Assume that John was an operations researcher at Knotty Pine Products and that hisfather-in-law had instructed him to determine the optimal quantities of products to bemanufactured, the resource utilisation and the profit of the business. His report on suchan investigation would differ significantly from the current one. Write the covering letterand the executive summary of such a report.

Solution to Problem 19.4

Page 292: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

286 STUDY UNIT 19 THE FINAL MESSAGE

Covering letter

Operational Research Department

Knotty Pine Products

DateMr BellManagerKnotty Pine Products

Dear Mr Bell

Investigation to determine the optimal quantities of products to be manufac-tured, the resource utilisation and the profit of Knotty Pine Products.

As instructed by you, I undertook an investigation into your business, Knotty Pine Prod-ucts, to obtain answers to certain questions.

An executive summary and a comprehensive report are attached hereto.

I shall appreciate it if you would study this report and, if you find it necessary, that youwould give me the opportunity to make a presentation to the management team.

Thank you.

John Ramokgadi

Page 293: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

19.3. JOHN’S REPORT 287

Executive SummaryBy

John Ramokgadi

Operations Research Section

Knotty Pine ProductsInvestigation to determine the optimal quantities of products to be manufac-tured, the resource utilisation and the profit of Knotty Pine Products.

The results of my investigation show that the actual profit of the business is relativelysmall. The profit relates directly to the quantities of the different types of furniture itemsto be manufactured. Therefore, it is critical for the survival of the business that thisproduct mix is optimally composed.

I developed a mathematical model to represent the problem of obtaining an optimal prod-uct mix and my results are summarised below.

1. Optimal quantities of products to be manufactured

The optimal product mix for a four-week period is:

No ten-seater tables,

86 six-seater round tables,

236 six-seater rectangular tables,

543 elegant chairs,

1 394 popular chairs,

81 buffets.

2. Profit

The associated profit is R305 942,30. This figure takes only relevant costs into ac-count. If the non-relevant costs are subtracted, the actual profit is only R1 441,42.This is a disquietingly small profit for the business.

3. Resource utilisation

Only two resources are fully utilised, namely the available hours on the routers and theavailable team-hours in the joining and finishing section.

All other resources are under-utilised to the following extent:

36,104 m3 of unused wood, (36%)

Page 294: OPTIMISATION OF RESOURCES - Home - StudyNotesUnisa · search or quantitative management techniques and the implementation of these results. You will see how John discovers a problem,

288 STUDY UNIT 19 THE FINAL MESSAGE

124,682 unused hours on the bench-saws, (20%)

181,943 unused hours on the thicknesser-planers, (36%)

27,295 unused hours on the planers, (8%)

135,002 unused hours on the tenon-saws, (42%)

239,419 unused hours on the band-saws, (70%)

94,944 unused hours on the spray gun. (56%)

This indicates that there is a significant amount of spare capacity, which should be inves-tigated further.