AN INVESTIGATION INTO A TWO STAGE TANDEM QUEUE FOR AN OPTIMUM SAWMILL DESIGN By .ROBERT LEWIS ZWICK A.Sc., The University of B r i t i s h Columbia, 1980 A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF APPLIED SCIENCE in THE FACULTY OF GRADUATE STUDIES (Department of Forestry) We accept th i s thesis as conforming to the required standard THE UNIVERSITY OF BRITISH COLUMBIA A p r i l 1984 ©Robert Lewis Zwick,l984 In presenting t h i s thesis i n p a r t i a l f u l f i l m e n t of the requirements fo r an advanced degree at the University of B r i t i s h Columbia, I agree that the Library s h a l l make i t f r e e l y a v a i l a b l e f o r reference and study. I further agree that permission for extensive copying of t h i s thesis f o r scholarly purposes may be granted by the head of my department or by h i s or her representatives. I t i s understood that copying or p u b l i c a t i o n of t h i s t h e s i s for f i n a n c i a l gain s h a l l not be allowed without my written permission. .Department of Gra~d 5f~uW/^s ( The University of B r i t i s h Columbia 1956 Main Mall Vancouver, Canada V6T 1Y3 DE-6 (3/81) i i ABSTRACT The a p p l i c a b i l i t y of queueing theory as an operations research tool for modelling sawmills is described. The model selected i s a two-stage tandem queue with two stations in the second stage. Each of the stations has general service times and f i n i t e buffer storage capacities which create the p o s s i b i l i t y of blocking pieces coming out of the f i r s t stage. A three-variable service time d i s t r i b u t i o n is proposed to model sawmill machinery processing the pieces. This d i s t r i b u t i o n creates the potential to functionally describe the sawmilling process, in contrast to the t r a d i t i o n a l method of using empirical d i s t r i b u t i o n s gathered at an existing sawmill. The l i t e r a t u r e in tandem queues reveals the lack of work done and the degree of d i f f i c u l t y in this f i e l d of study. A n a l y t i c a l solutions do not exist for the queue system studied. Numerical approximation techniques were not used to model the queue system, but they have good potential for being u t i l i z e d . A simulation study was performed on the queue system. A computer program was written with the intention of obtaining results anticipated in a mathematical analysis. Two separate queue d i s c i p l i n e s were studied: saturated and unsaturated f i r s t - s t a g e queues. The unsaturated queue investigated the dependency of system performance on the a r r i v a l rates. It also examined the operation of the queue under d i f f e r e n t second-stage a r r i v a l i n t e n s i t i e s . The saturated queue analysis focused on the phenomenon of piece blocking in the f i r s t stage. Some conclusions could be made from the simulation study with regards to design procedures for a sawmill. The study showed that in certain cases, improvement to system production by increasing a second-stage machine rate can be comparable to increasing the headrig rate. In addition, two stations in the second stage can complicate the analysis s i g n i f i c a n t l y . The simulation study also examined the p o s s i b i l i t y of u t i l i z i n g tandem queue analysis to provide solutions for optimum second-stage buffer capacities. The f e a s i b i l i t y of modelling sawmills by tandem queues exis t s , but the designer must choose the appropriate a n a l y t i c a l method to use. Numerical approximation techniques would l i k e l y prove to be the most successful method. Machine service times should also be studied in a sawmill to establish the s t a t i s t i c a l nature of the sawmilling process. This w i l l improve the solutions provided by queueing theory analysis. i v TABLE OF CONTENTS Page ABSTRACT i i LIST OF FIGURES vi ACKNOWLEDGEMENT v i i 1 . INTRODUCTION 1.1 Queueing Theory and Sawmill Design 1 1.2 Tandem Queues and the Model 3 1.3 A Brief Explanation of Queueing Theory 7 1.4 The Appeal of A n a l y t i c a l Models 9 1.5 Queueing Theory Notation 14 2. THE QUEUE DISCIPLINE 2.1 The Assumptions of the Queue System 16 2.2 The A r r i v a l Process 17 2.3 Additional Assumptions 19 2.4 Customer Types 20 2.5 Service Time Distributions 2.5.1 The D i s t r i b u t i o n Assumption 21 2.5.2 The k-Erlang D i s t r i b u t i o n 23 2.5.3 The Total Service Time 26 3. ANALYSIS OF AN UNSATURATED QUEUE 3.1 The Theoretical Analysis 28 3.1.1 The Departure Process of a Queue 28 3.1.2 Tandem Queues with Correlated 33 Service Times 3.2 Simulation Analysis of the Queue System 36 3.2.1 The Queue Assumptions for the 36 Simulation Study 3.2.2 The Service Time Random Variable 39 3.3 Discussion of the Simulation Model 42 3.3.1 Production vs. I n t e r a r r i v a l Time 43 3.3.2 Other System Measures Affected 50 by I n t e r a r r i v a l Time V TABLE OF CONTENTS (cont'd) Page 4. ANALYSIS OF A SATURATED QUEUE 4.1 The Theoretical Analysis 55 4.2 The Simulation of a Saturated Queue 56 4.2.1 Production of System as a Function 57 of Machine Rates 4.2.2 The Effect of Blocking on Second- 61 Stage Queues 4.2.3 System Production Affected by 65 Second-Stage Storage Capacity 5. SUMMARY AND CONCLUSIONS 68 BIBLIOGRAPHY 7 4 APPENDICES A. Notation and Symbols 79 B. An t i t h e t i c Variates 82 C. Renewal Process 85 D. k-Erlang D i s t r i b u t i o n 88 E. Estimation of k-Erlang Parameters 92 F. Production vs. I n t e r a r r i v a l Time 99 and Other System Measures vs. I n t e r a r r i v a l Time ( i n c l . simulation program and data) G. Production of System as Function of Machine 106 Rates ( i n c l . simulation program and data) H. The Effect of Blocking on Second-Stage Queues and System Measures Affected by Second-Stage Stor- 112 age Capacity ( i n c l . simulation program and data) v i LIST OF FIGURES Fig. T i t l e Page 1 Sawmill System Investigated 4 2 Schematic Representation of Queue System 6 3 A Simple Queue Mechanism 9 4 Tandem Queue Studied by Gershwin and Berman 10 5 Effect of Machine Speed on Production 10 Rate and Average In-Process Inventory 6 Effect of Storage Size on Production 12 Rate and Average In-Process Inventory 7 Queueing Theory and Optimum Cost Decisions 13 8 k-Erlang D i s t r i b u t i o n With Various Shape 25 and Scale Parameters 9 Production vs. I n t e r a r r i v a l Time 49 10 Average Contents in Storage 3 vs. I n t e r a r r i v a l Time 53 11 % Time Stage One i s Blocked vs. I n t e r a r r i v a l Time 54 12 Production vs. Machine Rates 60 13 % Time Stage One i s Blocked vs. Machine 2 Rate 63 14 Average Contents in Storage 3 vs. Machine 2 Rate 64 15 Production vs. Machine-2 Storage Capacity 67 16 The Renewal Process 86 v i i ACKNOWLEDGEMENT I would l i k e to thank Dr. Robert W. Kennedy for his unending assistance in a l l aspects of my work with the Forestry faculty. Dr. Kennedy's e f f o r t s to provide funding, counselling and ins p i r a t i o n w i l l always . be well appreciated, and well remembered. I would also l i k e to thank committee members Dr. Steve Wang and Dr. David Tai t for their advice and assistance. I must extend a special and warm thank you to committee member Dr. Shelby Brumelle from the Commerce faculty. It was Dr. Brumelle's thoughtful guidance that made t h i s paper a r e a l i t y . F i n a l l y I would l i k e to thank my parents Lewis and Elizabeth, my s i s t e r Theresa, and espe c i a l l y my brother Jim. This paper was written with them always on my mind. Robert L. Zwick 1 INTRODUCTION 1.1 Queueing Theory and Sawmill Design Management decisions in the sawmill industry can often involve a l o t of f i n a n c i a l resources - p a r t i c u l a r l y in the design stages of the sawmill. A p i v o t a l question that one encounters in a design project for a modern sawmill i s , "What i s the optimal sawmill design"? Not only is the designer concerned about constructing the best producing sawmill, but his senior company management are devoted to obtaining the best m i l l for the money available. Almost a l l facets of a sawmill operation involve the uninterrupted processing of discrete pieces. The important l o c a l design c h a r a c t e r i s t i c s for a processing station are that an adequate input of pieces are a v a i l a b l e , and that a smooth, uninterrupted output ensues. Simply restated, a machine center should be neither "starved" for incoming pieces, nor blocked or constrained on the output side. A good discussion of considerations for sawmill design is given by W i l l i s t o n . 3 3 Queueing theory lends i t s e l f well to a quantitative solution of the previously stated design problems. Designers have applied t h i s operations research (O.R.) technique to provide some of the answers to sawmill design problems. To date, most solutions to these queueing problems have involved discrete time-event simulation. Solutions by simulation have 2 evolved quickly since many good simulation languages are readily available, and apply well to sawmill design. The engineer can f i r s t analyze the sawmill layout by computer to determine the adequacy of the design. The advantages of sawmill simulation have been well described by Aune. 2 - 1 3 Simulation however does have several disadvantages. Primarily, i t does not provide an optimum solution to the design. The designer must compare the simulation results of a par t i c u l a r design to alternative design simulation runs. He must vary the input parameters, to arrive at a best solution amongst a l l the t r i a l s . He must then make an empirical decision as to whether the design layout is suitable. This design method can be expensive, tedious and even a waste of time. Sawmills are high-productivity i n d u s t r i a l systems. The trend of higher machine processing speeds has not achieved i t s plateau. However, the problems associated with high speed equipment becomes apparent when one evaluates a sawmill system in i t s entirety. Modern small-log sawmills allow l i t t l e room for mistakes. An operating error of only a few seconds, with a modern machine running at 1.60 meters/sec. (5.33 ft./sec.) w i l l cause logs on a conveyor to travel large distances. Even minor machine or personnel i n e f f i c i e n c i e s can result in a serious reduction in piece throughput. Bottlenecks and blocking of up-stream processors are the product of these i n e f f i c i e n c i e s . Therefore i t i s important to be able to predict potential problems in the m i l l design before the sawmill i s b u i l t . 3 Interest of sawmill designers has consequently focused upon an a l y t i c a l solutions to these queueing problems. For example, a computer program has been written by Carino and Bowyer 1 0 to take into account many sawmill design layouts, using queueing theory to provide the a n a l y t i c a l solutions. They also incorporated the direct search method algorithm (a nonlinear program) to arrive at the optimum solutions for various design parameters to the queue system. 1.2 Tandem Queues and the Model The sawmill designer is generally concerned with tandem queues. In a tandem queue, the output of the f i r s t queueing stage provides input d i r e c t l y into a second stage. Tandem queueing theory is r e l a t i v e l y new, with the bulk of the l i t e r a t u r e s t a r t i n g in the mid-70's. Some of the simpler tandem queue d i s c i p l i n e s can be solved mathematically. However, they often are of no use in modelling the system because of the si m p l i s t i c assumptions used to describe the tandem queue. Unfortunately, increased complexity of the tandem queue configuration often creates l i m i t s to the tractable solution. The problem can become mathematically d i f f i c u l t to solve. Sometimes the more general or useful problems have only be solved by numerical approximation. The purpose of t h i s study is to examine the potential use 4 of queueing theory to solve one aspect of a sawmill design layout, which could prove useful to the sawmilling industry. The tandem queue system considered (refer to Fig. 1) represents one of the small-log sawmill layouts discussed by Aune and Lefebvre. 1 This particular sawmill layout also represents a queue system that had not been analyzed by Carino and Bowyer. 8" 9 Source: Aune and Lefebvre, 1 p 15. 5 The sawmilling system in Figure 1 depicts a headrig " 1 " with a cant edger " 2 " d i r e c t l y downstream, and an off-stream reman edger " 3 " handling the slabs. There i s a queue (of sawlogs in this case) before the headrig. The logs are processed, with the output (of cants) d i r e c t l y becoming the input into the cant edger. A proportion of the headrig output is in the form of slabs, which are redirected to a reman edger. There are queues before both edgers, and each have the p o s s i b i l i t y of blocking the headrig output should either of the edger buffer zones become f i l l e d . In queueing theory parlance, we have a two-stage tandem system. The f i r s t stage is a single station and consists of a single storage buffer and a single server. The second stage consists of two stations, and each station has a single storage buffer and server (refer to Fig. 2 ) . A brief explanation of queueing theory i s given in section 1 . 3 and of queueing theory notation in section 1 . 5 . The merits of examining t h i s s p e c i f i c queue system are multi f o l d : 1 . This queue system is very common in small-log sawmills. 2 . The queueing analysis may be solved by using some of the recently introduced methods of obtaining tandem queue solutions. 3 . The sawmill layout may continue to be used in future sawmill designs. F i g . 2. Schematic Representation of Queue System Machine 3 v Queue /P/1 . Machine 1 Machine 2 STAGE 1 STAGE 2 7 1.3 A Brief Explanation of Queueing Theory Queueing theory i s the mathematical study of "queues" or waiting l i n e s . There are three aspects that are c h a r a c t e r i s t i c of a queue system. They are the a r r i v a l process, the waiting line (and i t s " d i s c i p l i n e " ) , and the service d i s t r i b u t i o n . Each of these points w i l l be b r i e f l y touched upon. The customers arrive to be serviced. The a r r i v a l process into the queue i s generally a random process and usually exhibits some s t a t i s t i c a l d i s t r i b u t i o n . The customers can come from either an i n f i n i t e or a f i n i t e population source. An i n f i n i t e assumption makes the mathematical analysis simpler and is often used for a large population source. The queueing analysis i s usually concerned with the d i s t r i b u t i o n of the i n t e r a r r i v a l time. The time in t e r v a l between each a r r i v a l i s a random variable and usually conforms to a s p e c i f i c s t a t i s t i c a l d i s t r i b u t i o n . The queue contains customers waiting to be serviced. The queue can have a f i n i t e or i n f i n i t e capacity. A f i n i t e capacity can result in customers being refused entry into the l i n e . It also means a more complicated analysis of the queue. The waiting l i n e i s characterized by a d i s c i p l i n e that the customer exhibits. Customers can present p e c u l a r i t i e s such as balking or waiting in l i n e for a certain time and then leaving. A l l of the queue i r r e g u l a r i t i e s have to be written into the analysis i f accurate modelling i s desired. 8 The waiting customer i s then serviced. A service mechanism consists of one or more service f a c i l i t i e s , each of which contains one or more service channels, c a l l e d servers. Servers can be p a r a l l e l or in series (tandem) with each other. The time elapsed from the commencement to completion of service i s c a l l e d the service time. The service time i s usually a random variable and follows a s p e c i f i c s t a t i s t i c a l d i s t r i b u t i o n . For queueing analysis, the service-time p r o b a b i l i t y d i s t r i b u t i o n for each server must be s p e c i f i e d . To complicate the analysis, the service rate can be dependent upon the amount of customers in the queue or by possibly some other influencing factors. In a sawmill, the machine centers and their associated conveyor equipment are regarded as servers. The customers are the logs, cants, boards, etc., that are to be processed by the machines. These pieces queue up before the machines in storage buffers or transfer chains. Therefore almost any aspect of a sawmilling environment can be modelled by queueing theory. Figure 3 depicts a simple queue mechanism. 9 Served customers LOGS (Customers) i i STORAGE FACILITY (Queue) C C C C C C C C C C C Queueing system MACHINE 5 CENTER •S (Service 5 facility) Served customers F i g . 3. A Simple Queue Mechanism Source: H i l l i e r and Lieberman, 1 9 p 404. 1.4 The Appeal of Analytical Models Gershwin and Berman's 1 6 analysis of a tandem queue highlights many of the exciting p o s s i b i l i t i e s for mathematical solutions to tandem queuing problems. Their paper explores in d e t a i l the operating characteristics of two unreliable machines in tandem with random processing times and f i n i t e storages before each machine (refer to Fig. 4). 10 \ M A C H I N E 2 1 F i g . 4. Tandem Queue Studied by Gershwin and Berman Source: Gershwin and Berman, 1 6 p 1 . Gershwin and Berman provide an extensive l i t e r a t u r e review on the topic of tandem queues. In addition, their results show that i f a tandem system can be mathematically modelled, many system features of interest to the designer can be examined. Quantitative decisions can be made on design problems such as buffer sizes, machine production rates and machine r e l i a b i l i t y . Some of their results are shown in Figures 5 and 6. I 1 tO 100 IOOO F i g . 5. Effect of machine speed on production rate and average in-process inventory. Source: Gershwin and Berman, 1 6 p 8. 11 Figure 5 shows what effect varying machine 1 and 2 operating speeds has on system production and in-process inventory. The abscissa parameters " M I " and "M2" represent machine 1 and 2 operating speeds respectively. The bracketed number in superscript indicates the graph number. The l e f t ordinate i s system production "p" and the right is in-process inventory "n" for the f i n i t e storage buffer between the two machines. Graphs 1 and 2 display the e f f e c t of varying the speed of machine 1 and 2 respectively, on the system c h a r a c t e r i s t i c s production and in-process inventory. The curves represent non-linear functional relationships between the parameters. Results of a simulation study of t h i s system would not reveal a continuous l i n e . Instead, a simulation study can only generate discrete data points. A regression l i n e can then be drawn through the points to show the functional relationship. This is what was done for the simulation studies in chapters 3 and 4. Figure 6 shows the e f f e c t of varying the storage size "N" on p and fi. Once again, non-linear functions are exhibited. These graphs imply that i f a system can be modelled a n a l y t i c a l l y , various system c h a r a c t e r i s t i c s can be quickly determined for d i f f e r e n t operating ranges. Optimum or "threshold" solutions can also be predicted beyond which further improvements in the system may not substantially increase the desirable returns from an operating c h a r a c t e r i s t i c . This mathematical analysis could a s s i s t the sawmill designer immensely. 1 2 T 1 I 1 2 -0 . i i 1 1 1 1 J I I l 0 0 2 4 6 8 10 12 14 16 IS 2ff M F i g . 6 • Effect of storage size on production rate and average in-process process inventory. Source: Gershwin and Berman, 1 6 p 9. In addition, queue systems exhibit a c l a s s i c operations research dilemma. An increase in the number, or the competency of the server generally increases c a p i t a l or operating costs. However a service mechanism that i s over - u t i l i z e d can result in d i s s a t i s f i e d customers, excessive waiting l i n e s , system bottlenecks, etc., which also burdens management with operating costs. A c o n f l i c t exists and an optimimum trade-off can be an a l y t i c a l l y determined for the system. Arriving at optimum cost solutions is one of the most desirable results from queueing theory. Figure 7 describes how optimum cost solutions are determined. The expected cost of service E(SC) increases with increasing level of service. The level of service can be defined as the rate, quality or number of servers found at a queueing station. Conversely, the expected cost of waiting E(WC) decreases with an increase in the level of service. If the two graphs are summed, the to t a l expected cost E(TC) is obtained. This curve represents a concave function, with the lowest point (the lowest cost) being the optimum cost solution. a £(7T) = E(SC) + E(WC) Cost of waiting ^ E(WQ Cost of service £ ( S Q Solution Level of service F i g . 7. Queueing Theory and Optimum Cost Decisions Source: H i l l i e r and Lieberman, 1 9 p 465. 1 4 1.5 Queueing Theory Notation There i s a shorthand notation commonly used to describe a queue system. Listed below i s a brief outline of the notation. The symbols and notation used in the thesis are summarized in Appendix A. M = a "Memoryless" or Exponential d i s t r i b u t i o n G = a General s t a t i s t i c a l d i s t r i b u t i o n GI = General Independent d i s t r i b u t i o n (usually used to describe an a r r i v a l process) E = a k-Erlang d i s t r i b u t i o n k D = a "Degenerate" (constant) d i s t r i b u t i o n N = the f i n i t e number of customers allowed in a waiting l i n e (queue capacity) c = the number of p a r a l l e l servers in a queue mechanism 15 These symbols are used to describe the queue system and are written in the form: i n t e r a r r i v a l d i s t . / s e r v i c e dist./no. of servers/queue capacity The following examples i l l u s t r a t e how queue systems are described: M/M/1 is an exponential i n t e r a r r i v a l process/exponential service time/with one server Gl/D/c/N i s a general independent i n t e r a r r i v a l process/degenerate service times/c servers/a queue capacity of N customers M/G/l->/G/2 are two queues in tandem. The f i r s t queue has exponential i n t e r a r r i v a l time/general service time/one server. The output process from the f i r s t queue provides the input process to the second-stage tandem queue. The second queue also has a general service d i s t r i b u t i o n with two servers. Figure 2 is a diagram of a tandem queue with c h a r a c t e r i s t i c s indicated by this same form of notation. The servers have Erlang service time d i s t r i b u t i o n s in the diagram. We can now focus on the description and the approach to the solution of t h i s queue d i s c i p l i n e . 1 6 THE QUEUE DISCIPLINE 2.1 The Assumptions of the Queue System The f i r s t c r u c i a l step in a queueing analysis is to establish certain assumptions about the system. As more i n t r i c a t e descriptions of a system are included in the analysis, the more d i f f i c u l t i t becomes to mathematically solve the system. However, i f the assumptions are too s i m p l i s t i c , the system cannot be modelled r e a l i s t i c a l l y . This chapter l i s t s the assumptions used in t h i s queueing analysis and the rationale for the selection. The intent i s to obtain tractable solutions and s t i l l have the potential for modelling a sawmill sytem. The analyst must examine the operation of the system and incorporate the important c h a r a c t e r i s t i c s into his model. He must also be aware of the l i m i t s of a n a l y t i c a l methods available in queueing theory. 17 2.2 The A r r i v a l Process Two cases are considered for the sawlog input, representing two common situations in a sawmill. These cases represent two important d i s t i n c t i o n s in the method of analysis for the tandem queue studied. In the f i r s t case, debarked logs are fed d i r e c t l y from a f u l l log p i t or transfer chain into the headrig, the stage-one processing machine. In t h i s case, the f i r s t queue can be considered as saturated. There is always a customer available for service. A r r i v a l s into this queue consistently keep the buffer zone in the f i r s t stage f u l l . Consequently, the departure process from the f i r s t station i s independent of the a r r i v a l s into the f i r s t stage queue. The service time d i s t r i b u t i o n of the leaving customer becomes the i n t e r a r r i v a l time d i s t r i b u t i o n into the second-stage queue system. In the second case, the a r r i v a l into the f i r s t queue i s a random process, depending for example, on the outfeed from the barker. Here the queue system i s unsaturated (with the assumption that steady-state conditions e x i s t ) . The unsaturated queue in the f i r s t stage results in dependent departure times from the f i r s t - s t a g e server. The departure times depend upon the a r r i v a l process into the f i r s t stage, which represents a tandem queue situation that i s more useful in modelling sawmills. In both cases, the f i r s t - s t a g e a r r i v a l process i s 1 8 represented by a Poisson d i s t r i b u t i o n that i s stationary and homogenous. A tandem queue that i s saturated in the f i r s t stage is insensitive to what a r r i v a l d i s t r i b u t i o n i s chosen but for si m p l i c i t y , the same d i s t r i b u t i o n i s used. Poisson a r r i v a l s w i l l provide exponential d i s t r i b u t i o n i n t e r a r r i v a l times into the queue. The Poisson assumption is frequently used in queueing analysis because i t allows for convenient mathematics. In addition, general l i t e r a t u r e on queueing theory support that a Poisson a r r i v a l d i s t r i b u t i o n i s in many cases, a r e a l i s t i c assumption. There are three basic assumptions to j u s t i f y - the Poisson d i s t r i b u t i o n as the a r r i v a l process under investigation: (1) The expected time for a Poisson event is constant at u time units per event. (2) Pr {one event in the time i n t e r v a l x,x+Ax} = Ax • M (3) Pr {more than one event occurs in x,x+Ax} = 0(Ax) The variable u i s the scale parameter used in the Poisson and exponential d i s t r i b u t i o n . The above statements are very general and could be v e r i f i e d for numerous situations in a sawmill environment. Therefore a Poisson a r r i v a l process i s a good a r r i v a l d i s t r i b u t i o n for the model. 19 2.3 Additional Assumptions (a) The sawlogs entering the queue represent blocked customers delayed. This assumes that the sawlogs do not leave the queue once they a r r i v e . (b) The output process from the f i r s t stage provides the input process into the second stage. (c) The two second-stage buffer storages before machines 2 and 3 have f i n i t e capacity. (d) Breakdown and repair rates of the machines are not considered. (e) The queueing system is considered to be an open network. Upon completion of the service, the customers leave the system immediately. (f) The condition of blocking exists when either of the two second-stage buffers are f u l l . This results in a shut down of the f i r s t - s t a g e machine. 20 2.4 Customer Types In sawmills, there often i s an increase in the number of pieces on the output side of a queue system, compared to the input side. In the tandem queue studied, individual logs enter the f i r s t stage, but there becomes two types of "customers" in the second stage: slabs and cants. Each of these customer types enter separate second-stage queues. The second-stage a r r i v a l process i s similar for both customers. However, the respective machine centers can have dif f e r e n t service rates for the two customer types. In addition, the two second-stage storage f a c i l i t i e s may have di f f e r e n t capacities for the two types of customers. In order to apply queueing theory to the system, operating parameters are selected to r e f l e c t a sawmill scenario. Often the edger processing the cants operates at a speed similar to the speed of the headrig, with the buffer capacity being quite small. However the slab-processing edger may operate at speeds faster than the headrig, and generally has a very large buffer capacity. In addition, the slab edger is usually off-stream to the headrig. The slabs which are conveyed on the transfer chains to the slab edger are often slower than for example, the log conveyor speeds for the headrig. For ease of analysis, the slabs exiti n g the f i r s t stage headrig are considered to be one "customer", even though there may be as many as four slabs, as in the case of a "quad" 21 bandmill. It i s assumed that the slabs a r r i v e in one batch to the second-stage reman edger. Therefore the calculation of piece throughput in the t o t a l system should r e f l e c t the average number of pieces found in a batch. In the case of the cant-processing edger, only, one cant enters the edger at one time, but several boards usually e x i t . The c a l c u l a t i o n of piece output must consider the average number of boards created from t h e c a n t s . The average number of slabs that come from a s p e c i f i c type of headrig, with a given log diet, can be determined by existing computer programs which determine optimum cutting solutions. This i s also applicable for determining the average number of boards created by the cant edger. Total system production can then be calculated, even though each processor handles individual customers. 2.5 Service Time Distributions 2.5.1 The D i s t r i b u t i o n Assumption In this study, a d i f f i c u l t challenge was the determination of service time d i s t r i b u t i o n s for each of the machines. In exi s t i n g sawmills, s t a t i s t i c s can be obtained, an inference made on the type of d i s t r i b u t i o n and an estimation of the d i s t r i b u t i o n parameters performed. For a theoreti c a l sawmill 22 being designed by a n a l y t i c a l methods, t h i s approach i s generally not f e a s i b l e . An assumption for the service time d i s t r i b u t i o n i s required. Simulation studies do not require a d i s t r i b u t i o n assumption. F i e l d data can be gathered at the sawmill to obtain an empirical d i s t r i b u t i o n . The simulation program can then randomly sample from the empirical d i s t r i b u t i o n . The service time d i s t r i b u t i o n can be subjective to the theoretician in the case of modelling a sawmill. S t a t i s t i c s are often available to the designer on the c h a r a c t e r i s t i c s of the logs being consumed in the small-log sawmill. Since machine service times are d i r e c t l y related to the length of the log, a frequency d i s t r i b u t i o n of the log lengths should adequately represent the frequency d i s t r i b u t i o n of the processor service times. It i s not the intent of this study to establish or confirm the relationship between machine processing times and the log length frequency d i s t r i b u t i o n . The designer should also be aware that many other factors come into play in an operating environment. These include operator errors, piece-loading machine v a r i a b i l i t y , time delays, etc. They a l l contribute to the random nature of service (and therefore second-stage a r r i v a l s ) . These contributing factors also af f e c t the service d i s t r i b u t i o n and can reduce the accuracy of the analysis i f ignored. With l i t t l e other information available on machine service times, a log-length frequency d i s t r i b u t i o n is a reasonable estimate of the log-processing time d i s t i b u t i o n . The 23 t o t a l time i t takes to serve a customer w i l l consider the other contributing items mentioned above. These factors are often unique to a p a r t i c u l a r machine center. 2.5.2 The k-Erlang D i s t r i b u t i o n The k-Erlang d i s t r i b u t i o n (refer to F i g . 8) has been selected to describe the log length d i s t r i b u t i o n . For a f u l l description of t h i s d i s t r i b u t i o n , see Appendix D. The reasons for i t s selection are: -I t i s an extremely f l e x i b l e d i s t r i b u t i o n that has a scale parameter "X" and a shape parameter "k". -The random variables are always p o s i t i v e . -Estimation of the parameters uses established s t a t i s t i c a l methods. -A k-Erlang random variable r e a l i z a t i o n i s the sum of k independent exponential random variables. The result i s that i t often allows mathematically tractable solutions for queueing problems. This is because a service f a c i l i t y with a k-Erlang service time can be considered as being k exponential servers working in ser i e s . Good examples of queueing solutions for 24 Erlangian service times are found in Jackson 2 0 or Heyman and S o b e l . 1 8 -The random variables are reasonably easy to generate for simulation studies; however i t may require extra computer time. The generation of a k-Erlang r e a l i z a t i o n as the sum of "k" exponential r e a l i z a t i o n s i s not e f f i c i e n t for large values of k. F i g . 8: k-Erlang D is t r ibut ion With Various Shape and Scale Parameters fKU) 1.0 -t: 0.8 A 0.6 H F i g . 8 - B . fK(t) with K = 2 and ;. = §, 1, 2, 5. Source: Heyman and S o b e l 1 8 , pp 514- 515. 26 2.5.3 The Total Service Time The random variable associated with the t o t a l service time can be composed of three separate variables. One i s the random time to process the log entering the machine, which w i l l be c a l l e d "L". This random variable is f i t with a k-Erlang d i s t r i b u t i o n (refer to App. D). The d i s t r i b u t i o n parameters are estimated and a Kolmogorov-Smirnov goodness-of-fit test is performed (refer to App. E). Data for the log-length frequency d i s t r i b u t i o n came from Dobie. 1 3 The goodness-of-fit test was accepted in two out of three sets of data obtained from the report. The second variable "D" is a displacement parameter. There is a minimum processing time associated with the minimum log length and also the time i t takes for a log to traverse a given transfer chain. The parameter D simply represents a constant value. The t h i r d random variable "S" is the random nature of "setting up" the log to be processed. This variable can be a result of machine equipment, conveyance of the pieces to the stage-two machines and the operator i n e f f i c i e n c i e s . For the queueing analysis in t h i s thesis, the description of th i s variable can be a highly subjective topic, with no available information to make a d i s t r i b u t i o n a l assumption. The variable D can be regarded as a displacement parameter with the k-Erlang log d i s t r i b u t i o n mentioned above. The 27 log-length frequency d i s t r i b u t i o n i s therefore considered as a 3-parameter k-Erlang model. This s t a t i s t i c a l model was used for the estimation of the log processing time d i s t r i b u t i o n . An alternative method of introducing a displaced service time i s by adding in series, another k-Erlang server where k->°°. As k becomes very large, with X becoming very small (which provides a constant k-Erlang mean).; the d i s t r i b u t i o n approaches a v e r t i c a l l i n e . The displacement parameter can be introduced to wherever the v e r t i c a l l i n e i s required. Jackson 2 0 outlines a good p r a c t i c a l solution to a M/G/1 queue with a time-displaced Erlang server. The random variable S i s unique to the machine and i t s associated equipment. An exponential d i s t r i b u t i o n i s assumed in th i s study. From my own p r a c t i c a l experience, I feel the exponential d i s t r i b u t i o n i s a good assumption for t h i s random variable. The values of the d i s t r i b u t i o n scale parameters assumed in the simulation study are "educated estimates". The headrig and slab edgers generally have long set-up times. Conversely, the cant edger has a very short set-up time. In summation, there are three variables associated with the t o t a l service time "T": D + L + S = T (another random variable) The above assumptions for a service d i s t r i b u t i o n seem reasonable. They allow a tractable analysis of the queue and also permit reasonable simulation work. 28 ANALYSIS OF AN UNSATURATED QUEUE 3 . 1 The T h e o r e t i c a l A n a l y s i s A l i t e r a t u r e review was made to determine the a v a i l a b l e methods for a n a l y s i s of the s t u d i e d tandem queue. The assumptions o u t l i n e d in the p r e v i o u s chapter provided a b a s i s for l o c a t i n g the r e l e v e n t papers. In a d d i t i o n , the l i s t e d assumptions were what I f e l t , necessary to adequately model a sawmill system. A t h e o r e t i c a l a n a l y s i s was not performed because the assumptions that were used would r e s u l t in a n a l y t i c a l work that was beyound the scope of t h i s study. The r e l e v e n t a n a l y t i c a l methods f o r m o d e l l i n g sawmills, that are a v a i l a b l e i n queueing theory, i s given i n t h i s s e c t i o n . 3 . 1 . 1 The Departure Process of a Queue The M/G/1~>/G/1 queue which i s not s a t u r a t e d can be used to model a wide v a r i e t y of s i t u a t i o n s . U n f o r t u n a t e l y the mathematical s o l u t i o n to t h i s problem i s d i f f i c u l t . Judging from the l i t e r a t u r e review, there has been a great deal of i n t e r e s t i n recent years among a p p l i e d mathematicians to research t h i s important a r e a . The problem a r i s e s from the departure process of the f i r s t 29 queue. The departure times f o r t h i s queue arrangement i n most a p p l i c a b l e s i t u a t i o n s , are non-renewal processes ( r e f e r to App. C f o r a d i s c u s s i o n on renewal p r o c e s s e s ) . E a r l y work by Burke 6 showed that the departure epochs from an M/M/1 queue form a Poisson process with a departure r a t e that i s i d e n t i c a l to the a r r i v a l r a t e . T h e r e f o r e tandem M/M/1 queues can be analyzed by e v a l u a t i n g each queue i n d i v i d u a l l y . T h i s case i s not true f o r the M/G/1/N queue. The s p e c i f i c c o n d i t i o n s when the queue output i s r e c u r r e n t (a renewal process) i s d e t a i l e d by Disney et a l . 1 2 These c o n d i t i o n s e x i s t when N=1 and G=D or when N=°° and G=M. The output flow i s Poisson only i n the case N=» and G=M. The a p p l i c a b i l i t y of a n a l y z i n g the proposed sawmill system i s l i m i t e d i f one i s c o n s t r a i n e d by these c o n d i t i o n s . Berman and Wescott" have r e c e n t l y o u t l i n e d c e r t a i n c o n d i t i o n s f o r the GI/G/c (1<c<°°) queue having a renewal departure p r o c e s s . They show that a necessary c o n d i t i o n f o r the departure process to be a renewal process i s i f i t s i n t e r v a l d i s t r i b u t i o n (the time spent i n the queue system) i s the same as that of the a r r i v a l p rocess. Approaches f o r e v a l u a t i n g g e n e r a l s e r v i c e time/tandem queue problems have l a t e l y been focused on numerical approximations. In a d d i t i o n , s i m u l a t i o n s t u d i e s have r e c e n t l y been performed to d e f i n e the p r o p e r t i e s and behaviour of the unsaturated queue. Shimshak and S p i c h a s 3 2 c a r r i e d out an ex t e n s i v e study of the M/E/1->M/1 queue, but the dependency of the departure process on the a r r i v a l process i n the f i r s t stage was not c o n s i d e r e d . The 30 a r r i v a l s into the second stage were approximated as a general independent d i s t r i b u t i o n . An equation for the numerical approximation of the tandem queue was derived. The numerical approximation was then compared to the simulation r e s u l t s . Their simulation study took into consideration the dependency of second-stage a r r i v a l s on the f i r s t - s t a g e a r r i v a l process. Several important conclusions were obtained from Shimshak and Spichas which can d i r e c t l y a f f e c t the works done by Carino and Bowyer. 8 , 9" 1 0 It was shown that the intensity of the a r r i v a l rate into the f i r s t queue s i g n i f i c a n t l y a f f e c t s the assumption of independent a r r i v a l s . Shimshak and Spichas define the f i r s t - s t a g e t r a f f i c intensity "p," as: P i = n ' T where „ rj = mean a r r i v a l rate into the f i r s t stage r = mean service time in the f i r s t stage The intensity of the second-stage queue " p 2 " i s : P2 = V ' 7 where y = mean service time in the second stage The study results showed that their numerical approximation was accurate only at low t r a f f i c intensity for both stages. 31 Accuracy of the tandem queue approximations were especially sensitive to high intensity in the second stage. Errors of up to 40 percent can be made under the independence assumption, with h i g h - t r a f f i c intensity values. Another influencing factor to the assumption of independent second-stage a r r i v a l s i s the k value used for the k-Erlang service d i s t r i b u t i o n in the f i r s t stage. Shimshak and Spichas' comparison between numerical approximation and simulation shows that a k value greater than five w i l l cause at least a 20 percent difference between the two methods. Therefore a low-variance k-Erlang d i s t r i b u t i o n or high-intensity second-stage t r a f f i c can seriously affect the numerical approximation r e s u l t s . The assumption of independent a r r i v a l s into the second stage becomes no longer v a l i d . A dependency exists with the a r r i v a l process and the covariance must be considered. These conclusions are s i g n i f i c a n t in view of the results of Rosenshine and Chandra 2 8 (and subsequently used in Carino and Bowyer's computer program). Both pairs of authors used a numerical approximation method for evaluating tandem queues with general service times. The departure process from the f i r s t stage was assumed to be independent of the f i r s t - s t a g e a r r i v a l process. Therefore the user of the DSMIN program package must be wary of the lim i t a t i o n s of t h i s program, owing to i t s s i m p l i f i e d d i s t r i b u t i o n assumptions. The covariance structure of the M/E/1 queue departure process has been studied. J e n k i n s 2 1 determined the joint 32 d i s t r i b u t i o n between departing customers from a stationary queue system (no transient conditions) with k-Erlang service times. His results gave a description of the co r r e l a t i o n between t r a f f i c intensity and the dependence of the departure process. Jenkins worked with the f i r s t two moments of the k-Erlang d i s t r i b u t i o n and did not provide results for the case of a general d i s t r i b u t i o n . Jenkins also v e r i f i e d Burke's work by showing that exponential service times (a k-Erlang d i s t r i b u t i o n with k=l) result in an independent departure process. K i n g 2 3 studied the departure process of an M/G/1 queue. His results gave an expression for the covariance structure of the departure process from any M/G/1 queue. His conclusions on the case of renewal departure processes are in agreement with Di sney et a l . 1 2 33 3.1.2 Tandem Queues with Correlated Service Times An important assumption in the queueing analysis assumes independence of the a r r i v a l and service d i s t r i b u t i o n s . As mentioned previously, t h i s study considers the service d i s t r i b u t i o n to be dependent upon the log-length frequency d i s t r i b u t i o n . The second-stage i n t e r a r r i v a l d i s t r i b u t i o n (for both tandem queue cases studied), i s similar to the f i r s t - s t a g e service d i s t r i b u t i o n . Therefore a corr e l a t i o n exists between the second-stage i n t e r a r r i v a l d i s t r i b u t i o n and the second-stage service d i s t r i b u t i o n . As a re s u l t , the second-stage service and i n t e r a r r i v a l d i s t r i b u t i o n s are not independent. A major assumption used in queueing analysis i s violated, where i t is assumed the service and a r r i v a l d i s t r i b u t i o n s are independent of each other. The mathematical analysis of t h i s queue system becomes an increasingly d i f f i c u l t task with the further assumption of correlated service times. Reports on tandem queues with similar service times at each stage have been recently appearing in technical journals. Boxma5 began the investigation of tandem queues with i d e n t i c a l general service times at each st a t i o n . He obtained asymptotic and numerical results for the sojourn times (time spent in a queue system) and the actual and v i r t u a l waiting times at the second stage. This i s a M/G/1~>/G/1 queue with highly correlated service times. 34 Boxma's results are relevant because he encounters a problem that is similar to this sawmill analysis. Because his study was in message-communicating switching networks, Boxma's ef f o r t s were directed at finding solutions to some tandem queue c h a r a c t e r i s t i c s that were d i f f e r e n t to the interests of a sawmill designer. Nonetheless, his results on sojourn time can be used for determining production of tandem queue systems, as envisioned in t h i s present study. -In addition, Boxma's results could be applicable to both the unsaturated and saturated cases discussed in t h i s report. The approach of modelling sawmills by numerical methods may be possible, even with the existence of highly correlated service times. Boxma concluded that the means and variances of the sojourn time in the second stage are smaller when the f i r s t stage is under heavy t r a f f i c , compared to an ordinary M/G/1 system with the same t r a f f i c intensity and service time d i s t r i b u t i o n . This is an interesting conclusion for computer network applications. Pinedo and W o l f f 2 7 made a comparison between tandem queues with dependent (correlated) and independent service times. The queue system investigated was a M/M/1->M/1 queue. A simulation study was made for the case of correlated service times where both servers had equal service times. The simulation results were then compared with a queueing analysis that had an independent service time assumption. Pinedo and Wolff showed that correlated service times affect the determination of waiting times in a queue system. They att r i b u t e the waiting time discrepency between dependent 35 and independent service times by a "length biasing e f f e c t " . This i s where i t i s more l i k e l y that the customer with a long stage-one service time w i l l have in addition, a long stage-two service time. T r a f f i c intensity also influences the waiting time of the simulation-studied queue. In addition, the results of Pinedo and Wolff were in agreement to Boxma's method of determining waiting times for correlated-service-time tandem queues. 36 3.2 Simulation Analysis of the Queue System The simulation part of t h i s chapter models the queue system with the assumptions outlined in chapter 2. This simulation study provides solutions of the queue system in a similar fashion to what one would expect a n a l y t i c a l solutions would provide. This section also investigates some of the important sawmill design c h a r a c t e r i s t i c s one would look for, to be provided by a queueing analysis. 3.2.1 The Queue Assumptions for the Simulation Study As was shown in Figure 2, the model i s a simple two-stage tandem queue. The f i r s t stage has a single server and a f i n i t e storage buffer. The second stage has two stations, each with a f i n i t e buffer and server. The following queue d i s c i p l i n e s for this simulation model are considered: (a) The piece (sawlog) input rate into the f i r s t stage is represented by a Poisson d i s t r i b u t i o n which i s stationary and homogenous. This w i l l provide an exponential d i s t r i b u t i o n for the i n t e r a r r i v a l time into the f i r s t queue. (b) To ensure the queue in the f i r s t stage remains unsaturated, the t r a f f i c intensity i s always less than one. This implies the 37 mean service time is less than the mean i n t e r a r r i v a l time. (c) The sawlogs upon entering the f i r s t stage do not leave the queue. (d) The machine processor at each station serves the customer according to the s t a t i s t i c a l d i s t r i b u t i o n described in section 3.2.2. (e) If either buffer in the second stage is f u l l , the machine in the f i r s t stage shuts down. The f i r s t stage becomes blocked. (f) If the buffer in the f i r s t stage i s f u l l , the generation of piece a r r i v a l s stops u n t i l some unused buffer capacity is restored. This ensures that an i n f i n i t e queue w i l l not exist at the f i r s t stage. Thus a "safety" switch i s provided for the simulation model to ensure that the a l l o t t e d memory for the program is not used up. (g) Two new pieces are created at the f i r s t - s t a g e machine. One piece always continues on d i r e c t l y to machine 2 (the cant edger) in the second stage. The other piece is directed to machine 3 (the slab edger) in stage two. There i s usually more than one piece created by the headrig and directed toward machine 3 in real l i f e . However, i t can be assumed that these pieces arrive at the slab edger as one batch. 38 (h) The time to convey a piece to the second-stage f a c i l i t y i s not considered, except in the "set-up" exponential random variable of the service d i s t r i b u t i o n . (i) The boards do not leave the second stage without passing through a machine station. (j) The length of a log is generated from a k-Erlang d i s t r i b u t i o n . The log length (and therefore the service processing time) remains unchanged through the entire process. However, the set-up time of a piece at the three machines are d i f f e r e n t and therefore are i n d i v i d u a l l y generated from an exponential d i s t r i b u t i o n . (k) Upon exiting the second stage, the pieces leave the system. 39 3.2.2 The Service Time Random Variable *> In accordance with a r e a l - l i f e s i tuation, the processing time of a p a r t i c u l a r log is used for a l l three machines. The same k-Erlang random variable i s used for the piece in each machine The set-up time i s a random variable independent of the customer. Each machine i s provided with i t s own exponential set-up time d i s t r i b u t i o n and respective scale parameter. The psuedo-random number generator used to sample from the exponential d i s t r i b u t i o n employs a d i f f e r e n t "seed" than the k-Erlang d i s t r i b u t i o n . In addition, the simulation model uses an t i t h e t i c variates (refer to App. B) to reduce the variance of the simulation estimates. In the simulation study, k-Erlang random variables are generated. The random variable i s derived from a log-length frequency d i s t r i b u t i o n . Refer to section 2.5.3 for a review of the service time d i s t r i b u t i o n . The generation of k-Erlang random variables for simulation i s outlined by Bury. 7 The exponential random number is generated in the simulation model from the following equation: X = w ("log (1-u )) (1) i i where u = the i ' t h random number sampled from the uniform d i s t r i b u t i o n . 40 n = the mean of the exponential d i s t r i b u t i o n The simulation program generates a pseudo-random number sequence of uniform random variables. S c h r i b e r 3 1 d e t a i l s how th i s i s done for the simulation model. A k-Erlang r e a l i z a t i o n is the sum of "k" exponential random variables: Once the k-Erlang random variable i s realized, the processing time i s then calculated. If the feed speed of the machine is "s", the processing time L i s : The variable "m" i s the minimum length log allowed in the sawmill. Therefore the displacement time D i s : X E k Z X i = 1 i L = X /s E (a random variable) D = m/s Authentic values are assigned to the above variables for realism to the simulation model. For instance, assume the following values: 41 m = 2.5 meters (8 f t . ) X = 3 meters ( 1 0 f t . ) E s = 1.0 meters/sec. (3.1 ft./sec.) Then D + L = (2.5 + 3)/1.0 = 5.5 seconds The other random variable associated with the t o t a l service time i s the set-up time. As mentioned previously, the assumption taken is that set-up time is exponentially di s t r i b u t e d and independent of the log length. It i s a variable dependent upon the type of machine processing the log. Exponential random variables are generated as outlined in equation (1) of this section. Suppose the mean set-up time "/i" is 3 seconds. If an exponential r e a l i z a t i o n of the mean i s made, we can now calculate the t o t a l service time "T" for this log. It i s the sum of the mean set-up time and the processing time: T = D + L + S = 2.5 + 3.0 + 3.0 = 8.8 seconds 42 3.3 D i s c u s s i o n of the S i m u l a t i o n Model The s i m u l a t i o n model was w r i t t e n i n the General Purpose S i m u l a t i o n System (GPSS) language. T h i s language i s extremely f l e x i b l e and has a short l e a r n i n g time. The computing center at UBC has a GPSS-H compiler, which i s the most up to date v e r s i o n . It a llows f o r improved i n t e r a c t i o n amongst other c o m p i l e r s , the programmer and f i l e s or d e v i c e s over the e a r l i e r v e r s i o n , GPSS-V. There i s a l s o an improvement i n c o n t r o l l i n g or r e i t e r a t i n g runs. F i n a l l y , the compiler i s about f i v e times f a s t e r than the p r e v i o u s v e r s i o n ; t h e r e f o r e the s i m u l a t i o n c o s t s are markedly reduced. I t i s a new language that should s e r i o u s l y be c o n s i d e r e d by the person i n t e r e s t e d i n s i m u l a t i n g queue systems. The s e l e c t i o n of values f o r the o p e r a t i n g parameters i n the s t u d i e d queue system i s s u b j e c t i v e , so the s i m u l a t i o n program w r i t t e n allowed c o n s i d e r a b l e f l e x i b i l i t y . The approach taken was to f i r s t e s t a b l i s h what c h a r a c t e r i s t i c s of the queue system would be of i n t e r e s t f o r the mathematical a n a l y s i s . Important c h a r a c t e r i s t i c s to the sawmill design engineer were a l s o c o n s i d e r e d . Once these were e s t a b l i s h e d , values f o r the parameters were chosen to best r e f l e c t the a c t u a l system o p e r a t i o n . R e a l i s t i c o p e r a t i n g values found i n a sawmill were of primary importance i n a s s i g n i n g numbers to the parameters. The s i m u l a t i o n of an unsaturated queue was p r i m a r i l y intended to e x h i b i t the dependency of the second-stage queue 43 process on the a r r i v a l rate in the f i r s t stage. For a l i s t i n g of the simulation program and a l l the parameters selected, one should refer to the appropriate Appendix (F-H) associated with the simulation runs that w i l l be discussed in the following sections. 3.3.1 Production vs. I n t e r a r r i v a l Time The intention of the f i r s t simulation run was to observe the dependency of system production on the f i r s t - s t a g e a r r i v a l rate. System production i s the t o t a l number of pieces to have been through either second-stage machine in an hour. The program is described in Appendix F and computer-generated graphs were drawn to make more e f f e c t i v e use of the simulation results (refer to f i g . 9). The f i r s t - s t a g e intensity "p," i s always less than one. This ensures that the f i r s t stage queue remains unsaturated. The a r r i v i n g logs may fi n d no queue, or even machine 1 not busy. Therefore the departure time from the f i r s t stage i s not only the service time, but can include part of the f i r s t - s t a g e i n t e r a r r i v a l time as well. One can consider the investigation in t h i s section as examining the ef f e c t of headrig i d l e time on system production. The assignment of values to the multitude of system variables i s a subjective task. An example of how t h i s was done 44 is shown below so the reader can f a m i l i a r i z e himself with the equations and variables (refer to secton 3.2.2 for a description of the service time d i s t r i b u t i o n . For the simulation runs in subsequent sections, one can simply refer to the proper Appendix for the parameters and the respective values used in the computer program. (a) Machine 1 Total Service Time Let machine 1 operate at a feed speed s, of 1.0 m/sec. machine 1 mean set-up time be 2 seconds mean log length be 2.8 meters minimum log length be 2.5 meters Then T, = 2.50 m + 2.80 m + 2.0 sec 1.0 m/sec. = 7.3 seconds To ensure that p,<1, the stage-one a r r i v a l rate must be greater than 7.3 seconds. Therefore l e t the f i r s t - s t a g e i n t e r a r r i v a l time vary from 7.5 to 17.0 seconds in the simulation run and examine the r e s u l t s . 4 5 (b) Machine 2 T o t a l S e r v i c e Time A h i g h stage-two i n t e n s i t y i m p l i e s slow second-stage machines Let machine 2 operate at a feed speed s 2 of 0.8 m/sec. machine 2 mean set-up time Mi be 2 seconds. Then T 2 = 5.30/s 2 + u2 with s 2=0.8 and M 2=2.0 = 9.6 seconds (which i s s l i g h t l y slower than machine 1) (c) Machine 3 T o t a l S e r v i c e Time Let machine 3 operate at a feed speed s 3 of 0.6 m/sec. machine 3 mean set-up time M 3 be 2 seconds. Then T 3 = 5.30/s 3 + ju3 with s 3 = 0.6 and ju3 = 2.0 = 10.8 seconds Machine 3 ( s l a b edger) t o t a l s e r v i c e time i s slower than machine 2 (cant edger), but has a l a r g e r storage c a p a c i t y . T h i s r e f l e c t s a t y p i c a l sawmill o p e r a t i n g l a y o u t . A l l the system o p e r a t i n g parameters of i n t e r e s t now have assi g n e d v a l u e s . A s i m u l a t i o n run can be performed to determine how p r o d u c t i o n i s a f f e c t e d . Twenty s i m u l a t i o n runs were performed, v a r y i n g the mean i n t e r a r r i v a l times from 7.5 to 17.0 seconds, i n steps of 46 0.5 seconds. The f i r s t moments of the service and a r r i v a l d i s t r i b u t i o n s were used to determine the values for the parameters. The example shown above i s for a medium-intensity second-stage a r r i v a l rate ( P 2 ) . High and low second-stage i n t e n s i t i e s were also studied in this section. The parameter .values used for these other two simulation runs are found in Appendix F. A l l three cases were graphed in Figure 9. To obtain steady-state conditions, the model i s run for an equivalent r e a l - l i f e time of about 8 minutes and then a l l the s t a t i s t i c s are reset. It i s assumed that the effect of i n t i t i a l conditions, where there are no logs in the system at the st a r t , have disappeared by then. The model i s then run for another 60 minutes and the s t a t i s t i c s are subsequently gathered. The duration of a simulation run d i r e c t l y a f f e c t s the accuracy of what one is attempting to estimate. Complicated procedures exist for determining the required duration to provide an estimate at a given confidence l e v e l . This study however did not approach this topic. Instead, a subjective approach was made and judging by the resu l t s , the goal of obtaining good s t a t i s t i c s were met. For each case, a regression curve was drawn through the points. The variation about the regression l i n e was small, implying that the simulation runs were long enough duration. This curve should represent the functional relationship that exists between the parameters graphed. As shown in Figure 9, there appears to be a direct 47 relationship between production and the f i r s t - s t a g e i n t e r a r r i v a l time. Every second data point was omitted on the graph for c l a r i t y . As expected, d i f f e r e n t second-stage i n t e n s i t i e s a f f e c t the t o t a l system production. A low intensity (high stage-two machine speeds) provides greater output than the other two higher-intensity cases, especially at short i n t e r a r r i v a l times. It i s interesting to observe that the three curves converge at a common i n t e r a r r i v a l time of 17 seconds.- This is because the queue system production becomes increasingly dependent upon the longer i n t e r a r r i v a l times rather than the machine rates. A low stage-two intensity culminates to a point at large i n t e r a r r i v a l times, where further improvements may not increase production (at least in a linear fashion). In thi s instance, the second-stage machines would be "starved" for pieces and the storages empty. This implies that i f expensive machines of high capacity were i n s t a l l e d in the second stage, system production may not be improved. This section shows that i f a mathematical model were made of the system, desirable information for designing a sawmill could be obtained. In addition, d i f f e r e n t f i r s t - s t a g e i n t e r a r r i v a l times af f e c t production a great deal. The amount of production i s also dependent upon the second-stage intensity, as shown by the three d i f f e r e n t slopes in Figure 9. The li n e a r relationship for the high-intensity case implies that for the range of i n t e r a r r i v a l time values studied, the system dependency on the a r r i v a l rate is straight forward. The medium and low intensity curves exhibit properties of a 48 n o n - l i n e a r f u n c t i o n . A f u r t h e r i n v e s t i g a t i o n to the p o s s i b i l i t i e s of why these r e l a t i o n s h i p s were found i s given i n the next s e c t i o n . FIG. 9 - PRODUCTION VS. INTERARRIVAL TIME 1000 900 4 BOO 4 700 g 600 500 4 400-P a r a m e t e r V a l u e s ( m e t e r s / s e c o n d ) M a c h i n e 1 M a c h i n e 2 M a c h i n e 3 Low I n t e n s i t y 1 . 0 0 0 . 6 0 0 . 4 0 M e d i u m I n t e n s i t y 1 . O O 0 . 8 0 0 . 6 0 H i g h I n t e n s i t y 1 . 0 0 1 . 2 0 1 . 0 0 Legend o wen » u a t - T W c mTBwrrv A MtDlUM »~»0t-TlWO BWtNltTt 4 LOW msi-Two miiNsmr INTERARRIVAL TIME - seconds 50 3.3.2 Other System Measures Affected by I n t e r a r r i v a l Time Two other system measures studied here in the unsaturated queue analysis are the average number of pieces in the machine-3 storage f a c i l i t y and the percentage of time stage one i s blocked. This simulation run describes the medium stage-two intensity case (refer to App. F). The percentage of time stage one is blocked "B" , comes from the equation: B = (e - $)/e x 100 where e = average time at machine 1 $ = average machine 1 service time The mathematical analysis of th i s queue system can be d i f f i c u l t i f blocking i s taken into consideration. The complication exists when both second-stage stations provide the p o s s i b i l i t y of f i r s t - s t a g e blocking. The simulation run performed in th i s section i n t e n t i o n a l l y allowed for independent blocking to occur. There was only one storage f a c i l i t y that contributed to the blocking. The machine 3 storage capacity was assigned to 50 pieces. The parameter values chosen for t h i s simulation run ensured that the average piece content before machine 3 was at the most, about half the storage capacity (refer to Fi g . 10). Machine 2 51 was t h e r e f o r e r e s p o n s i b l e f o r the b l o c k i n g . Refer to Appendix F f o r the parameter values used i n the s i m u l a t i o n program. B l o c k i n g was an important system c h a r a c t e r s t i c to i n v e s t i g a t e . For the medium-intensity case, there i s no f i r s t - s t a g e b l o c k i n g at an i n t e r a r r i v a l time of g r e a t e r than 11.0 seconds ( r e f e r to F i g u r e 11). F i g u r e 9 shows that the medium stage-two i n t e n s i t y graph becomes n o n - l i n e a r with no stage-one b l o c k i n g . The p r o d u c t i o n of the system becomes dependent only upon the i n t e r a r r i v a l times and i n a f u n c t i o n of higher order than one. The high second-stage i n t e n s i t y case ( r e f e r to F i g . 9) p o r t r a y s a l i n e a r f u n c t i o n i n the range of i n t e r a r r i v a l times i n v e s t i g a t e d . The data in Appendix F shows that b l o c k i n g occurred throughout t h i s range of i n t e r a r r i v a l times. The low second-stage i n t e n s i t y case e x h i b i t s a s l i g h t n o n - l i n e a r graph. The data in Appendix F shows that no b l o c k i n g o c c u r r e d through the range of i n t e r a r r i v a l times. Therefore the n o n - l i n e a r graph i s a r e s u l t of the a r r i v a l process only. P r e d i c t i o n of average queue content before second-stage machinery c o u l d be complicated i f b l o c k i n g i s c o n s i d e r e d . F i g u r e 10 shows a curve of average piece content at the b u f f e r before machine 3 as a f u n c t i o n of i n t e r a r r i v a l times ( f o r the medium-intensity c a s e ) . There was a marked decrease i n the average p i e c e content as f i r s t - s t a g e b l o c k i n g (provided by machine 2) decreased. With the cant edger b l o c k i n g the h e a d r i g , determining the proper s i z e f o r the storage c a p a c i t y before the s l a b edger i s d i f f i c u l t . A sawmill where b l o c k i n g occurs 52 ( i n t e n t i o n a l l y or not) can r e s u l t i n many c o m p l i c a t i o n s downstream of the blocked machine. If both storage f a c i l i t i e s c o n t r i b u t e to b l o c k i n g , a covar i a n c e must be taken i n t o account. A c o r r e l a t i o n would e x i s t between the two second-stage b u f f e r s , with e i t h e r of them having the p r o b a b i l i t y of b l o c k i n g the f i r s t stage. The mathematical determination of b l o c k i n g i n stage one i s s t r a i g h t - f o r w a r d i f only one second-stage storage f a c i l i t y has to be c o n s i d e r e d . The percentage of time stage one i s blocked i s then equal to the percentage of time the storage f a c i l i t y i n the second stage i s f u l l . T h i s can g e n e r a l l y be so l v e d with a n a l y t i c a l methods. FIG. 10 - AVERAGE CONTENTS IN STORAGE 3 VS. INTERARRIVAL TIME 5 0 - . L U o < DC to O O UJ O < U i 4 0 - 4 VP 3 0 - ^ 2 0 4 FIG. 11 - % TIME STAGE ONE IS BLOCKED VS. INTERARRIVAL TIME 25-, 20 a o 3 to LU o LU O to LU 15-10 5-4 A -A r — A — 10 11 12 13 14 15 INTERARRIVAL TIME - seconds 16 17 ~1 U l 55 ANALYSIS OF A SATURATED QUEUE 4.1 The Theoretical Analysis Analysis of the queue system could be done with present numerical approximation methods i f the queue in the f i r s t stage were to be considered as saturated. The departure process from the f i r s t stage becomes independent of i t s a r r i v a l process. Interest is then focused only on the second stage. If the second-stage a r r i v a l process is assumed to be independent of the second-stage service process, the queue system can be described as a GI/G/1/N queue. A good discussion on this queue analysis is found in Neuts. 2 4 Neuts discusses the problem of blocking in a tandem queue with a f i n i t e buffer in the second stage and he provides a comprehensive l i s t of references on this subject. He also provides solutions to some of the queue systems that exhibit blocking. He explains the numerical method of matrix geometric programming to model a queue system. This method is used for so-called quasi b i r t h and death processes and uses a computer algorithm for their analysis. With two f i n i t e - b u f f e r stations in the second stage, there is the pr o b a b i l i t y that either of them can block the f i r s t stage. Blocking i s studied in the section of saturated queue analysis because i t i s a second-stage phenomenon. Since the f i r s t stage i s saturated, the a r r i v a l process can be disregarded 56 and blocking can be studied more e f f e c t i v e l y . 4.2 Simulation of an Saturated Queue The simulation of a saturated queue u t i l i z e s a computer program similar to the case of a unsaturated queue. A l l the assumptions outlined in chapter 3 are also used in this analysis. A major difference between the saturated and unsaturated case is that the f i r s t - s t a g e t r a f f i c intensity p, is greater than one in the saturated case. As a r e s u l t , the f i r s t - s t a g e buffer i s always f u l l of waiting customers. If there was not a limited-capacity f i r s t - s t a g e buffer, an i n f i n i t e queue would r e s u l t . A f i r s t - s t a g e i n t e r a r r i v a l time of 1.0 second was used in the simulation runs. With a saturated f i r s t - s t a g e queue f a c i l i t y , the a r r i v a l process into the second stage is dependent on only the service d i s t r i b u t i o n in the f i r s t stage. The purpose of analyzing the saturated queue i s to study the second-stage c h a r a c t e r i s t i c s more e f f e c t i v e l y , which i s possible since the f i r s t - s t a g e i n t e r a r r i v a l times are no longer considered. The c a l c u l a t i o n of the parameter values used for the simulation run were similar to the example given in section 3.2.2. Once again, the intention was to examine operating characterstics of the queue system and not to become too involved in assigning values to the parameters. The simulation 57 programs in this section are presented in Appendices G and H. 4.2.1 Production of System as a Function of Machine Rates Simulation of a saturated queue can more e f f e c t i v e l y examine the eff e c t of individual machine processing rates. Therefore, the intention of the f i r s t simulation run was to observe the effect each machine has on system production. This is important for sawmill design because i t may provide information on which machine to give special consideration to, with regards to t o t a l production. Figure 12 displays the eff e c t of machine rates on system production. Each of the three machines was independently varied to produce separate curves. Selection of the base values for the three machines reflected operating rates anticipated in a sawmill. Refer to Appendix G for a l l the machine operating rates used in the simulation run. Machines 1 and 2 would be expected to have similar rates, with machine 2 (cant edger) being s l i g h t l y faster in order to " p u l l away" the pieces from the headrig. Machine 2 also has a small storage capacity. Machine 3 (slab edger) has a longer service time than the other two machines. The long service time r e f l e c t s the slow transfer of slabs to machine 3. In addition, machine 3 has a large storage capacity. For c l a r i t y of reading the three graphs, they were provided with d i f f e r e n t maximum production values. 58 The intention of. varying the rate of machine 1 was to investigate the importance of the headrig. The early steep slope indicates the large effect on production the f i r s t stage has. The decline in the slope i s a result of blocking in the second stage. As the headrig becomes faster, bottlenecks downstream decrease the system production. The influence of the cant edger on improvement to production i s not as great. At slow service rates, production is decreased because of blocking, which i s not shown in Figure 1 2 (refer to App. G for t h i s s t a t i s t i c ) . As the speed of the cant edger increases, system production increases. The t o t a l system production gradually approaches a l i m i t as the cant edger speed i s increased. With the cant edger becoming faster than the headrig, the average piece content before machine 2 decreases. The decrease in blocking and the subsequent decrease in average piece content of the small-capacity storage result in the production l i m i t . F i n a l l y , varying the rate of machine 3 can have a large influence on production. The parameter values were selected for this simulation run to encompass a f u l l machine 3 buffer that has a large storage capacity. The shape of the curve (refer to Fi g . 1 2 ) representing the slab edger shows that system production can be improved as e f f e c t i v e l y as increasing the service rate of the headrig. The improvement in system production came from decreasing the time of blocking and then decreasing the average piece content in the large-capacity storage of the slab edger (refer 59 to App. G). The decrease in the curve slope at high machine 3 speeds was a result of the slab edger becoming "starved" for pieces. The s i m i l a r i t y between the curves for machine 1 and 3 imply that the influence of the slab edger, under certain conditions, can be as i n f l u e n t i a l in system production as the headrig. FIG. 12 - PRODUCTION VS MACHINE RATES 900-1 BOO A 1 700 \ m u CL 600 O o Q O 500 QC CL 400 300-} 0 / O 4 0.2 0.4 0.6 0-3 1 1.2 MACHINE RATES - meters/second —r— 1.4 —T — 1-6 —1 i.a Legend O MACHINE 1 RATE VARIED A MACHINE 2 RATE VARIED - r MACHINE 3 RATE VARIED O 61 4.2.2 The Effect of Blocking on Second-Stage Queues Another question addressed in the simulation study was what effe c t blocking provided by one second-stage station has on the other station average piece content? The intention of this simulation run i s to examine the effect two second-stage stations have between each other (their c o r r e l a t i o n ) . The simulation program is found in Appendix H. The rate of machine 2 was selected to provide the necessary blocking of the f i r s t stage. The parameter values were chosen to i n i t i a l l y have the average piece content of machine 3 to be empty. Refer to Appendix H for the parameter values used in the simulation run. Machine 2 speed was increased (to decrease blocking) and the effect on the average piece content behind machine 3 was observed. Figure 13 displays f i r s t - s t a g e blocking and Figure 14 displays machine-3 average piece content, as functions of machine 2 operating speed. As expected, blocking by the cant edger in the second stage af f e c t s the average queue contents of the slab edger. As blocking decreases to zero, the average piece content of the slab edger increases, approaching a l i m i t (refer to F i g . 14). The parameter values chosen in th i s simulation run int e n t i o n a l l y display how large an influence blocking provided by one second-stage station can have on the other station. The occurence of blocking in a sawmill system can make the design of a second-stage storage f a c i l i t y d i f f i c u l t . One can 62 approach this problem (and the results in this section are only an example) by designing the slab-edger storage capacity to accomodate the worst case. This is where i t i s assumed that there is no blocking done by the cant edger. The general intention in designing a sawmill is to avoid the event of blocking and attempt to predict operating conditions so that i t w i l l not take place. On the other hand, i f blocking i s to be permitted by the cant edger, i t i s possible to save space (and money) by designing a smaller storage f a c i l i t y behind the slab edger. Blocking can p o t e n t i a l l y influence the average piece content in a second-stage buffer a great deal. The designer must be aware of this and i f he wishes to allow blocking to occur in the system, he should attempt to understand a l l the ramifications. FIG. 13 - % TIME STAGE ONE IS BLOCKED VS. MACHINE 2 RATE 60-1 50 4 co MACHINE 2 RATE - meters/sec. FIG. 14 - AVERAGE CONTENTS IN STORAGE 3 VS. MACHINE 2 RATE 35 -> A J j j A O t t r -0.4 &~ A A. • 1 i 1 1 r ~ 0.5 0.6 0.7 0.8 0-9 1 t l 1.2 MACHINE 2 RATE - meters/sec. 1.3 1-4 1.5 6 5 4.2.3 System Production Affected by Second-Stage Storage Capacity The objective of t h i s simulation run was to determine i f an optimum size can exist for a second-stage storage f a c i l i t y . The designer could save c a p i t a l by i n s t a l l i n g the smallest second-stage storage f a c i l i t y possible, while at the same time retaining t o t a l system production. This simulation run was in part, attempting to duplicate Gershwin and Berman's 1 6 result (refer to F i g . 6). In this simulation run, we take the previous results in section 4.2.2 one step further by saying that the designer w i l l i n t e ntionally allow blocking to occur. A common situation could be where the cant-edger storage f a c i l i t y i s constrained for space. This is often the case because cants are usually stored in f a c i l i t i e s l o n g i t u d i n a l l y (ends facing the machines). In addition, the operating speed of the cant edger i s generally as fast as the headrig. Therefore, the storage f a c i l i t y can rapidly f i l l to capacity. The machine rates are kept at constant values (refer to App. H). This may represent the s i t u a t i o n where the machines may already have been selected for the sawmill. The machine 2 storage capacity was varied from 1 to 20 pieces. The selected machine rates provide an average piece content of about 14 pieces in the cant edger storage f a c i l i t y . The average piece content before the slab edger i s small enough to ensure no 66 f i r s t - s t a g e blocking. However, there are always enough pieces before machine 3 to keep the slab edger busy. The results of the simulation run are shown in Figure 15. The curve shows that there i s only marginal improvement to system production at a storage capacity of larger than 5 pieces. Why would a storage f a c i l i t y of greater than 5 pieces not improve system production, i f the average piece content before th i s cant edger would be 14 pieces i f i t had an i n f i n i t e capac ity? Two other simulation runs were performed (but were not graphed) to answer this question. The rate of the cant edger was varied. One simulation run had an average piece content of about 17 pieces, the other 7 pieces. The data from these simulation runs reveal the same c h a r a c t e r i s t i c , where system production i s not reduced s i g n i f i c a n t l y by decreasing the cant-edger storage capacity. Production i s reduced only in the range of 6 - 10 percent, depending upon the a r r i v a l intensity into the cant edger. In addition, t h i s decrease in production is with respect to the worst situation - a storage capacity of 1 piece. Production however, was s i g n i f i c a n t l y changed by the difference in machine-2 operating speed. Figure 15 duplicates the results found by Gershwin and Berman (as shown in F i g . 6). However, the conclusions made from this simulation run indicate that system production i s not highly dependent upon storage capacity. The rates of the second-stage machines can influence t o t a l system production at a greater magnitude. FIG. 15 - PRODUCTION VS. MACHINE-2 STORAGE CAPACITY BOO- . 780 4 760 4 1 740 \ Vi o .5J 720: CL O O O 0 0 / J J J J J J o o o q 700 h-O ZD § 680-660 640 O. 620- , , , , , 0 2 * 6 8 ,0 12 14 16 ^ MACHINE-2 STORAGE CAPACITY - pieces 6 8 SUMMARY AND CONCLUSIONS The d i f f i c u l t y of modelling a system increases with the amount of d e t a i l the designer adopts to describe his model. The assumptions specified in t h i s study for analyzing a queue system describe what is commonly found in a sawmill. Even though these assumptions are descriptive of what occurs in a sawmilling process, they are d i f f i c u l t to employ in an a n a l y t i c a l model, thereby precluding a rigorous mathematical analysis. The advantages of mathematically modelling queue systems make i t desirable to pursue the modelling of sawmills by a n a l y t i c a l techniques. Research into the f i e l d of departure processes from the M/G/1 queue has shown that these processes cannot be mathematically described except for a few r e s t r i c t i v e cases. If more general solutions were available, the modelling of a sawmill system would be possible. Research into this area is c e r t a i n l y warranted, but i t would be d i f f i c u l t to guarantee that applicable solutions could be obtained. For the unsaturated case, the investigated sawmill system could not be modelled mathematically because of the assumptions used in t h i s study. A simplifying assumption of exponential service times might improve the potential for mathematical modelling. Exponential service times would result in a recurrent departure process, and there has been extensive work done in t h i s f i e l d of queueing theory. The usefulness of modelling sawmills with t h i s service d i s t r i b u t i o n i s unknown. 69 The errors introduced by using t h i s d i s t r i b u t i o n a l assumption could be investigated. If the errors were tolerable, this would be a reasonable method for approaching the sawmill system analysis. In cerain cases, numerical approximation methods derived from queueing theory can be applied to model the investigated sawmill layout. Boxma's research (tandem queues with highly correlated service times) has provided solutions that can po t e n t i a l l y be useful for sawmill modelling. I believe the assumtion of correlated service times i s representative of the sawmilling process. Boxma considered an i n f i n i t e storage capacity between machine centers, which i s a simplifying assumption that can l i m i t the use of the a n a l y t i c a l model. In addition, Neuts' solutions can be applied to the saturated queue case, i f correlated service times are disregarded. The service time d i s t r i b u t i o n of machines found in a sawmill should be investigated further. A good d i s t r i b u t i o n should adequately describe how the material i s processed. The service time d i s t r i b u t i o n used in t h i s study i s f l e x i b l e and is a good representation of the sawmilling process. It can consider many of the influencing factors that a f f e c t sawmill systems. These factors include: the size and quality of logs, the e f f e c t of log lengths on processing times, conveyor speeds, machine processing rates and operator i n e f f i c i e n c i e s . The service d i s t r i b u t i o n suggested in th i s study is capable of being used for queueing analysis. It also enables the modeller to use functional equations to describe service times, 70 rather than empirical d i s t r i b u t i o n s , which are presently used. This can be advantageous for modelling sawmills by both queueing theory and simulation, methods. F i e l d research to confirm the service d i s t r i b u t i o n suggested in t h i s study should be done. This report discusses some of the possible applications for sawmill designers using queueing theory. The extensive problems which could be encountered by a n a l y t i c a l methods were shown by the simulation analysis. Simulation provided a great deal of insight into the sawmill system and enabled the study of important operating c h a r a c t e r i s t i c s . Queueing theory is incapable of providing some important solutions of interest to the sawmill designer. Production s t a t i s t i c s on the wide variety of board dimensions, species or grades made in a sawmill can only be determined by simulation methods. This simulation study attempted to duplicate results to what one would find from queueing theory. Consequently, the simulation work only considered one customer "type". Valuable information can s t i l l be obtained with t h i s simplifying assumption. Sawmill operating c h a r a c t e r i s t i c s such as buffer capacity, bottlenecks and blocking are generally not dependent on customer types. Simplistic production estimates could also be determined. This simulation study provided information for sawmill design procedures on i t s own merit. The study showed that the relationship between production and the a r r i v a l rate into this simple queue system can be linear i f blocking occurs (in the range of operating values studied). If i n t e r a r r i v a l times are 71 very large, a s l i g h t non-linear relationship exists with respect to production i f there i s absolutely no blocking. There is only a minor dependency of i n t e r a r r i v a l times on system production. Therefore, in many applicable situations, system production estimates could be very e a s i l y calculated. Although blocking i s d i f f i c u l t to incorporate in an a n a l y t i c a l model, i t should not be disregarded. With two stations in the second stage of the studied queue system, the determination of f i r s t - s t a g e blocking time can be d i f f i c u l t . The analysis could be s i m p l i f i e d i f independent blocking, contributed by only one second-stage station, i s considered. Blocking provided by one second-stage station can have a large effect on the average queue content of the other station. Therefore, i t is desirable to predict the occurrence of blocking, i f the designer i s attempting to determine the capacity of a second-stage buffer. The assumption of an i n f i n i t e second-stage storage capacity would allow the modeller to determine average queue contents in the storages without blocking. This would be a desirable procedure for s i z i n g the storage to the worst case. System production can be affected i f any one of the three machines contribute to f i r s t - s t a g e blocking. Production of the studied sawmill appears to be most sensitive to the machine speed of the headrig. Production improvement by increasing the headrig speed approaches a l i m i t as blocking by either of the two second-stage stations increases. The simulation study reveals that another possible method 72 of increasing production i s to decrease the average queue content of a second-stage storage; p a r t i c u l a r l y i f the storage is large, as in the case of the slab edger. This could be a non-conventional method to get more production from a sawmill, since most sawmill designers focus on the importance of the headrig as the primary production machine. The l i m i t to production improvement by increasing the speed of the slab edger occurs when the average piece storage content i s zero. A designer can int e n t i o n a l l y allow some second-stage blocking to occur, by decreasing the storage capacity of a second-stage machine. This might be necessary i f saving space in the second stage is an important consideration. The simulation study showed that system production can be quite insensitive to the second-stage storage capacity. System production is not substantially reduced by u t i l i z i n g very small storages in the second stage, which I consider as a non-intuitive result. Further investigation into optimum second-stage storage capacity should be done. If an a n a l y t i c a l approach i s undesirable, a simulation study could be done to research this unusual c h a r a c t e r i s t i c . In summation, this thesis outlines some of the problems encountered in attempting to model a sawmill by queueing theory. It also shows some of the disadvantages of simulation for analyzing a sawmill system. It is desirable to have queueing theory as another tool available to the sawmill designer. The most important aspect of queueing theory analysis i s to know when, where and how to use i t ( l i k e using any other 0. R. 73 technique). This i s p a r t i c u l a r l y important with user-friendly software packages that are beginning to appear on the market. Unless the designer understands the theory behind these programs, serious errors or interpretation may be made from the computer output. 74 BIBLIOGRAPHY 1. Aune, J.E. and E.L. Lefebvre: Small-Log Sawmill Systems in Western Canada. Western Forest Products Laboratory, Information Report VP-X-141 (1975). 2. Aune, J.E.: System Simulation; A Technique in the Study of Sawmill Productivity Analyses and Designs. Forestry Chronicle, 50 (2), pp 66-69 (1974). 3. Aune, J.E.: Computerized Sawmi11 Design; Model vs. Reality. Proceedings; F i f t h wood machining seminar, Richmond, Ca., pp 266-275 (1977). 4. Berman, M. and M. Wescott: On Queueing Systems With Renewal Departure Times. Advances in Applied Probablity, 15 (3), pp 657-673 (1983). 5. Boxma, O.J.: On a Tandem Queueing Model With Identical Service Times at Both Counters I_ & I_I_. Advances in Applied Probability, 11 (3), pp 616-659 (1979). 6. Burke, P.J.: The Output of a Queueing System. Operations Research, 4 (4), pp 699-704 (1956). 7. Bury, K.V.: S t a t i s t i c a l Models in Applied Science. Wiley, New York (1975). 75 8. Carino, H.F. and J.L. Bowyer: New Tool for Solving Material Flow Problems: A Computer Based Model for Maximizing Output at Minimum Cost. Forest Products Journal, 29 (10), pp 84-90 (1979). 9. Carino, H.F. and J.L. Bowyer: Sawmill Analysis Using Queueing Theory Combined With a Direct Search Optimizing Algorithm. Forest Products Journal, 31 (6), pp 31-40 (1981). 10. Carino, H.F., and J.L. Bowyer: DSMIN (Direct Search Minimization): A Queueing-Based Interactive Computer Model For Wood Products M i l l Design and Productivity Analyses. University of Minnesota Agriculture Experimental Station Technical B u l l e t i n , 334 (1982). 11. Cooper, R.B.: Introduction to Queueing Theory. MacMillan, New York (1972). 12. Disney, R.L., R.L. F a r r e l l and P.R. DeMorais: A Characterizat ion of M/G/1 Queues With Renewal Departure Processes. Management Science, 19 (11), pp 1222-1228 (1973). 13. Dobie, James: Relationships Between Log Size and Volume Throughput for Types of Sawmill Headrigs. Forest Products Journal, 23 (6), pp 31-35 (1973). 14. F a l i n , G.I.: Effe c t of the Recurrent C a l l s on Output Flow 76 of a Single Channel System of Mass Service. Engineering Cybernetics, 17 (4), pp 99-103 (1979). 15. F e l l e r , William: An Introduction to Probability Theory and Its Applications. Vol. 2, 2nd ed., Wiley, New York (1971). 16. Gershwin, S.B., and 0.Berman: Analysis of Transfer Lines Consisting of Two Unreliable Machines With Random Processing Times and F i n i t e Storage Buffers. AIIE Transactions 13 (1), pp 1-11 (1981). 17. Henriksen, James 0. and R.C. Crain: GPSS-H User's Manual. Wolverine Software Company, Annandale VA., (1983). 18. Heyman, D.P. and M.J. Sobel: Stochast ic Models in Operations Research. McGraw-Hill, New York (1982). 19. H i l l i e r , F.S. & G.J. Lieberman: Introduction to Operations Research. 3rd ed., Holden-Day, San Franciso (1980). 20. Jackson, R.R.P.: A Maintenance Study of Unscheduled Open Hearth Furnace Repairs. Unable to locate the source of th i s paper. 21. Jenkins, J.H.: On the Correlat ion Structure of the Departure Process of the M/E/1 Queue. Journal of the Royal S t a t i s t i c a l Society, Series B, 28, pp 336-344 (1966). 77 22. K a r l i n , S. and H.M. Taylor: A F i r s t Course in Stochastic Processes. Academic Press, New York (1975). 23. King, R.A.: The Covariance Structure of the Departure Process from M/G/1 Queues With F i n i t e Waiting Lines. Journal of the Royal S t a t i s t i s t i c a l Society, Series B, 33, pp 401-405 (1971). 24. Neuts, Marcel F.: Matrix-Geometric Solutions in Stochastic Models; An Algorithmic Approach. John Hopkins University Press, New York (1981). 25. Parzen, E.: Modern Probability and Its Applications. Wiley, New York (1960). 26. Parzen, E.: Stochastic Processes. Holden-Day, San Francisco (1962). 27. Pinedo, M. and R.W. Wolff: A Comparison Between Tandem Queues With Dependent and Independent Service Times. Operations Research, 30 (3), pp 464-479 (1982). 28. Rosenshine, M. and M.J. Chandra: Approximate Solutions for Some Two-Stage Tandem Queues, Part J_: Individual A r r i v a l s at the Second Stage. Operations Research, 23 (6), pp 1155-1166 (1975). 29. Ross, Sheldon M.: Introduction to Probability Models. 78 Academic Press, New York (1980). 30. Ross, Sheldon M.: Applied Probability Models With Optimization Applications. Holden-Day, San Francisco (1970). 31. Schriber, Thomas J: Simulation Using GPSS. Wiley, New York (1974). 32. Shimshak, D.G. and G.P. Spichas: Waiting Time in a Two Station Ser ies Queueing System: The Ef fect of Dependent I n t e r a r r i v a l Times. Journal of the Operational Research Society, 33, pp 745-750 (1982). 33. W i l l i s t o n , E. M.: Lumber Manufacturing; The Design and Operation of Sawmilis and Planer M i l l s . M i l l e r Freeman Publications, New York (1976). APPENDIX A NOTATION AND SYMBOLS 80 Notation and Symbols Page U\ Exponential d i s t r i b u t i o n scale parameter 11 representing machine 1 operating speed M2 Exponential d i s t r i b u t i o n scale parameter 11 representing machine 2 operating speed p Queue system production 11 n Average in-process inventory behind 11 a queue station E(SC) Expected cost of service 13 E(WC) Expected cost of waiting 13 E(TC) Expected t o t a l cost 13 M "Memoryless" or exponential d i s t r i b u t i o n 14 G General d i s t r i b u t i o n 14 GI General independent d i s t r i b u t i o n 14 E k-Erlang d i s t r i b u t i o n 14 k D "Degenerate" (constant) d i s t r i b u t i o n 14 N F i n i t e number of customers allowed in a 14 waiting l i n e (queue capacity) c Number of p a r a l l e l servers in a queue mechanism 14 X k-Erlang d i s t r i b u t i o n scale parameter 23 k k-Erlang d i s t r i b u t i o n shape parameter 23 L Random number representing the time to 25 process a log D Displacement parameter (a constant) 25 S Random number representing the set-up time 25 at a machine to process a log 81 Page T Random number representing the t o t a l service 26 time to process a log 17 Mean a r r i v a l rate into the f i r s t stage 29 7 Mean service time in the f i r s t stage 30 7 Mean service time in the second stage 30 p. T r a f f i c intensity in the f i r s t stage 30 p 2 T r a f f i c intensity in the second stage 30 X The i ' t h Exponential d i s t r i b u t i o n random 37 i number r e a l i z a t i o n u The i ' t h Uniform d i s t r i b u t i o n random 37 i number r e a l i z a t i o n s- Speed of a machine processor 38 m Minimum length of a log permitted in the sawmill 38 T, Total service time of machine 1 42 T 2 Total service time of machine 2 43 T 3 Total service time of machine 3 43 s. Feed speed of machine 1 43 s 2 Feed speed of machine 2 43 s 3 Feed speed of machine 3 43 Mi Mean set-up time of machine 1 43 M 2 Mean set-up time of machine 2 43 M 3 Mean set-up time of machine 3 43 B Percentage of time stage 1 i s blocked 47 e Average time at machine one 47 $ Average machine 1 service time 47 APPENDIX B ANTITHETIC VARIATES 83 Antithetic Variates A n t i t h e t i c variables i s a variance reducing technique used in simulation. It i s used for reducing the variance of two random variable (outputs) X and Y. Antithetic variates are based on on the equation: VAR(X+Y) = VAR X + VAR Y + 2 COV (X,Y) The purpose of a n t i t h e t i c variables is to induce a negative correlation between X and Y (have the covariance of X and Y become negative). This w i l l result i n : VAR (X+Y) < VAR X + VAR Y There i s no direct control in simulation over the output of the random variable. However, simulation does have the control of the input random variables that are generated. Therefore, the approach for a n t i t h e t i c variables i s to induce negatively correlated input random variables and hope that the ensuing output random variables have a negative c o r e l l a t i o n . Henriksen and C r a i n 1 7 states that the resulting negative c o r r e l a t i o n in output random variables i s usually substantially less than the negative c o r r e l a t i o n induced in input random variables because the s t a t i s t i c a l models act as " f i l t e r s " . 84 A n t i t h e t i c variates are induced by the sampling of the uniform d i s t r i b u t i o n . Numbers are sampled from (0,1) and a negative correlated number is then used. For example: sampled random number = 0.300 an t i t h e t i c random number = 1-0.300 = 0.700 Antithetic random variables result in better point estimates of the simulation r e s u l t s , for the same number of samples. APPENDIX C RENEWAL PROCESS 86 Renewal Process Renewal theory forms the foundation for analysis of queues. The theory is based on counting processes. A counting process for which times between successive events are independent and id e n t i c a l l y distributed with an arbitrary d i s t r i b u t i o n is defined as a renewal process. 5, 5 , F i g . 16. The Renewal Process Source: Ross, 9 p 227. Let (N(t), t>0} be a counting process and l e t Xn denote the time between the (n- l ) s t and the nth event of the process, n£1. If the sequence of nonnegative random variables {X,,X2,...} are independent and i d e n t i c a l l y distributed, then the counting process is a renewal process. For a renewal process having i n t e r a r r i v a l times X,,X2 N Let S 0 = 0 S = L X for n>1 n i = 1 i Then N(t) = max { n: S St} n 87 Therefore N(t) is the number of renewals that have occurred by time t. For further reference to renewal theory and related processes, see R o s s 2 9 ^ 3 0 , P a r z e n 2 6 , K a r l i n and T a y l o r 2 2 or Heyman and S o b e l 1 8 . APPENDIX D -ERLANG DISTRIBUTION 89 k-Erlang D i s t r i b u t i o n A random variable X i s said to by a 3-parameter gamma model i f the pro b a b i l i t y density function i s of the form: (k-1 ) f (x;0,X,k)= 1 .(x-0) exp {-(x-0)/X) E XfTkT TxT where B= location parameter X= scale parameter r ( « ) = gamma function k = shape parameter The k-Erlang d i s t r i b u t i o n i s a gamma d i s t r i b u t i o n with integer values for the shape parameter. The k-Erlang d i s t r i b u t i o n i s an extremely f l e x i b l e d i s t r i b u t i o n that accomodates a wide variety of shapes. Figure 8 - A shows the k-Erlang d i s t r i b u t i o n with a constant scale parameter X and dif f e r e n t values for the shape parameter k. Figure 8-B shows the k-Erlang d i s t r i b u t i o n with a constant value for k and diff e r e n t values for X. The 3-parameter k-Erlang d i s t r i b u t i o n possesses the following properties: E ( X ) = 6 + X-k V A R ( X ) = X 2 - k 90 Mode = 6 + X-(k-1) The maximum l i k e l i h o o d estimators for the gamma di s t r i b u t i o n are: X-R = x n where x = (1/n )• £ Y n=1 i Y = a gamma random variable r e a l i z a t i o n i If the geometric mean is defined as: n 1 /n G = n Y i = 1 i and g = In (x/G) Bury 7 states that a highly accurate approximation of R can then be made from the following equations: with R = (0.5001 + 0.l649g - 0.0544g 2)g" 1 0 < g < 0.577 91 or K = (17.80 + 11.97g + g 2) - 1 •(8.99 + 9.060g + 0.977g 2)g-' with 0.577 < g < 17 In simulation, a k-Erlang r e a l i z a t i o n i s the sum of k exponential d i s t i b u t i o n r e a l i z a t i o n s : k Pr[X >t] = Z Pr[X >t] E i=l i Where X = a k-Erlang r e a l i z a t i o n E X = an exponential r e a l i z a t i o n i Thus, a uniform random number u i s converted into an exponential random number, and the sum of k such values gives a single r e a l i z a t i o n of a k-Erlang variable: k X = M - Z (-In ( 1 - u )) E i = 1 i 92 APPENDIX E ESTIMATION OF k-ERLANG PARAMETERS 93 Estimation of the k-Erlang Parameters The data used to estimate a 3-parameter k-Erlang d i s t r i b u t i o n came from Dobie. 1 3 The page containing the data from Dobie's report is included in t h i s Appendix. One can refer to the data for the numbers that were used in the estimation of the parameters. The equations used to estimate the parameter values are found in Appendix D. (1) Estimate the k-Erlang parameters for chipper headrig - m i l l "A" Minimum log length is 8 f t . Therfore 6 w i l l have to be subtracted from a l l log-length frequency values. This i s because i t i s desirable to include the 2 f t . between the 8 and 10 f t . frequency class as contributing to the processing time. This w i l l reduce the 3-parameter k-Erlang d i s t r i b u t i o n to a 2-parameter d i s t r i b t u i o n . From the data, we obtain the following values: x = 9.44 = X-k n 1/n G = n x i = 1 i _ 2 5 ' 7 5 . 4 2 ' 7 5 . 6 b ' 7 5 ' 8 1 5 ' 7 5 ' 1 0 2 O ' 7 5 « 1 2 1 i , ' 7 5 ' 1 4 1 1 ' 7 5 94 G = 8.629 g(R) = In (x/G) = In (9.44/8.629) = 0.0898 R = (0.5001 + 0.l649g - 0.0544g 2)g" 1 for 0<g<0.577 R = 5.72 X = 1.65 These are estimates for the gamma model. The k-Erlang d i s t r i b u t i o n uses only integer values for k therefore l e t : R = 6 X = 1.6 Thus our 3-parameter k-Erlang function takes the form: (5) f (x;6,1.6,6) = 1 . (x-6) exp {-(X-6)/1.6} E 1.6T(6) (1.6) The above equation i s used for case (1) in the Kolmogorov-Smirnov test (2) Estimation of k-Erlang parameters for a scrag headrig - m i l l "G" Minimum log length i s 10 f t . , therefore subtract 8 from a l l data values to obtain a 2-parameter k-Erlang model. X = 8.87 95 G = 8.31 g(R) = 0.0652 R = 7.82 X = 1.13 Integer values of k are required, therfore l e t : R = 8 X = 1 .1 The k-Erlang d i s t r i b u t i o n has the parameters: (7) f (x;8,1.1,8) = 1 .(x-8) exp {-(x-8)/1.l} E 1.ir(8) (1.1) (3) Estimation of k-Erlang parmaters for a log gang headrig m i l l " J " Minimum log length is 10 f t . , therefore subtract 8 from a l l data values to obtain a 2-parameter k-Erlang model. X = 8.10 G = 7.54 g (R) = 0.0709 R = 7.21 X = 1.12 Integer values of k are required, therfore l e t : R = 7 X = 1 . 1 The k-Erlang d i s t r i b u t i o n has the parameters: 96 (6) f (x;8,1.1,7) = 1 . (x-8) exp {-(x-8)/1.U E 1.1T(7) (1.1) 97 Nov 3/83 Rob Zwick Chipper Heading "A" KOLMOGOROFF TEST (1) (2) (3) Class Observed Observed Value Frequency i x i n i (4) Cumulative Frequency n i (5) Sample Distri-bution (4) (6) Erlang c.d.f. FE -(x;8,1.6,6) (7) Absolute Deviation K 5)-(7)l 1 8 5 5 0.0067 0.0092 0.0025 2 10 2 7 0.0933 0.1088 0.0155 3 12 8 15 0.2000 0.3225 .0.1225 4 14 15 30 0.4000 0.5595 Fails-K).1595 5 16 20 50 0.6667 0.7470 0.0803 6 18 14 64 0.8533 0.8679 0.0146 7 20 11 75 1.0000 0.9340 0.0660 Test f a i l s at a = 0.10 C/fn" = 0.14087 Scrags "G" (x;10,l.l,8) 1 10 1 1 ' 0.00099 0.0006 0.0093 2 12 5 6 0.0594 0.0733 0.0139 3 14 25 31 0.3069 0.3062 0.0007 4 16 30 61 0.6040 0.5940 0.0100 5 18 18 79 0.7822 0.8022 0.0200 6 20 11 90 0.8911 0.9162 0.0251 7 22 2 92 0.9109 0.9681 0.0572 8 24 9 101 1.0000 0.9891 0.0109 Test passes at a = 0.10 C//TT- 0.1214 Log Gangs "J" (x;10,1.1,7) 1 10 2 2 0.0238 0.0104 0.0134 2 12 9 11 0.1310 0.1559 0.0249 3 14 17 28 0.3333 0.4469 0.1136 4 16 31 59 0.7024 0.7119 0.0095 5 18 13 72 0.8571 0.8781 0.0210 6 20 7 79 0.9405 0.9536 0.0131 7 22 2 81 0.9643 0.9845 0.0202 8 24 3 84 1.0000 0.9945 0.0059 Test passes at a =0.10 C/Jn = 0.133 98 — DISTRIBUTION OF LOG LENGTHS IN STUDY SAMPLES. Log length Chipper hoadrigt Scrags Log gangs ( « . ) A B C D E F G H 1 J K (No. of logs) 8 5 6 10 2 3 2 1 2 12 8 24 9 9 5 3 6 9 5 14 15 11 3 21 12 4 25 8 5 17 10 16 20 24 13 68 106 55 30 47 56 31 22 18 14 10 19 14 15 18 2 12 13 18 20 11 12 40 36 13 11 8 7 21 22 4 31 5 2 6 2 6 24 9 11 3 9 26 1 Number of legs 75 61 106 116 184 102 101 60 105 84 91 Average length (ft.) 16 18 20 15 16 16 16 16 18 16 18 Source: D o b i e , 1 3 p 33. APPENDIX F PRODUCTION VS. INTERARRIVAL TIME AND OTHER SYSTEM MEASURES VS. INTERARRIVAL (INCL. SIMULATION PROGRAM AND DATA) SIMULATE * THIS PROGRAM VARIES THE INTERARRIVAL TIME * OF LOGS ENTERING THE QUEUE SYSTEM * * FUNCTION DEFINITIONS * * THIS IS AN EXPONENTIAL DISTRIBUTION FUNCTION * WHICH WILL BE USED FOR THE K-ERLANG DISTRIBTUION * 5 FUNCTION RN1.C24 , 0 / . 1, . 104/ .2 , . 2 2 2 / . 3 . . 3 5 5 / . 4 , . 5 0 9 / . 5 , . 6 9 / . 6 , .9 15/ .7 , 1 . 2 / . 7 5 , 1 . 3 8 . 8 . 1 . 6 / . 8 4 , 1 . 8 3 / . 8 8 . 2 . 1 2 / . 9 , 2 . 3 / . 9 2 . 2 . 5 2 / . 9 4 , 2 . 8 1 / . 9 5 , 2 . 9 9 / . 9 6 , 3 . 2 . 9 7 , 3 . 5 / . 9 8 . 3 . 9 / . 9 9 . 4 . 6 / . 9 9 5 . 5 . 3 / . 9 9 8 . 6 . 2 / . 9 9 9 , 7 / . 9 9 9 8 , 8 * * THIS IS A SEPARATE EXPONENTIAL DISTRIBUTION FUNCTION * FOR THE SET-UP TIMES OF EACH MACHINE. IT HAS A DIFFERENT * "SEED" THAN THE ABOVE EXPONENTIAL DISTRIBUTION * 6 FUNCTION RN2.C24 , 0 / . 1 , . 1 0 4 / . 2 . . 2 2 2 / . 3 , . 3 5 5 / 4 . . 5 0 9 / 5 , . 6 9 / . 6 , . 9 1 5 / . 7 , 1 . 2 / . 7 5 , 1 . 3 8 . 8 , 1 . G / . 8 4 , 1 . 8 3 / . 88, 2 . 12/ . 9 , 2 . 3/ . 92 , 2 . 52/. 94 , 2 . 8 1 / . 95, 2 . 99/ . 96 , 3 . 2 . 97 , 3 . 5/ . 98 , 3 . 9/ . 99 , 4 . 6/ . 995 , 5 . 3 / . 998 . 6 . 2 / . 999 , 7/ . 9998 , 8 # » THIS STATEMENT IDENTIFIES THE EXTERNAL SUBROUTINE THAT * STORES X-Y VALUES OF R1 VS. P INTO A FILE ACCESSIBLE FOR * THE TELLAGRAF GRAPHING SOFTWARE PACKAGE EXTERNAL &DATA * * STORAGE CAPACITY DEFINITIONS STORAGE SSSMACH1,100/SSSMACH2;10/SSSMACH3,50 REALLOCATE COM,100000 DECLARE ALL AMPERVARIABLES USED IN THE PROGRAM SRATE1,&RATE2,SRATE3,&SET1.6SET2.6SET3.8SCALE,&M.SK &BL0CK,&P1(2O),SAC3(2O).&B1(2O),&ARR(2O) SI ,S J RATE OF MACHINE 1 RATE OF MACHINE 2 RATE OF MACHINE 3 SETUP MEAN TIME FOR MACHINE 1 SETUP MEAN TIME FOR MACHINE 2 SETUP MEAN TIME FOR MACHINE 3 MEAN VALUE OF EXPONENTIAL DIST. FOR GENERATION OF ERLANG RANDOM VARIABLES K VALUE FOR ERLANG DISTRIBUTION MINIMUM LOG LENGTH » MODEL SEGMENT 1 CNTL GENERATE 750,FN5 GENERATE INTERARRIVALS OF 750 TIME UNITS REAL REAL INTEGER &RATE1 SRATE2 -SRATE3 -6SET1 &SET2 &SET3 SSCALE -&K SM h o o GATE SNF ENTER SEIZE GATE SNF GATE SNF SEIZE LEAVE SMACHt SMACH1 MACH1 SMACH2 SMACH3 AVE SMACHI IF STORAGE SMACHI IS FULL, BLOCK ARRIVALS ENTER STORAGE SMACH1 SEIZE MACH1 FACILITY IF STORAGE MACH2 IS FULL, DO NOT LEAVE STORAGE SMACH1 IF STORAGE MACH3 IS FULL, DO NOT LEAVE STORAGE SMACH1 STATISTICS FOR NO BLOCK SERVICE TIME THIS ROUTINE CREATES ERLANG RANDOM NUMBERS WITH A K VALUE OF 7. THESE RANDOM VARIABLES ARE THEN ASSIGNED TO PARAMETER 1 TO GIVE THE MACHINES 1,2 OR 3 THEIR RESPECTIVE PROCESSING TIMES. THE AMPERVARIABLES &R1. &R2 AND &R3 GIVES THE MACHINES THEIR RESPECTIVE PROCESSING RATES. WHICH CAN BE VARIED BY EXTERNAL CONTROL CARDS. ONE ASSIGN ASSIGN ASSIGN TEST GE ERL1 FVARIABLE ERL2 FVARIABLE ERL3 FVARIABLE TOT1 FVARIABLE TOT2 FVARIABLE TOT3 FVARIABLE ADVANCE RELEASE RELEASE SPLIT ENTER SEIZE LEAVE ADVANCE RELEASE QUEUE DEPART BYBY TERMINATE MACH3 ENTER SEIZE LEAVE ADVANCE RELEASE QUEUE DEPART TRANSFER * 4,&SCALE, 1+.P4 5+, 1 P5,&K,0NE (&M+P1J/&RATE1 (&M+P1)/&RATE2 (&M+P1)/&RATE3 &SET1*FN6+V$ERL1 &SET2*FN6+V$ERL2 &SET3*FN6+V$ERL3 V$T0T1 MACH1 ASSIGN AN EXPONENTIAL RANDOM NUMBER TO PARAMETER 4 ADD THE EXPONENTIAL VALUE TO PARAMETER 1 ASSIGN THE RATE OF MACH1 TO THE EXPONENTIAL VARIABLE ASSIGN THE RATE OF MACH2 TO THE EXPONENTIAL VARIABLE ASSIGN THE RATE OF MACH3 TO THE EXPONENTIAL VARIABLE AVE 1,MACH3 SMACH2 MACH2 SMACH2 VSTOT2 MACH2 PROD PROD SMACH3 MACH3 SMACH3 V$TOT3 MACH3 PROD PROD .BYBY MODEL SEGMENT 2 GENERATE 10000 TERMINATE 1 PROCESS THE PIECE AT TOTAL SERVICE TIMEFOR MACHINE ONE LEAVE MACH1 (INCLUDES BLOCKING) GATHER STATS ON NO BLOCKING SPLIT THE PIECE INTO TWO: ONE GOES TO MACH2. THE OTHER TO MACH3 ENTER STORAGE FOR MACH2 SEIZE MACH2 FACILITY LEAVE THE MACH2 STORAGE PROCESS THE PIECE AT TOTAL SERVICE TIME FOR MACHINE TWO LEAVE MACH2 COUNT TOTAL PRODUCTION THROUGHPUT OF SYSTEM GATHER STATISTIC FOR PRODUCTION OF SYSTEM ENTER THE STORAGE FOR MACH3 SEIZE FACILITY MACH3 LEAVE THE STORAGE MACH3 PROCESS THE PIECE AT TOTAL SERVICE TIME FOR MACHINE THREE LEAVE MACH3 COUNT TOTAL PRODUCTION THROUGHPUT OF SYSTEM GATHER STATISTICS FOR SYSTEM PRODUCTION CONTROL CARDS LET LET LET LET LET &M=2S0 SK = 7 &SCALE=40 &SET1=200 &SET2=200 SET MINIMUM LOG LENGTH TO 0 .25 METERS SET K VALUE TO 7 SET ERLANG SCALE PARAMETER TO .40 SECONDS MEAN SET-UP TIME FOR MACHINE 1 IS 2 SECONDS MEAN SET-UP TIME FOR MACHINE 2 IS 2 SECONDS H o h LET 8SET3=200 MEAN SET-UP TIME FOR MACHINE 3 IS 2 SECONDS UNLIST CSECHO SET THE RATES OF THE MACHINES FOR THE MEDIUM INTENSITY CASE THE MACHINE RATES FOR THE LOW INTENSITY CASE ARE : MACHINE 2 = 1.20 METERS PER SEC. AND MACHINE 3 = 1.00 METERS PER SEC. THE MACHINE RATES FOR THE HIGH INTENSITY CASE ARE : MACHINE 2 = O.SO METERS PER SEC. AND MACHINE 3 = 0 .40 METERS PER SEC. LET &RATE1=1.00 RATE LET 8RATE2=0.80 RATE LET 8RATE3=0.60 RATE LET 8J=750 DO 81=1,20 START 5.NP RESET RMULT 1,2 START 18.NP RMULT - 1 . - 2 START 18,NP LET 8P1(&I)=QC$PR0D LET 8AC3(8I)=SA$SMACH3 LET &BL0CK*(FTSMACH1 -FTSAVE)/FT$MACH1* 100 LET &B1(6I)=8BL0CK LET &ARR(&I)=&J LET &J=&J+50 CNTL GENERATE &J .S CLEAR ENDDO CALL 8DATA(8P1(1),8AC3(1),&B1(1),SARR( 1)) END OF MACHINE 1 IS 1.0 METERS PER SEC. OF MACHINE 2 IS 0 .80 METERS PER SEC. OF MACHINE 3 IS O.GO METERS PER SEC. H O 651 657 662 654 664 663 649 626 598 584 562 549 530 514 496 480 464 452 436 425 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 8 3 0 2 3 8 9 4 2 9 0 4 2 9 6 5 25 23 17 15 1 1 7 3 M 0 0 0 0 0 0 0 0 0 0 0 0 6 7 8 7 5 5 6 7 0 0 0 0 0 0 0 0 0 0 0 o 750 800 850 900 950 1000 1050 1 100 1 150 1200 1250 1300 1350 1400 1450 1500 1550 1600 1650 1700 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 THIS DATA IS FOR THE MEDIUM STAGE-TWO INTENSITY CASE WITH MACHINE 2 = 0 .80 METERS PER SECOND AND MACHINE 3 = 0 . 6 0 METERS PER SECOND COLUMN 1 IS SYSTEM PRODUCTION (IN PIECES PER HOUR) COLUMN 2 IS AVERAGE PIECE CONTENT IN STORAGE 3 (IN PIECES) COLUMN 3 IS % TIME STAGE ONE IS BLOCKED COLUMN 4 IS INTERARRIVAL TIME (IN HUNDREDTH SECONDS) H O 923 .0 3 .2 0 .0 750.0 874 .0 2 8 0 .0 800.0 840 .0 1 . , 4 0 .0 850.0 802 .0 1 . 5 0 .0 900.0 756 .0 0. 4 0. 0 950.0 721 .0 0. 3 0. .0 1000.0 685 .0 0. 2 0 .0 1050.0 654 .0 0. 2 -0 .0 1100.0 626 .0 0. 4 0 0 1150.0 601 .0 0. 1 0. 0 1200.0 577 .0 0 . 2 0. 0 1250.0 552 .0 0 . 2 0. 0 1300.0 534 .0 0 . 1 0. 0 1350.0 514 .0 0. 2 0. 0 1400.0 496 .0 0. 1 0. 0 1450.0 480 .0 0. 2 0. 0 1500.0 464 .0 0. 1 0. 0 1550.0 451 .0 0. 1 0. 0 1600.0 436. .0 0 . 1 0 . 0 1650.0 424 .0 0 . 1 0 . 0 1700.0 THIS DATA IS FOR THE LOW STAGE• WITH MACHINE 2 = 1.20 METERS Pi AND MACHINE COLUMN 1 IS COLUMN 2 IS COLUMN 3 IS COLUMN 4 IS INTENSITY CASE 3 = 1.00 METERS PER SECOND SYSTEM PRODUCTION (IN PIECES PER HOUR) AVERAGE PIECE CONTENT IN STORAGE 3 (IN PIECES) % TIME STAGE ONE IS BLOCKED INTERARRIVAL TIME (IN HUNDREDTH SECONDS) 478 .0 46 .5 45 .3 750 .0 484 .0 47 .0 44 .6 800 .0 478 .0 46 .4 45 .5 850 .0 4B2 .0 47 .3 44 . 1 900 .0 479 .0 46 .5 44 .2 950 .0 480 .0 45 .7 39 .5 1000 .0 '485 .0 44 .0 35 .9 1050 .0 482 .0 41 .7 3-1 .7 1 100 .0 479 .0 38 . 3 29 .5 1 150 .0 478 .0 35. . 1 26 .6 1200 .0 474. .0 30. . 1 27 .0 1250 .0 474 .0 26. .5 24 .8 1300. .0 473 .0 21 . 5 16 .4 1350. .0 474. .0 16. .7 4 . ,5 1400. .0 464 . 0 12 . 4 0. 0 1450. .0 453. .0 10. 3 0. .0 1500. .0 442 . 0 8. 7 0. .0 1550. .0 429. 0 8. 2 0. 0 1600. 0 417 . 0 7 . 3 0. 0 1650. 0 408. 0 6. 0 0. 0 1700. 0 THIS DATA IS FOR THE HIGH STAGE WITH MACHINE 2 = 0 .60 METERS PEI •TWO INTENSITY CASE ! SECOND AND MACHINE 3 = 0 .40 METERS PER SECOND COLUMN 1 IS SYSTEM PRODUCTION (IN PIECES PER HOUR) COLUMN 2 IS AVERAGE PIECE CONTENT IN STORAGE 3 (IN PIECES) COLUMN 3 IS % TIME STAGE ONE IS BLOCKED COLUMN 4 IS INTERARRIVAL TIME (IN HUNDREDTH SECONDS) 106 APPENDIX G PRODUCTION OF (INCL. SYSTEM AS FUNCTION OF MACHINE RATES SIMULATION PROGRAM AND DATA) SIMULATE THIS PROGRAM VARIES THE THREE MACHINE RATES AND PRODUCTION OF THE SYSTEM IS SUBSEQUENTLY OBSERVED FUNCTION DEFINITIONS THIS IS AN EXPONENTIAL DISTRIBTUION FUNCTION WHICH WILL BE USED TO OBTAIN A K-ERLANG DISTRIBUTION FUNCTION 5 FUNCTION RN1.C24 , 0 / . 1 , . 1 0 4 / . 2 , . 2 2 2 / . 3 . . 3 5 5 / . 4 . . 5 0 9 / . 5 , . 6 9 / . 6 , . 9 1 5 / . 7 , 1 . 2 / . 7 5 . 1 . 3 8 . 8 , 1 .6/ . 84 , 1 . 83/ .88 , 2 . 12/ . 9 , 2 . 3/ . 92 , 2 . 52/ . 94 , 2 . 8 1/ . 95 , 2 . 99/ . 96 , 3 . 2 . 9 7 , 3 . 5 / . 9 8 , 3 . 9 / . 9 9 , 4 . 6 / . 9 9 5 , 5 . 3 / . 9 9 8 , 6 . 2 / . 9 9 9 , 7 / . 9 9 9 8 , 8 * * THIS IS A SEPARATE EXPONENTIAL DISTRIBUTION FUNCTION FOR * THE SET-UP TIMES OF THE MACHINES. IT HAS A DIFFFERENT * "SEED" THAN THE ABOVE EXPONENTIAL DISTRIBUTION. 6 FUNCTION RN2.C24 , 0 / . 1 . . 1 0 4 / . 2 , . 2 2 2 / . 3 , . 3 5 5 / . 4 , . 5 0 9 / . 5 . . 6 9 / . 6 , . 9 1 5 / . 7 , 1 . 2 / . 7 5 , 1 . 3 8 . 8 , 1 . 6 / . 8 4 , 1 . 8 3 / . 8 8 , 2 . 1 2 / . 9 , 2 . 3 / . 9 2 , 2 . 5 2 / . 9 4 , 2 . 8 1 / . 9 5 . 2 . 9 9 / . 9 6 . 3 . 2 . 97 , 3 . 5/ . 98 , 3 . 9/ . 99 , 4 . 6/ . 995 , 5 . 3 / . 998 , 6 . 2 / . 999, 7/ . 9998 , 8 THIS STATEMENT IDENTIFIES THE EXTERNAL SUBROUTINE THAT STORES X-Y VALUES OF R1 VS. P INTO A FILE ACCESSIBLE FOR THE TELLAGRAF GRAPHING SOFTWARE PACKAGE EXTERNAL &DATA STORAGE CAPACITY DEFINITIONS STORAGE SSSMACH1.100/SSSMACH2,10/S$SMACH3,50 REALLOCATE COM,100000 DECLARE ALL AMPERVARIABLES USED IN THE PROGRAM REAL &RATE1,SRATE2,&RATE3,SSET1,&SET2,&SET3,&SCALE.&M,SK REAL 6.BLOCK.&RK20) ,&R2(20),6R3(20) ,&P1(20) ,&P2(20) ,&P3(: INTEGER 61 &RATE1 - RATE OF MACHINE 1 &RATE2 - RATE OF MACHINE 2 SRATE3 - RATE OF MACHINE 3 SSET1 - SETUP MEAN TIME FOR MACHINE 1 &SET2 - SETUP MEAN TIME FOR MACHINE 2 &SET3 - SETUP MEAN TIME FOR MACHINE 3 &SCALE - MEAN VALUE OF EXPONENTIAL DIST. FOR GENERATION OF ERLANG RANDOM VARIABLES &K K VALUE FOR ERLANG DISTRIBUTION &M - MINIMUM LOG LENGTH MODEL SEGMENT 1 ),SB 1(20) ,SB2(20) .8B3(20) H O GENERATE 100,FN5 GENERATE INTERARRIVALS OF 100 TIME UNITS GATE SNF SMACH1 IF STORAGE SMACH1 IS FULL, BLOCK ARRIVALS ENTER SMACH1 ENTER STORAGE SMACH1 SEIZE MACH1 SEIZE MACH1 FACILITY GATE SNF SMACH2 IF STORAGE MACH2 IS FULL, DO NOT LEAVE STORAGE SMACH1 GATE SNF SMACH3 IF STORAGE MACH3 IS FULL, DO NOT LEAVE STORAGE SMACHI SEIZE AVE STATISTICS FOR NO BLOCK SERVICE TIME LEAVE SMACH1 THIS ROUTINE CREATES ERLANG RANDOM NUMBERS WITH A K VALUE OF 7. THESE RANDOM VARIABLES ARE THEN ASSIGNED TO PARAMETER 1 TO GIVE THE MACHINES 1,2 AND 3 THEIR RESPECTIVE PROCESSING TIMES. THE AMPERVARIABLES &R1, SR2 AND 8R3 GIVES THE MACHINES THEIR RESPECTIVE PROCESSING RATES, WHICH CAN BE VARIED BY EXTERNAL CONTROL CARDS. ONE ASSIGN 4,&SCALE,5 ASSIGN AN EXPONENTIAL RANDOM NUMBER TO PARAMETER 4 ASSIGN 1+.P4 ADD THE EXPONENTIAL VALUE TO PARAMETER 1 ASSIGN 5+, 1 TEST GE P5.8K.0NE ERL1 FVARIABLE (8M+P1)/8RATE1 ASSIGN THE RATE OF MACH1 TO THE EXPONENTIAL VARIABLE ERL2 FVARIABLE (SM+P1)/8RATE2 ASSIGN THE RATE OF MACH2 TO THE EXPONENTIAL VARIABLE ERL3 FVARIABLE (6M+P1J/8RATE3 ASSIGN THE RATE OF MACH3 TO THE EXPONENTIAL VARIABLE T0T1 FVARIABLE SSET1*FN6+V.$ERL1 T0T2 FVARIABLE SSET2*FN6+V$ERL2 T0T3 FVARIABLE 8SET3*FNG+V$ERL3 ADVANCE V$T0T1 PROCESS THE PIECE AT TOTAL SERVICE TIMEFOR MACHINE ONE RELEASE MACH1 LEAVE MACH1 (INCLUDES BLOCKING) RELEASE AVE GATHER STATS ON NO BLOCKING SPLIT 1,MACH3 SPLIT THE PIECE INTO TWO: ONE GOES TO MACH2. THE OTHER TO ENTER SMACH2 ENTER STORAGE FOR MACH2 SEIZE MACH2 SEIZE MACH2 FACILITY LEAVE SMACH2 LEAVE THE MACH2 STORAGE ADVANCE V$T0T2 PROCESS THE PIECE AT TOTAL SERVICE TIME FOR MACHINE TWO RELEASE MACH2 LEAVE MACH2 OUEUE PROD COUNT TOTAL PRODUCTION THROUGHPUT OF SYSTEM DEPART PROD GATHER STATISTIC FOR PRODUCTION OF SYSTEM BYBY TERMINATE MACH3 ENTER SMACH3 ENTER THE STORAGE FOR MACH3 SEIZE MACH3 SEIZE FACILITY MACH3 LEAVE SMACH3 LEAVE THE STORAGE MACH3 ADVANCE VST0T3 PROCESS THE PIECE AT TOTAL SERVICE TIME FOR MACHINE THREE RELEASE MACH3 LEAVE MACH3 OUEUE PROD COUNT TOTAL PRODUCTION THROUGHPUT OF SYSTEM DEPART PROD GATHER STATISTICS FOR SYSTEM PRODUCTION TRANSFER , BYBY MODEL SEGMENT 2 GENERATE 10000 TERMINATE 1 CONTROL CARDS LET LET LET LET 8M=250 &K = 7 SSCALE=40 SSET1=300 THE MINIMUM LOG LENGTH IS 0 .25 METERS K-ERLANG K VALUE IS 7 K-ERLANG SCALE PARAMETER IS 0 .40 SECONDS SET-UP TIME FOR MACHINE 1 IS 3 SECONDS H O CO LET SSET2=300 SET-UP TIME FOR MACHINE 2 IS 3 SECONDS LET &SET3=300 SET-UP TIME FOR MACHINE 3 IS 3 SECONDS UNLIST CSECHO IN THE FIRST SIMULATON RUN, VARY THE RATE OF MACHINE 1. THE BASE VALUES FOR THE OTHER TWO MACHINES ARE: MACHINE 2 RATE = 1.20 METERS PER SEC. MACHINE 3 RATE = 0 .80 METERS PER SEC. THE RATE OF MACHINE 1 IS VARIED FROM 0 .50 TO 1.50 METERS PER SECOND LET &RATE1=0.50 LET &RATE2=1.20 LET 8RATE3=0.80 DO 81=1,20 START 5,NP RESET RMULT 1 .2 START 18.NP RMULT - 1 , - 2 START 18,NP LET &R1(8I)=&RATE1 LET 6P1(6I)=QC$PR0D LET 8BL0CK=( FT$MACH 1 -FTSAVE )/FT$MACH1 * 100 LET 8B1(&I)=8BL0CK LET 8RATE1=8RATE1+0.05 CLEAR ENDDO IN THE SECOND SIMULATION RUN, VARY THE RATE OF MACHINE 2 THE BASE VALUES FOR THE OTHER TWO MACHINES ARE: MACHINE 1 » 1.10 METERS PER SEC. MACHINE 3 = 0 . 9 0 METERS PER SEC. VARY THE RATE OF MACHINE 2 FROM 0 .70 TO 1.70 METERS PER SECOND LET 8RATE1=1 . 10 LET SRATE2=0.70 LET 8RATE3=0.90 DO 81=1,20 START 5.NP RESET RMULT 1.2 START 18.NP RMULT - 1 , - 2 START 18,NP LET 8R2(8I)=8RATE2 LET &P2(8I)=OC$PROD LET 8BL0CK=(FTSMACH1-FTSAVE)/FT$MACH1* 100 LET 8B2(8I)=8BL0CK LET SRATE2=SRATE2+0.05 CLEAR ENDDO IN THIS SIMULATION RUN, VARY THE RATE OF MACHINE 3 THE BASE VALUES FOR THE OTHER TWO MACHINES ARE: MACHINE 1 RATE = 1.00 METERS PER SEC. MACHINE 2 RATE = 1.20 METERS PER SEC. VARY THE RATE OF MACHINE 3 FROM 0 .30 TO 1.30 METERS PER SECOND LET 8RATE1=1.00 LET 8RATE2=1.20 LET &RATE3=0.30 DO S I " 1 . 2 0 START S.NP RESET RMULT 1,2 START 18,NP RMULT - 1 , - 2 START 18,NP LET 6R3(&I)=SRATE3 LET &P3(&I)=OC$PROD LET « B L O C K = ( F T $ M A C H 1 - F T $ A V E ) / F T $ M A C H 1 * 100 LET &B3I&I)=&BLOCK LET &RATE3=SRATE3+0.05 CLEAR ENOOO CALL &0ATA(UR1( 1 ),&R2( 1).SR3( 1 ) ,&P1( 1),&P2( 1 ) ,&P3( D . S B K 1 ),&B2( 1 ) ,&B3( 1)) END I—1 H O 0 .500 0 .700 0 300 490 .0 64 1 .0 336 .0 0. .0 23 .9 56 .0 0 .550 0 .750 0. .350 532 .0 662 .0 399 .0 0 .0 22 .4 47 . 1 0 .600 0 .800 0. 400 571 .0 686 .0 435 .0 0. .0 21 .6 43 .6 0 .650 0. .850 0. .450 605 .0 732 .0 482 .0 0. .0 15 .6 36 .3 0. .700 0. .900 0. .500 646 .0 754 .0 534 .0 0. .0 11 . 3 27 .6 0 . 750 0. .950 0. 550 661 .0 769 .0 553 .0 0. 0 8 .2 28 .6 0 .800 1 . .000 0. 600 696 .0 780 .0 592 .0 0. 0 5 .0 23 .3 0 .850 1 . .050 0. 650 707 .0 795 .0 620 .0 0. 0 3 .8 20 .7 0. .900 1 . 100 0. 700 721 .0 787 .0 652 .0 0. 0 2 . 3 14 . 4 0. .950 1 . 150 0. 750 735 .0 788 .0 696 .0 1. 4 4 . 3 9. .6 1. .000 1 . 200 0. 800 723 .0 788 .0 733 .0 6. 5 4 . 1 2 .5 1, 050 1 . 250 0. 850 728. .0 783 .0 754 .0 8. 6 5 .7 0. .0 1. . 100 1 . 300 0. 900 729 .0 763 .0 777 .0 1 1 . 6 7 . 6 0. 0 1. . 150 1 . 350 0. 950 740. .0 792 .0 793 .0 10. 3 3. .5 0. 0 1. 200 1 . 400 1 . 000 713. .0 785 .0 804 .0 19. 0 3. 8 0. 0 1. 250 1 . 450 1 . 050 725. .0 796 .0 815 .0 19. 2 4 . 4 0. 0 1. 300 1 . 500 1 . 100 728. .0 795 .0 812 .0 20. 2 2 . 6 0. 0 1. 350 1 . 550 1 . 150 715. 0 803 .0 810 .0 24. 6 0. .2 0. 0 1. 400 1 . 600 1 . 200 738. 0 788 .0 819 .0 21 . 1 4 . 8 0. 0 1. 450 1 . 650 1 . 250 715. .0 792 .0 814. .0 28. 4 3. .4 0. 0 COLUMN 1 IS RATE OF MACHINE 1 VARIED (IN METERS PER SECOND) COLUMN 2 IS RATE OF MACHINE 2 VARIED (IN METERS PER SECONO) COLUMN 3 IS RATE OF MACHINE 3 VARIED (IN METERS PER SECOND) COLUMN 4 IS SYSTEM PRODUCTION FROM MACHINE 1 VARIED (IN PIECES PER HOUR) COLUMN 5 IS SYSTEM PRODUCTION FROM MACHINE 2 VARIED (IN PIECES PER HOUR) COLUMN 6 IS SYSTEM PRODUCTION FROM MACHINE 3 VARIED (IN PIECES PER HOUR) COLUMN 7 IS "/. BLOCKED TIME FROM FIRST RUN COLUMN 8 IS % BLOCKED TIME FROM SECOND RUN COLUMN 9 IS % BLOCKED TIME FROM THIRD RUN H H H APPENDIX H THE EFFECT OF BLOCKING ON SECOND-STAGE QUEUES AND SYSTEM MEASURES AFFECTED BY SECOND-STAGE STORAGE CAPACITY (INCL. SIMULATION PROGRAM AND DATA) SIMULATE THE FIRST SIMULATION RUN OF THIS PROGRAM VARIES THE RATE OF MACHINE 2 TO VARY FIRST-STAGE BLOCKING. THE SECOND SIMULATION RUN VARIES THE SIZE OF MACHINE 2 STORAGE FACILITY FUNCTION DEFINITIONS THIS IS AN EXPONENTIAL DISTRIBUTION FUNCTION WHICH WILL BE USED TO OBTAIN A K-ERLANG DISTRIBUTION FUNCTION 5 FUNCTION RN1.C24 , 0 / . 1 . . 1 0 4 / . 2 , . 2 2 2 / . 3 , . 3 5 5 / . 4 , . 5 0 9 / . 5 , . 6 9 / . 6 , . 9 1 5 / . 7 . 1 . 2 / . 7 5 . 1 . 3 8 . 8 . 1 . 6 / . 84, 1 . 8 3 / . 88, 2. 12/. 9, 2 . 3/ . 92 , 2 . 52/. 9.4 . 2 . 8 1/. 95 , 2 . 99/ . 96 , 3 . 2 . 9 7 , 3 . 5 / . 9 8 , 3 . 9 / . 9 9 , 4 . 6 / . 9 9 5 , 5 . 3 / . 9 9 8 . 6 . 2 / . 9 9 9 , 7 / . 9 9 9 8 . 8 * THIS IS A SEPARATE EXPONENTIAL DISTRIBUTION FUNCTION FOR * THE THREE MACHINE SET-UP TIMES. IT HAS A DIFFERENT "SEED" » THAN THE ABOVE EXPONENTIAL DISTRIBUTION * 6 FUNCTION RN2.C24 .0/.1,.104/.2,.222/.3..355/.4..509/.5,.69/.6,.915/.7.1.2/.75,1.38 . 8 , 1 . 6 / . 8 4 . 1 . 8 3 / 8 8 . 2 . 1 2 / . 9 , 2 . 3 / . 9 2 , 2 . 5 2 / . 9 4 , 2 . 8 1 / . 9 5 , 2 . 9 9 / . 9 6 . 3 . 2 . 9 7 . 3 . 5 / . 9 8 , 3 . 9 / . 9 9 , 4 . 6 / . 9 9 5 , 5 . 3 / . 9 9 8 , 6 . 2 / . 9 9 9 , 7 / . 9 9 9 8 , 8 THIS STATEMENT IDENTIFIES THE EXTERNAL SUBROUTINE THAT STORES X-Y VALUES OF R1 VS. P INTO A FILE ACCESSIBLE FOR THE TELLAGRAF GRAPHING SOFTWARE PACKAGE EXTERNAL SDATA STORAGE CAPACITY DEFINITIONS STORAGE S$SMACH1,100/S$SMACH3,50/SSSMACH2,10 REALLOCATE COM,100000 DECLARE ALL AMPERVARIABLES USED IN THE PROGRAM REAL URATE 1.6RATE2,8RATE3.8SET1,SSET2,8SET3,SSCALE,&M,8K REAL SBL0CK.&R2(20) ,8P1(20) .8P1B(20) ,8S2(20) ,8B1(20) .8AC3B(20) ,&AC3(20) ,8AC2B(20) INTEGER 81,&J &RATE1 - RATE OF MACHINE 1 8RATE2 - RATE OF MACHINE 2 8RATE3 - RATE OF MACHINE 3 ( SSET1 - SETUP MEAN TIME FOR MACHINE 1 8SET2 - SETUP MEAN TIME FOR MACHINE 2 8SET3 - SETUP MEAN TIME FOR MACHINE 3 SSCALE - MEAN VALUE OF EXPONENTIAL DIST. FOR GENERATION OF ERLANG RANDOM VARIABLES 8K - K VALUE FOR ERLANG DISTRIBUTION 8M - MINIMUM LOG LENGTH MODEL SEGMENT 1 GENERATE GATE SNF ENTER SEIZE GATE SNF GATE SNF SEIZE LEAVE 100,FN5 SMACH1 SMACH1 MACH1 SMACH2 SMACH3 AVE SMACH1 GENERATE INTERARRIVALS OF IF STORAGE SMACH1 IS FULL ENTER STORAGE SMACH1 SEIZE MACH1 FACILITY IF STORAGE MACH2 IS FULL, IF STORAGE MACH3 IS FULL, 100 TIME UNITS BLOCK ARRIVALS DO NOT LEAVE STORAGE SMACH1 DO NOT LEAVE STORAGE SMACH1 STATISTICS FOR NO BLOCK SERVICE TIME THIS ROUTINE CREATES ERLANG RANDOM NUMBERS WITH A K VALUE OF 7. THESE RANDOM VARIABLES ARE THEN ASSIGNED TO PARAMETERS 1 TO GIVE THE MACHINES 1,2 AND 3 THEIR RESPECTIVE PROCESSING TIMES. THE AMPERVARIABLES &R1, &R2 AND &R3 GIVES THE MACHINES THEIR RESPECTIVE PROCESSING RATES, WHICH CAN BE VARIED BY EXTERNAL CONTROL CARDS. ONE ASSIGN 4.&SCALE.5 ASSIGN AN EXPONENTIAL RANDOM NUMBER TO PARAMETER 4 ASSIGN 1+.P4 ADD THE EXPONENTIAL RANDOM NUMBER TO PARAMETER 1 ASSIGN 5+, 1 TEST GE P 5 , » K , 0 N E ERL 1 FVARIABLE (&M+P1)/SRATE1 ASSIGN THE RATE OF MACH1 TO THE EXPONENTIAL VARIABLE ERL2 FVARIABLE (&M+P1)/SRATE2 ASSIGN THE RATE OF MACH2 TO THE EXPONENTIAL VARIABLE ERL3 FVARIABLE (&M+P1J/&RATE3 ASSIGN THE RATE OF MACH3 TO THE EXPONENTIAL VARIABLE T0T1 FVARIABLE &SET1*FNG+V$ERL1 T0T2 FVARIABLE &SET2*FN6+V$ERL2 TOTS FVARIABLE &SET3*FN6+V$ERL3 ADVANCE V$T0T1 PROCESS THE PIECE AT TOTAL SERVICE TIMEFOR MACHINE ONE RELEASE MACH1 LEAVE MACH1 (INCLUDES BLOCKING) RELEASE AVE GATHER STATS ON NO BLOCKING SPLIT 1,MACH3 SPLIT THE PIECE INTO TWO: ONE GOES TO MACH2, THE OTHER TO ENTER SMACH2 ENTER STORAGE FOR MACH2 SEIZE MACH2 SEIZE MACH2 FACILITY LEAVE SMACH2 LEAVE THE MACH2 STORAGE ADVANCE V$T0T2 PROCESS THE PIECE AT TOTAL SERVICE TIME FOR MACHINE TWO RELEASE MACH2 LEAVE MACH2 QUEUE PROD COUNT TOTAL PRODUCTION THROUGHPUT OF SYSTEM DEPART PROD GATHER STATISTIC FOR PRODUCTION OF SYSTEM BYBY TERMINATE MACH3 ENTER SMACH3 ENTER THE STORAGE FOR MACH3 SEIZE MACH3 SEIZE FACILITY MACH3 LEAVE SMACH3 LEAVE THE STORAGE MACH3 ADVANCE V$T0T3 PROCESS THE PIECE AT TOTAL SERVICE TIME FOR MACHINE THREE RELEASE MACH3 LEAVE MACH3 QUEUE PROD COUNT TOTAL PRODUCTION THROUGHPUT OF SYSTEM DEPART PROD GATHER STATISTICS FOR SYSTEM PRODUCTION TRANSFER , BYBY MODEL SEGMENT 2 GENERATE 10000 TERMINATE 1 CONTROL CARDS LET LET LET LET &M=250 SK = 7 8SCALEM0 SSET1=300 MINIMUM LOG LENGTH IS 0 .25 METERS K-ERLANG K VALUE IS 7 K-ERLANG SCALE PARAMETER IS 0 .40 SECONDS SET-UP TIME FOR MACHINE 1 IS 3 SECONDS H LET 8SET2=300 SET-UP TIME FOR MACHINE 2 IS 3 SECONDS LET 8SET3=30O SET-UP TIME FOR MACHINE 3 IS 3 SECONDS UNLIST CSECHO THE FIRST SIMULATION RUN INTENTIONALLY CREATES FIRST-STAGE BLOCKING BY MACHINE 2. THE RATE OF MACHINE 3 ENSURES A QUEUE IN STORAGE 3, BUT WILL NOT PROVIDE FIRST-STAGE BLOCKING. THE RATE OF *MACHINE 2 IS VARIED. TO VARY THE FIRST-STAGE BLOCKING. LET 8RATE1=1.00 LET 8RATE2=0.40 LET SRATE3=0.90 DO &I=1.20 START 5.NP RESET RMULT 1 ,2 START 18, NP RMULT - 1 . - 2 START 18.NP LET 8R2(8I)=8RATE2 LET &P1(8I)=QC$PR0D LET 8 B L 0 C K = ( F T $ M A C H 1 - F T $ A V E ) / F T $ M A C H 1 « 1 0 0 LET 8B1(8I)=8BL0CK LET 6AC3(&I)=SA$SMACH3 LET 6RATE2=8RATE2+0.05 CLEAR ENOOO THIS SIMULATION RUN INTENTIONALLY HAS AN AVERAGE STORAGE 2 PIECE CONTENT OF 14 PIECES. THERE IS NO BLOCKING BY MACHINE 3. MACHINE 2 HAD A SPEED OF 0 . 9 METERS PER SECOND. THE MACHINE 2 STORAGE CAPACITY IS VARIED FROM 1 TO 20 PIECES. TWO MORE SIMULATION RUNS WERE MADE. ONE RUN HAD A MACHINE 2 RATE OF 0.85 METERS PER SECOND. THIS CREATED AN AVERAGE PIECE CONTENT OF 17 BEFORE MACHINE 2. THE OTHER RUN HAD A MACHINE 2 RATE OF 0.95 METERS PER SECOND. THIS CREATED AN AVERAGE PIECE CONTENT OF 7 BEFORE MACHINE 2. LET 8RATE1=1.00 METERS PER SECOND LET &RATE2=0.95 LET 8RATE3=1.O0 " * • LET 8J=1 DO 81=1,20 STORAGE SSSMACH1.100/S$SMACH3.50/SSSMACH2.&J START 5,NP RESET RMULT 1,2 START 18,NP RMULT - 1 , - 2 START 18,NP LET 6P18(81)=QC$PROD LET 8AC3B(8I)=SA$SMACH3 LET 8S2(SI)=8d LET SAC2B(8I)=SA$SMACH2 LET 8d=8J+1 CLEAR ENDDO CALL 8DATA(8R2(1) ,SP1(1) ,8B1(1) ,SAC3(1) ,8P1B(1) ,8AC3B(1) ,8S2(1) ,SAC2B( 1 ) ) END 0, .400 410 .0 48 , 1 0. . 1 630 .0 0. . 1 1 .0 0 .2 0. 450 448 .0 42 6 0. 1 728 .0 0. 5 2 .0 0 . 7 0 .500 483 .0 40 .0 0. 1 729 .0 0 8 3 .0 1. .3 0. 550 526 .0 33 .2 0. .3 739 .0 0 6 4 .0 2 .5 0, .600 568 .0 27 .8 0 4 757 .0 1 .5 5 .0 3 . 3 0. .650 591 .0 24 .7 0. .3 768 .0 1. .7 6 .0 3 . 7 0. .700 643 .0 19 . 1 0. 7 765 .0 1. 7 7 .0 4 .5 0. .750 672 .0 13 .7 0. 8 755 .0 2 . 5 8 .0 6. . 1 0. .800 699 .0 13 .0 1 . 6 775 .0 2. 4 9 .0 5 .0 0. .850 723 .0 9 8 2. 7 741 .0 0, 9 10 .0 7 .8 0 .900 744 .0 9 .0 7. .2 778 .0 5 .2 1 1 .0 5 .4 0 .950 759 .0 5 .2 13. ,6 761 .0 1 . .5 12 .0 9 . 3 1. .000 777 .0 1 . 1 19. 8 767 .0 2. .2 13 .0 9 8 1. .050 777 .0 0 .6 30. 2 753 .0 1 . . 7 14 .0 1 1 . .2 1, . 100 790 .0 0 .0 24, .0 755 .0 2 . 5 15 .0 12. .3 1. . 150 779 .0 0 .0 25. 7 752 .0 1 . 7 16 .0 13. .5 1. .200 773 .0 0 . 1 24 . 4 759 .0 3. 4 17 .0 12 .9 1 .250 780 .0 0 .0 20 .5 761 .0 3 0 18 .0 15 . 1 1 . 300 777 .0 0 .0 20. . 1 753 .0 2. . 1 19 .0 16 .3 1 . 350 766 .0 1 .8 36. . 1 774 .0 1 . .2 20 .0 13 . 7 FOR THE FIRST SIMULATION RUN: COLUMN 1 IS RATE OF MACHINE 2 (IN METERS PER SECOND) COLUMN 2 IS SYSTEM PRODUCTION (IN PIECES PER HOUR) COLUMN 3 IS % TIME STAGE ONE IS BLOCKED COLUMN 4 IS AVERAGE OUEUE CONTENT IN STORAGE 3 (IN PIECES) FOR THE SECOND SIMULATION RUN: COLUMN 5 IS SYSTEM PRODUCTION (IN PIECES PER HOUR) COLUMN 6 IS AVERAGE OUEUE CONTENT IN STORAGE 3 (IN PIECES) COLUMN 7 IS CAPACITY OF STORAGE 2 (IN PIECES) COLUMN 8 IS AVERAGE OUEUE CONTENT IN STORAGE 2 (IN PIECES) H ON 0 .400 410 .0 48 . 1 0. . 1 623 .0 0 .2 1 .0 0 . 2 0. .450 448 .0 42. .6 0. . 1 703 .0 0. .4 2 .0 0 .8 0. .500 483 .0 40. .0 0. . 1 705 .0 0. 7 3 .0 1. .7 0. 550 526 .0 33 2 0. .3 728 .0 0. 9 4 .0 2. .4 0. .600 568 .0 27, .8 0. .4 724 .0 1 . 1 5 .0 3 6 0 .650 591 .0 24 . 7 0. .3 723 .0 0 .7 6 .0 4 , . 3 0. .700 643 .0 19. . 1 0. .7 731 .0 1 . 0 7 .0 5 ,2 0. . 750 672 .0 15. .7 0. .8 729 .0 1 . 0 8 .0 6 . 5 0. 800 699 .0 13. 0 1. 6 725 .0 0. 8 9 .0 ' 7 . 1 0 .850 723 .0 9 8 2. .7 7 13 .0 0 7 10 .0 8 . 7 0. .900 744 .0 9 0 7. .2 728 .0 0 8 1 1 .0 8 8 0. .950 759 .0 5. .2 13. .6 731 .0 1 .0 12 .0 9. .6 1. .000 777 .0 1 1 19. 8 729 .0 1. 3 13 .0 1 1 , 1 1. .050 777 .0 0. 6 30. .2 730 .0 0. 9 14 .0 12 , 1 1. . 100 790 .0 0 .0 24. .0 732 .0 1. 2 15 .0 13 . 2 1. 150 779 .0 0 .0 25 . 7 734 .0 1. .0 16 .0 14 .0 1 . 200 773 .0 0 . 1 24. . 4 729 .0 0 8 17 .0 14 . 7 1, .250 780 .0 0 .0 20. .5 731 .0 0. 6 18 .0 14 . 7 1. .300 777 .0 0. .0 20. 1 738 .0 '1 . 8 19 .0 16. 6 1 .350 766 .0 1. 8 36. 1 741 .0 1, 5 20 .0 16 . 6 THIS DATA IS FOR THE SIMULATION STUDY WHERE THE SECOND RUN HAS A MACHINE 2 RATE OF 0 . 6 0 METERS PER SECOND. FOR THE FIRST SIMULATION RUN: COLUMN 1 IS RATE OF MACHINE 2 (IN METERS PER SECOND) COLUMN 2 IS SYSTEM PRODUCTION (IN PIECES PER HOUR) COLUMN 3 IS V. TIME STAGE ONE IS BLOCKED COLUMN 4 IS AVERAGE OUEUE CONTENT IN STORAGE 3 (IN PIECES) FOR THE SECOND SIMULATION RUN: COLUMN 5 IS SYSTEM PRODUCTION (IN PIECES PER HOUR) COLUMN 6 - IS AVERAGE OUEUE CONTENT IN STORAGE 3 (IN PIECES) COLUMN 7 IS CAPACITY OF STORAGE 2 (IN PIECES) COLUMN 8 IS AVERAGE OUEUE CONTENT IN STORAGE 2 (IN PIECES) H H 0. .400 4 10 .0 48 . 1 0 . 1 660 .0 0 . 3 1 .0 0 .2 0. .450 448 .0 42 .6 0 . 1 747 .0 0 . 9 2 .0 0 .6 0. .500 483 .0 40 .0 0 . 1 758 .0 1 .0 3 .0 1 .0 0 .550 526 .0 33 .2 0. .3 772 .0 1 .2 4 .0 2 .0 0. 600 568 .0 27 .8 0, .4 775 .0 3 .0 5 .0 2 . 7 0. 650 591 .0 24 . 7 0 3 769 .0 0 .9 6 .0 3 . 4 0. . 700 643 .0 19 . 1 0 . 7 774 .0 2 . 1 7 .0 4 .6 0 .750 672 .0 15 .7 0. 8 774 .0 1 .8 8 .0 5 .6 0. .800 699 .0 13 .0 1. .6 783 .0 4 .2 9 .0 5 .0 0. 850 723 .0 9 .8 2. .7 787 .0 5 . 4 10 .0 7 . 2 0. 900 744 .0 9 .0 7. 2 785 .0 3 . 9 11 .0 6 . 7 0. 950 759 .0 5 .2 13. 6 778 .0 4. . 3 12 .0 9. .2 1. 000 777. .0 1 . . 1 19. 8 785 .0 2 . 1 13 .0 9 5 1. 050 777 .0 0 .6 30. 2 784 .0 1 . 8 14 .0 10. 6 1. 100 790 .0 0 .0 24 . 0 789 .0 5 .0 15 .0 10 . 1 1. 150 779 .0 0 .0 25 7 788 .0 3 0 16 .0 8 7 1. 200 773. .0 0. . 1 24. 4 778 .0 1 . .4 17 .0 7. 3 1. 250 780. .0 0 .0 20. 5 775 .0 1 . 8 18 . 0 6. 8 1. 300 777 . 0 0 .0 20. 1 774 .0 6 .8 19. 0 14 . 9 1. 350 766 .0 1 .8 36. 1 786 .0 6. . 4 20 0 13. 8 THIS DATA IS FOR THE SIMULATION STUDY WHERE THE SECDND RUN HAS A MACHINE 2 RATE OF 0 . 9 0 METERS PER SECOND. FOR THE FIRST SIMULATION RUN: COLUMN 1 IS RATE OF MACHINE 2 (IN METERS PER SECOND) COLUMN 2 IS SYSTEM PRODUCTION (IN PIECES PER HOUR) COLUMN 3 IS % TIME STAGE ONE IS BLOCKED COLUMN 4 IS AVERAGE OUEUE CONTENT IN STORAGE 3 (IN PIECES) FOR THE SECOND SIMULATION RUN: COLUMN 5 IS SYSTEM PRODUCTION (IN PIECES PER HOUR) COLUMN 6 IS AVERAGE QUEUE CONTENT IN STORAGE 3 (IN PIECES) COLUMN 7 IS CAPACITY OF STORAGE 2 (IN PIECES) COLUMN 8 IS AVERAGE QUEUE CONTENT IN STORAGE 2 (IN PIECES) H C O SUBROUTINE DATA(R2,P1,B1,ACS,P1B,AC3B,S2,AC2B) REAL R2(20) .P1(20) .B1(20) ,AC3(20) .P1B(20) .AC3B(20) .S2(20) +.AC2B(20) INTEGER I CALL FTNCMD('ASSIGN 1=DATAS2;') DD 30 I ' 1 , 2 0 WRITE (1,20) R 2 ( I ) , P 1 ( I ) , B 1 ( I ) . A C 3 ( I ) , P 1 B ( I ) , A C 3 B ( I ) , S 2 ( I ) +.AC2BII) 20 FORMAT (' ' . F 5 . 3 . 2 X , 7 ( F 6 . 1,2X) ) 30 CONTINUE RETURN END H H
- Library Home /
- Search Collections /
- Open Collections /
- Browse Collections /
- UBC Theses and Dissertations /
- An investigation into a two stage tandem queue for...
Open Collections
UBC Theses and Dissertations
Featured Collection
UBC Theses and Dissertations
An investigation into a two stage tandem queue for an optimum sawmill design Zwick, Robert Lewis 1983
pdf
Page Metadata
Item Metadata
Title | An investigation into a two stage tandem queue for an optimum sawmill design |
Creator |
Zwick, Robert Lewis |
Publisher | University of British Columbia |
Date Issued | 1983 |
Description | The applicability of queueing theory as an operations research tool for modelling sawmills is described. The model selected is a two-stage tandem queue with two stations in the second stage. Each of the stations has general service times and finite buffer storage capacities which create the possibility of blocking pieces coming out of the first stage. A three-variable service time distribution is proposed to model sawmill machinery processing the pieces. This distribution creates the potential to functionally describe the sawmilling process, in contrast to the traditional method of using empirical distributions gathered at an existing sawmill. The literature in tandem queues reveals the lack of work done and the degree of difficulty in this field of study. Analytical solutions do not exist for the queue system studied. Numerical approximation techniques were not used to model the queue system, but they have good potential for being utilized. A simulation study was performed on the queue system. A computer program was written with the intention of obtaining results anticipated in a mathematical analysis. Two separate queue disciplines were studied: saturated and unsaturated first-stage queues. The unsaturated queue investigated the dependency of system performance on the arrival rates. It also examined the operation of the queue under different second-stage arrival intensities. The saturated queue analysis focused on the phenomenon of piece blocking in the first stage. Some conclusions could be made from the simulation study with regards to design procedures for a sawmill. The study showed that in certain cases, improvement to system production by increasing a second-stage machine rate can be comparable to increasing the headrig rate. In addition, two stations in the second stage can complicate the analysis significantly. The simulation study also examined the possibility of utilizing tandem queue analysis to provide solutions for optimum second-stage buffer capacities. The feasibility of modelling sawmills by tandem queues exists, but the designer must choose the appropriate analytical method to use. Numerical approximation techniques would likely prove to be the most successful method. Machine service times should also be studied in a sawmill to establish the statistical nature of the sawmilling process. This will improve the solutions provided by queueing theory analysis. |
Genre |
Thesis/Dissertation |
Type |
Text |
Language | eng |
Date Available | 2010-05-24 |
Provider | Vancouver : University of British Columbia Library |
Rights | For non-commercial purposes only, such as research, private study and education. Additional conditions apply, see Terms of Use https://open.library.ubc.ca/terms_of_use. |
IsShownAt | 10.14288/1.0096334 |
URI | http://hdl.handle.net/2429/24964 |
Degree |
Master of Applied Science - MASc |
Program |
Forestry |
Affiliation |
Forestry, Faculty of |
Degree Grantor | University of British Columbia |
Campus |
UBCV |
Scholarly Level | Graduate |
AggregatedSourceRepository | DSpace |
Download
- Media
- 831-UBC_1984_A7 Z85.pdf [ 4.77MB ]
- Metadata
- JSON: 831-1.0096334.json
- JSON-LD: 831-1.0096334-ld.json
- RDF/XML (Pretty): 831-1.0096334-rdf.xml
- RDF/JSON: 831-1.0096334-rdf.json
- Turtle: 831-1.0096334-turtle.txt
- N-Triples: 831-1.0096334-rdf-ntriples.txt
- Original Record: 831-1.0096334-source.json
- Full Text
- 831-1.0096334-fulltext.txt
- Citation
- 831-1.0096334.ris
Full Text
Cite
Citation Scheme:
Usage Statistics
Share
Embed
Customize your widget with the following options, then copy and paste the code below into the HTML
of your page to embed this item in your website.
<div id="ubcOpenCollectionsWidgetDisplay">
<script id="ubcOpenCollectionsWidget"
src="{[{embed.src}]}"
data-item="{[{embed.item}]}"
data-collection="{[{embed.collection}]}"
data-metadata="{[{embed.showMetadata}]}"
data-width="{[{embed.width}]}"
async >
</script>
</div>
Our image viewer uses the IIIF 2.0 standard.
To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0096334/manifest