[B. Van Der Veen (Auth.)] Introduction to the Theo(BookZZ.org) (2)

November 19, 2017 | Author: Mani Kant Mishra | Category: Stochastic Process, Markov Chain, Probability Theory, Mathematics, Physics & Mathematics
Share Embed Donate


Short Description

kjg yhn kjhygb hyhgbn...

Description

B. van der Veen

Introduction to the theory of operational research

INTRODUCTION TO THE THEORY OF OPERATIONAL RESEARCH

INTRODUCTION TO THE THEORY OF OPERATIONAL RESEARCH

B.

VAN DER

VEEN

SPRINGER-VERLAG BERLIN HEIDELBERG GMBH

Translated from Dutch by W.D. Hoeksma, O.R. Leader, Inveresk Paper Co. Ltd., London, England This book contains viii

+ 204

pages and 36 ilJustrations.

U.D.C. No. 65.012.122 Library of Congres Catalog Card Number : 67-16125

ISBN 978-3-662-42157-4 ISBN 978-3-662-42424-7 (eBook) DOI 10.1007/978-3-662-42424-7

© Springer-Verlag Berlin Heidelberg 1967 Originally published by N.V. Philips' Gloeilampenfabrieken, Eindhoven (The Netherlands) in 1967 Softcover reprint ofthe hardcover Ist edition 1967 AH rights reserved

~ PHILIPS Trademarks of N.V. Philips' Gloeilampenfabrieken

No representation or warranty is given that the matter treated in this book is free from patent rights; nothing herein should be interpreted as granting, by implication or otherwise, a Jicence under any patent rights.

PREFACE The scientist makes many abstractions. For example in physics, matter is sometimes considered to be continuous (elasticity theory), then again as a collection of perfectly elastic colliding marbles (kinetic gas theory), or as a wave phenomenon (quantum mechanics). The physicist creates an image or model of reality which is simple enough to be manageable yet detailed enough to describe the studied phenomenon with reasonable accuracy. Finding an appropriate model, or the approach to a given problem, is learnt by experience and intuition, and as a rule very little is said or written about this aspect of a science; practice makes perfect. This is where O.R. appears to differ: many writings on O.R. include, long philosophical dissertations about "What is a problem?", "What is the relationship between the model and reality?", "The building of models", etc. Perhaps this is due to the fact that O.R. is still a comparatively new science and that its practitioners come from many different disciplines: philosophers, physicists, economists, mathematicians, psychologists and engineers; these disciplines could be divided into a "verbal" group and an "algebraic" group. As the author counts himself with the second group this introduction to O.R. is devoid of philosophical discourses which would only be useful to readers who are already acquainted with the subject. When one considers O.R. as the research into the quantitative aspects of operations (transactions, projects, undertakings) then it comes as no surprise, considering the quantitative nature, that mathematics plays an important role in this science. For this reason it is assumed that the reader is acquainted with the rudiments of mathematical analysis. Because we are concerned with operations, the mathematical calculations must also be operationally interpreted and formulated. I hope that this book does justice to both aspects. The book is intended for everyone who wishes to acquire knowledge of O.R. and is prepared to exert the necessary concentration. To give the reader some practice and as a supplement to the main subject matter some forty problems are included. For those having difficulties with the rudiments of probability theory an appendix is added.

Vl

PREFACE

The word "theory" is used in the title because the vital skills of, firstly, how to acquire the necessary data and secondly, introducing the recommended new measures, have been ignored; it should be obvious that both require a wide range of abilities: a knowledge of statistics and a fair portion of tact being particularly useful assets. I am very grateful to Dr. W.F. Schalkwijk for his inspiring encouragement and to Prof. Jr. W. Monhemius for his willingness to critically read the manuscript. I owe particular thanks to my colleague Dipl. lng. H. Grunwald for all the discussions we had and his many useful criticisms. September 1966

The author

CONTENTS PREFACE

v

INTRODUCTION

1 2

Chapter I

Stochastic processes

Chapter II

Queueing problems Taxi problem Single counter (Kendall's method) Markov processes and queueing problems Multi-counter problem (Markov process) Unlimited number of counters S-counters with unlimited queue lengths Single counter with unlimited queue length Single counter with limited queue length . Single counter with possibility of increasing the service rate Centralization of counters .

Chapter III

Chapter IV

Chapter V

Stock, production and orders The dynamic nature of stock Optimum batch size . Re-order level and safety stock The gamma distribution . Gaussian or normal distribution. Safety stock when demand has a gamma or a normal distribution Number of orders and demand per order . Demand when lead time variable Control stock Stock control systems Industrial dynamics A system with two stock controllers Jay W. Forrester: Industrial dynamics Multi-stage decisions; dynamic programming (a stock control problem) . Summary of the iteration procedure employed

11 11

12 17 18 19 21

25 25 26 28 33 33 42 47 49 52 52 56 57 63 65 71 72

78 80

89

VIII

CONTENTS

Limiting case for large values of N; Markov process A different treatment of the limiting case (N --+ oo) The second iteration method (R.A. Howard's PolicyIteration Method) ; N --+ oo . . . . . . . . The optimum ordering policy compared with other possibilities . . . . . . . . . Chapter VI

Chapter VII

94 96

Allocation; linear programming . The Simplex method . . . . The dual problem . . . . . . Interpretation of the dual problem . Transportation technique; shipment problem

101 104

Game theory . . . . . . . . . . Finite, two-player, zero-sum games Sadd/epoint; value of the game . Dominance . . . . . . . . . . Mixed strategy . . . . . . . . Graphical method for 2 X M games The Main Theorem . The game of Morra.

131

Chapter VIII Network planning . . CPM . . . . . . . Network diagram; events Critical events and activities Note about the results achieved so far Planning of the project . . . . . Example : launching a new product Reducing the critical path . . . Activity duration and cost . . . Optimal duration of the project PERT . . . . . Progress control Chapter IX

90 92

O.R. and decisions Summary of the previous chapters What is an optimal decision ? . . Decision criteria . . . . . . . Making decisions when the risk is known. Making decisions when the risk is unknown.

112 116 120 131

133 134

135 137 139

143 145 145 146 149

151 152

153 154

157 159

160 161 162 162

166 167 168 170

CONTENTS

IX

APPENDIX Permutations and combinations . . Some concepts in probability theory Mathematical expectation . . . . Continuous or geometric probability

173 174 177 180

PROBLEMS

183

ANSWERS .

197

BIBLIOGRAPHY

200

INDEX . . . . .

201

INTRODUCTION Providing a complete definition of a given specialist science is not a simple matter and is rarely a necessity. We will therefore limit ourselves to a description which demarcates the field of O.R., leaving it to the reader to decide whether to interpret the letters O.R. as an abbreviation for "Operations Research", "Operational Research" or "the science of decisionmaking". In O.R., operations (transactions) such as, for example, the control of a stock, the transportation of goods, or the searching out and combatting of hostile elements, are studied with a view to making quantitative pronouncements about them in order to arrive at an optimal decision; i.e. a decision which, taking into account all the circumstances, can be considered the best one. For instance: on the one hand one wishes never to keep a customer waiting, on the other hand it is far too expensive to provide the degree of service which ensures that no customer ever has to wait. One then has to compare a number of factors, preferably quantitatively, in order to arrive at an appropriate model for the degree of service. Just as in physics one constructs a mathematical model whose solution is then sought. The model and the solution must naturally be proved in the actual situation in which they are to be applied. Thus the introduction and the maintenance of a new solution are also part of the O.R. man's duties. Usually one's attention is occupied by non-deterministic problems. For example one cannot be certain whether, and when, a customer will arrive and what he will ask for when he does. Thus probability theory plays an important role in this science. We therefore first give a short introduction to stochastic processes, whilst readers who are unacquainted with the rudiments of probability theory are referred to the Appendix.

CHAPTER I

STOCHASTIC PROCESSES

Doob writes: "A stochastic process is the mathematical abstraction of an empirical process whose development is governed by probabilistic laws". With stochastic processes, unlike deterministic ones, future events are not uniquely determined; statements can be made about the future but these statements are of a probabilistic nature. As an example we take the following problem which was already current in Laplace's time: N black and N white balls are divided between two jars so that each jar contains N balls. The process then consists of taking one ball randomly out of both jars and returning each to the other's jar. The state of the system is described by the number of black balls in the first jar. What are the transition probabilities of the different states? If the system is in the state Ek> k = 0, 1, 2, ... , N; then this means that the first jar contains k black balls and N- k white ones, whilst the second has N- k black and k white. It is possible for the system to remain in the same state when two balls are interchanged; this happens when either both balls are black or both are white. The probability of this happening is calculated as follows: First jar: probability of black k/N, probability of white (N -k)/N; Second jar: probability of white kfN, probability of black (N-k)/N. Therefore the probability of drawing a white ball from both jars is (N-k)k/N 2 , because each drawing is quite independent of the other. The probability of drawing two black balls is the same, so that the probability that the system remains in state Ek (or, to put it another way, that the transition E" ~ Ek takes place) is equal to:

Pkk =

2k(N-k)

Nz



{1)

Ek can be transformed to Ek+ 1 by drawing a white ball from the first jar and a black one out of the second one. The probability of this happening is: Pk,k+l

N-k) = (

N

2 •

(2)

1]

3

STOCHASTIC PROCESSES

Similarly the probability of transition Ek-+ Ek_ 1 : Pk,k-1

=

(~Y·

(3)

In this example the probabilities Pki are determined by the state in which the system exists (Ek) at a given moment and the nature of the possible next state (Ei). The probabilities Pki are independent of the states the system has passed through before reaching state Ek. Such a process is called a Markov process; being acquainted with all the previous states does not influence the calculation of the probability under consideration, Pki·

Note: The throwing of a die gives a series of completely independent states (here the state is characterised by the score that is thrown). The transition probabilities are not only independent of the previous history but also of the current state. The transition probabilities can be incorporated into a table (a matrix) where the first subscript (which indicates the row) refers to the state before the transition and the second subscript (which indicates the column) refers to the state after the transition; for our example:

= (Pu) =

P

c·~~~ ~~~

p.,

....

PNo



0

0

4

4(N-2)

Nz

(N;;2y

0

0

9

6(N-3)

0

0

Nz

0

0 •







:1

(N;;1y

0



PNN

Nz

2(N-1)



PN2

= 0

1



~~~ ... .... ~~~

0

1



....

PoN)

0

0

Nz

PN1

p.,

0

•••

Nz 0

•••••

0

Nz

••••••••••••••••••••

0

0

0

0

0

0

0

0

•••••

0

•••

0

•••••••

2(N-1)

1

Nz

Nz

1

0

4

[1

STOCHASTIC PROCESSES

There are many zero values in this matrix because these transitions are not possible. Of course this is not generally the case. However, we see that the sum of any row is 1. This always holds for a probability matrix because starting in state E 1 the system must transform to a state E1, i.e.

L Pti j

(4)

= 1

(summation over all values of j). A similar relationship does not generally hold for the columns; we should keep in mind thatp,1 is not the probability that being in state E1 the previous state was E 1• Moreover, it might be noted here that p 11 is also not the probability that the transition E 1 -+ E1 occurs. For p 11 is the probability that the next state will be E1 when the present state is E 1 (conditional probability). We will elaborate on this using the properties of the limiting distribution or steady state of a Markov process. In problems I-5, and I-6 the limiting distribution is formulated in a rather more precise fashion but for the system of the two jars the following will suffice. From whatever state the series. of transitions starts any of the N + 1 states Ek can be reached after a finite number ofsteps. When the system has not been observed during a large number of transitions, i.e. when the series of previous states is not known, one can ask what is the probability of reachtug state E1 after one more transition. In the steady state this will be a fixed probability which is independent of the last observed state. To calculate this probability we investigate the probability of finding the system in state E1 after n transitions. This is the probability that after the (n -1)'h step the state E 1 exists, multiplied by p 11 , summing over all possible values of i:

Now if a limiting distribution exists then the probability that the system is in state E1 is independent of the value of n,

and the above equation becomes (5)

Pi= LPtPii. I

For the example of the two jars this gives Pi=

( N-j+1) N

2

PJ-1

+

2j(N-j) N2

Pi+

(j+1)2

N

PJ+l'

1]

5

STOCHASTIC PROCESSES

where Pk

=0

holds for k > N and k < 0, whilst LPk k

= 1 (this must be

explicitly stated as a condition because the summation of equation (5) only gives the equality:

The equation of the steady state solution can be written as (j+ 1)2 PJ+t- (N-j) 2 PJ = i 2 P1- (N- j+ 1)2 P1-1·

If we refer to the right hand side of this equation as R1 then the following clearly holds:

As R 0

= O(p1_ 1 = 0 forj = 0), therefore R1+ 1 = 0, i.e. U+1)2 PJ+l -(N-j)2 PJ = 0

so that the following relationship holds PJ+t

j:t·)2

=(N

(6)

PJ •

This gives

_ (N-j+1. N-j+2

p1 -

j -1

j

...

N-1. N)2 2

1

Po '

which. can be written

where C~ = N !fj! (N-j) ! gives the number of combinations of N values takingj at a time. If we use the property that

then from the condition that the sum of the probabilities p1 is unity it follows that Po= 1/C~N• therefore PJ

= (C~) 2 /C~N·

(7)

For example: N = 4; using equation (7) we find

Po

1

= P4 = 70 ,

Pt

16

= P3 = 70 •

P2

36

= 70 ·

6

[1

STOCHASTIC PROCESSES

The problem is usually not tackled by finding a formula for the limiting probabilities pi, as in equation (7). Often one will solve the table of transition probabilities (5) directly, using the numerical values of these probabilities. The matrix of transition probabilities for N

P=

:\

= 4 is

0

1

0

0

1 16

6 16

9 16

0

0

4 16

8 16

4 16

0

0

9 16

6 16

1 16

0

0

1

0

\:

from which it can easily be seen that for the steady state solution (equation 5): 16po = P1 16p 1 = 16p0 + 6p 1 + 4p 2 16p2 = 9p1 + Spz + 9p3 16p3 = 4p 2 + 6p 3 + 16p4 l6p4 = P3 whilst

also holds. When dealing with the transition probabilities we mentioned what Pii is not. This will now be elaborated upon. 1. The probability that the transition Ei ~ Ei takes place in the steady state case is PiPii•being the probability that state Ei occurs times the probability that it is then followed by state Ei. The sum of these probabilities is unity of course, remembering that

2. The probability that being in Ei the previous state was Ei> can be calculated using the equation P(AB)

= P(A) • P(BIA) = P(B) ·

P(AIB),

(8)

1]

STOCHASTIC PROCESSES

7

which means that the probability that two events A and B both occur is given by the probability that A occurs times the probability that B occurs when it is given that A occurs (conditional probability), or by the probability that B occurs times the probability A occurs when it is given that B occurs. From equation (8) it follows that P(AJB)

=

P(A) · P(BJA) P(B)

(9)

so that the probability we wanted in the limiting case is given by PiPii!Pi• for event A is "the previous state is Ei," whilst the event B is "the present state is E/' Note: Equation (9) is an example of Bayes' Theorem.

As an example of a stochastic process we have dealt with a Markov process. We will now consider another example, namely the Poisson process. Suppose that an event G repeats itself after a time; G could be the arrival of a customer, the failure of a lamp, etc. Now let the probability that event G takes place in the short time At be ,1. At, independent of the number of times G has previously occurred; whilst At can be made so small that the probability of G occurring more than once in At is negligibly small. This is a Poisson process. Consider a period of time t +At. What is the probability that in this period G will occur a given number of times, n? These n occurrences can take place in two ways: 1. G happens n times in t and G does not occur in At. 2. G happens n -1 times in t and G does occur in At, so that or

In the limit At -+ 0, this becomes: (10)

For n = 0 the second way cannot occur, or, to put it another way, Pn-l is zero for n = 0, therefore: (11)

8

STOCHASTIC PROCESSES

[1

and using P 0 (0) 1 it follows that: P 0 (t) = e-u. The linear differential equation with constant coefficients and right hand side dPn ,p •p -+11. n=A. n-1•

dt

[equation (10)], can be solved by first putting the right hand side equal to zero, which gives Pn(t) = Cn e-.u and then considering Cn as a function of t (method of varying the constant). After substituting in (10) we get the equation dCn = A.Cn-1 '

dt

or

The constant of integration kn equals zero because of the condition Pn(O)

= 0 (n

~ 1).

Having previously found C0 = 1 therefore Cn = (A.t)"fn! so that Pn(t) = (A.t)" e-u, n!

(n;;;:: 0).

(12)

This equation gives the probability of the occurrence of n events in an interval of length t. Many queueing or stock problems can be treated by assuming that the arrival of customers or orders follow a Poisson distribution. The Poisson process can also play an important role in life expectancy when the termination of life does not follow slow deterioration but is caused by a chance event, the probability of such an occurrence being independent of the length of time the object has already existed (life of a wine glass). The life lengths then follow a negative exponential distribution, because the probability p(t) dt that the object at time zero, will have a life length between t and t + dt time units is P 0 (t)·A.dt, being the probability that in the interval 0 to t "nothing" happens, multiplied by the probability that the event (the end of the life) occurs in the small interval dt. From the above it follows that p(t) = A.e-u,

(13)

this function (the distribution density) gives the distribution of the interval between two events. Conversely one can investigate whether occurrences of certain events follow a Poisson process by checking if the intervals between two events follow a negative exponential distribution. The average value of the time to which we referred above as life length is

1]

9

STOCHASTIC PROCESSES

l=

J

1

oo

(14)

t·p(t)dt=:-· o A

This means that E = J.t events take place on average in time t. Equation (12) can now be interpreted as the probability of n events occurring when E were expected: (15) The following relationship holds for the variance of a stochastic variable: var (x) where E(x) that

= E(x-x) 2 = x 2 -x2 ,

(16)

= xis the expected value or the average of x. It directly follows Var (ax)

=

a2



Var (x).

For the negative-exponentially distributed interval t between two events (life length) we then find var (t) =

J oo

0

t 2 p(t) dt-

1

-;;z

A

1

= 2, ).

so that the following relationships exist var(t) = 12

var(t/l) = 1.

and

(18)

For n events which follow a Poisson distribution the variance is: var(n)

=

n,

(19)

(the expected number being ii) which is proved as follows (with E(n)

=

i.e.

oo

Ene-E

oo

= E):

Ene-E

L: cn-1) (n-1)! + n=t(n-1)! L: - n=l

(20)

10

STOCHASTIC PROCESSES

[1

Equations (20) and (16) together give equation (19). From the above it follows that the standard deviation, being the positive square root of the variance, is: a(t) = t

and

a(n) = .jfi.

(21)

The Poisson process can also be regarded as a Markov process. This can be done as follows: We identify the state at timet by the number of times ( == n) that G has occurred during the preceding time (0-+ t). During the next small interval Lit, the system can transfer to the staten+ 1 with a probability A.· Lit, it can also remain in the staten with a probability 1-A. · Lit. Other transitions are not possible. (The transition probabilities pii are zero for j < i or j > i+ 1.) We shall now concern ourselves with a number of specific stochastic processes, namely queueing problems and stock problems.

CHAPTER II

QUEUEING PROBLEMS

Because waiting plays an important part in our way of life an operational research study is appropriate. In this investigation we are interested in how queues are created, in queue lengths, waiting times, cutting waiting times, etc. Queues form in certain ways: Suppose we have a counter, it may be a "real".counter (e.g. post office), a doctor's waiting room, a lubrication bay, a factory or workshop, or a machine, etc. At this counter service is given when there are jobs which need service. The job may be the sale of a stamp, the examination of a patient, the greasing of a car or machining a component. Every job has its own time requirement. The jobs come in according to some arrival process. If the counter is busy then the jobs form a queue. A priority rule or queue discipline is now required because when the counter has finished with one job it has to be decided which job will then be commenced: it may be sensible to pick the one that will take the least time, or choose some other characteristic to determine the priority (a painter prefers to do outside work in the summer), it may be that the last arrival will be served next (automatic telephone exchange: no visible queue). Usually the priority rule will be: first come, first served. This is the rule we shall assume is being operated unless we state otherwise.

Taxi problem

Our first example is the taxi problem: At a taxi rank customers arrive according to a Poisson process with an average of A. customers per unit time. The taxis also arrive according to a Poisson process with an average of J1. taxis per unit time. We shall consider the queue positive if there are customers waiting and negative if there are taxis waiting. If the queue length initially is zero then after time t it will on average be: q(t) = A.t-Jl,t. For the case where A. = Jl., the average queue length will be zero. So then everything would be fine were it not for the fact that the variance of the

12

[2

QUEUEING PROBLEMS

queue length increases linearly with time, which can be proved as follows: If

E(q)

= q= 0

then var (q) = E(q 2 ). (See equation 1-16). Now if we call the number of customers and taxis that arrive k and a respectively then, because q = k...: a, the following equation holds: var (q) = E(k-a) 2

::::;

E(k 2 )

+ E(a 2 ) - 2E(a) · E(k),

(1)

where it is assumed that a and k are independent, i.e. E(ak) = E(a) · E(k). For a Poisson process

(equation 1-20) whilst in the case when A. = J.L we also have E(k) and E(k 2 ) = E(a 2 ), so that then it follows from equation (1) that var (q)

= 2E(k) = Ut.

=

E(a) (2)

Because the variance increases with time the probability that the queue length is between -q 1 and +q1 (where q1 is finite) tends to zero as t tends to infinity. This taxi problem can always crop up where two things have to be brought together (customers and taxis; articles and boxes; arrival and departure of goods (supply and demand)). Although on average everything is alright things can go badly adrift..

Single counter Our second example concerns the single counter with Poisson arrivals and a given (arbitrary) distribution of job lengths (Kendall's method; Journal of the Royal Statistical Society, B, XIII no. 2, 1951). By queue length we mean the number of customers (jobs) that are present; so in this case it is the number of customers that are waiting plus the customer who is being served. Consider the queue length at the moment the customer who was being served is just leaving because his job has been completed. Suppose he leaves k customers (k ;;;::: 0) behind and that at the moment the

2]

13

SINGLE COUNTER

next customer (Mr. Jones) leaves, k' customers are left behind, then it is apparent that k' = max(k-1, 0) +a,

where a is the number of customers that entered whilst Mr. Jones was being served. The equation can be written as k'=k-I+o+a,

where

ois a function of k:

!

(3)

0, when k # 0

0=

(4)

1, when k

=

0.

From definition (4) it follows that the expected value of o is equal to the probability that k = 0 and moreover

= J, (1- N) = e-Mp

I

n=N+l

(Affl)" n!

(19)

which can be evaluated, if necessary, using a cumulative Poisson table. The average number of occupied counters is

ii =

Loo

n=l

nP n

=

e-Mp •

which was also quite predictable.

(A/ t

L fl n=t(n-1)! oo

= -A. P

(20)

2]

21

MULTI-COUNTER PROBLEM

Note: Tables of the functions in equations (18) and (19) have been published; for example: "Poisson's Exponential Binomial Limit" by E.C. Molina, van Nostrand, New York (1947). As our second example we now choose the problem of S Counters with unlimited queue lengths Again assume A.,. = A.. For flrr we have; Jl11

Jln

= nJl for 0 ~ n ~ = SJl for n ~ S

S

Therefore:

= (A.fp.)" Po

P II

for

n.I

A)II-S ·P=

= P=P (p,S s+(n-s) II

s

O~n~S

(A./ )"

sn-·.Jl s! P

for

0

n~S.

(See figure 11-3.) P0 can again be determined by summing the probabilities:

p O

[I

n=O

(A.fp,)" n!

+

f

(J./p,)"

n=S+l sn-s.

S!

J

= 1.

(21)

The first sum on the left hand side of equation (21) can be looked up in tables, whilst the second sum becomes (pSl S5 I -·p -A. )" = 1-p S! s! n=S+l p,S oo

(

provided

A. p = p,S < 1;

where p is the utilization factor which is calculated as follows: Suppose that the unit of time is one hour; then the average number of arrivals per hour equals A. whilst the jobs have an average service time of l/Jl hours. Thus the average amount of work that arrives per hour would occupy one counter for A./Jl hours, whilst S counter-hours are available. The utilization factor can be defined as the ratio of the required number of counter-hours and the available number, so that this factor p, will here equal A./JlS.

22

[2

QUEUEING PROBLEMS In

"

..cu

181- f."-' f'---

\:

If t=

1 '\

16

uI

!\

~

v

(,\

12

-~~

\- "-"'-

\

'

1\'

I

II

!

't' !'--"",

0

f'

\\ \

'\0._

~.o 9 ··::.:.:

2/

Fig. 11-3

I

l\ 1\

8 6

~

I \ I .\ \

10

-

=u.tt

~~

"'"' "1/

~ ->:.--::

/ =4

2

6

'\

"'

-~

8

"... ~ 0

r--.;

-~

F=::,

12

' --

-- -

"

18 -n 16

f="

Probability that of S counters n are occupied, as a function of n; formula (22).

The second summation in equation (21) gives a finite result if p < 1; then P0 , P 1 , P 2 etc. do not equal zero. When p ~ 1 then P0 , and therefore Pn for every finite value of n, equals zero. Continuing:

= (pS)" p

p

nl

n

Pn

=

O~n~S

0'

ss

p" · - P 0 , n ~ S S!

(pS)s

p

P o[= - - · - + S! 1-p

Erlang's Equations.

(22)

s (pS)"]-1 L n=O n!

The probability that a newly arrived customer has to wait, being the probability that all counters are occupied, can easily be arrived at using these equations:

2]

23

MULTI-COUNTER PROBLEM

(23)

The average queue length (the average value of the total number of customers or jobs in the system) is:

=

E(n)

00

L

n · Pn,

n=1

which is summed in two parts: 1)

S

( S)n

L !!:_f!__po = P

n=1

2)

L oo

n=S+1

n!

0

pS

k=O k!

ss

np"- Po; now

S!

S)k

L _P_

S-1 (

L oo

= pS

L Pn

S-1 n=O

npn

n=S+1

= p -d

dp

so that the second sum becomes: (pS)s P

S!

oP

= pS(1-Pw),

L oo

pn

n=S+1

= p -d

1)

( S+ P_ ' dp 1-p

(s + _1_)·

1+

S(1-p) = P (1-p)2 p w

1-p

The above gives ii =

p(S+~) 1-p

(24)

Often we are interested in the problem of what the average queue length is when all counters are occupied: E(nln ~ S)

=

L n · P{queue = n=S

=

L 11. Pw = s. -· +- L n. Pn = s + __!!___, Pw Pwn=S+1 1-p

00

00

p

p

nln ~ S}

1

(25) 00

_n

n=S

where we have used the result from 2) above and the property that P.fPw =1-p.

So in this case S jobs are receiving service whilst there is still an average queue of length p/(1- p).lf all the counters are occupied then the probability that a job will be finished during the short interval dt is equal to SJLdt, so that as far as the queue is concerned we can consider the S counters as a single counter which works at S times the speed and therefore has an average

24

[2

QUEUEING PROBLEMS

service time of 1/(p,S). The average waiting time for the jobs that are waiting is then iii'

= _1_ _!__ = 1-p flS

_!!_.

1-p

!,

(26)

A.

because for a "single counter" equation (25) gives

E(n!n

~ 1) = 1 + _!!_

1-p

1- . 1-p

(27)

= -

For all jobs the average waiting time will be iii = Pw · iii'

+ (1- Pw) 0 =

Pw · iii'

=

pPw 2(1-p)

(28)

We will now consider some more examples concerning the single counter problem (see also figure II-4).

10

Pnt in%1 7.5

5

2.5

R

\~ 1\ 1\.'\" ~ ~I ~\ '\

""'

l\!'--I I I

0

5

10

15

.....

~t-20 25 30

-n

35

Fig. 11-4 Pn as a function of n for a single counter; /..fp, = 0.95. I with unlimited queue length; formula (29), II with increased service rate when n > 15; f3 = 1,2; formula (33), III with limited queue length: N = 15; formula (30).

2]

25

MULTI-COUNTER PROBLEM

Single counter with unlimited queue length

If the value 1 is substituted for S in the S counters problem, we obtain P0

= 1-p,

Pw = p,

(29) ii = _!!_ 1-p

1 E(nln ~ 1) = - . 1-p

'

Some of these equations were already discussed when Kendall's method was referred to. Single counter with limited queue length

Suppose that the system can hold a maximum of N customers: one customer at the counter and N -I customers queueing; thus the maximum queue-length is N. Customers who arrive when the queue is "full" go away immediately. We can consider this as a case of impatient customers. Then:

An= A for 0 An= 0 for for

Jln = Jl

~

n;):

n< N N

0 < n ~ N,

(Jlo = 0)

Substituting these values in equation (17): for Again from the condition

for

L Pn n

n > N.

(30)

= 1 we obtain: 1-p

Po = 1 -p N+l'

(31)

where p = Aj Jl· The condition p < 1 is not necessary here; the utilization factor of the counter in this case is not p but 1 - P 0 • The average queue length is ·-

p

11---

- 1- p

1-pN · (N-pN+1) 1 - PN + 1 •

·--=-~

(32)

The probability of an arriving customer finding a full queue and returning home without receiving service, or taking his job elsewhere, is of course PN.

26

[2

QUEUEING PROBLEMS

Single counter with possibility of increasing the service rate (unlimited queue length)

Consider the case where the following rule is used to sometimes speed the rate of service in order to limit the waiting times: If the queue length exceeds N then the counter increases its rate of working by a factor of p. Thus

An= A,

ILn

0

for n=O

Jl

for 0 < n

P11 (For p = 1, or N ter.)

=

N

~

for n>N,

with

p ~ 1.

oo we again have the case of the "ordinary" single coun-

It then follows that:

for

0

~

n

~

N,

(33)

p . · PN = (A)" p pn~N

A, )n-N

pn = p(n-N)+N = ( PI-' Then, by summation p0[

LN (A)" - + Loo

n=O f.'

n=N+1

(

for

J

-A )" pN PI-'

n>N.

= 1'

i.e. Po= [ with p =

1- PN + 1 1-p

PN + 1]- 1

+ -P-p

(1-p)(p-p) (p-p) _ (p-l)pN+1

=

(34)

~ < p.

f.'

The probability of the faster service rate being required is P(n > N) =

L 00

n=N+1

Pn = -

p

P-p

PN+1

· PN =--·Po,

P-p

(35)

being the probability that the queue length exceeds N. Comparison of this probability with the probability for the case when the service rate is always constants, gives

2]

27

MULTI-COUNTER PROBLEM

P(n > Nl/3 ~ 1) = _1-_p . P0 = ~ P(n>Nif3=1) /3-p P 0 (f3=1) /3-p

(36)

If the service rate can be increased by 10% (f3 = 1.1) when the queue length exceeds 150 (N = 150) and if, for example, p = 0.99, then the above ratio equals 0.11: the long queues are much rarer. Again the average queue length is found using n = "f.nPn:

n=

Po

n

N

I

n=O

np"

oo

+ Pof3N I

n=N+l

nptn

d~ n P/3N'd = P oPL.. P + o P -, dp n=O

~ L..

dp n=N+ 1

Ptn

d (1-pN+l) +P /3 N pd- (p'N+l) = P 0 p-0 1

dp

1- p

dp'

= ~{1-pN(N-pN+1)}+ (1-p)2

1 - p'

Pof3Np' p'N(N-p'N+1) (1-p')2 '

thus ii

= PoP 2 (1-p)

-

P 0 pN{~ (N- pN + 1)(1-p)

p' 2 (N- p'N + 1)}, (37) (1- p')

where p' = pff3. As stated above the condition p < f3 holds for the varying service rate case and therefore p' < 1. It is, therefore, not necessary for p to be smaller than 1 to obtain a limiting solution. If, as in equation (36), we compare two situations with the same p but with different values of f3 then of course, p must be smaller than the smaller f3 so that both cases are limiting (in the case of equation (36) this means the condition: p < 1). Consider again the situation where p very nearly equals 1 so that faster working becomes essential if one does not want to continually face enormous waiting times. In that case if f3 is large enough f3- p will approximately equal f3 -1 so that equation (34) becomes 1-p Po ~ 1-pN+l

(38)

which is independent of f3. Given a certain fixed p and f3 the above relationship becomes less and less approximate as N increases; the term (/3- 1) in the denominator of expression (34) loses importance with increasing N (if p < 1).

28

[2

QUEUEING PROBLEMS

Example

approximate

exact N = N= N= (N =

15 30 50 oo

P0 P0 P0 P0

= = = =

8.9% 6.3% p = 0.95 5.4% p = 1.2 5.0%),

7.7% 6.0% 5.3% 5.0%

Note that the approximate formula for P0 is identical to the one for the limited queue length situation,equation(31). This approximation corresponds to neglecting the possibility of increasing the service rate in the evaluation of P0 • The difference v between ii in the "faster working rate" situation and ii in the "limited queue length" situation is v=P0 pN.

p'

~1-p')

2

(N-p'N+1).

Example

p = 0.95

and

p = 1.2;

p' = 0.79 and N

v ~ P0pN · 18(1-0.2N)

= 15: v ~ 3

N=30:v~2 N=50:v~l

(N

= oo: v = 0).

Working at a faster rate can thus be considered as the shortening of long queues without having to send customers away. A problem which now merits our attention is Centralization of counters

Consider three separate single ·counter systems, all with unlimited queue lengths and the same A. and Jl. Suppose that the lengths of the queues are 5, 3 and 7 respectively. The probability of this is: P

= P5 • P3 • P7 =

p 5 P0



p 3 P0



p7



P0

= p 15 P 0 3 , with P 0 = 1-p.

In total 15 customers are present in the three systems. They could, of course, be distributed between the systems in different ways from the above. For

2]

29

MULTI-COUNTER PROBLEM

instance the queue lengths could be 8, 4 and 3 respectively. This combination has the same probability, namely p

= Pa. p4. p3 = ps Po. p4 Po. p3 Po = pls Po3.

The number of combinations is calculated as follows: A total of n customers can be distributed by making the queue length at the first counter, R 1 = j(j = 0, 1, 2 ... , n); the 2nd counter, R 2 = k(j+k = 0, 1, 2 ... , n); the 3rd counter, R 3 = n-(j+k). If we fix R 1 = j then there are still (n- j+ 1) possibilities for R2 = k. When R 1 and R 2 are chosen R 3 is automatically fixed. The total number of possibilities is therefore: n

L

j=O

(n-j+1) = (n+1) + n + (n-1) + ... + 2+1 = Hn+1)(n+2).

Every one of these possibilities has the same probability p"P0 3 • Therefore the probability of finding a total of n customers is:

p: = p"(l-p)

3

(n+1)(n+2). 2

(39)

The probabilities summed over n must be equal to 1; for

L 00

n=O

(n+1)(n+2)p" =

d2 00 2) 2 L pn+2 = -d22 ( _p__ = --3, dp n=O dp 1-p (1-p)

-2

so that

* L Pn = n=O 00

1.

On average, of course, the total number of customers that are present is

-* = -3p- .

1l

(40)

1-p

because here we have three single counter systems, for each of which equation (29) holds; equation (40) can also be derived directly from equation (39), for

ii

*= L 00

n=O

* = (1- p)3 L

nPn

00

2

n=O

n(n+l)(n+2)p"

= (1-p) 3 p~ 2

f

dp 3 n=O

pn+2 = _lp_ 1-p

30

[2

QUEUEING PROBLEMS Pn in"-'

f il-----~--,-----,----.-------r--.---.-----.-----r-~

:\1

I I

: I

' I I

3·~:--1~~-+--~--+-~~-+--~--+-~

\

/

o

ro

--1--r-

20

30

40

so ,,

10 li

Fig. 11-5 Centralization of counters; p = 0.95. Probability that a total of n customers are present. P;: three separate single counter systems; formula (39), P~: one counter that works three times as quickly, formula (41), P~: three adjoining counters with one common queue, formula (43).

Now it is also possible to send all the customers to one counter that works three times as quickly and therefore, has a utilization factor equal to p' = 32f3Jl = p. The probability that the single system contains n customers is then (see equation 29),

(41) whilst the average queue length is

n' =

__!!_

1-p

(42)

In conclusion we can consider three adjoining counters with one common queue; see equation (22) with S = 3. The utilization factor is again

2" t-t" s

32

p" = --- = - - = p' ft. 3

and also P()

1-p

2]

31

MULTI-COUNTER PROBLEM

!0.8

P.

0.91 P~~ .95

I

J

\

2

\

\

\

1\

\\ 0

"" "'

""

10

\

20

t--

30

1'---L

40

50

60

70

80

n-

90

Fig. 11-6 Centralization of counters. Relationship P~f!P as a function of n, formula (45).

P'l = 3pP0, _, n

= -3p- .

PZ = ~p"P'O 1+p-tp2

1-p 1+2p+~p 2

(43)

(n ~2).

1-t(1-p)2 = -p- . -----=-'---.:.....:.---

(44)

1-p 1-.lf(l-p) + t(1-p) 2

ii" is written as a function of (1- p) to show clearly that when p value ii" tends to ii' = p/1-p.

--+

1 the

E.g.p = 0.95 ii* = 57,

ii' = 19,

ii" = 20.

In this case ii" is nearly equal to ii'; this means the three counters with one common queue can be considered as one counter that works three times as quickly. The differences occur mainly in the probabilities P~ and P: for small values of n' (see figure 11-5).

32

QUEUEING PROBLEMS

[2

Furthermore we see that replacing three counters by one counter which works at three times the rate reduces the average total number of customers present by a factor of 3. The occurrence of long queues is much rarer, as can be seen from

P'

p:

~

2 = -------=------2

(1-p) (n+1)(n+2)'

which tends to zero as ii--+ oo. See also figure II-6.

(45)

CHAPTER III

STOCK, PRODUCTION AND ORDERS The function of stocks can be dealt with very briefly. Stocks are necessary to cope with fluctuations in supply and demand. If the supply stops or is temporarily inadequate then all, or part, of the demand is satisfied from stock; on the other hand if demand is temporarily low then the superfluous production is used to build up the stock. The above not only describes the function but also the creation of stocks. By considering the stock as a queue of goods one can bridge the gap between the last chapter and this one; what were called jobs are now goods, whilst the counter is now called a store. There are, however, differences that are deeper than differences in names. In queueing problems the arrival process is usually determined outside the system, whilst the departures are governed by the counters; with stocks it is usually the other way round: the storekeeper watches the stock level to see whether it is getting too low and if extra production is required or if an order should be placed. Production control (or the placing of orders) and stock control are very closely related. In this chapter special attention is paid to this relationship. First we shall consider a continuous ru1e for controlling the supply of goods and then different kinds of discontinuous rules. (In practice a "continuous" rule is often a discontinuous rule with small steps.)

The dynamic nature of stock

Suppose that the production is a function of time, p(t), whilst sales are s(t). The "dimension" of these functions is goods-per-unit-time. The integrals of these functions are the total quantity of goods produced and sold respectively; the difference between these is the stock, to which we add an initial stock of i 0 : I(t) =

f~ {p(r)- s(r)} dr + i0 •

Because in this equation only the difference between p and s (and not p or

34

STOCK, PRODUCTION AND ORDERS

[3

s by themselves) appears, one can add or subtract the same quantity to or from each one without altering the value of the equation; i.e. we can consider p and s as the variable portion of the production and the sales with respect to a given level p 0 = s0 (for instance the average production which equals the average sales). p and s can be negative or positive. We can also write the stock as: I(t)

=

i0

-

J~ {s(r)- p(r)}dr =

i0

-

v(t),

(1)

where we call the integral on the right hand side(= v(t)) the stock shortage (w.r.t. stock level i0 ). Our imaginary factory will now react to this shortage as follows: one sets a production rate p(t) proportional to v(t); i.e. p(t) =

IX·

v(t).

Thus one produces a little more (w.r.t. p 0 ) when the shortage is positive and a little less (p(t) < 0) when the shortage is negative (i.e. when there is too much stock):

p(t) =

IXV(t)

=

IX

t{

s(r) - p(r)} dr.

(2)

By differentiation it follows that

dp = IX{s(t)- p(t)}, dt from which it can be seen that with the rule adopted here the rate at which the production changes is directly proportional to the current difference between sales and production. From the equation it follows that:

dp dt

+ 1Xp =

IXS.

(3)

To obtain a solution to this differential equation the method of changing the constant is again applied, putting the right hand side equation to zero we obtain the homogeneous equation:

dp+1Xp=0 dt ' which gives p(t) = ce-at. This solution is substituted in differential equation (3) where the constant

3]

35

THE DYNAMIC NATURE OF STOCK

of integration, C, is considered as a function of t; thus one obtains the equation:

e -~rdC ~- = rxs dt ' from which by integration it follows that (with C(O)

C(t) = rx

J>(r) eafd-r.

=

p(O)

=

0) (4)

Production as a function of time is therefore (5)

We shall give some examples. Suppose that at timet = 0 the production rate is p 0 , the sales rate s0 and the stock i 0 and that now the sales rate suddenly rises by an amount k to subsequently settle (at least for the moment) at the new level s0 +k. How does this step effect the production and the stock? From s(t) = k for t > 0 it follows that:

C

= rxk f~ e"'fd'l' =

k(e"'t- 1),

so that

p(t) = k(l-e-"'t).

(6)

From this it can be seen that for large values oft the production, p (t), again equals the sales, s(t) = k, which was the original intention. The stock shortage, v(t)

= ! · p(t) = ~ (1-e-at), rx

rx

(7)

so that for large values oft there is a considerable stock shortage of magnitude kfrx. The functions p(t) and v(t) are plotted in figure III-I: see the curves where f3 = 0. As a second example we choose the situation where the sales increase linearly from time t = 0 onwards; s(t) = kt fort > 0. From equation (4) it follows that

so that the production,

36

[3

STOCK, PRODUCTION AND ORDERS

v(t}

..

k

"i OJk 0

/'

-OJk

~

' ........I-'"

h

1.5k

I

~l

\

=u:>

v

4_

""\.

····~ r \.. L.

IJ

II.

....

n.u

r-- ..:..:.:..:.:.

~"

t

I V/

D.5k

L--

p tJ=• (t}+l. /~('( dT

I /.- y

k

II•• ······

/

..... ""'

113

L ~""'--..

~

······ .. ~

-

/t•C

1.5-t

1.0

0

Fig. Ill-1 Changes in the production rate and the stock shortage as a result of a step in the sales rate; formulae (6), (7), (23), (24), (25).

p(t)

= kt- ~(1-e-a'). rx

(8)

See figure III-2 (when f3 = 0). When tis large enoughp{t) will be an amount kfrx lower than s(t) = kt; the stock shortage will then continually increase: v(t) =

! · p(t) rx

=

~ · t- ~. rx

rx 2

(9)

To return to our first example: we saw that a single step gives a constant stock shortage of k(rx; the stock has now changed from its initial value of i0 to i0 - k(rx. This makes the stock controller unhappy. He would like to see the stock level return to its original value. Only changingp(t) = rx · v(t) will not be enough. We now introduce the "number of shortage days", being the integral of v(t): this is the average stock shortage multiplied by the

3]

37

THE DYNAMIC NATURE OF STOCK

. 0), then the whole differential equation reduces to (13)

Here it may be remarked that in the special case where a 1 a 2 = 4/3, the solution becomes p(t) = (Ct+D)e-at/ 2

a2 , i.e. when

+ k.

From equation (10) we get fort = +0: p( +0)

=

= a· v( +0)

p'( +0) = a{s( +0)- p( +0)} + f3v( +0),

(14)

I

(15)

wherep' indicates dpfdt. With the assumption that v( +0) = 0 ands( +O)=k, the initial conditions for equation (11) become; p(+O)=O, p'(+O)=ak.

(16)

With these conditions the constants of integration from equations (13) and (14) can be calculated. In the case where the two roots, a 1 and a2 , are not equal, i.e. when 2 a -# 4/3, it follows from (13) and (16) that

t

Knowing the production rate the stock shortage is easily calculated: v(t) =

J:

{s('r)- p(r)} dr = -

(Ae"''+ Be02')dr.

The following relationships follow from equations (12) and (17):

(18)

3]

THE DYNAMIC NATURE OF STOCK

A

-k

B

a1

Ja?-4p'

az -

39

k

Ja -4P 2

Then v(t) can be written:

v(t)

k

=

-Ja -4P

(ea,t- ea2t).

. (19)

2

In the special case of equal roots, a 1 that

C=~k 2

= a 2 , it follows from (14) and (16) (20)

D= - k .

'

Then the production, (21) and the stock shortage,

v(t) = -

J~ (Cr+D)e-a•12 dr =

kte-at/Z.

(22)

We will now give three examples illustrating the above: 4p. For simplicity choose a = 4 and p = 3. From equation (17) it follows that A = k/2 and B = - 3k(2, so that equations (13) and (19) become

1. a2 >

(23)

2. a 2 = 4p. Choose a = 4 and (21) and (22) that:

3. a 2 <

p=

4. It follows immediately from equations

p(t)

=

k(1-e- 21 + 2te- 21),

v(t)

=

kte- 21 •

4p. Choose a =

I

4 and f3 = 125. Equation (17) gives:

A=2-l1ik B= -2-llik 22i ' 22i ' where i is defined by i 2

= -1. Using the well-known relationship eix

=

cos x

+ i · sin x,

(24)

40

[3

STOCK, PRODUCTION AND ORDERS

it follows from equations (13) and (19) that

p(t) =

k{1-e- t(cos llt- : 1 sin llt)}, 2

(25)

v(t) =

~·e- 2 tsin11t 11

Note: cos llt- _3_ sin llt = 11

.J125 ·(__!.!:__ cos llt - - 2 - sin llt) 11 Jill Jill

= 1.016 · cos(llt+qJ),

with

qJ =

arcsin - 2 - = 0.18 rad

Jill

In the three examples the production rate tends to equal the sales rate, s(t) = k, whilst the stock shortage tends to zero, when t is large. Both effects were intended when the rule was formulated. In figure III-1 p(t) and v(t) are plotted for the given cases and for p = 0, ex = 4 (see equations (6) and (7)). Using terms from physics our three examples can be called examples of under damping, critical damping and oscillatory damping respectively.

Note: Undamped oscillations occur when ex = 0 and p > 0; equation (17) then gives A = B = -k/2, so that (13) and (19) become

p(t) = k{1-cos(t.Jp)}

'l

(26)

v(t) = _!_ · sin(t.jP).

JP

Oscillations are undesirable in a production process. The tendency for them to occur is obvious. The sales rate suddenly goes up by k; the production rate cannot be stepped up instantaneously, which means the stock shortage grows. To replenish the stock p(t) must then increase by more than k: then part of the production can be put into stock. If there is too little damping in the system the production is increased too much (up to 2k in equation (26)) so that when the stock shortage has been overcome we still have a production rate which is very high and instead of a shortage we are faced with an excess. By the time the production does fall again to

3]

41

THE DYNAMIC NATURE OF STOCK

the desired level (p(t) = k), the excess has grown to such an extent that the production has to be decreased even more, and so on and so on. In order to avoid all oscillations one should have 1X 2 ;;::: 4/3: then the production overshoots level k once and thereafter approaches the final level from above. In the numerical examples IX was kept constant and f3 was varied; this caused all cases to have the same initial conditions (16). From figure 111-1 it can then be seen that with critical damping the stock shortage settles at zero sooner than with under-damping. Thus if one wishes to ayoid oscillations whilst still reacting quickly then f3 should be chosen so that f3 = 1X 2 /4. By having a large IX one quickly reaches the desired state, but, of course IX cannot be arbitrarily fixed at some large value because the speed with which the production can react is naturally limited. Note: In "Notes on Operations Research; 1959", R.A. Howard treats this problem by using Laplace transforms. These transforms are very useful in the study of stock control systems but will not be discussed here.

Suppose that we choose the critically damped rule described above (with IX 2 = 4/3). We now wish to know what the effect would be of a linearly increasing sales rate. With s(t) = k · t for t > 0, the differential equation (11) becomes d 2 p +IX dp + f3p dt dt 2

= IXk + f3kt

(i > 0).

(27)

With v( +0) = s( +0) = 0 the initial condition (15) becomes: p( +0) = 0,

p'( +0) = 0.

The general solution of equation (27) is p(t) = (Ct+D)e-«t/ 2

+ kt.

Substitution of condition (28) gives p(t)

= kt(l-e-«tf 2 ),

v(t)= J~{s(r)-p('r)}dr= :~{1-(l+~t)e-«t/ 2 }.

(28)

l

(29)

Production and stock shortage are plotted in figure 111-2 for the values IX= f3 = 4.

42

STOCK, PRODUCTION AND ORDERS

[3

As stated earlier, the [3 = 0 curve in the diagram relates to equations (8) and (9) with rx = 4 and [3 = 0. In conclusion the reader is referred to the Chapter entitled "Industrial Dynamics" where the problems raised above are discussed more fully. Note: By substituting r = rxt/4, and multiplying through by 16/rx 2 , differential equation (11) becomes: d2 p dp ds - +4-+4yp = 4-+4ys, dr 2 dr dr

(y = 4[3frx 2 ).

y being the only parameter in this equation means that for the function p(r) only the value of the term y = 4[3frx 2 is important. Therefore in figures III -1 and III-2 the curves for which rx = 4 and [3 = 0, 3, 4 or 125 are valid for all cases where y = 0, !, 1 or 125/4 respectively, if along the horizontal axis one reads r( = rxt/4) in place oft.

Optimum batch size

In our example we considered a factory with a variable production rate. We were particularly interested in the relationship between sales, production and stock. It was implicitly assumed that the factory concerned makes only one item. Suppose that a factory has to fulfill a regular demand for a given item which is produced using a machine or group of machines. If the production of this item occupies only a fraction of the machine's time then the problem of discontinuous production arises. At given times a batch of the items is made. We will now investigate the optimum size for such a batch. Let the total annual demand for the product beD with the demand per unit time (e.g. one day) more or less constant. It is decided to make n batches per year; the batch size being Q = Dfn. We suppose that occasional stock-outs will be tolerated. Orders received during stock-outs are fulfilled when another batch has been produced. The stock can therefore be negative. We consider the following costs: 1. Stock holding cost per unit, per year: I (stock positive). 2. Stock-out cost per unit, per year: S (stock negative).

3]

43

OPTIMUM BATCH SIZE

3. Changeover costs, incurred in setting up the machines to make the given article, per batch: F.

The stock is shown as a function of time in figure III-3. Each cycle the stock is negative for a timet- t'. Then, when a batch of size Q is delivered,

I I I

I

a: : I

Q'l

I

I I I

time

t'

Fig. 111-3

The stock as a function of time; formula (30).

a quantity Q- Q' is immediately used for satisfying outstanding orders so that a positive stock Q' remains. From the diagram it follows that

t'

Q'

- = Q'

Q-Q' Q

t-t'

--=--

(30)

The average stock during time t' is Q' /2. Per year there is a positive stock for a fraction t'/t of the time, so that the stock holding cost per year is

t' Q' Q'2 K 1 =-·--I = - I . t 2 2Q

(31)

Similarly the annual stock-out cost is

t-t' Q-Q'

K 2 =--·--S= t 2

(Q-Q') 2 S. 2Q

The number of batches produced per year is over cost per year is K3

(32)

D/ Q; therefore the total change-

D·F

= --. Q

(33)

Thus the total of the above annual costs is Q'z K=-1 2Q

+

(Q-Q')z 2Q

DF S+-. Q

(34)

44

STOCK, PRODUCTION AND ORDERS

[3

The problem is to fix Q and Q' so that the total annual cost is minimized. These costs are minimized when the following conditions are fulfilled:

aK =

aQ

0

oK

and

8Q'

=

o.

(35)

It is obvious that there are more costs than the three considered above.

For instance the cost of materials has not been mentioned. However, we assume that all the costs not named above are dependent on the total annual demand D and are not affected by the size of Q and Q'. They can be added as fixed costs to the right hand side of equation (34), but due to (35) they do not affect the choice of the optimum values for Q and Q'. Applying conditions (35) to equation (34) gives 0 = - IQ' 2

+ S(Q- Q')(Q+ Q')- 2DF,

0 = IQ'- (Q- Q')S. The latter equation becomes

_g_ = I+S

(36)

s

Q'

whilst the two equations combined give Q·Q' = 2DF_ I

(37)

From equations (36) and (37) it follows that

Q = J2DF. I+S I

S

'

Q'

= J2DF. _s__ I

I +S

In the special case where negative stocks are not possible Q putting it another way, S = oo. Equation (3) then becomes

Q = Q'

=f¥,

(38)

Q' or,

(39)

which is the formula developed by Harris in 1915 and Camp in 1922. In this case cost-equation (34) is K

1

= lQJ +

DF

Q'

3]

45

OPTIMUM BATCH SIZE

which, by differentiation, not only gives us result (39) directly, but also relationship

which means that when S = oo, the optimum batch size is determined by the point where the annual stock holding cost equals the annual changeover cost. See figure III-4. Cost

1 \

\

\

\

''

''

' ........

- - ---

K=total cost I

'-.

:

__ - - Stock holding cos f

----I . . . . . . . . . . . . . __ l --- ..... -~--

:

-- -

Change over cost

t

--Batch size Q

Fig. 111-4 Cost as a function of the batch size, when S

=

oo.

In the general case where S has a finite value, the minimum costs are found by substituting relationships (36) and (37) in equations (31), (32) and (33):

Q12 QI S K 1 =-I=-·-2Q 2 I+S 1

K = (Q- Ql)2 s = (1 - Ql)2 . SQ = (-I-)2 (I+ S) Q = Q I . _I_, 2 2Q Q 2 I +S 2 2 I+ S I

I

DF IQ K3 = - = - - . Q 2 1

We see that the optimum value is reached when the sum of the annual

46

STOCK, PRODUCTION AND ORDERS

[3

stock holding and out of stock costs equals the annual changeover cost. For all cases, therefore, the minimum cost is K = IQ' = 2 ~F = 2(K 1 +K 2 ) = 2K3,

(40)

where Q and Q' are defined in equation (38), so that

K = J2DF_E_

l+S'

(41)

from which it can be seen that with a finite S costs are lower than with an infinitely large S. In general it will be difficult to evaluate S. Often the answer to the question "What does going out of stock cost"? is not easily found. The same sometimes applies to stock holding and changeover costs. For instance we may be trying to give customers a fixed delivery time (or lead time: defined as the interval between placing an order and receiving the delivery). When our stock is positive and we receive an order the required quantity is despatched straightaway, by, for instance, ship. However, if our stock is negative when the order is received then there is a delay before it can be fulfilled. In order to still get the delivery to the customer in time special action has to be taken: "express delivery" may require a lot of telephone calls and expensive air transport etc. These extra costs incurred over and above the normal despatch costs can then be used to calculate the out of stock cost, S. We can also introduce another parameter: the degree of service, p, here defined as the fraction of the time that the stock is· positive and demand can be immediately satisfied. Thus P = t' /t and using equations (30) and (36) the optimum p is found to be:

s P=-. l+S

(42)

As a function of p the costs are:

= C · PJ/3 K 2 = C · (1-fJ) .J/3

K1

K3

=

K4

=

J/J 2C · J/J C·

(43)

3]

RE-ORDER LEVEL AND SAFETY STOCK

v

2C

c ,vo;.1m t.SC

o.sc

0

I

KJDiJ =CI/I =Kt4 K]+ 3

v

/

I

0

I

I

rr L

/

KJ: Kt+K

/

v

I

r1 v

~

/' ~?

/

Q2

47

IU

0.6

If=_§_

1+5

""'

0.8

LO

sloo

Fig. 111-5 Cost as a function of the degree of service, {3, with optimal batch size; formula (43).

In figure III-5 these costs are plotted as a function of /3. When f3 is larger than about 0.75 the plot of K is practically a straight line, which one would expect when one considers that for small values of 1-/3:

.J/3 ~ 1 -

Hl- /3),

so that

K = 2C.J{3 ~ (1+f3)C. When f3 > 0.75 then S > 31. In this area f3 is relatively insensitive to changes in S. Thus: When S = 3 /then f3 = 0.75 and K = 1.75 C When S = 9 !then f3 = 0.90 and K = 1.90 C When S = 19lthen f3 = 0.95 and K = 1.95 C When S = oo then f3 = 1.00 and K = 2.00 C

Re-order level and safety stock If the stock controller is not in charge of the production process then he has

48

STOCK, PRODUCTION AND ORDERS

[3

to periodically replenish his ever decreasing stock by placing orders. He is faced with the problem of when he should place an order and how large his order should be. For the moment we shall concern ourselves with the first part of his problem. Let the re-order level, B, be the magnitude of the stock when it is necessary to place an order to replenish the stock. B will in general be larger than zero because the ordered quantity will not immediately be available as its delivery will be delayed for a lead time, L, so that for that length of time the demand will still have to be satisfied from the remaining stock. If Land a, the demand per unit time, are both known then it is simple to fix B so that the stock will never become negative: B = aL. Difficulties occur because the magnitudes of a and L are not accurately known beforehand. Let us assume for the moment that L is known. Now let B equal L · a, where a is the average demand per unit time, then the stock will become negative even when the demand during the time L is only a bit higher than its average value. If the article is needed in a production process, or if for some other reason a negative stock is undesirable, this situation would be very annoying. Therefore, one chooses a re-order level which is V(O!) higher than is required to meet the average demand:

B = L·

a+ V(1X).

(44)

The V(1X) portion is called the safety stock, it is the average size of the stock at the moment the delivery is received. V is a function of IX, the probability of going out of stock. The safety stock is fixed using an acceptable value of IX. The larger Vis the lower IX becomes (as long as IX > 0). Thus on average the stock falls linearly during the lead time L from an initial value of La + V(IX) to V(IX); see also figure III-6. Note that for the moment we assume there is no overlapping; i.e. the next order is placed when the delivery from the previous order has already arrived. This in fact, means that we are assuming the lead time is shorter than the interval between two consecutive deliveries, which is achieved by making the orders sufficiently large. We will return to this question of overlapping when we come to the concept of control stock. We now wish to consider the function V(IX) more fully, particularly for the common case where the demand during the lead time has a gamma distribution. However, we will first discuss the gamma distribution.

3]

49

RE-ORDER LEVEL AND SAFETY STOCK

__a'!_~f!!Je demand La

V("'

t Order placed

+

Delivery received

Fig. 111-6 The stock as a function of time after an order has been placed; formula (44).

The gamma distribution

This distribution can be derived from the Poisson process. In Chapter I, equation (12), we saw that, if the probability of an event occurring in a small time interval is A.· dt, then the probability of n events occurring in time t (when, of course, we expect A.t) is

The interval between two events then has a negative exponential distribution. The probability that the sum of n of these intervals ("life lengths") lies between t and t +dt is

P _ (t) · A.dt = A.(}.t)"- 1 e-Mdt n

(n-1)!

1

'

which, of course, means that n-1 events occur in the time 0 to t and one event occurs in the subsequent small time dt. A quantity (such as the sum of n neg. exp. distributed life lengths) which is distributed according to the function

p

( t)

=A.(A.t)n-1 e-M (n-1)!

'

(45)

50

STOCK, PRODUCTION AND ORDERS

(3

is said to have a gamma distribution. Because p(t) is a distribution density n need no longer be an integer. The only requirement is that p(t) is a nonnegative function whose integral over all possible values (in this case from 0 to oo) is unity. Now for every n > 0:

where F(n) is the gamma function.

Note:

By partial integration it can be shown that r(n+1)

=

n. r(n),

n > 0.

(47)

As it follows from the original definition that F(1) = 1, it therefore holds for all integer values of n ( ~ 0) that r(n+1)

=

n!

(48)

The gamma distribution can therefore be written in the general form t - A.(.A.t)n-1 e-;.t p()F(n) 'n>O,

(49)

which fulfills the necessary condition

J 00

0

p(t) dt = 1.

The average value of the distribution is (50)

E(t) = nfA.,

which is not surprising when we consider the n life lengths which each have an average value of 1/A.. Of course (50) can be derived directly from (49) and (46): E(t) -_

Joo t .A.(.A.tY0

1

F(n)

e-;.td _

1

t - -.A.F(n)

Joo X n e -xdX 0

_ F(n+l) _ n - -. A.F(n) A.

-

Similarly the variance, var (t) = n/A.2 which was also to be expected.

(51)

3]

51

RE-ORDER LEVEL AND SAFETY STOCK

This result can be proved as follows (using definition (16) from chapter 1): var(t)

=foo t2p(t)dt-(!!.)2 ,

A.

o

F(n+2)_(!!_)2

=

J.? F(n)

;.

= (n+l)n-n2 A- 2

n

= ;__2.

By putting the derivative of p(t) equal to zero we find that the gamma distribution for n > 1 has a maximum at t = t 0 , where n-1

(52)

to=-.-. A

Thus for large values of n this maximum practically coincides with the average value. This is also apparent from the fact that the gamma distribution becomes a normal distribution when n is large enough, as will be shown. If only n is varied then the shape as well as the average value of the density curve changes. Therefore it is better, if we are interested in the shape of the curve, to write the function p(t) with n and E as parameters and then to vary n for a constant E. From equations (49) and (50) it follows that

p(t)

=

nt n (E

E.

n-1

e-ntfE

(53)

F(n)

For large n Stirling's formula holds: F(n) ~ nne-n .J2njn.

Substituting this in equation (53) gives the following approximation for p(t): p(t)

~

.Jn

(i)n-1.

(54)

e-n(t-E)/E.

E .J2n E

From equations (51) and (50) it follows that (55)

so that the variance becomes small relative to the average for large values ofn. Therefore we investigate the behaviour of the functionp(t) in the region of the average value (t- E small w.r. t. E):

(~J = exp(nlg~) = exp{nlg(1 + t~E)} ~ ~

exp { n. t ~

E(

1 _ t ~E)},

(56)

52

STOCK, PRODUCTION AND ORDERS

[3

making use of the definition of the natural logarithm, exp(lg x) = x and also of the expansion of lg x for values of x around I. As it is quite legitimate to replace n by n- 1 in the left hand side of equation (56), we can then substitute (56) into (54) with the following result:

p(t)

~(J

1- exp{-I(t-£)2}, 2 (J

J2ir

(57)

being the equation for the Gaussian or normal distribution. We close this introduction to the gamma distribution with a few brief notes: 1. Using the gamma distribution and choosing the parameter n correctly we can describe a whole spectrum of distributions from, for example, the negative exponential distribution (n = 1), via the normal distribution (n large) to the distribution of a stochastic quantity which only has one value (n extremely large: a = 0). 2. For a "gamma-type" distribution n and A. can be determined from the variance and the mean. From equation (55): and

(58)

3. In figure III-7 a number of gamma distributions, each having the same E but a different n, are shown. 4. Although a gamma distribution becomes a normal distribution for large values of n = (Efa) 2 , this does not mean that a normal distribution must always have a large value of (Efa) 2 • It is true that the normal distribution in theory stretches from - oo to + oo, so that variables which can only have positive values (e.g. the height of recruits) can only be (as good as) normally distributed if Efa is so large that the probability of a negative value is negligibly small (e.g. when Efa > 4, then this probability is· smaller than 10-4 ). 5. In the section "demand when lead time variable" some more properties of the gamma distribution are mentioned.

Safety stocks when demand has a gamma or a normal distribution After the above detour we now return to considering the safety stock V(oc).

3]

53

RE-ORDER LEVEL AND SAFETY STOCK

P(t)

!,·'

~

2

I

1. 0

.2 I

\ \1 =1£

I

I'.~

y ['-. \

I

'I

0.

II

'

a a

0

/

v

0.5

1\.

" 11

5

~n

lr

"

1'-.. ]"..:

1.5

J_

0

"

\

0

\

1.0

~ !-X1\

0.6

\\

I

I I II

0.8

\ \ .\

I I

a

.ol\

1\.n

'"

"\

"~'-

""

........

......... ......... E

2.o---t

0.5

~

1.0

'

........

........

........... ~.

r- r::::!3:: 2.0

1.5

-t

Fig. III-7 Gamma distribution with E(t)

= nfl =

1; formula (49).

Let the demand during the lead time be distributed according to the curve p(v), which means that P{v 7) is practically zero. Thus when n is large enough the following relationships hold:

_1_Ik

.J2Tc

e-x2f2dx

-oo

V = ka, B

= 1-oc,

= V+E.

(67)

56

STOCK, PRODUCTION AND ORDERS

[3

There are many tables for evaluating the integral in (67). Here too it is true the value of the integral ( = 1-a:) determines the value of the upper limit k and therefore the safety stock and the re-order level. The graph off which k can be read as a function of is given in figure 111-9.

2

Fig. 111-9 Determination of the re-order level and safety stock when the demand has a normal distribution; formula (67). V = ka, B = V+E; ac is the probability of going out of stock.

Example: Situation as above. From IX = 0.05 it follows that k = 1.65. For u = 400 we then find V = 660; whilst u = 150 gives V = 248. Therefore for n = 6.25 the Gaussian approximation gives a value for B that is 3.5% too low, and for n = 44 it gives a value that is only 1% too low.

Number of orders and demand per order

Thus far it has been assumed that the distribution of the demand during the lead time L is known. It is possible that this is only indirectly the case: for example the distribution of the number of orders arriving during the lead

3]

RE-ORDER LEVEL AND SAFETY STOCK

57

time and the distribution of the demand per order might be known. We now have to determine the total demand per time L, which we shall do using the expected value and the standard deviation. Let: A be the number of orders in a period. D be the demand per order. C be the demand per period. We assume that E(A), u(A), E(D) and u(D) are known, and that we wish to know E(C) and u(C). Now: E(C 2 )

=

L P{A = m} · E(C 2 IA = m) m

=

L P{A = m} · [u 2 (C lA= m) + E2 (C!A = m)], m

(68)

where in the second line use is made offormula (16) from chapter I. If there are m orders (A = m), all independent of each other, then the variance of the total demand represented by these orders is m times the variance of the demand represented by one order: (69) It holds that

E(CJA = m) = m · E(D).

(70)

Substitution of(69) and (70) in (68) gives E(C 2 )

= u 2 (D) · Lm · P{A = m} + E 2 (D) · Lm 2 • P{A = m}, m

m

i.e. (71)

When D and A are independent of each other, as we assume, then the expected value of C, E(C) = E(A) · E(D). (72) Using this equation and relationship (16) from chapter I equation (71) becomes: (73)

Demand when lead time variable Lastly we shall consider the case which has the added complication of a lead time which is not constant, but has a certain distribution, whilst the

58

[3

STOCK, PRODUCTION AND ORDERS

distribution of the demand for a fixed time period, for instance, a month, is known. This problem looks very much like the one just discussed. Let: A be the lead time in months D be the demand per month C be the demand per lead time; then again it holds that E(C 2 )

=

L P{A = m} · E(C 2 iA = m),

etc.

m

We obtain the same formulae (72) and (73) as before, albeit that the letters now have a different meaning. The expected value and the standard deviation of the demand in the stochastic lead time are now known. For the calculation of the re-order level we wish to know a bit more however, particularly the probability that the demand will exceed a certain level. We shall consider this question for the case where the demand per unit time (e.g. one month) has a gamma distribution.

p (v)

=

A.(A.vt- 1 -.l.v e . r(n)

If the demands in different months are independent of each other, then the demand during two months also has a gamma distribution. For if we call the distribution density of the demand during two months p 2 (v), then

I

V

~~o

A(Ae)n-1 e-).~ • A.{A.(v-~w-1 e-).(v-~) de r(n)

r(n)

A.(A.v)2:-1 e-.l.vfv (f)n-1. r (n) ~=0 v

(l _f)n-1 d(f). v

v

The last integral can be written as

J:

x"- 1 (1-x)"- 1 dx,

which is a function of only n. Substituting k(n) for this integral gives

p2 (v) = 11.1('AV)2n-1 e -.l.v - k(n) 2- .

r

(n)

3]

RE-ORDER LEVEL AND SAFETY STOCK

59

Because we know that the demand during two months must be between 0 and oo the following must hold:

J oo

p 2 (v)dv

0

=

k(n) · F(2n)

F 2 (n)

= 1.

(74)

Substituting this in p(v) gives

P2 t.v) --

• ( l

A. 11.V

)2n-1

F(2n)

· e - .l.v

(75)

'

This proves that when the demand per month has a gamma distribution with parameters A and n, then the demand per two months has a gamma distribution with parameters A and 2n. This proof can be extended to t months (where t is an integer) by induction; this will not be shown here. Thus in general it holds for t months that Pr

(v) = A(Av)'n-1 . e-lv

r(tn)

(76)

·

The average value and the variance are determined by the parameters A and tn; tn

E=-=t·E

A

t

'

(Jt2

= tn - t . (J2 • Az-

(77)

Here E and u relate to the demand per unit time, which for simplicity's sake was called one month here. Notes: 1. Using Laplace transforms, equation (76) as well as the following can be proved: If one divides the time unit into m parts each of which are

assumed to have the same demand distribution density, then this density has a gamma distribution with parameters A and nfm. Thus the time unit can be made as small as one likes, and relationship (76) also holds for non-integral values of n. 2. k(n) is a special case of the beta function B(n,m)

=

J:

x"- 1 (1-xt- 1 dx

r(n) ·l(m) r(n+m) .

This relationship is directly obtained, in the same sort of way as was done above, if one determines the distribution of the sum of two stochastic variables each of which is gamma distributed with the same parameter A.

60

STOCK, PRODUCTION AND ORDERS

[3

but with different parameters n 1 and n 2 • This sum has a gamma distribution with parameters A. and n1 + n 2 • Let us return to the problem of the distribution of the demand during a stochastic lead time. For this distribution

PL(v) = where:

1:

0

dt l(t) · p1 (v),

= distribution density of the lead times, p 1 (v) = distribution density of the demand during fixed timet. l(t)

The condition from which the re-order level B is calculated, is

1 J:o 8

=

0

dv

dt l(t) · p 1 (v)

=

1-il(.

Changing the order of integration round and substituting gamma function (76) gives

f.

oo

dtl(t)

t=O

f;.B

dxx

x=O

tn-1

e

-x

F(tn)

= 1-ll(,

which in the notation used already, see equation (61), becomes

J:o

dt l(t) · I(u,p) = 1-ll(,

(78)

with

A.B

B

and

U=--=--

Fn uJi

p

= tn-1.

(79)

The following example may demonstrate the usefulness of equation (78): Let the lead time for a given article be uniformly distributed between limits L -I and L +I. Let the demand per unit time be gamma distributed in such a way that nL = 10. Determine the value of the re-order level for il( = 5%, if we also know that 1/L = 0.25. With a constant lead time L the parameter "n", which relates to the demand per lead time, equals 10, so that figure III-8, with il( = 5%, gives

B

B

U=-=--=5, (JL

(1

JL

(80)

which gives the re-order level as a function of u. However, the lead time is not constant: assuming that the re-order level in (80) is correct we investigate

3]

61

RE-ORDER LEVEL AND SAFETY STOCK

how ex, the probability of going out of stock, is affected. Because L(t) is a uniform distribution, therefore

l(t) =

2i1

for

L-l~t~L+l,

l(t)

0

for

t < L-l

=

t>L+l.

and

Equation (78) then becomes 1

21

fL+I

dt l(u,p) = l-ex,

t=L-1

which can be evaluated using Simpson's rule: h a+h f(x) dx ~ -{!(a- h)+ 4f(a) + f(a +h)}. 3 a-h

f

This gives the following conditions

where B

u1

=

u2

= -B- =

u3

=

u~

= -B- ·

1

uJL .j1-lfL

5

= -- = .j0.75

5.77,

5,

uJL B

u.JL+l

whilst, p1

p2 p3

B

= -- ·

1

uJL .,/1+1/L

5

= -- =

J1.25

4.47,

= n(L-1)-1 = nL(1-//L)-1 = 6.5, = nL-1 = 9, = n(L+l)- 1 = nL(l +IlL)- 1 = 11.5.

From Pearson's table (mentioned earlier) WI! then find that I(uh P1) I(u 2 , p 2 )

= 0.9926 = 0.9525

l(u 3 , p 3 ) = 0.8301.

Substitution of these values in (81) gives ex = 6.1%, which means that

62

[3

STOCK, PRODUCTION AND ORDERS

because of the possible fluctuations from the average value, in the lead time, the probability of going out of stock has risen from 5% to 6.1% for the same B. We might be satisfied with this or we could again work through the example with a higher B, which would give a lower oc; then interpolation will be accurate enough to determine the B that gives oc = 5%. This example can be treated in a completely different manner by using formulae (72) and (73) with the definitions: A = lead time, D = demand per unit time, C = demand per lead time. From the uniform distribution of the lead times it follows that

=

E(A)

L

u 2 (A) = E(A 2 ) - E 2 (A) = With E(D)

=

(L + !:_)L 3 2

2

= !:_ = 3

L 2

48



E and u(D) = a, this gives

= EL,

E(C)

= u 2 L + L2 E 2 =

u 2 (C)

48

E 2 L2

(_!_ + _!_) = 0.121 E 10 48

2 L2

'

where the following relationship is used: 10

=

nL

=

Ez L-. 0"2

Let us assume that the demand during the lead time "will probably also have something like a gamma distribution", then for the parameter n(C) of this distribution we find:

so that with oc

= B

5% figure III-8 gives the following re-order level:

=

4.7 ·a( C)

= EL · 4.7 .JO.l21 = 1.64EL.

Naturally this re-order level is higher than the level which was calculated for a constant lead time in equation (80): ~ E 1I 5 B = 5u · -.JL = 5-"- = - E L = 1.58EL,

FJIO

but the latter does correspond to an oc of 6.1%

3]

RE-ORDER LEVEL AND SAFETY STOCK

63

Control stock

During the discussion of the re-order level it was tacitly assumed that there was no overlapping: during the lead time we receive no deliveries from previous orders, or, to put it another way: when an order is placed there are no deliveries outstanding, the goods have all been received. This, in fact, implies that immediately after a delivery the stock always exceeds the re-order level by a large enough margin to make the placing of an order unnecessary for a while. This no longer holds when the demand during the lead time is greater than the order quantity. For example see figure III-10 where the stock level is plotted against time for the case where the demand during the lead time is five times as large as the re-order quantity, Q. When a delivery is received the stock is still a quantity 4Q below the re-order level. Noticing this one immediately places another order of size Q, without much effect however, because in a short while the whole reserve safety stock is used up.

£=5Q

Fig. III -10 The stock on hand is still below the re-order level after the delivery is received•

One now gets the impression that perhaps the re-order level was determined correctly but that the re-order quantity is too small: larger orders should be placed. However, this is not necessarily the case, the average order size may well be the optimum one. The fault can be avoided by a different interpretation of the concept "stock". So far when we referred to stock we meant the goods actually available, i.e. the stock on hand. When we are dealing with the re-order level we should, however, consider the control stock (or economic stock or assets), being the sum of the stock on hand and the stock on order (goods for which an order has been placed but

64

STOCK, PRODUCTION AND ORDERS

[3

which have not yet been delivered). An order should be placed as soon as this control stock is less than the re-order level B. Immediately after the order is placed this stock again exceeds level B. Thus there is the possibility of placing an order before the previous order has been fulfilled. The reason that previously we could determine B without differentiating between stock on hand and control stock is that we excluded the possibility of overlapping and therefore at the moment orders were placed there was no stock on order and the control stock equalled the stock on hand. There is a possible complication when some of the stock is already reserved for particular customers. This part of the stock is no longer freely available to the stock controller and thus must not be included amongst the control stock any more, it may even be so large that the stock on hand is in fact negative: part of the future deliveries is already reserved for these customers. The concepts of control stock and stock on hand are sufficient for our needs because the first can be used when determining the re-order level and the second for ascertaining the "amount out of stock"; because, of course, when V1 :::::; 0 the articles ordered by a newly arrived customer cannot immediately be delivered to him. That both concepts are useful here can be shown as follows: Let the control stock as a function of time equal Ve(t), whilst the stock on hand equals V1 (t). If the lead time equals L then the goods which were ordered a time L, and longer, ago will already have arrived, i.e.

(82)

where aL is the demand during time L. One is out of stock if the right hand side of (82) is zero or negative, i.e. when Ve(t-L) :::::; aL.

If at timet- L the control stock is too low, then at or before timet the stock on hand will have run out. Extra orders placed between t-L and t cannot change this. Therefore, should one not want to be out of stock (with probability 1- ex) at time t, then at time t- L an order must be placed if the control stock is then lower than the re-order level. As this holds for every t we continually keep an eye on the level of ve. We again wish to point out that it is quite possible to place new orders before one's previous orders have been fulfilled, whilst even immediately after a delivery the stock on hand is not necessarily greater than the re-order level. For illustration see figure III -11, which refers to the example mentioned above where the order quantity is Q, whilst the lead time demand is 5Q.

3]

65

STOCK CONTROL SYSTEMS

8

E Stock on hand

v Time

Fig. 111-11

The order is placed as soon as the control stock falls below the re-order level.

Stock control systems

A stock control system consists of a collection of rules which one uses to answer the question: "When, and how much, must we order?". The rules are valid as long as the circumstances such as the lead time demand, the stock holding cost, and the cost of placing an order, remain unchanged. When these circumstances change the system should be modified. We shall deal briefly with two basic systems, namely the (B, Q) and the (s, S), and then discuss some variations. In the (B, Q) system there is a fixed re-order level B and a fixed order quantity Q. B can be calculated as shown previously whilst the batch size, Q, is found using the formula (39) of Harris and Camp. The cost Fin this formula should then be interpreted as the cost of placing an order, being the cost, independent of the order size, which is incurred whenever an order is placed. One assumes that the average stock is Q/2, which is the case if, between deliveries, the stock decreases more or less linearly. If a:, the probability of going out of stock after the re-order level has been crossed, is fixed, which therefore fixes the safety stock V(a), then this safety stock will have no effect on the size of the optimum Q: the costs related to the safety stock are fixed costs. Thus B and Q can be determined independently of each other.

66

STOCK, PRODUCTION AND ORDERS

[3

There is a complication however. If the expected annual demand is D and the order quantity is Q then the expected annual number of orders, and therefore the number of times the stock falls below the re-order level, equals D(Q. On average one will be out of stock/= aD/Q times per year. Often the stock controller is more interested in f than in a. If he starts with a certain permissible value for J, that then makes a ( = f Q/D) a function of Q, which gives us a connection between the re-order level Band the order quantity Q. The optimum value for Q can then be determined in the following way. The total of the costs dependent on Q is on average: K = !QI

2

+ V(a) ·I+ DF, Q

with a = fQ(D;

(83)

in which the three terms on the right hand side are the stock holding cost relating to the re-order quantity, the cost of holding the safety stock and the cost of placing orders respectively. For a given value ofjwe can evaluate V(a) for different values of Q, so that it is possible to draw a graph of K(Q). The minimum of this function determines the optimum Q. One can also write equation (83) as K= KH+ V· I, where KH is the sum of the costs that are taken into account when the formula of Harris and Camp is applied. If Q0 PT and QH are the values Q corresponding the minimum of K and KH respectively, then the derivative of the function K(Q) is zero or negative at the point QH because the derivative of KHat that point is zero and V(a) is a non-increasing function of Q. Consequently Q0 PT > QH. Fixing f instead of a means that in general a higher order quantity has to be chosen. An example to illustrate this: Suppose that for a certain product the average annual demand is D, the lead time is a month and the lead time demand has a gamma distribution with Efa = 2. One is allowed to go out of stock once every two years on average. The storekeeper has calculated, using the formula of Harris and Camp, that he should order 50 times a year. The average lead time demand is E = D/12, so that a = D/24. With f = 0.5 we now consider various cases, for instance:

1.~ = _!_, D

50

i.e. a= 1%.

Graph III-8 gives u = 5: the safety stock is V = a( u -

~) =

3a = D/8.

3]

STOCK CONTROL SYSTEMS

67

Let us call the annual cost of placing orders, holding the order quantity in stock and holding the safety stock Kb, K. and Kv respectively. Then for this first case

because the formula of Harris and Camp was used to calculate that there should be 50 orders. Also K, K.

= --.!:::._ = D/8 = 12.5. D/100

Q/2

Therefore the annual sum of all the costs dependent on Q is

where A = Kb = K •.

. oc -- 2%• 2 Q- 1 t.e. o, D 25 0

-

u

-

-

,

= 4.4, therefore V = 2.4cr = D/10, so that Kv K.

= D/10 = S. D/50

Because the order quantity is now twice as large, the costs K. have doubled and costs Kb have been halved with respect to the first case. The sum of the costs is therefore K

= Kb+K.+Kv = :i_ + 2A+10A = 12.5A. 2

3 Q- 1 I.e. oc - 5%• o, 0

0-

D u

-

-

10

-

,

= 3.8, therefore

V

= 1.8cr = 0.075 D, so that Kv K.

= 0.075D = l.S. D/20

The sum of the costs is therefore

K 4. fl =

D

! , i.e. 5

oc = 10%

= :i + 5A + 7o5A = 5

12.7A.

68

STOCK, PRODUCTION AND ORDERS

u

= 3.3, therefore

V

[3

= 1.3a = 0.054 D so that Kv = 0.054 D = 0. 54 K, D/10

The sum of the costs is then K

= ~ + lOA + 5.4A =

15.5A ,

10·

From the graph of K(Q) in figure III-12 it looks as if the optimum will probably be around Q/D = 3/50, i.e. when there are 15 to 20 orders a year (on average). A more accurate solution is not usually required. Around the optimum we know that K(Q) is relatively insensitive to changes in Q, whilst, moreover, the costs dependent on Q are only part of the total costs. In this region one can therefore choose a value of Q which is convenient for one reason or another (for instance: a multiple of 100).

/

K Kb~ Ks+ v----.

\ 12

10

.q opt -r--

\

\

--

"' " '

If

8

6

2

v [/

}H,....

" ......... I'-1/so

IY'

.y

.......

:N

..........

/

/

/

/

v

l/

""' l/

.~ ............ ,..._ ,-[

Ks

...,.-K~

V2s

Fig. III-12 Cost as a function of the batch size; A is the annual cost of placing an order when the batch size is calculated using Harris and Camp's formula.

3]

STOCK CONTROL SYSTEMS

69

In the above we supposed that IX or f is given; one should bear in mind that IX determines the amount by which one is out of stock when a stock out occurs, whilst f determines the number of times this happens. Other cases, for instance where one is instead given the cost of being out of stock, are of course possible. They will not be considered here. Another stock control system is the (s, S) system. In this system the control stock is reviewed periodically, once a week for instance. One has the following rule for placing orders:

ve ~ ve <

s: do not order. s: order the quantity

s- ve.

Thus the size of the order depends on the observed stock level, the control stock being increased to level S. When it is seen that an order is necessary it will, on average, be half a review interval after the stock first fell below levels. This level must therefore be high enough to meet the demand during half a review interval plus the lead time. Because of the spread in the time that has elapsed since the stock went below the level, one should allow for more than half a review interval. The following rule of thumb is often used: calculate the re-order level s as though one is determining a B level for a lead time L + 0.75 T; here L is the lead time, T is the review interval, whilst the B level refers to the re-order level in the (B, Q) system discussed above (where the stock is constantly reviewed). From the ordering rule it follows that the size of the order is larger than S- s. The average order quantity will be approximately S-s + a(T/2), where a(T/2) is the demand during half a review interval. If Q0 PT is the optimum order quantity then it follows that the higher level, S

~ QoPT

+ s- a(T/2).

(84)

With the aid of the above we can now briefly indicate for which situations the above systems, or variations of them, are suitable. However, we shall first list the symbols we have used, with their meanings: B is the re-order level where the control stock is continuously reviewed. The moment the stock falls below this level an order is placed. s is the re-order level where the control stock is periodically reviewed. Qis a fixed re-order quantity. S indicates that the re-order quantity is variable and that when an order is placed this order brings the control stock up to level S. Different combinations of these letters are possible. The (B, Q) system operates happily when the demand is more or less continuous; i.e. when the

70

STOCK, PRODUCTION AND ORDERS

[3

demand consists of many small portions, each of which is small compared to Q. The crossing of the re-order level then only occurs with a small stock movement. If this was not the case then it might happen that, because of the discontinuity, the stock has already fallen far below the re-order level at the moment the order is placed; it can then be desirable to place an order the size of which depends on the stock level at that moment, a condition which the (B, S) system fulfills. It can happen that continuous observation of the control stock level is not possible, or not necessary or too expensive, whilst it may also be that there is no point in doing it because, for example, the times at which orders can be placed are determined externally. In these situations one should review the stock periodically. One can use the (s, Q) system if the demand during the review interval is small compared to Q: so little happens during the review interval that continuous reviewing of the stock level is not necessary whilst a variable order size is also superfluous, because at the first review after the re-order level is crossed the difference between the re-order level, s, and the actual stock will be small compared to Q. If this should not be the case then a variable order quantity, as in the (s, S) system, is appropriate. When s = S we have the system of periodic stock replenishment, for which, of course, it no longer holds that the re-order level is crossed halfway through the review interval: the control stock will fall below s immediately after the order is placed. In formula (84) we have to replace a(T/2) by a(T) when s = S; from the formula we also see that under these circumstances the system will operate efficiently when Q0 PT = a(T). Of course, the quartet mentioned above does not exhaust the possible stock control systems. To mention just one more possibility: With the (s, Q) systems one can order a quantity Q1 or Q2 depending on the stock level, which means the order size can be adjusted to the requirements. In the chapter about multi-stage decisions the optimum stock control system for a certain situation is calculated.

CHAPTER IV

INDUSTRIAL DYNAMICS

The dynamic nature of a single stock with a production process connected to it was studied in the last chapter. Because of the fluctuations in the sales the state of the system is constantly changing. The production rate has to be adapted to the sales rate, which takes time: the sales may rise or fall quickly, the production needs time to follow these changes. In real life the situation in an industry or company is of course much more complicated than the situation we considered: the factory usually produces various different articles, so that there are many stocks (not necessarily all positive). Here we are not only thinking in terms of stocks of end products, but also of new materials and parts which are used in the production process. The available finance and machinery is also very important, as well as the fact that the sales one is taking into account are often not "real" sales but anticipated sales for the coming one, five or ten years, where this anticipation is not only based on the expected value of a stochastic variable but may also be a target one is trying to reach by influencing the customer with quality, guarantees, prizes, publicity drives, etc. The above, and many other factors, influence the running of a company to such an extent that quite a complicated, and therefore sometimes slow, reaction procedure is evolved. For instance if, on the basis of expected increased sales one wishes to expand the production capacity then one must look for future labour resources, new factories must be built, tools and raw materials must be ordered, etc. Around the time that the desired capacity has been achieved it may well be far too large for the then current needs. In order not to get bogged down in the complicated network that constitutes a company, we will return to the stock controller who appeared at the beginning of the third chapter, in order to learn some more from him. In his factory the production was adjusted according to the state of the stock shortage and the number of days out of stock. Now suppose that the stock controller does not have a production process but that he in his turn obtains the goods from a store whose stock is replenished from a factory. Thus we now have two stock controllers, and for simplicity's sake we shall assume that both of them react in the same way to their own stock

72

INDUSTRIAL DYNAMICS

[4

shortage. This system of two stock controllers is then two of the simple systems, discussed in chapter III, connected in series with each other.

A system with two stock controllers

In figure IV-I the flow of goods from factory to customer is drawn: in the short time dt a quantity p 2 (t) dt goes from the factory to the second store, and a quantity s2 (t) dt = p 1 (t) dt goes from the second to the first store, whilst eventually a portion s1 (t) dt moves from the first store to the customer. (Because a delivery received by the first store represents a sale for the second one: p 1 (t) = s2 (t)).

p2

(tJ=•v2 (tJ+n

t

Jv2 frJ dr

0

t

s 2 ftJ .. p 1 (t) ... v1 (t)+R Jv 1 (T)dr

r-~~------------~0

s, Fig. IV-1

(t}

A system with two stock controllers; formula (1).

Both stock controllers react to their stock shortage according to the rule from equation (10) in chapter III: p;(t) = cw;(t)

+ fJ

t

v;(r)dr (i = 1;2).

(1)

We now investigate how the system reacts if the sales to the customer suddenly change by an amount k:

s 1 (t) = 0, for t :::;; 0 s1 (t)

= k, fort> 0.

(2)

4]

A SYSTEM WITH TWO STOCK CONTROLLERS

73

As we did in the numerical examples in the previous chapter we will solve the present problem for two situations: 1. Critical damping: 1X 2 = 4/3; in particular IX = f3 = 4, 2. Oscillatory damping: 1X 2 < 4/3; in particular IX = 4, f3 = 125. Bearing in mind the note on page 42, IX = 4 is no real limitation. With equations (24) and {25) from chapter III we find that 1. For the critically damped case p 1 (t) = k(l-e- 21 + 2t e- 21),

(3)

2. For the oscillatory case p 1 (t) = k{l-e- 21 1.016 · cos(llt+0.18)}.

(4)

The initial conditions with this were p 1 (+0) = 0,

p~(+O)

= 1Xk.

It only remains to determine the functions p 2 (t) in equation (1). Differen-

tiating that equation twice gives d 2 p2 dp 2 f3 ds2 p -2-+IX-+ Pz =IX-+ Sz, dt

dt

dt

(5)

where s2 can be replaced by p 1 in the right hand side: 1. Using equation (3) we find that for the critical case the right hand side of (5) is: (6)

Thus in the right hand side functions of the form exp( -2t) and t · exp(- 2t) appear, functions which also satisfy the reduced equation. Therefore for the particular solution of p 2 (t) we try functions of the form

the particular solution then becomes Pz(t)

=

C1k

+ ke- 21 (C2 t 2 + C3 t 3 ).

Substituting this in the left hand side of (5) gives, together with the right hand side (6): C1 = 1,

cz

= 6, C3 = -4/3,

so that the general solution of (5) in the critically damped case is p 2 (t) = k + ke- 21 (A + Bt + 6t 2

-

4f3t 3 ),

(7)

74

[4

INDUSTRIAL DYNAMICS

where A and B are constants which have yet to be determined. 2. For the oscillatory case we find for the right hand side of (5) using equation (4): 125 · k- 1.016 · e -lt k {117 · cos(11t + 0.18)- 44 · sin(llt + 0.18)} = =

125k + 1.016 e-2 t k .J117 2 + 442 sin(llt + 0.18- tp) =

(8)

= 125k + 127 k e-2 t sin(llt- 1.03), (with cp = arctan

~=

1.21 rad}

Expressions of the form

=e-2t sin (llt + l/J) g(t) =e- cos (llt +l/1),

f(t)

2t

(9)

where l/1 is a constant, can be found from the reduced equation, i.e. they do not contribute to the right hand side. Therefore as a particular solution try

p 2 (t) = A (t) · f(t)

+ B(t) · g(t) + k,

(10)

where A(t) and B(t) must be chosen in such a way that (5) is satisfied. Substitution in the left hand side of (5) gives A(j" +4f' + 125/) + B(g" +4g' + 125g) + f'2A' + g'2B' + · +(A"+4A')f+(B"+4B')g+ 125k.

(11)

The first two terms of this sum equal zero because f(t) and g(t) satisfy the reduced equation; it immediately follows from equation (5) that g' = -llf-2g. and f' = llg-2/ Using this we transform (11) to (A"- 22B')f + (B" + 22A')g + 125k, which must equal the right hand side of (8). This condition is fulfilled when ifJ = - 1.03 and: A"-22B' = 127k, B"+22A' = 0. A solution of this is A(t) = 0,

127 B(t) = - 22 kt,

4]

A SYSTEM WITH TWO STOCK CONTROLLERS

75

so that particular solution (10) becomes: 127 p 2 (t) = k - - kt g(t). 22

(12)

On the basis of (9) and (12) the general solution of (5) in the oscillatory case is:

p 2 (t)

=

127 ) g(t) Af(t) + ( B- nkt

+ k,

(13)

where A and B are constants whose value is yet to be determined. A note about the initial conditions: The stock shortage in the second store as a function of t is Vz(t)

=

t

{s 2 (r)- p 2 (r)}dr,

i.e. v2 ( + 0) = 0. As the extra production p 2 (t) is chosen according to the rules in ( 1), we therefore have p 2 ( + 0) = 0. Also by differentiating it follows from (1) that

with s 2 (+0)

= p 1 (+0) =

0, we therefore get initial conditions:

Pz( +0) = p;( +0) = 0.

(14)

These conditions can now be substituted into the general solutions already found. 1. In the critically damped system (7) and ( 14) lead to (15) 2. In the oscillatory system use is made of equation (9) with 1/1 so that

-1.03,

f( +0) = sin 1/1 = -0.8573

= cos 1/1 = 0.5148 f'( +0) = 11 cos ljJ- 2 sin ljJ = 7.3774 g( +0)

g' ( + 0) = - 11 sin ljJ - 2 cos ljJ = 8.4007.

Substituting conditions (14) in equation (13) and using the above values we obtain A = 0.903k, B = -0.439k.

76

[4

INDUSTRIAL DYNAMICS

According to (13) the extra production is then: p 2 (t) = k+ke- 21 {0.903 sin(llt-1.03)- (0.439 + 5.773t) cos (llt-1.03)},

which can be written as p 2 (t)

= k + ke -Zt {1.004 sin(llt-1.48)- 5.773t cos(llt-:-1.03)}.

(16)

For the two cases considered the change in production rate because of a step in the sales is determined by equations (15) and (16) respectively. These results will now be discussed.

1) Critically damped system

In the above we put ct = 4 which, as was noted, was not in fact a limitation. This means that results (3) and (15) are also valid for other values of ct as long as y( = 4f3/ct 2 ) equals unity, whilst t should be read as 1: : Pt (r) = k-ke- 2 t(l-2r), p 2 (r) = k-ke- 2 t(1+2r-6r 2 +4/3r 3 ),

(r = ctt/4).

These functions are plotted in figure IV-2. We see that the production s2 = p 1 , this means that p 2 reaches a

p 2 first of all lags behind the sales

I.Sk

P2(}

k

/

QSk

1/ I I I II

1//

0

/

-2 J

p (t}

[/"::

r--

/

--

--

I

1.0

lS

.'

1' ~

Fig. IV-2 Increased orders ( = Pt) and production ( = P2) as a result of a step in the sales; critically damped system.

4]

A SYSTEM WITH TWO STOCK CONTROLLERS

77

higher maximum than p 1 . The extreme value of p 1 is found by putting the derivative equal to zero: p 1 (r) has a maximum for 't" = 1 (i.e. t = 4/a.); the value of this maximum is Pt (-r =I) = k+ke- 2 = 1.135k.

(17)

The turning points of p 2 are found from the equation -r3 - 6-r 2 + 6-r = 0, so that they occur at -r = 0, -r = 3-.J3, 't" = 3+.J3. There is clearly a horizontal tangent at 't" = 0 (see (14)); the next turning point is a maximum, whilst the last turning point is a minimum. The size of the maximum is p 2 (-r=3-.J3)

= k+k(6.J3-1)e- 6 + 2 ../3

~ 1.21k,

(19)

p 2 (-r=3+.J3) = k-k(6.J3+1)e_ 6 _ 2 ..;"S ~ 0.9986k.

(20)

whilst the size of the minimum is

Thus it follows from equations (17), (19) and (20) that for a critically damped system of the form (1) a jump k in the sales rate causes p 1 andp 2 to rise to maximum values which lie 13.5% and 27% respectively above level k; the maximum value of p 2 is then followed by a minimum which lies 0.14% below k. Connecting the system in series thus has an "amplification-effect" and furthermore it increases the number of maximum and minimum values. The amplification is much greater with a system having oscillatory damping, as will now be shown.

2) System with oscillatory damping

The function p 1 (-r) and pi-r) from equations (4) and (16) are drawn in figure IV-3. The production fluctuates wildly about level k. The largest value reached by P2 is 2.3 k, followed by a low of -0.2 k, which means a change in production rate of 2.5 k in a short length of time. This difference was "only" 0.9 k for the first stock controller, see function p 1(1:). Here only two control systems are connected together. When this number grows it is not very surprising that catastrophes occur: periods with extremely high production are followed by periods when the factory practically comes to a standstill; the factory fluctuates between overtime arid reduncancy whilst outwardly nothing is really the matter, the only thing that has happened being that the sales rate has increased by quantity k and has then quite unspectacularly remained at this new level. Naturally the system discussed here"is rather simplified; for instance we

78

[4

INDUSTRIAL DYNAMICS

2,5k

I

I

(\i

i

I

!(\

Pi I 1.5k

k

0

-D.2k

r

1/J Ll

i

I i

\

(\

I "'\.

-/~-~-

\ v

1

I i

j

-I, --- -

I O.Sk I I

I

I

\

lflti'CJ

I

I

2k

.'\

!

I

!

-v-I ~ \~vt I 2'"\:. I \V

!

r=a s I

T= 1JJ

~

IT=tS 'T= ~V"

Fig. IV-3 Increased orders (=PI) and production ( = P2) as a result of a step in the sales; oscillatorily damped system.

have allowed the production rate to be continuously variable, which is very rare in practice. However, it still holds that from this example one can learn that a factory should, as far as possible, base its judgement about production changes on actual demand and not on demand figures which have been completely distorted by a chain of intermediates. This distortion takes place because everyone reacts too slowly and is therefore then forced to overdo it. Of course, even when there are only a few intermediate links, the right way of reacting is still vital, as was shown by comparing the two situations discussed above.

Jay W. Forrester: Industrial Dynamics In the July-August 1958 edition of the Harvard Business Review an article by Jay W. Forrester, entitled "Industrial Dynamics", appeared. Later a

4]

JAY W. FORRESTER: INDUSTRIAL DYNAMICS

79

book by him was published (M.I.T. Press 1961) under the same title. In the article he expresses the hope that in the future management will become a true profession in the sense of a job for which one can develop certain skills: "In the past, with management considered more of an art than a profession, education and practice have been highly fragmentized. Manufacturing, finance, distribution, organization, advertising, and research have too often been viewed as separate skills and not as part of a unified system." The interactions between different aspects of a company are of special interest: "The company success depends on the interaction between the flows of information, materials, money, manpower, and capital equipment." The task of management is to interrelate these five flow systems in the best way. For instance the manager should know that: "Small changes in retail sales can lead to large swings in factory production", and that: "An advertising policy can have a magnifying effect on production variations." Illustrating this Forrester quotes the case of a factory where the variation in the production in a given year was four times as great as the variation in the actual retail sales; it is clear that much money and effort was wasted here. Forrester studies the interrelations by simulating the workings of (a limited part of) a company on an electronic computer. To do this it is necessary to know the organizational structure, the delays in decisions and actions, the policy for stock control and purchasing, etc. He then investigates how the system reacts to given changes in the sales rate. The above dissertation on Forrester's article, together with our example of the two stock controllers, should emphasize the importance of studying a company as a control system.

CHAPTER V

MULTI-STAGE DECISIONS; DYNAMIC PROGRAMMING

One speaks of multi-stage decisions when there is a series of points in time at which decisions have to be made. For instance a stock controller may have to decide every Monday morning what order he should place. He will base his decision on the state of the stock and his knowledge of the expected sales. More generally one can say that there is a system (the stock, for instance) which is in a certain state (the stock level) at given epochs (decision times). The state at the next epoch can be affected by making a certain decision now (for instance the size of an order). To quote another example: the owner of a machine judges the state of the machine once per quarter. Suppose he grades it in the following way: good, reasonable, sub-standard, bad. He may make one of the following decisions: leave it alone, repair it, replace it. The owner wants to decide in such a way that he maximizes his profit. This sort of problem can often be successfully tackled with the help of dynamic programming as developed by R. Bellman. This method can be used not only for dynamic problems but also for some static ones (e.g. see problem V-2) by artificially introducing a time element. We shall demonstrate dynamic programming with a stock control problem. The calculated optimum solution will then be compared with some "approximate" solutions. Stock control problem: At the beginning of every month a shopkeeper can place his orders which can vary in size, although he must order in multiples of a quantity of size a. The ordered goods are delivered immediately. The monthly demand (whi N. In order not be have to make an exception for j = 0, we also introduce c0 = 0. Example: equations (4) give Basis

Profit coefficients ci

ci

xi

0

1

3

0

0

0

0

0 0 0 0

x3 x4

9 7 22 32

1 0 2 1

0 1 1

1 0 0 0

0

0 0 1 0

0 0 0 1

Xs

x6

4

1

0 0

M

Therefore amongst the results we obtain are (using the above notation):

(6)

6]

107

THE SIMPLEX METHOD

5. We add a row ti to the matrix, where

ti =

L

i(basis)

As the solution corresponding to the chosen basis equals xi the value ofjwhich is the result of this solution is

f =

(7)

(j= O,l, ... ,K+N)

mijci-ci

L mio i

ci

=

mio• therefore

= to·

(8)

Example: Table (6) with ti added to it: basis

0 0 0 0

x3 x4 Xs

x6

0

1

3

9 7

1

0

0

0

0

0

0

1

0

0 0

1

0 0

0

0

0

1 0

0 0 0

0

0

0

22 32

2 1

1 1 4

0

-1

-3

M

(9)

1

0

Because of equation (5): (10)

if xP belongs to the trivial basis. For the variables xi which do not appear in the basis ti has a special meaning which will be apparent from the following. In the example there are six variables, of which four are in the basis. The values of the latter can be read directly off the table; from (9) we have x 3 = 9, x 4 = 7 etc. If we wish to change the basis in order to obtain a higher value off then we first investigate which element should be added to the basis (point 6) and subsequently which element should be removed (point 7). Suppose that x 1 is added. As x 2 is still zero, the equations represented by M become 9 =

= 22 = 32 = 7

X1+X3

x4 2x 1 +x5

(11)

x 1 +x6 •

If we choose x 1 = 1 (instead of the old value x 1 = 0) then the increase in f due to this is c1 • In order still to satisfy equations (11) the values of x 3 and x 6 must decrease by one and x 5 by two; x 4 may remain as it was. Due

108

ALLOCATION; LINEAR PROGRAMMING

[6

to the decrease in these variables the value off goes down by c3 + 2c 5 + c6 • There is no point in adding x 1 to the basis unless the decrease is smaller than the increase: i.e. unless t 1 < 0. Note: By adding x 1 = 1 to the basis the number of variables not equal to zero has risen to five, which means this new solution no longer corresponds to a vertex but does do respond to a point on the boundary. The point is in fact F in figure VI -1.

The above can be formulated generally: If xP = 1 is added to the basis, then the value off goes down by a quantity tP; the addition is pointless unless this quantity is negative (the increase infis then positive). 6. The most negative number inti is sought; if this is found atj = j* then should be added to the basis. This means that when one has a choice, one should add that variable to the basis that gives the greatest increase in f

x;

Example: according to table (9) x 2 should be added to the basis. Thus in figure VI-1 the walk to the optimum goes in direction OE for the moment. The walk is continued to the next vertex; in this case to E therefore and not to H (where x 1 = x 6 = 0). Although His at the intersection of two boundary lines it is outside the permissible solution area : at Hx2 = 8 > 7, in other words Hlies on the wrong side of boundary ED.

7. Compute mwfmii* for every i for which mii* is positive. If the minimum of these quotients occurs in row i* then xi• must disappear from the basis. Here we have a way of finding the next vertex referred to in point 6 above (without having access to a diagram). Example: According to table (9) we investigate the following quotients (j* = 2):

7

22

1' 1'

32 4

Quotient 7/1 is the smallest of these, this means x 4 disappears from the basis: we have indeed arrived at pointE in figure VI-1, (x 1 = x 4 = 0).

6]

109

THE SIMPLEX METHOD

Thus the following has happened: x 3 , x 4 , x 5 and x 6 formed the basis to which x 2 was added. The equations to which table (9) corresponds are (with x 1 = 0): 9 = x3 (12) 7 = lx 2 +x4 22 = lx 2 +x5 32 = 4x 2 +x6 We find ourselves on the line x 1 with others occur at

=

0. Points of intersection of this boundary

x 2 = 7/1 = 7 (when x 4 = 0) x 2 = 32/4 = 8 (when x 6 = 0) x 2 = 22/1 = 22 (when x 5 = 0) It is clear that the minimum quotient indicates the next vertex. In the first one of equations (12) x 2 has a coefficient of zero, i.e. the intersection of boundaries x 1 = 0 and x 3 = 0 is infinitely far away (lines OE and AB are parallel). Negative coefficients of x 2 do not occur here. If they had occurred it would still not have been necessary to investigate the equations concerned, because they would give points of intersection for which x 2 < 0, so that during a walk in the positive xz-direction the boundary concerned would never be crossed. See note 2 after point 9.

8. By adding x/ and deleting x;* a new basis has been created. Matrix M is now so transformed that columnj* also satisfies condition (5). Example: The matrix was ofform (9):

M

(

2~

1 0 2 1

32

0 1 1 4

1 0 0 0

0 1 0 0

0 0 1 0

~)

The new basis is: x 2 , x 3 , x 5 , x 6 • The column corresponding to x 2 is not yet of the right form: it must have the form of the column corresponding to the "old" basis variable, x 4 ; i.e. the second column must be of the form

\ ('·

0

~1

0

instead of )

(

4

)

110

[6

ALLOCATION; LINEAR PROGRAMMING

As the matrix is an abbreviated representation of a set of equations it is clear that the required result is achieved by subtracting the second row from the third and four times the second from the fourth. M then becomes 1 0 2

0

1

0

0

1 -1 -4

0

0 0

0 0 0

i

i

~)

1

0

(13)

i

i

so that column vectors 2, 3, 5 and 6 have indeed achieved the right form. This treatment can be formulated as an algorithm: starting from the existing matrix the row i* is divided by the element mi*i* which makes the new element m;*i* equal to unity. (Because of the agreement in point 4 the number of the row is changed: old i*, new j*.) From the other rows we subtract the new row multiplied by the element that these rows had in common with column j*; this makes elements m;i*(q # j*) equal to zero. In formulae: mj.P

=

m~P =

= 0, 1, ... , K + N), (q #J·*). mqp-mj.P · mqi•

(14)

(p

mi•p/m;•i•

(15)

9. Points 5 to 8 are repeated for the new matrix. This procedure is continued till the matrix has all values of ti ~ 0; f has then reached the maximum value. Example: After the first transformation (see (13)) table (9) became:

basis 0 3 0 0

0

0

0

0

0

1

1

0 0

0 0 0

0 1 -1

-4

0 0 1 0

0 0 0 1

0

0

3

0

0

0

1

3

Xs

9 7 15

x6

4

1 0 2 1

21

-1

x3 x2

M

(16)

In (9) the profit was: f = 0. Now 7 units of x 2 (for which t 2 was - 3) have been added so that the profit is now:f = 21. We have now arrived in pointE of figure VI-1. From (16) it now follows thatj* = 1, i* = 6.

6]

Ill

THE SIMPLEX METHOD

After the second transformation the table becomes: basis

0 3 0 1

x3

x2 Xs

xl

0

1

3

0

0

0

0

5 7 7 4

0 0 0 1

0 1 0 0

1 0 0 0

4 1 7 -4

0 0 1 0

-1 0 -2 1

25

0

0

0

-1

0

1

M

(17)

This solution corresponds to point D in the diagram. From the table: = 4, i* = 5. The transformation gives;

j*

basis

0

1

3

0

0

0

x3

1

0

0

1

3 0 1

x2 x4 xl

6 1 8

0 0 1

1 0 0

0 0 0

0 0 1 0

26

0

0

0

0

0

0

-4/7 1/7 -1/7 2/7 M 1/7 -2/7 4/7 -1/7 1/7

(18)

5/7

All values of ti are now non-negative: the maximum has been reached: f = 26. The solution is represented by point C in figure VI -1. Notes: 1. After the transformation of M a new row ti can be worked out. However

it is also possible (and often quicker) to make use of the fact that row ti transforms itself as a row ofthe matrix (equation (15)). See problem VI-4. 2. It can happen that in a column for which ti is negative, all coefficients m;i are negative or zero. In that case f = oo because the xi concerned can be chosen infinitely large: the next vertex from point 7 does not exist. 3. If the j* from point 6 is not unique, i.e. if there are more values of j which give the same most negative value ti, then any one of these values can be chosen. 4. If the i* from point 7 is not unique one speaks of degeneration. The possibility of this was referred to in point 3. The usual procedure is that one then chooses the smallest value of i*. Of the new basis at least one of the basis elements will then be equal to zero.

112

ALLOCATION; LINEAR PROGRAMMING

[6

Example of degeneration If in our example b4 had equalled 28 (instead of 32), then in point 7 we would have found: i* = 4 or 6. Point H in figure VI-1 then coincides with point E. The basis in this point would then have been (the smaller i* being chosen): x 2 ( = 7), x 3 ( = 9), x 5 ( = 15), x 6 ( = 0). As m 60 in table ( 16) would then be zero and m 61 would equal unity, x 6 would have to disappear from the basis during the next iteration, whilst x 1 would replace it. However as x 6 = 0, x 1 would also equal zero in the new basis. Thus this iteration does not change the valueoftheprofit. In table(17)we would now have: m 50 = 15, m 10 = O,f= t 0 = 21. Then x 4 is added to the basis. As m 14 < 0, x 1 remains in the basis (exit x 5 ). In principle it is possible that an arbitrary choice of i* in the case of degeneration causes the process to become cyclic: the iterations do not lead to the optimum but go round in a circle. There are ways of avoiding this pitfall. We shall not discuss this any further here, mindful of the words of Gass in his book "Linear programming": "Out of the many linear programming problems considered by investigators in the field, only three have been known to cycle. These were artificially constructed by Hoffman and Beale to demonstrate that cycling could occur".

The dual problem In the above we tackled the problem: maximize

(19)

subject to

x1 ;;:.0,

N

I

j= 1

a;1 x1 ~b;

(i=1,2, ... ,K).

(20)

In order to make equations of the K inequalities slack variables xN + i• which we shall indicate below by s;, were introduced: s;

=

N

b;-

I

j=l

aiix1 ~0,

(i= 1,2, ... ,K).

(21)

We now choose a set of parameters Y; so that for every value of i the product y;s; satisfies (i=1,2, ... ,K).

(22)

6]

THE DUAL PROBLEM

113

The profit function can then be written as

f

N

=

L cjxj

j= 1

+

K

L Y;S;

i= 1

(23)

where t1

=

K

LYiaii-cj,

i= 1

(j=1,2, ... ,N).

(24)

In equation (28) the relationship between the tj defined here and the ones from equation (7) is given. For the moment we are not interested in this relationship. Now if Xh satisfies: (25) then equation (23) gives:

f =

K

L b;Y;· i= 1

(26)

That relationships (22), {24) and (25) can be satisfied simultaneously is shown as follows: With the Simplex method (point 3) we saw that the solution of the maximization problem must be sought at a vertex, i.e. a point where at the most K of the N+Kvariables xj and s; can be non-zero; the basis consists of K variables. If xj (respectively s;) appears in the basis we choose tj (respectively Y;) equal to zero, so that at any rate conditions (22) and (25) will be satisfied because xj and S; are zero if they do not appear in the basis. Suppose there are n different indices j for which xj appears in the basis, then there will thus be just as many tj equal to zero. There are therefore n of the N equations (24) for which:

0=

K

L y;a;j-c1 •

(27)

i=1

Because there are K-n indices i for which s; appears in the basis, there are just as many Y; equal to zero, so that only n different indices i remain for which Y; does not equal zero. These n values of Y; can be found from the n .equations (27). All values of Y;(i = 1, ... , K) are therefore now known;

114

[6

ALLOCATION; LINEAR PROGRAMMING

the still remaining N- n values tj which can be unequal to zero are then determined from the remaining N- n equations (24). In this manner all Yi and tj are determined by the choice of the basis, independently of the values of the basis variables. For of the N + K variables tj and Yi only N are unequal to zero, these being evaluated from the N equations (24), so that their value is a function of the apq and the cq; for a given choice of basis Y; and tj are therefore independent of bp(P = I, 2, ... K; q = 1, 2, ... , N). That it was not illogical to use symbol tj in (24) is shown as follows. If xj appears in the basis then tj, according to the above, will be chosen equal to zero; this is in conformity with (10). If xj does not appear in the basis then it can be added to it with a value of I which, according to (23), causes the profit to decrease by tj, which conforms with what was said under point 5 in the Simplex method about tj there defined. The tj from (24) and the ones from (7) thus have the same numerical values. tj

In equation (7)

from (24) tj

=

tj

from (7), (j = 1, 2, ... N)

(28)

is also defined for values of j > N. For these values: Y;

=

tN+i

(i

(29)

= 1, 2, ... , K)

which is not surprising as we have replaced xN+i by s;. The relationship (29) is obvious when s; appears in the basis; when this is not the case then we remember that the addition of si = 1 to the basis comes to the same thing as holdingS; constant at zero and subtracting I from bi, which, according to (23), causesfto decrease by an amount Yi· Example: From table (17) it follows that the following values of tj andY; belong to the given basis: t1

=

f2

= 0,

Yt

= 0,

Y2

= -1, Y3 = 0, Y4 = 1.

With the Simplex method the iteration process is continued till all tj(j = 1, 2, ... , K+N) are non-negative. During this the profit function is a monotonic non-decreasing function, i.e. at every iteration f increases or remains constant. Subsequently the value of the function K

f="f.,b;Yi

(from equation (26))

i=l

in the optimum is the minimum of the values for which allY; and tj are non-negative;for after all when a basis is chosen which gives a lower/than the possible maximum, at least one of the tj(f = 0, 1, ... , K+N) will be negative.

6]

115

THE DUAL PROBLEM

Thus here a minimization problem has appeared out of a maximization problem. One problem is said-to be the dual of the other. Duality

Minimize

Maximize

K

g =

L b;Y; i=l

subject to

subject to

K

N

L aiixi,;;; b; j=l

LY;aiJ";;:;ci

i=l

(j = 1,2, ... ,N)

(i = 1,2, ... ,K)

and

and

Y;";i:;O

In the max-problem the slack variables s; are introduced, equation (21), whilst in the min-problem the ti from equation (24) are the slack variables. Equations (23) onwards have shown us how the function K

L b;Y;· i=l

has become

Starting from the min-problem this transition can be made in the opposite direction: Introduce parameters xi, so that Xh equals zero (j = 0, 1, ... , N) etc. If we return to the original problem that was tackled by the Simplex method: Maximize

!=

x1

+ 3x2

subject to X to

x2

~

,;;; x2,;;; 2x1 + x 2 ,;;; x 1+4x2 ,;;; Xt

0

9 7 22 32.

and

(30)

116

ALLOCATION; LINEAR PROGRAMMING

[6

The dual problem is: Minimize subject to (31) and

+ 2J3 + Y4 Y2 + Y3 + 4y4

Y1

~ 1 ~

3.

The answer to both problems is, according to table (18): X1

= 8,

X2

= 6,

f = 26,

(32)

with the slack variables

and y 1 = y 2 = 0,

1

5

y 3 = 7, y 4 = 7, g = 26 ,

{33)

with the slack variables t 1 = t 2 = 0. Note: By solving one of the two problems the dual problem is also solved. The number of variables (including the slack ones) is N + K for both problems; with the max-problem the number of restricting equations is K and with the min-problem it is N. When there is a lot of difference between Nand Kit can be useful to solve the problem with the smaller number of restrictions because this will involve less arithmetic (even though the profit function has more terms in that case). See also problem VI-6:

Interpretation of the dual problem

When a function has to be minimized this function will often relate to costs, because it is in the nature of things to minimize costs. Now it is not very difficult to concoct an arbitrary problem the mathematical formulation of which is represented by equations (31). It is harder to see a relationship between the min-problem (31) and the problem of the toymaker who appeared at the beginning of this chapter, his problem having been mathematically formulated as the max-problem of equations (30). We shall now investigate this relationship.

6]

THE DUAL PROBLEM

117

There were four restrictions in the original problem: 1. 9 components of type a are available, 2. 7 components of type c are available, 3. 22 components of type b are available, 4. 32 hours are available. The components and the hours can be considered as raw materials which are necessary in order to produce the end products. In our example the resources consist of four kinds of raw materials. The toymaker can earn money with each one, i.e. every resource represents a value to him. He therefore wants to attribute a value to every unit in each resource, let this value bey, for resource i. The total value of the resources then is g = 9y 1 +7y2 +22y 3 +32y4 .

To assemble one toy cart of type A the toymaker draws 1, 0, 2 and 1 units respectively from the various resource~, so that the value in resources incorporated in one A-type cart is W1 = Y1 +2YJ+Y4·

(34)

Similarly the value incorporated into one B-type cart is: (35)

Putting it rather more generally: if the sizes of the resources are h; units and if for the assembly of one example of product j one needs a;1 units from resource i, then the total value of the resources is

g =

K

L h;Y;

(36)

i=l

and the value attributed to one unit of article j is

W1 =

K

2:

i=l

Y;a;1 , (j = 1,2, ... ,N).

(37)

If a total of x1 units of article j are produced then the value attributed to them is x1 · W1. This value is acquired because a profit of c1x1 is made with these products, or in other words: the raw materials required for the production of article j represent a potential profit of c1x1, thus Xj wj

= xjcj,

(j = 1, 2, ••• , N),

from which it follows that (38)

118

ALLOCATION; LINEAR PROGRAMMING

[6

The number of units from resource i that are used in the total production equals

Vi

N

=

L1 aiixi

j=

(i = 1,2, ... ,K).

(39)

The value of the whole resource i is derived from the fact that Vi units are used: biYi = V;Y; (i = 1, 2, ... , K) so that

Yi = 0

when

V; < b;.

(40)

The value which is attributed to resource i with the chosen production programme (the chosen value of xi) is therefore zero if the resource is not completely used. We could put it this way: if the resource is only partly used then it is not very scarce and therefore has no economic value, or: we do not consider it worthwhile to spend money on expanding this resource, as even if this resource were twice its present size we could still earn nothing extra because the critical resources are the ones that are fully used up. Therefore the profit value is attributed to the latter resources. Let us suppose that, in conformity with equations (21) and (24) we have

then relationships (22) and (25) are rediscovered with the help of (40) and (38) respectively, as long as the Yi which were introduced in (22) are interpreted as above (value of one unit of a resource). In the present interpretation a negative value of ti means that in the current production programme the values are attributed to the resources in such a way that a given article which is not to be made (ti < 0 means xi = 0), would, if it were made, contribute more value than would be sacrificed for it ( Wi < c) which means that it definitely must be made: the resources can be employed better than they are at present. Because the total value of the resources, equation (36), is by definition equal to the profit (in conformity with (26)) the production programme must be modified till all ti are non-negative. Neither can a resource have a negative value (y; < 0) in the optimal programme. For Yi < 0 means that s; = 0, i.e. the resource is completely used; the negative value indicates that the units from the relevant resource lower the value of the products in which they are incorporated, which means that more profit could be made by not using this resource fully (s; > 0, then Yi = 0). Therefore, in order to achieve the largest profit, not only ti but also Yi must be non-negative.

6]

119

THE DUAL PROBLEM

As the total value of the resources equals the profit and as a lower profit can only be obtained by letting one or more of the ti andy; become negative, therefore the optimal ( = maximum profit) total value of the resources is the minimum for which all ti andY; are non-negative. In the last paragraph we have in fact derived the min-problem from the max-problem. We now tackle the problem rather differently. Suppose that the toymaker has to choose between the following alternatives: 1. To use his raw materials to make products and then to sell these. 2. To sell the whole stock of raw materials as such. For the second alternative the toymaker has to know what the minimum value of his raw materials is, in order to decide whether the price offered is acceptable. For if he values his stock too high then he runs the risk of turning down a favourable offer, where by a favourable offer we mean one that will give him a larger profit than his own production would. The stock cannot of course be given some arbitrary low value because a quantity of raw materials with which a unit j can be produced has at the very least a value of ci. Therefore when he determines the minimum value of all the resources he takes into account the fact that they must be valued in such a way that to use the materials to produce any of the articles would not be more profitable than to sell the raw materials as such. Minimize

I I

K

g=

I:

i=1

b;Y;,

subject to Y;~O

and

wj

K

=

I:1 y;aij~ci.

i=

I

(41)

Because Y; is the profit value which can be earned with one unit from resource i therefore Y; can also be thought of as the maximum price the toymaker would be willing to pay in order to increase that resource by one unit. The term shadow prices is often used in this connection. Notes:

I. From relationship (28) it follows that

L

i(basis)

K

mijci =

L= aviYv,

p

(42)

1

where index i has K values, chosen from the values I, 2, ... , K+N (see

120

ALLOCATION; LINEAR PROGRAMMING

[6

points 4 and 5 of the Simplex method). Also from equations (29) and (7) we have Yp

=

L

i(basis)

mi,N+pci-cN+p•

with

cN+p

= 0.

Substituting this in equation (42) gives mii

=

K

L

p=l

aPimi,N+p.

(43)

Thus from the last K columns of the Simplex table we can calculate the other columns using the coefficients which appear in the original inequalities. Use is made of this property in various variations of the Simplex method which eliminate much of the arithmetic. 2. For a general account of linear programming, use can be fruitfully made of vector- and matrix mathematics. However for a first introduction to linear programming a less abstract treatment seems more appropriate, so that the practical aspects of the problem are better emphasized. 3. In general the variables xi will not have whole integer values in the optimum. This does not matter if the products are powders or liquids which are by their nature divisible. With a problem like the toymaker's this can be important because the extra restriction is imposed that xi must have a whole integer value. Then the problem is to find a point with integer co-ordinates in the permissible area which will give a value off which is as near as possible to the optimum. A good approximation is often obtained merely by rounding the variables. In general the problem with discrete values is rather unpleasant however. See the article by G. B. Dantzig in Econometrica (vol. 28, no. 1; Jan. 1960). 4. For sizeable linear programming problems the use of an electronic computer is essential.

Transportation technique; shipment problem

The transportation technique is a method for solving linear programming problems when the allocation problem is to do with only one type of item. For instance we might have a number of warehouses where we hold stocks of the same article, whilst at other places certain quantities of the article are required. The problem now is to so arrange the flow of goods between the warehouses and the destinations that all requirements are met whilst the transport costs are minimized.

6]

TRANSPORTATION TECHNIQUE; SHIPMENT PROBLEM

121

For simplicity the same symbol V; is used to indicat': both the magnitude of the stock and the place where that stock is stored: Stocks in warehouses: V1 , V 2 , ••• Similarly: the requirements at the destinations; Bu B 2 , ••• Let the number of units that have to be shipped fJ om warehouse V; to destination Bi be xii; the transport cost per unit for th·s move is called cii· If for convenience we assume that the requirements ate equal to the sum of the stocks (see also problem VI-3), then we have the following linear programming problem: minimize (44) subject to xii;:;:o,L:Xii=Bi•l:Xii=V; .i

j

(i=l, ... ,K;j=l, ... ,N). (45)

There are K + N restricting equations, which are, however, linearly dependent because: (46)

also holds, so that one of the K + N equations can be directly derived from the remaining K + N- 1 equations. Therefore in the optimum the number of variables x,i that do not equal zero is at most equal to K + N -1: in this case the basis consists of K + N -1 variables (see point 3 of the Simplex method). The transportation method is demonstrated using an example with six destinations and four warehouses. In table (47) the available stocks are listed at the extreme right (V1 = 20, etc.), whilst the requirements are given at the bottom (B 1 = 18, etc.). In each square V;Bi the transport cost cii is given in the bottom right hand corner (example: c23 = 7). A possible first solution can, for example, be found with Dantzig's "north-west corner rule": start by investigating the north-west corner, i.e. the top left hand square. There are three possibilities:

= B 1 • Then continue horizontally along the table, i.e. now begin to supply B 2 from V1 • 2. B1 = V1 : choose x 11 = B 1 = V1 : destination B 1 is satisfied, stock V 1 is exhausted. Then continue diagonally across the table, i.e. investigate the square V2 B 2 • ? . B1 > V1 ; choose x 11 = V1 ; B1 needs more, thus supplies can start from V 2 • Therefore continue vertically down the table. I. B 1 < V1 : supply B 1 from V1 , i.e. choose x 11

122

[6

ALLOCATION; LINEAR PROGRAMMING

Continue in this way till eventually the square VNBN is reached. The solution thus obtained is indicated in table (47); the xii have been circled in the relevant squares.

a, v,

85

18

+1

2 r---

--------

--

---------

I I

8

IL -1

4

8 I

3

-- -------r. 7

I

I I

+1

I

+3

I

t

8 1--

I

30

-7

5

4

5

(47)

5

2

15

10 6

3 25

14

4

9

I

1~

+4

12

-6

9

I

---------1-J

4

1 10

-6

\7

6

-------+2

+3

5 18

10

12

L---------,

I

2

20

I I

+7\

I

7

[

I

I

-3

t

15

r--

6

9

-3

0

+2 -l

26 7

10

90

Example: V1 = 20, B 1 = 18. Choose x 11 = 18 ; in V1 a stock of 2 remains; this is sent to B 2 • B 2 then still needs 8 more which can be supplied from V2 , etc. The costs corresponding to the first solution are: f= 18 X 8+2 X 4+8 X 3+15 X 7+7x4+5 X 2+9 X 9+16 X 6+10 X7 = 566.

If in the walk from square V 1 B 1 to VkBN only horizontal and vertical steps are taken then the number of squares with circles is K + N -1. A diagonal step decreases this number by 1: the suggested solution is then degenerate. In our example there is no degeneration; the number of circles is 9(= 4+6-1). If, for instance, the step from V2 B3 to V3 B4 had been taken in one go, diagonally, then the number of circles would have been 8. In such a case we make it 9 anyway (the basis consists of 9 variables) by circling a zero in V2 B 4 or in V3 B3 • Now in order to find out whether a cheaper solution than the proposed one exists, all squares V;Bi which now do not contain a circle are investigated. V1B4 is such a square for instance. This means that destination B4

6]

TRANSPORTATION TECHNIQUE; SHIPMENT PROBLEM

123

receives no goods from stock V1 , whilst it might perhaps be sensible to supply B 4 from V1 • We are now going to take a walk which begins and ends in V1 B4 : From V 1B4 go horizontally to a circled square ( V1 B2 ) that lies in a column which contains at least one more circle-square (V2 B 2 ). In the first named square (V1 B2 ) we turn a corner and the walk is continued in a vertical direction to circle-square (V2 B 2 ) which lies in a row containing another circle-square (V2 B 3 and V2 B4 ). In this square (V2 B 2 ) the walk reverts to a horizontal direction, etc. The walk ends in a last verticle step when the walk is back in the column which contains the starting off point. The walk is indicated in table (47):

The walk for the square V4 B 2 is also indicated in the table. Why are these journeys made? Suppose we want to ship one unit of goods from V1 to B4 • Starting from the existing solution this can be realized as follows: I. Bring one unit less from V1 to B 2 ; decrease in cost: 4. 2. Bring one unit more from V2 to B 2 ; increase in cost: 3 3. Bring one unit less from V2 to B4 ; decrease in cost: 4 4. Bring one unit more from V1 to B4 ; increase in cost: 7. Neither the total quantity supplied by V1 (and V2 ) nor the amount received by B 2 {and B4 ) is changed by this. Thus we have found a possible solution. This procedure has changed the total cost by an amount Af = -4+3-4+7

= +2

In view of the resulting increase in cost there is no point at this stage (i.e. starting from the existing solution) in shipping goods from V 1 to B4 • We now write + 2( = Af) in square V 1 B4 ; similarly in square V 4 B 2 we write + 3 because for this square we have Af= -6+9-2+4-3+1

= +3

Thus for each square the corresponding Af is calculated by finding the algebraic sum of the transport costs (alternately negative and positive) which appear in the squares in which the walk changes direction. The value so found is entered in the square. If these values are all positive or zero then a decrease in the transport costs is not possible; the optimal solution has then been reached. In our example this is not yet the case. We are looking for the square with the greatest decrease in cost; in our example it is V2 B 6 where Af = - 7. We therefore endeavour to ship as much as possible from V2 to B 6 • The walk from V2 B 6 looks as follows:

124

[6

ALLOCATION; LINEAR PROGRAMMING

± C;i

-4 0 equals s = sin t? Assume that the control factors referred to above are equal to 4. A manufacturer sets his production equal to the average sales over the latest time T. During a comparatively long period of time the sales have remained steady but now they suddenly rise to a new level and remain at this level. The production follows this step

189

PROBLEMS

V-1.

(how?) and at a time T after this jump, the production has also reached the higher level and thus again equals the sales. Unfortunately there is now a permanent stock shortage; therefore the control system is changed in such a way that a term, proportional to the stock shortage, is also added to the production. What happens to the production and the stock shortage with this new system, if the sales suddenly increase by an amount k? An agreement is made with the manager of an hotel, for a number of guests to dine there on two consecutive days. A restriction is included to the effect that if a guest is dissatisfied the first day then he has the right to eat elsewhere the second. The agreed price is $ 10. - per person per meal. The manager knows from experience that there are always dissatisfied customers, but that the average number is closely related to the quality of the meal. He has four qualities and knows the corresponding probabilities of losing a customer: excellent p = 1/10 p = 3/10 good moderate p = 5/10 p = 9/10 bad (after all there are some people who are always happy). The profit he makes with these four categories of meal is 3, 5, 7 and 8 dollars respectively. Which quality of meal should he serve his customers on the two relevant days if it is worth 0, 5, 10 or 15 dollars respectively, to him to see a satisfied customer leaving his establishment on the second day?

V-2.

5

,

,6------6:;;----012

190

V-3.

V-4.

PROBLEMS

Road network problem: the 12 circles represent towns whilst, the lines represent connecting roads of the indicated length. Determine the shortest distance from townj(j = 1, 2, 3, ... , 11) to town 12. A dealer in caravans buys one or two from the manufacturer at the beginning of each summer month (1 May, 1 June, 1 July, 1 August). During the months May to August incl., the demand to the dealer is as follows: 10% probability of no demand. 70% probability of demand for one caravan. 20% probability of demand for two caravans. The retail price is $ 4000.- each. He will never sell more than two caravans per month. When he has no caravans in stock he sells none (the customers require immediate delivery). The dealer has no special cost for placing an order, the cost of telephoning the manufacturer is negligible, whilst reviewing the stock also costs nothing because the dealer can see at a glance what his stock is: he only has room for 4 caravans. The manufacturer offers immediate delivery at $ 3.000.- for one; whilst two caravans cost $ 5900.-. The dealer's stock holding cost (storage, maintenance, insurance, etc.) is $ 60.- per month for each caravan that he has in stock at the beginning of that month (after the delivery takes place). From 1 September to 1 May he sells nothing unless he drops the price below $ 4000.-. It is possible to sell an average of 1/4 of the caravans he has in stock on 31 August at $ 3400.- each, whilst the manufacturer buys his remaining ones at $ 2200.- each. This low price is due to the fact that the manufacturer has to store and maintain the caravans, whilst they also become out of date. How many caravans should the dealer order, at the beginning of each month (May-August incl.), as a function of the stock he is holding at that time? If one assumes that his stock is nil on 30 April then what is his expected profit over the coming season? Note: As he gets rid of his remaining stock at the start of September, he incurs no stock holding cost in that month. The twelve towns from problem V-2 have to be connected by a network of cables which follow the existing roads. How should the cables be laid so as to minimize the total length of cable?

191

PROBLEMS

VI-1.

A manufacturer makes three kinds of articles, each of which has to undergo two processes. The hours needed for the two processes per thousand examples of the articles, are: Hours required per I 00 Article 1 Article 2 Article 3

VI-2. VI-3.

VI-4. VI-5.

process 1

process 2

10 15 25

20 10 10

The profit per thousand for the three articles is 80, 70 and 95 dollars respectively. The manufacturer still has 200 hours free for the first process and 150 hours for the second. How many should he make of each kind of article in order to maximize his profit? Check table (57) in Chapter VI (page 130). In the shipment example it was supposed that the sum of the requirements equalled the sum of the stocks (see page 121). How does one tackle a shipment problem where the sum of the stocks is greater and smaller, respectively, than the sum of the requirements? Prove note 1 from page 111. If with the Simplex method (point 3), the restrictions are of the form: N

L1 aiixi~b;

j=

(i=1,2, ... ,K),

0, then there is an obvious first solution: xi = 0 and xN+i = b;, where xN+i are the slack variables. Now suppose that one or more of the b; are negative, or, another way of achieving the same effect, that all the b; are greater than or equal to zero but that the ::::; sign has been replaced by ~ in some of the restrictions. Now there is not a so obvious solution; the corresponding slack variables would become negative. It is also possible that some of the inequalities have become equalities. In these situations one can sometimes find a first solution by trial and error, the equations having to be written in a suitable form (see examples (31) and (32) from Chapter VII). If trial and error is unsuccessful then there is the following method: 1. Equal sign (all b; ~ 0): still introduce a non-negative slack variable, i.e. treat these equations as if they contain a ::::; sign; however to the profit function which is to be maximized, we add a term which includes this variable with a very large negative profit whilst all b;

~

192

PROBLEMS

coefficient. The effect of the latter is that at each iteration an attempt is made to remove this variable from the basis, or at least to give it a value of nil. If this is successful then the problem is solved: slack variable equal to zero means the equation is satisfied. If it is unsuccessful then the problem has no solution. 2. ~ sign (all b 1 ~ 0). First introduce a non-negative slack variable in order to make it an equal-sign and then treat the problem as indicated under 1. Apply this method to the following problem: Maximize f = 2x 1 + 5x 2 subject to:

VI-6.

How does one apply the Simplex method when one wishes to minimize a function? Example: Minimize f = 4x 1 + 3x 2 + 8x 3 subject to: x 1 +x 3 ~ 2, x 2 +2x 3 ~ 3, whilst the variables must be nonnegative. Let the possible first solution be x 1 = 2, x 2 = 3, x 3 = 0. VII-1. Colonel Blotto has 4 regiments available, whilst his opponent can only send 3 regiments into battle. Both have set their sights on two strategic points, sl and s2. Colonel Blotto can choose from 5 different strategies: 1. Send 4 regiments to S 1 and none to S 2 2. Send 3 regiments to S 1 and 1 to S 2 3. Send 2 regiments to S 1 and 2 to S 2 4. Send 1 regiment to S 1 and 3 to S 2 5. Send no regiments to S 1 and 4 to S 2 • His opponent can choose from 4 strategies: 1. Send 3 regiments to S 1 and none to S 2 2. Send 2 regiments to S 1 and 1 to S 2 3. Send 1 regiment to S 1 and 2 to S 2 4. Send no regiments to S 1 and 3 to S 2 • To arrive at the best decision the "pay-off" or "gain" must be determined: If one side sends more regiments to S 1(i = 1 or 2) than the other side sends, then the first side wins earning themselves one point for each regiment they have beaten + 1 extra point for occupying S 1• If both sides send an equal number of regiments to S 1 then the battle is inconclusive (0 points). Example: Blotto sends 3 regiments to S 1 and 1 to S 2 , whilst the enemy sends 2 regiments to S 2 and 1 to S 1 • The points are then scored as follows:

193

PROBLEMS

Blotto captures S 1 ( = 1 point) and 1 enemy regiment ( = 1 point). The enemy captures S 2 ( = 1 point) and 1 of Blotto's regiments ( = 1 point). Blotto therefore gains 0 point. Show that the pay-off table is as follows: Enemy Blotto 1

2 3 4

5

2

3

4

2

1 0 2 3 2

0 -1 -2 1

4 1

3 2 0 1

-2 -1 0

4

Prove that the optimal (mixed) strategies of Colonel Blotto and his opponent are given by:

X=(:~), 4/9

/

y =

1/18 4/9 4/9

(

l/18 \

')

respectively,

'

whilst the value of the "game" is 14/9 in Blotto's favour. VII-2. A variation of the game of "Le Her". The game is played with only the court cards (4 each of king, queen and jack) and the 4 aces, from a deck of playing cards. Two players take part: the dealer and the receiver. The dealer shuffles the cards and deals one to. his opponent and one to himself. The object of the exercise now is to obtain a higher value card (ace highest) than one's opponent whilst one does not know the opponent's card nor the remaining 14. The rules are as follows: 1. If the receiver is not satisfied with his card then he may exchange his card with the dealer's; the latter has to permit this unless he possesses an ace. 2. After the receiver has or has not exchanged his card, the dealer may exchange his card with a card drawn from the pile of 14. If he draws an ace, then this exchange does not take place. Of course in both cases the rule is that if one has expressed one's willingness to exchange, then the exchange must take place (except when this would cause one to obtain an ace).

194

PROBLEMS

Both the dealer and the receiver then shows his card. The one with the higher value card wins. In case of a draw the following rules apply: 1. AA or KK: dealer wins; 2. J J: receiver wins; 3. QQ: winner decided by the spin of a coin. Determine the exchange strategies the two players should employ, in order to maximize their probability of winning. Calculate the magnitude of these probabilities. VII-3. Prove that if dominance occurs in a 2 x 2 pay-off table, then there is a saddle point. Is the converse true? VIII-1. Which dummies are definitely redundant in the network diagram below?

n p

0

q r /

/

/

/

/d7

/

s

/dB

VIII-2. Given the network diagram with activity durations as shown. Number the events and fill in the corresponding event times. Indicate the critical path. Evaluate the various floats.

~/~ -~ ~DO

DO~~

0 0 ',,,

7

/

',,

DO

,

I

',DO/ tz

_ _,_,10'-••',____,5~-- _ ___,_7_ _ _~...

DO 10

DO

DO 9

/

/

12 ,/~,

DO /

6

19

7o

00;---"'9'--_

DO

DO

PROBLEMS

195

VIII-3. Draw the network diagram for the project consisting of the activities a to k inclusive, if: a must be preceded by e b must be preceded by e c must be preceded by a and j d must be preceded by e e must be preceded by f must be preceded by d and h g must be preceded by f h must be preceded by i must be preceded by j must be preceded by b, d and h k must be preceded by c, g and i If the activity durations are 17, 25, 10, 8, 15, 7, 3, 30, 20, 5 and 15 days respectively, what is the shortest overall time in which the project can be completed? Which activities are critical? Which activity has the most free float? What are the consequences if activity d should finish a week later than the earliest time by which it could have been completed? Note: There is sufficient labour available. VIII-4. The manager of the project referred to in the above problem, has 5 men available, each of whom can perform the necessary tasks. For the execution of each of the activities a to k incl., the number of men required is 1, 2, 2, 1, 3, 1, 1, 2, 1, 4 and 3 respectively. Can the project be completed by the 5 men in the shortest time which was calculated in problem VIII-3? Plan the timing of each of the activities, preferably in such a way that the number of men at work on the project varies as little as possible. IX-1. A publicity manager can choose from three different kinds of publicity campaigns A, B and C to which the following evaluations can be attributed: 6, 8 and 10, as long as the competitor does not find out what is going to happen. If the competitor does discover his intentions then the campaign will be partly a wash-out, the evaluation of the results then being 5-t, 5 and 2 respectively. Which campaign should the manager select in each of the situations listed below? a. He is a pure optimist b. He is completely pessimistic about the result c. His optimism coefficient is 0.4 or 0. 7

196

IX-2.

PROBLEMS

d. He only considers the average result e. The least regret criterion is .applied. What is the best strategy if there is a 20% probability that the competitor "finds out"? How can (in this particular problem) the coefficient of optimism be defined? In problem IX-1 the least regret criterion was less pessimistic than the maximin (or minimax) criterion. It is acceptable as a criterion in that problem. Using the pay-off table below show that the least regret criterion must be treated very carefully:

95 15 -100

1

A

2 3

90 -110 -105

-10 190 -9

(A decides with the risk unknown; pay-off table in A's favour).

What remarkable effect occurs when A is also allowed a fourth strategy: A

4

100

-130 200

and the least regret criterion is applied?

ANSWERS

1-1. 1-2. 1-3. 1-5. 11-1. 11-2. 11-3. 11-4. 11-5. 11-7.

1/3; 1/2 the two probabilities are equal 687; 865 Pii = 0 fori = 3; 4; 5; 6 andj = 1; 2 150; 10.5 15.47; o.24; o.28. w-4 4.72; 0.764 39%; 0.135; 4.88; 1.84 3.43; 0.153; 0.367 Pn = P1 (1-p 1t- 1 with p 1 = 1-e-Ep•; 3.19; 0.023 Hint: Define the state immediately after the arrival of an article (zero-state therefore does not occur). Prove that: 00

Pt

00

I Pi k=i I pko i=l 00

I PiPi-i+l i=i-1

(j

~

2),

00

L Pi= i=l

1;

where Pi is the (limiting) probability of being in state j, whilst Pk is the probability that the number of arriving customers, during a given interval, is k. Show that the same equations hold when all pi(j ~ 1) are replaced by uijP 1 , where (j~

1).

Because of the similarity of the equations, we have:

u ~ 1),

so that Pi

= Pt (1-pt)i - 1 ,

this result is independent of the customers' arrival process, as long as the arrivals in different intervals are independent of each other,

198

III-1. III-2.

III-3. III-4.

ANSWERS

whilst this number must have an average greater than one in order to obtain a steady state. 952; 352 298 L smaller than 800 dollars

Q

J

33DF(

~ 2f

1+

J8)2 ; 1

III-5. III-6.

0.09; 644; 434.6; 437.9 200

IV-2.

p(t)

IV-3.

At first:

J 3

Q'

~

= _±. {(1-5t) · e- 21 + 7 · sint- cost} 25

p(t)

=

kt/T for

p(t)

New rule:

for 0 ~

t ~

T

=

k

0

for

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF