• No results found

“Contested Garment” A New Queueing Discipline

N/A
N/A
Protected

Academic year: 2021

Share "“Contested Garment” A New Queueing Discipline"

Copied!
68
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

“Contested Garment”

A New Queueing Discipline

A

S

IMULATION

S

TUDY

Mathijs van der Linden

S2598442 MSc Technology and Operations Management Rijksuniversiteit Groningen Supervisors: N. van Foreest & H. Balsters

(2)

1

Abstract

This research develops a new queueing discipline in the category of fair queueing based on the “Contested Garment” rule a term coined by Aumann (2002). A rule that approach fairness in a different way. In this research, this principle is translated into a queueing discipline (CGC), and its performance is compared to that of First-Come First-Served (FCFS) and Round-Robin (RR).

(3)

2

Contents

Abstract ... 1 1. Introduction ... 5 2. Research Framework ... 7 2.1. Queueing ... 7

2.2. Dynamic Queueing Disciplines ... 8

2.2.1. First Come First Served... 8

2.2.2. Shortest Processing Time ... 8

2.2.3. Earliest Due Date ... 8

2.3. Static Queueing Disciplines ... 9

2.3.1. Fair Queueing ... 9

2.3.2. Round-robin ... 9

2.4. Contested Garment Rule ... 10

3. Methodology ... 11

3.1. The Model ... 12

3.1.1. Simulation Setting ... 12

3.1.2. Simulation Parameters ... 13

3.1.3. Fundamental Relationships ... 13

3.1.4. Measurements of Characteristics in Simulation ... 15

3.1.5. Hypotheses... 16

3.2. Program the Model ... 17

3.2.1. FCFS ... 17

3.2.2. RR ... 17

3.2.3. CGC ... 18

3.3. Programmed Model Validation ... 20

3.3.1. Working of the Model ... 20

3.3.2. Workings of Queue Disciplines ... 23

4. Results... 25 4.1. Hypothesis 1... 25 Hypothesis 2 ... 27 4. Discussion ... 29 5. Conclusion... 30 Bibliography ... 31

Appendix A. Simulation Code ... 33

Appendix B. Model Testing ... 49

(4)

3

Unit Tests ... 51

Scenario Tests ... 53

Appendix C. Tests Codes ... 56

Test in Chapter 3.4. ... 56

Tests in Appendix B. ... 60

Appendix D. Results ... 65

Appendix E. Integrity of Results ... 67

Figure 1. Production Network ... 7

Figure 2. “A Seven-Step Approach for Conducting a Successful Simulation Study” by Law (2003) ... 11

Figure 3. Simulation Setting ... 12

Figure 4. Conceptual Model ... 19

Figure 5. Characteristics of the simulation ... 20

Figure 6. Comparison of the queue disciplines ... 22

Figure 7. Working of FCFS ... 23

Figure 8. Results of RR ... 23

Figure 9. Working of RR ... 23

Figure 10. Results of Aumann (2002) example ... 24

Figure 11. Equal variance test of FCFS CT_a and CGC CT_a ... 25

Figure 12. Histogram of data set distribution FCFS CT_a and CGC CT_a ... 26

Figure 13. Independent samples t-test for FCFS CT_a and CGC CT_a ... 26

Figure 14. Equal Variance Test RR CT_c and CGC CT_c ... 27

Figure 15. Histogram of data set distribution RR CT_c and CGC CT_c ... 28

Figure 16. Independent t-test with unequal variance for RR CT_c and CGC CT_c ... 28

Figure 17. Helpers.py ... 35

Figure 18. Server.py ... 36

Figure 19. FCFS.py ... 38

Figure 20. RR.py ... 39

Figure 21. CGC.py ... 41

Figure 22. Plot code ... 45

Figure 23. Output.py ... 48

Figure 24. Expected values of simulation ... 49

Figure 25. Simulation results from model build by supervisor ... 51

Figure 26. Zero arrivals ... 51

Figure 27. Jobs move to queue ... 51

Figure 28. High capacity ... 52

Figure 29. Comparison capacity and assigned capacity ... 52

Figure 30. One queue... 52

Figure 31. Server Test ... 52

Figure 32. Queue length per period ... 53

Figure 33. Ascending queue length ... 53

Figure 34. Deterministic arrivals test ... 54

Figure 35. Queue length with 1 utilisation ... 54

Figure 36. Queue length with 1 capacity... 55

(5)

4

Figure 38. Simulation results from model build by supervisor code ... 57

Figure 39. Test of FCFS working ... 58

Figure 40. Test of RR working ... 58

Figure 41. Test of CGC working ... 59

Figure 42. Zero arrivals code ... 60

Figure 43. Jobs move to queue code ... 61

Figure 44. Large capacity code ... 62

Figure 45. One queue code ... 63

Figure 46. Server test code ... 64

Figure 47. Integrity of results ... 67

Table 1. Division of Estate to Creditors in “Ketubot” 93a as per the Mishna (Aumann, 2002) ... 10

Table 2. Utilisation of servers. ... 13

Table 3. Difference between the WIP and the E(WIP) ... 21

Table 4. Comparison of CT between FCFS and CGC of the smallest job stream ... 25

Table 5. Comparison of CV between RR and CGC of the largest job stream ... 27

Table 6. Excel simulation... 50

Table 7. Server 1 KPIs ... 65

Table 8. Server 2 KPIs ... 65

Table 9. Server 3 KPIs ... 66

(6)

5

1. Introduction

The production industry is a highly competitive industry. Firms manage their production process closely to reduce cost and variability. Queueing theory is one of the aspects associated with system variability and is used for predicting queue lengths and waiting times of jobs through mathematical analysis (Sundarapandian, 2009). In queueing theory there are several queueing disciplines, sometimes called scheduling methods, consisting of an algorithm which determines the job order processing. There are some well-known queueing disciplines, First Come First Serve (FCFS) is an example of that. FCFS gives priority to jobs which arrived first in the queue. Another example of a queueing discipline is strict priority, giving priority to certain jobs. The choice for a queueing discipline hinges on the important characteristics of a situation (Hall, 1991).

Imagine a rollercoaster ride where there are three queues. Queue A is for the regular crowd, queue B for the people with priority passes, and queue C for Very Important Persons (VIP). People standing in queue B and C payed extra to get faster access to the ride. Would we apply FCFS in this situation, the people in queue B and C do not get on the ride faster since they have to wait for all the people that arrived earlier.

Fairness is an important characteristic in this situation. Cambridge Dictionary (2015) defines fairness as “the quality of treating people equally or in a way that is right or reasonable”. Since some people payed more, it seems reasonable that they have to wait a shorter amount of time. So some sort of priority should be assigned to the queues.

Nagle (1987), devised a fair queueing (FQ) discipline. The idea of fair queueing is that the fairness aspect in incorporated in the queueing discipline. His first idea resembled the method of Round-Robin (RR). In which the capacity is equally divided over all queues. Would this be deemed fair by the customers waiting in line for the rollercoaster ride? Hall (1991) states that for optimal

effectiveness a fitting queueing discipline should be devised per situation. So is there a method for dividing the capacity of the rollercoaster ride which might be considered fair?

In the Talmud1 a ‘fairness’ rule is described. This fairness rule is based on “equal division of the contested sum” p.4 (Aumann, 2002). Meaning it equally divides the value over which the claimants dispute. The rule of the Talmud is coined by Aumann (2002) as the “Contested Garment” rule (CG), referring to the first example of this ruling in the Talmud. In modern law, proportional division is prominent in accordance to Aristotle’s Equity Principle, under which every dollar of debt is treated equal (Aumann, 2002). Both principles can be considered fair but clearly take a different perspective on fairness. Aristotle’s Equity Principle is in essence similar to RR. The goal of this research is to adapt the CG rule into a queueing discipline (CGC) and compare the performance to RR and FCFS, because these are widely known and applied. Therefore, this research seeks to answer the following question:

How can the Contested Garment rule be translated into a queueing discipline and how does it perform in comparison to RR and FCFS?

To answer this question, these queueing disciplines are tested in a simulation which executes several scenarios. The performance of the queueing disciplines is measured followed by hypotheses to determine a statistically significant difference in performance. If CGC performs better in comparison, then it can be considered a valid queueing method. Practically, such a queueing discipline can be

(7)
(8)

7

2. Research Framework

This chapter contains the description of six queueing disciplines, including how the CG rule is translated into a queueing discipline. The disciplines are subdivided into two categories which are called dynamic and static disciplines, but first an explanation of what queueing entails and the scope of this research.

2.1. Queueing

A queueing system combines several components. Specifically these components are: the arrival process, the queue, and the service process (Hopp & Spearman, 2008). In the supermarket a queueing system is also present at the register. Customers want to check-out and arrive at a queue for the register, which is the arrival process. In the queue there are several other customers waiting, in queueing theory these customers are viewed as jobs which need to be processed. Which

customer is served first is decided by the queueing discipline, in a supermarket this is mainly done using FCFS. The server, in this case is the cashier, ‘processes the job’ by checking-out all the groceries, in this case you are the job. This is associated with the service process.

This research focusses on the queue part of a queueing system, and more specifically on queueing disciplines. Queueing disciplines affect the way in which jobs are selected for processing. So the number of jobs which are processed and the process time of these jobs remains equal. A queueing discipline only affects the variance of jobs when one queue is reserved for one server (Hall, 1991). This research looks into a situation where there are three queues for one server. An example of such a queueing network is given in Figure 1. This is a schematic example of the aforementioned roller coaster queueing network. Each type of job has to enter the queue corresponding to the job type.

Figure 1. Production Network

Hall (1991), states queueing disciplines can be divided into two groups, static and dynamic disciplines. Dynamic queueing disciplines are queueing disciplines which are updated constantly. Dynamic queueing disciplines check for the criteria every time a job is finished and the next job is selected. In FCFS this criteria is the arrival time, the queueing discipline will determine which job is to be processed next based on the earliest arrival time (Jackson, 1961; Azarfar, Frigon, & Sansò, 2012). Static queueing disciplines select just a number of jobs which are to be processed over a

(9)

8

2.2. Dynamic Queueing Disciplines

To follow are three well known dynamic queueing disciplines which each are briefly described.

2.2.1. First Come First Served

This is probably the most well-known scheduling system and applied in many situations such as stores and supermarkets. Common fashion is to join the back of the queue at any checkout, people in front of you arrived earlier. Since this feels so natural FCFS is sometimes described as the lack of a queueing discipline. However, for one queue with one server FCFS minimizes waiting time variance (Hall, 1991).

In the setting of this research FCFS needs to be treated as three queues, else it would be difficult to compare the queueing disciplines. In FCFS multiple queues can be treated as one, since the products are served based on their arrival time regardless. FCFS does disregard what queue the jobs are in (Bertrand, Wortmann, & Wijngaard, 1998). This does mean that FCFS relegates all flow control to the arrivals process. Thus when average arrival rate of jobs in a queue differs between the queues these job streams are not protected from each other.

2.2.2. Shortest Processing Time

A quite popular queueing discipline used in manufacturing is the Shortest Process Time (SPT) (Hopp & Spearman, 2008; Bertrand, Wortmann, & Wijngaard, 1998). The Shortest Process Time gives priority to the jobs which are processed in the shortest amount of time. In comparison to FCFS, SPT reduces the average cycle time of jobs which is the time jobs have spent in the process. This is because the number of jobs in the queue will always be equal to or less than the number of jobs using any other queueing discipline with the same arrival and process times (Schrage, 1968) since the shortest jobs are performed first. This effect increases when the utilization increases, when the variation of process time increases, or if the number of machines per workstation decreases (Bertrand, Wortmann, & Wijngaard, 1998).

2.2.3. Earliest Due Date

(10)

9

2.3. Static Queueing Disciplines

To follow is the description of two static queueing discipline.

2.3.1. Fair Queueing

The main idea of fair queueing (FQ) is to assign each queue a fair fraction of the server capacity (Nagle, 1987), however what is deemed ‘fair’ is subjective. This fairness aspect is open to interpretation. Thus fair queueing is actually a category in static queueing discipline.

FQ has the advantage over FCFS that it considers the frequency of jobs sent (Demers, Keshav, & Shenker, 1989). FQs protect the job streams from each other, and prevents an arbitrarily large output of one job. In FQ disciplines the smallest stream generally has a lower cycle time and variance in comparison to FCFS, because this queue is assigned a part of the capacity. In FQ jobs only have to wait for the jobs in the same queue, rather than having to wait on all the jobs in front of in all the queues. (Demers, Keshav, & Shenker, 1989). Nagle (1987) introduced FQ in dividing capacity of switches in broadband networks. He divided the capacity equally amongst the inquiring parties. This version of FQ is very similar to Round-Robin (RR).

2.3.2. Round-robin

RR is an algorithm commonly used in process and network scheduling. The goal of RR is to generate equal output of from all sources, unless overcapacity occurs in which the overcapacity is spread over the other sources. Officially, RR schedules time slices in which the job is processed with the

(11)

10

2.4. Contested Garment Rule

The CG rule is a rule that addresses the fairness aspect and thus falls under the FQ disciplines. The “Contested Garment” rule (CG) coined by Aumann p.6 (2002) refers to the first mentioned example of dividing debt in the Talmud. In this example two parties claim a garment, the first claims the whole garment and the second claims half of the garment. The first claimant receives ¾ and the second claimant receives ¼ of the garment. The logic behind this division is that there is only a dispute over half the garment, so each gets half of this part. The rest is for the largest claim. The CG rule does have several underlying rules when dividing the debt which complicate the division:

 Rule 1: Equal amounts appointed to claimants if the value of the estate does not exceed half the sum of the claims, as long as this does not exceed half of their claim.

 Rule 2: Equal loss amongst claimants if the total estate value is greater than half the sum of the claim, creditors cannot lose more than half of their claim.

To demonstrate these rules the following example will be explained:

A father leaves his estate to his three children after passing away. The value of an estate is to be shared amongst them, we will call them the creditors. The three creditors each have a different sized claim on the estate and depending on the value of the estate they get a different amount. These amounts they would receive are shown in Table 1. Division of Estate to Creditors in “Ketubot” 93a as per the Mishna.

Claim 100 200 300 Value Estate 100 33 ⅓ 33 ⅓ 33 ⅓ 150 50 50 50 200 50 75 75 300 50 100 150 400 50 125 225 500 66 ⅔ 166 ⅔ 266 ⅔ 600 100 200 300

Table 1. Division of Estate to Creditors in “Ketubot” 93a as per the Mishna (Aumann, 2002)

This division of the value is done in the following manners. First off is calculating half of the sum of the claims, which in this case is 300. So when the estate is valued at 150 rule 1 applies, and each claim gets the same amount (50). If the estate is valued at 200 the first claim receives 50, since the second part of the first rule is that the amount received cannot exceed half of their claim. The other claims receive what is left, after the first claimant receive their amount 200 – 50 = 150 is left. The second and third claim receive the same amount 150 / 2 = 75.

(12)

11

3. Methodology

The goal of this research is to compare CGC to Round-Robin and First Come First Serve. These queueing disciplines are chosen as comparison because they are fairly simple in execution and commonly used. Furthermore, RR and FCFS each represent one of both categories of queueing disciplines, dynamic and static. CGC is judged based on its performance in comparison to RR and FCFS under the same conditions.

Reflecting the purpose of this research, the following research question is posited:

How can the Contested Garment rule be translated into a queueing discipline and how does it perform in comparison to RR and FCFS?

This type of research is considered explanatory theory building research, since the goal is towards developing a new queueing discipline. The performance of the three queueing disciplines is determined in a simulation model which represents a queueing network. Simulations have been used to test queuing disciplines by Demers, Keshav, & Shenker (1989) and Alomari & Menascé (2014) amongst others, showing simulation is a trial and tested method for this kind of topic. The results from this simulation will be used to tests hypotheses which will reveal differences in performance between the queueing disciplines.

The set-up of this research is based on Law’s (2003) model of simulation research, as shown below in Figure 2. “A Seven-Step Approach for Conducting a Successful Simulation Study” by Law (2003)

(13)

12

3.1. The Model

This chapter contains the description of the environment which the model is to represent the underlying relationships of such an environment and hypotheses which determine the difference in performance between the queueing disciplines.

3.1.1. Simulation Setting

The simulation setting consists of three job streams, which are called A, B, and C. A Poisson distribution is used to determine the number of arrivals. The Poisson distribution is a good representation of this arrival process. The distribution is specified by one parameter, which is the mean (Hopp & Spearman, 2008). Each arrival process has a different mean, representing the average number of jobs arriving per period .The mean of job stream A varies and signifies different scenarios, but in every scenario job stream C is larger than A. This is depicted in Figure 3.

Figure 3. Simulation Setting

With difference in the average arrival rates, a situation in which fairness plays a role is created. Job stream A has very low number of average arrivals, but these jobs should be treated fairly with respect to the arrivals in job stream C. Consider an extreme scenario where there is one job arriving in queue A and a thousand jobs in queue C. In FCFS all the jobs have an average of 500 jobs in front of them, the streams are treated equal but one might argue not fairly since there is only one job on queue A.

In scenarios where there is a difference in average arrival rates between job streams, smaller stream could use protection. In such a situation FCFS does not bode well for the smallest stream, as

demonstrated. Demers, Keshav, & Shenker (1989), call a much larger stream an “ill-behaving source” (as they are referring to a computer network) and state that a queueing discipline should perform well regardless of an ill-behaving source. Otherwise, this source would affect the performance of the system heavily. Ill-behaving sources claim a large portion of the capacity, which might not be

desirable when other jobs are required for fulfilling orders, or should be considered higher priority. FCFS does not consider ill-behaving sources. RR on the other hand does consider ill-behaving sources, and limits them rigorously by dividing capacity equally amongst all job streams and thus protecting the smallest stream.

(14)

13 The job flows remain the same throughout the system. Jobs arriving in stream A are always sent to the queue of that stream, and the same for goes for job streams B and C. The depicted model is an open queueing network, jobs enter and leave this network (Hopp & Spearman, 2008).

3.1.2. Simulation Parameters

A discrete event simulation can be used in this case since the state of the system only changes at particular points. Python 3.5 is a programming tool with which a discrete event simulation is made. Python is commonly used in research. In discrete event simulations the simulation is split into periods, which can represent any span of time. The run-length of the simulation is determined by the number of periods. For this simulation the run-length is set at 100000 periods, such a length is sufficient to produce results which reflect the characteristics of a steady-functioning production system. In addition, one warm-up period is present at the start of the run-length in which jobs arrive but are not processed.

Variability is only included in the arrivals, for the simplicity of the model, failures, scrapping of jobs, and variability in capacity are not considered in the simulation. This results in a more stable system and thus the variance is lower on average as well as the cycle time of the jobs.

Several scenarios are created on which the queueing disciplines can be tested, a fitting scenario is chosen from these scenarios to test the performance difference. Scenarios are created by changing the mean arrivals of job stream A and by the three servers. The capacity for the first server is set at the sum of the arrival means plus three. Each subsequent server has one less capacity, so server two has sum of the arrival means plus two etc. This is to ensure that for all servers queues are created, while not over encumbering the servers. The utilization of the servers will be as shown in Table 2.

Utilisation Server 1 Server 2 Server 3

1 88.89% 92.31% 96.00%

3 89.66% 92.86% 96.30%

5 90.32% 93.33% 96.55%

7 90.91% 93.75% 96.77%

Table 2. Utilisation of servers.

3.1.3. Fundamental Relationships

Characteristics of the described simulation can be calculated using fundamental relationships that underlie such a queueing network. The characteristics which are calculated are suggested in the book Factory Physics by Hopp and Spearman (2008). The described queueing network has variability in arrivals (M) but the process times of the servers are deterministic (D) and per server there is one machine. This queueing network is classified as an M/D/1 queueing network, the characteristics presented in this chapter hold up for such a network (Hopp & Spearman, 2008).

A fundamental relationship that is applicable to a singular queue and its server is called Little’s Law, which is based on Work-in-Process (WIP), Throughput (TH), and Cycle Time (CT). WIP represents the number of jobs in the system excluding the finished goods inventory. CT represents the time jobs spent in the system until the finished goods inventory. TH represents the number of jobs that reach the finished goods inventory. The relationship between these measures is shown in the formula below.

(15)

14 Using Little’s Law expected characteristics of the simulation can be calculated. Expected CT consists of the expected CTq, and the effective process time of the server (te). The relationship is as follows:

𝐸(𝐶𝑇) = 𝐸(𝐶𝑇𝑞) + 𝑡𝑒

The effective process time can be calculated by the following formula in which the capacity is represented by C:

𝑡𝑒 =1 𝐶

Expected CTq can be calculated using Kingsman’s equation (Kingman, 1962), which is referred to as the VUT-equation by Hopp & Spearman (2008). This equation has three components, a variability term (V), utilisation term (u), and a process term (t). In the variability term the variability of arrivals and processing times are used. These terms are represented by 𝐶𝑎2 and 𝐶𝑒2 respectively. The c

represent the coefficient of variation, which is a relative measure of variability. This measure is chosen over the normal variance when the absolute variability is less important than the relative variability (Hopp & Spearman, 2008). Since the arrival rate of the job streams varies in size this relative measure is chosen over the absolute variance.

The coefficient of variation is calculated as shown below: 𝐶𝑉 =𝜎

𝑋̅

Furthermore, in the Kingman’s equation a utilization term (u) is mentioned which can be calculated by when knowing the average arrivals (ra) and the effective process time (te). The average utilisation can be calculated using the following formula in which m represent the number of machines at the server:

𝑢 =𝑟𝑎 ∗ 𝑡𝑒 𝑚

Since each of the servers has only one machine the formula can be simplified to: 𝑢 = 𝑟𝑎 ∗ 𝑡𝑒

The Kingman’s equation is as follows:

𝐸(𝐶𝑇𝑞) = (

𝑐𝑎2+ 𝑐𝑒2

2 ) (

𝑢 1 − 𝑢) 𝑡𝑒

The equation is deemed “reasonably accurate in typical manufacturing systems”. Typical

manufacturing systems have a utilization between 0.1 and 0.95 and 𝑐𝑎 and 𝑐𝑒 not much larger than

1. The squared coefficient of the arrivals (𝑐𝑎2) is according to a Poisson distribution which means

that 𝑐𝑎2= 1. The effective process times are deterministic thus there is zero variability, thus 𝑐𝑒2= 0.

In the simulation the jobs spent one extra period in the queue, hence the formula which will be used to estimate the expected CTq is:

𝐸(𝐶𝑇𝑞) = (

𝑐𝑎2+ 𝑐𝑒2

2 ) ( 𝑢

(16)

15 No failures in the system means that there is no scrapping of jobs, and it is to be expected that the average throughput is as good as equal to the average arrival rate. One warm-up period is in place thus TH will not be exact to ra.

𝐸(𝑇𝐻) = 𝑟𝑎

Combining the formulas the following formula is used to calculate the expected WIP: 𝐸(𝑊𝐼𝑃) = (𝐸(𝐶𝑇𝑞) +

1

𝐶 ) ∗ 𝐸(𝑇𝐻)

Furthermore, there are limits for the CT and WIP in the system. These limits are determined by the following formulas: 𝑈𝑝𝑝𝑒𝑟 𝐿𝑖𝑚𝑖𝑡 𝑊𝐼𝑃 =𝐶𝑇 𝑡𝑒 𝐿𝑜𝑤𝑒𝑟 𝐿𝑖𝑚𝑖𝑡 𝑊𝐼𝑃 =𝐶𝑇 − 1 𝑡𝑒 𝑈𝑝𝑝𝑒𝑟 𝐿𝑖𝑚𝑖𝑡 𝐶𝑇𝑞 = 𝑊𝐼𝑃 𝑟𝑎 𝐿𝑜𝑤𝑒𝑟 𝐿𝑖𝑚𝑖𝑡 𝐶𝑇𝑞 = 𝑊𝐼𝑃 𝑟𝑎 − 1

3.1.4. Measurements of Characteristics in Simulation

The expected values are compared with the values resulting from the simulation. These values are measured using the following formulas where average time jobs spent in queue is represented by CT, k represents the unique jobs per job stream/stream, n represents the period in the total amount of periods (N), t represents the time the jobs spent in a particular queue and period, d represents the departure of a job, and Q represents the queue length.

𝐶𝑇 = 1

𝑁∑ 𝑡𝑛,𝑘 For the CV of the queue:

𝐶𝑉 =𝜎 𝑡̅

For the total CT:

𝐶𝑇 = 1 𝑁∑ 𝑡𝑛 For the TH:

𝑇𝐻 = 1

𝑁 ∑ 𝑑𝑛 For the WIP:

𝑊𝐼𝑃 = 1

(17)

16

3.1.5. Hypotheses

CGC falls under the fair queueing disciplines. Since it considers the fairness aspect just like other fair queueing disciplines, the expectation is that CGC protects job stream A from job stream C. In similar fashion as RR. Thus, the expectation is that jobs from job stream A spend less time in the queue in CGC than FCFS.

H1: The mean cycle time of jobs from stream A in CGC is lower than in FCFS. 𝐻0: 𝐶𝑇̅̅̅̅𝑎,𝐶𝐺𝐶≥ 𝐶𝑇̅̅̅̅𝑎,𝐹𝐶𝐹𝑆

𝐻𝐴: 𝐶𝑇̅̅̅̅𝑎,𝐶𝐺𝐶< 𝐶𝑇̅̅̅̅𝑎,𝐹𝐶𝐹𝑆

RR and CGC are both designed to protect job stream A. However, in RR each queue gets a proportion of the capacity. In comparison to job streams B and C, job stream A gets a large portion of the capacity in comparison to the average arrivals. Thus it is likely that the smallest queue in RR will have little to no variance. Every job that comes in is almost immediately processed. RR is rigorous in protecting the smallest stream, the expectation is that CGC is less rigorous. Meaning that the expectation is that the CV of CGC for job stream A is slightly higher than in RR, and it distributes this to the other queues so a lower CV in job stream C. Where RR basically burdens the largest queue only with the protection of the smaller queue.

However, comparing CV proves to be quite difficult. Instead this research compares the variance and the means of both data sets. Comparing the CV requires more advanced statistical tests. Even further complicating the testing is the fact that the CT of the largest queue is unlikely to be equal between RR and CGC, because there is no underlying law between these queues. Only the CT sum of all the three queues in RR and CGC is equal. In situations where either the mean or the variance is equal between the data sets these tests also determines if there is a difference in CV.

The expectation is that the variance and mean of CT for job stream C is unequal in CGC and RR. For the hypothesis only the mean comparison is shown since a test of variance is a standard procedure when comparing means.

H2: The variance of job stream C in CGC is unequal to the variance of RR. 𝐻0: 𝐶𝑇̅̅̅̅𝑐,𝐶𝐺𝐶 = 𝐶𝑇̅̅̅̅𝑐,𝑅𝑅

𝐻𝐴: 𝐶𝑇̅̅̅̅𝑐,𝐶𝐺𝐶 ≠ 𝐶𝑇̅̅̅̅𝑐,𝑅𝑅

Both hypotheses are tested for statistical significant differences with a confidence interval of 95% and the equality of variance for the data sets. An F-test is suited for comparing the variances of two samples (Keller, 2008). The following formula is used for the test:

𝐹 = 𝜎12/𝜎22

The more the F ratio deviates from 1 the larger the evidence for unequal variance. To test if the hypothesis is rejected in a two-tailed test, the following formula can be applied in which N represents the number of samples and α the confidence interval:

𝐹 > 𝐹1−𝛼

2,𝑁1−1,𝑁2−1

(18)

17 suited for comparing two samples with independent samples (Keller, 2008). Test are performed in Minitab.

3.2. Program the Model

Each job is represented by a number in a list, the number represents the length in the queue, and the length of the array depicts the number of jobs. Partial jobs cannot be processed, so in all queueing disciplines the jobs are completely processed. The queue for the next period can be determined as follows. Let Q denote the number of jobs in the queue (i) at period n, let A denote the number of jobs arriving in the period and D the number of jobs departing during the period. Then number of jobs in the queue is determined by:

𝑄𝑛,𝑖= 𝑄𝑛−1+ 𝐴𝑛− 𝐷𝑛

3.2.1. FCFS

In FCFS the three incoming streams are combined into one queue2. The job with the highest time in queue is picked to be processed. Since this concerns a discrete event simulation, several jobs will arrive at the same time. In such a case, all jobs with the highest waiting time are dealt with in a Round-Robin manner, but not leaving jobs partially finished. Because of the high utilisation it is probable that some jobs are left in the queue, which are due first to be processed in the following period. The distinction between FCFS and RR lies in the fact that RR prioritizes assigned queue capacity over how long jobs are waiting in queue and FCFS visa versa.

The number of departing jobs in FCFS are determined by the amount of jobs that are in the queue or the capacity:

𝐷𝑛 = min (𝑄𝑛−1, 𝐶)

3.2.2. RR

In Round-Robin the capacity is split equally over the three queues. Let C denote the server capacity and I the total number of queues, then the appointed capacity (Ri) per queue i, at the start of the period is:

𝑅𝑛,𝑖=

𝐶 𝐼 Meaning that the departures can be determined as:

𝐷𝑛= min (𝑄𝑛−1, 𝑅𝑖)

When the jobs in queue are less than the assigned capacity (Qn,I < Ri) the overcapacity of this queue is divided over the other queues so that no capacity is lost. In some cases the assigned capacity result in decimals. Since the simulation is build where jobs are represented by numbers in an array, part of a job cannot be represented in this simulation. Instead the simulation is designed in such a manner that when the division of capacity results in a number with decimals, the remainders are subtracted. So in a case were the assigned capacity is [13.3333, 13.3333, 13.3333], so 13.333 for all the queues, the assigned capacity is changed to [13, 13, 13]. The decimals are stored in a remainder, which in this case is one. Then the remainder is assigned to the queue with the largest difference between the length of the queue and the assigned capacity of that queue. Since the method of dealing with these decimals affects the results, the sum of the averages is set to be an even number in an attempt to limit the effect of this redistribution choice.

(19)

18

3.2.3. CGC

Translating the CG rule into a queueing discipline (CGC) would mean the following. In CGC the length of the queue determines the size of the claim. The capacity of the server is what the claims dispute over. In Table 1. Division of Estate to Creditors in “Ketubot” 93a as per the Mishna , the capacity can be viewed as the ‘estate value’. The server capacity which is appointed by CGC (Rn,i) is starts similar to RR, when this results in decimal numbers they are dealt with in the same manner as in RR:

𝑅𝑛,𝑖=

𝐶 𝐼

The departures can be determined in the same manner as in RR: 𝐷𝑛= min (𝑄𝑛−1, 𝑅𝑖)

However the division of capacity is restrained by a condition depending if “half the sum of the claims” is exceeded by the server capacity. This is interesting since we need to know how the capacity is divided amongst the queues, whether it is by rule 1 or rule 2. In linear programming a common method for determining which “greater-than” constraint applies is the “Big M method”. So two equations are presented which are both constraints. The constraints are associated by a very large number (M) and a variable (x), this part of the equation determines whether the constraint is ‘lifted’ or not.

Whether “half the sum of the claims” is exceeded is reflected in the following formula: → 𝑥 = 1, and 0 otherwise

The first rule that underlie the CG is represented in the following equation: 𝑅𝑛,𝑖 ≤

𝑄𝑛,𝑖

2 + 𝑀 ∗ 𝑥 And the second rule:

𝑅𝑛,𝑖 > 2𝑄𝑛,𝑖+ 𝑀(𝑥 − 1)

(20)

19

(21)

20

3.3. Programmed Model Validation

The validity of model is tested using the suggestions by Sargent (2003) and Law (2003). I will review test that concern the general workings of the simulation and the queueing disciplines in this chapter, more specific tests are found in Appendix B. The tests consist of unit tests and scenarios tests. Unit testing consist of testing a small part of code to determine whether this is fit for use (Kolawa & Huizinga, 2007). Scenario testing consist of changing parameters of the simulation to test the outcome. Unit tests are shown in Appendix C. the code for scenario tests are since the code in Appendix A is used. For the scenario tests only the parameters (configuration) are changed. The tests performed confirm that the model correctly represents the intended scenario.

3.3.1. Working of the Model

Event validity concerns the occurrence in events and comparing these to real systems. Determining if the simulation model works correctly, regardless of the queueing discipline, is essential to the validity of the model. Therefore the simulation model is compared to the aforementioned characteristics of such a system (chapter 3.2).

The parameters are chosen to ensure a utilization below 0.95 as this was a condition for the accuracy of Kingman’s equation, all the expected values are calculated using Little’s Law and Kingman’s Equation. In Figure 5, the expected value of the system and the limits of the

characteristics of the system are shown. The code for these calculations is shown in Appendix C, Figure 37.

(22)

21 Figure 5 shows that the characteristics of the simulated model fall between the limits. However, the expected values differ around 10% from the values from the simulation. Since the simulation shows that Little’s Law hold up the relation between the CT, WIP, and TH is correct. The WIP and its expectation are compared to determine the difference of the results from the simulation. In Table 3 the difference between the WIP and E(WIP) is shown for different utilizations. The utilization is changed by changing the capacity while the arrival rate remains equal. The table shows that the difference in WIP and E(WIP) decreases when the utilization decreases. The difference in WIP and EWIP with a utilization of 96.30% is probably skewed, since it does not meet the condition of Kingman’s equation that utilization is below 95%.

Utilization WIP E(WIP) Difference Percentage 96.30% 36.50186 39.48148 -2.979617 8.16% 92.86% 30.05784 32.96429 -2.906446 9.67% 89.66% 28.11062 30.78161 -2.67099 9.50% 86.67% 27.21941 29.68333 -2.463926 9.05% 83.87% 26.74327 29.01935 -2.276082 8.51% 76.47% 26.18887 28.00735 -1.818485 6.94% 70.27% 26.05166 27.53317 -1.48151 5.69% 65.00% 26.01924 27.25357 -1.234332 4.74% 50.00% 26.00985 26.75 -0.74015 2.85% 25.00% 26.00985 26.29167 -0.281817 1.08%

Table 3. Difference between the WIP and the E(WIP)

The calculation of WIP in the model has also been sense-checked manually and compared to the results of a slimmer version of the same system and (Appendix B). Results from both simulation are equal and therefore I conclude that the calculation of the characteristics in this simulation are correct. The simulation is a discrete event simulation, while the expected values are designed for continues process which can be an explanation for the difference in results.

A queueing discipline only affects from which queue the jobs are taken from, so the total number of jobs in all the queues should be equal for all the queue disciplines. As well as the CT of each

(23)

22

(24)

23

3.3.2. Workings of Queue Disciplines

To test if the queueing disciplines work according to their underlying idea, the following test have been conducted. In the figures queues are shown. Each number in the queue represents a job and the number represents the time in the system, so the length of the array is the number of jobs in the queue.

In FCFS the jobs that wait the longest should be processed first. In a situation where the queues are filled as followed [4, 12, 12] and the time they are in queue is [0, 3, 5] the third queue should be emptied first, followed by the second and then the third. Figure 7 shows exactly how this works in the simulation model, so FCFS works properly.

Figure 7. Working of FCFS

In RR when the smallest stream has an arrival rate of one, there should be zero variance in the CTq of this queue when the capacity is 26. Since the assigned capacity for this queue (26/3 ≈ 9) is very large in comparison to the average arrivals for this queue (1). Furthermore, since the ratio between the assigned capacity and arrivals becomes smaller when the number of arrivals increases the standard deviation should increase for each subsequent queue.

Figure 8. Results of RR

The working of RR is shown in Figure 9. Each queue is assigned an equal amount of the capacity (6), unless the amount of capacity which is assigned exceeds the number of jobs in the queue. In such a situation the overcapacity is reassigned to another queue. The code is shown in Appendix C.

(25)

24 CGC is a new queueing discipline which makes it very difficult to predict its performance. However, Aumann (2002) described how CGC would work with different capacities. CGC was unit tested on the example of Aumann. The results are integers and therefore slightly differ from the results of

Aumann. The code is shown in Appendix C. Figure 10 shows the results from the test. First the capacity is printed followed by the assigned capacity, which is done by the simulation. Then the expected capacity is shown, if this is equal to the assigned capacity this results in a “True”, the last number shows which rule of the CGC is applied. Since all the statements are true the CGC

programmed in the simulation performs as it is expected.

(26)

25

4. Results

This chapter contains the results from the simulation, the details of the results are shown in Appendix D. In chapter 3.4 and Appendix B, the simulation model was thoroughly tested.

4.1. Hypothesis 1

The first hypothesis is:

H1: The average cycle time of jobs from stream A in CGC is lower than in FCFS. 𝐻0: 𝐶𝑇̅̅̅̅𝑎,𝐶𝐺𝐶≥ 𝐶𝑇̅̅̅̅𝑎,𝐹𝐶𝐹𝑆

𝐻𝐴: 𝐶𝑇̅̅̅̅𝑎,𝐶𝐺𝐶< 𝐶𝑇̅̅̅̅𝑎,𝐹𝐶𝐹𝑆

In Table 4 a scenario is chosen that seems fit to test this hypothesis. This scenario involves the smallest average arrival for queue A, which makes it more vulnerable because proportionally the difference between the arrivals in other stream is large. The first server is chosen because this has an utilisation below 90% and represents a realistic system.

A[0] queue CT_a queue CT_a Mean Difference

1 CGC s1 1.2480 FCFS s1 1.0024 0.2456

Table 4. Comparison of CT between FCFS and CGC of the smallest job stream

The variance of both samples is compared to determine if there is a difference in performance. As shown in Figure 11, the p-values show that the null-hypothesis is rejected and therefore the variances of both samples is unequal.

Figure 11. Equal variance test of FCFS CT_a and CGC CT_a

(27)

26

Figure 12. Histogram of data set distribution FCFS CT_a and CGC CT_a

Since the variance is unequal and the samples are according to a normal distribution an independent samples t-test is performed using unequal variance.

Figure 13. Independent samples t-test for FCFS CT_a and CGC CT_a

The p-value is 1 which is outside the 0.05 limit set, meaning that the null-hypothesis cannot be rejected. Therefore H1 is rejected, thus the CT of CGC in job stream A is not lower than that in FCFS. H1: The average cycle time of jobs from stream A in CGC is lower than in FCFS.

𝐻0: 𝐶𝑇̅̅̅̅𝑎,𝐶𝐺𝐶≥ 𝐶𝑇̅̅̅̅𝑎,𝐹𝐶𝐹𝑆

(28)

27

Hypothesis 2

The second hypothesis is:

H2: The variance of job stream C in CGC is unequal to the variance of RR. 𝐻0: 𝐶𝑇̅̅̅̅𝑐,𝐶𝐺𝐶 = 𝐶𝑇̅̅̅̅𝑐,𝑅𝑅

𝐻𝐴: 𝐶𝑇̅̅̅̅𝑐,𝐶𝐺𝐶 ≠ 𝐶𝑇̅̅̅̅𝑐,𝑅𝑅

A fitting scenario is shown in Table 5 for this test. This scenario is due to the high utilisation (but below 95%) so the queueing disciplines demonstrate clearly if they put the same strain on the largest queue

A[0] queue CV_c queue CV_c

5 RR s2 0.3075 CGC s2 0.2229

Table 5. Comparison of CV between RR and CGC of the largest job stream

The variance of both population is compared to determine if there is a difference. Figure 14 shows that the variance of both data sets is unequal, since the p-value (0.000) is smaller than the alpha of 0.05 and therefore the null-hypothesis is rejected which states that the variance is equal.

(29)

28 Figure 15 shows that the two samples are according to a normal distribution.

Figure 15. Histogram of data set distribution RR CT_c and CGC CT_c

Since the variance is unequal and the samples are according to a normal distribution an independent samples t-test is performed using unequal variance.

Figure 16. Independent t-test with unequal variance for RR CT_c and CGC CT_c

The p-value is 0.000, with the set confidence interval the test shows that the null-hypothesis is rejected and therefore the alternative hypothesis is accepted. Meaning that the CT of the largest queue in RR and CGC is not equal. The results show that in fact the CT of CGC in job stream C is lower than that of RR.

H2: The variance of job stream C in CGC is unequal to the variance of RR. 𝐻0: 𝐶𝑇̅̅̅̅𝑐,𝐶𝐺𝐶 = 𝐶𝑇̅̅̅̅𝑐,𝑅𝑅

(30)

29

4. Discussion

The goal of this research was to research a possible new queueing discipline called CGC and how it would perform in comparison to FCFS and RR in a simulation model. The results are quite

unexpected, since CGC which would be classified as a fair queueing discipline which, to me,

suggested that it protects the underprivileged. Hypothesis 1 stated that the cycle time of jobs from job stream A was lower in CGC than in FCFS. The results from hypothesis 1 show that CGC does not have a lower CT for job stream A than FCFS. This is remarkable since FCFS does not protect job stream A. CGC was suspected to protect the smallest stream since it classifies as a fair queueing discipline, such as RR has proven to do. But the results actually suggest that FCFS does a better job protecting the smallest queue than CGC, although it makes no effort.

Hypothesis 2 was designed to test if CGC would have an equal CT of the largest stream in

comparison with RR. The statistical tests showed that this hypothesis was rejected. The variance and CT of stream C in CGC is not equal to that of RR. The expectation was that the CV of job stream A would be lower in RR but similar to the CV of CGC for this job stream.

RR is a fairly extreme queueing discipline in that it divides the capacity regardless of number of jobs, I expected CGC to be milder in the sense that it would spread the CV more equal amongst the other queues. Thus the CV of CGC would be lower for job stream C. The average CT of CGC in job stream C is lower than in RR, since the hypothesis shows that they are not equal.

Since CGC performed worse in protecting job stream A than FCFS, and RR does this better than FCFS CGC does this worse than RR. FCFS is deemed as not protecting the smallest job stream, thus CGC cannot be deemed as a queueing discipline that protects the smallest job stream. The results suggest that it even harms the smallest queue. However, since CGC has a lower CV in the highest job it suggest that CGC actually protects the interest of the largest stream. In hindsight this could have been predicted since the CG rule gives most to the largest claimant.

Looking at the raw results in Appendix D, I see indications that CGC performs better when the smallest queue has an arrival rate of 7, then the CV of all queues seem evenly distributed with the largest stream still having the lowest CV. Further research could determine if CGC is an interesting option in situation where the largest stream needs to be protected from other streams which claim resources and have a slightly lower arrival rate. Maybe in a job shop where there is one product which is the main source of income, and a lot of other products dispute the resources CGC could be beneficial.

I expect that the idea of CGC failed in this case because it is not thorough enough in protecting the smaller streams. RR empties the smallest queue regularly whilst CGC lets job linger when the queues with more frequent arrivals have a lot of jobs. However, changing the manner in which the

overcapacity and decimal capacity is divided amongst the queues could heavily impact the

(31)

30

5. Conclusion

The goal of this research was to answer the following question:

How can the Contested Garment rule be translated into a queueing discipline and how does it perform in comparison to RR and FCFS?

CGC falls under the fair queueing disciplines, and is another method for dividing capacity based on a rule from the Talmud with a different approach to fairness. CGC assigns server capacity based on the amount of jobs in the queue and contains two rules to ensure fairness. The idea of this research was to translate this into a new queueing discipline which would perform well were fairness is an

important aspect of job processing.

The three queueing disciplines were built in a simulation, in which several scenarios were simulated. The performance of the queueing discipline is measured in Cycle Time (CT), Work in Process (WIP), Throughput (TH), and Coefficient of Variation (CV).

At the start of the research the following hypotheses were posited:

H1: The mean cycle time of jobs from stream A in CGC is lower than in FCFS. H2: The variance of job stream C in CGC is unequal to the variance of RR.

The results from hypothesis 1 show that CGC does not have a lower CT for the smallest queue than FCFS. Showing that CGC does worse in protecting the smallest job stream than a queueing discipline which does not protect the smallest job stream. Hypothesis 2 was designed to test if CGC would have an equal CT for the largest stream in comparison with RR. The statistical tests showed that this hypothesis was rejected.

The idea at the start of this research was that CGC is a queueing discipline which protects the smallest job stream in a less rigorous manner than RR. RR loads the burden of protecting the smallest job stream on the largest job stream, the expectation was that CGC would distribute the variation more equal among the queues.

The actual results indicate that CGC protects the largest job stream. CGC might be an interesting queueing discipline for protecting the largest job stream, when there are a lot of smaller streams claiming resources. Job shops which have one product as its main source of income but performs several other jobs might find CGC interesting.

(32)

31

Bibliography

Alomari, F., & Menascé, D. A. (2014). Efficient Response Time Approximations for Multiclass Fork and Join Queues in Open and Closed Queuing Networks. IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, 1437-1446.

Arpaci-Dusseau, R. H., & Arpaci-Dusseau, A. C. (2014). Scheduling: Introduction. In Arpaci-Dusseau, Operating Systems (pp. 1-12). Arpaci-Dusseau Books.

Aumann, R. J. (2002). Game Theory in the Talmud. Research bulletin Series on Jewish Law and Economics.

Azarfar, A., Frigon, J., & Sansò, B. (2012). Dynamic Selection of Priority Queueing Discipline in Cognitive Radio Networks. Vehicular Technology Conference, 1-5.

Bertrand, J., Wortmann, J., & Wijngaard, J. (1998). Productiebeheersing en material management. Educatieve Partners Nederland.

Cambridge Dictionary. (2015, 05 25). Meaning of "fairness" in the English Dictionary. Retrieved from Cambridge Dictionary Online: http://dictionary.cambridge.org/dictionary/english/fairness Demers, A., Keshav, S., & Shenker, S. (1989). Analysis and simulation of a fair queueing algorithm.

ACM SIGCOMM Computer Communication Review, 3-26.

Goldberg, H. M. (1977). Analysis of the Earliest Due Date Scheduling Rule in Queueing Systems. Mathematics of Operations Research,, 145-154.

Hall, R. (1991). Queueing Methods: For Services and Manufacturing. Prentice Hall. Hopp, W., & Spearman, M. (2008). Factory Physics. Singapore: McGraw-Hill.

Jackson, J. R. (1961). Queues with Dynamic Priority Discipline. Management Science, 18 - 34. Keller. (2008). Managerial Statistics. South-Western CENGAGE Learning.

Kendall. (1953). Stochastic Processes Occurring in the Theory of Queues and their Analysis by the Method of the Imbedded Markov Chain. The Annals of Mathematical Statistics, 338-354. Kingman, J. F. (1962). On Queues in Heavy Traffic. Journal of the Royal Statistical Society. Series B

(Methodological), 383-392.

Kolawa, A., & Huizinga, D. (2007). Automated Defect Prevention: Best Practices in Software Management. Wiley-IEEE Computer Society Press, 426.

Law, A. M. (2003). HOW TO CONDUCT A SUCCESSFULL SIMULATION STUDY. Proceedings of the 2003 Winter Simulation Conference.

Nagle, J. B. (1987). On Packet Switches with Infinite Storage. IEEE Transactions on Communications, 435-438.

Ouelhadj, D., & Petrovic, S. (2009). A survey of dynamic scheduling in manufacturing systems. Journal of Scheduling, 417 - 431.

(33)

32 Schrage, L. (1968). Letter to the Editor - A Proof of the Optimality of the Shortest Remaining

Processing Time Discipline. Operations Research, 687-690.

Sen, R. (2010). Operations Research: Algorithms And Applications. Prentice-Hall of India.

(34)

33

(35)
(36)

35

(37)

36

(38)
(39)

38

(40)

39

(41)
(42)

41

(43)
(44)
(45)
(46)

45

(47)
(48)
(49)

48

Figure 23. Output.py

(50)

49

Appendix B. Model Testing

In this appendix test are performed to further check the validity of the simulation regarding predictive validity, degenerate tests, and extreme condition tests. Predictive validity concerns the behaviour of the simulation in comparison to what is predicted when a change to the system is made. Degenerate tests are performed, which tests the degeneracy of the model’s behaviour. Extreme condition tests pertain to changing the parameters to extreme values and determine if the simulation acts accordingly. All test results are shown in operational graphics or tables. The following list is a summary of what test are done throughout the testing of the simulation.

 Test simulation design

 Test queueing discipline design

 Compare WIP, TH, and CT across queuing disciplines.

 Printing several periods visualising the arrivals, queue, departures, results, and remaining queue length.

 Comparison to the workings of slimmer simulation models.

Expected Values Tests

Since the there is a difference in the expected value and the value resulting from the simulation, a check whether the values from the simulation are counted correctly is in place. These are the results from the simulation:

(51)

50 From the simulation the data of the 5000 arrivals and the capacity are taken. In Excel a similar simulation is build, the formula for determining the queue length is used:

𝑄𝑛,𝑖= 𝑄𝑛−1+ 𝐴𝑛− 𝐷𝑛

The departures are determined by:

𝐷𝑛 = min (𝑄𝑛−1, 𝐶)

Each queue length from the Excel model is compared to the queue length which was reported by the simulation, and is found equal in every period as well as the total number of departures in both models.

Calculating the WIP is done by taking the average queue length. Then calculating the expected values using the aforementioned formulas, show that also in the Excel model (Table 6) there is a difference in actual and expected values.

n arrivals Queue length EQ Check Departures ED

total Check 50 00 21 =C5001-F5002+B5002 (=21) 21 =IF(C5002=D500 2,"TRUE","NOO OOO") (=21) =IF(C5001>$L$ 2,$L$2,C5001) (=24) =AVERA GE(B2:B 5002) (=25.99) =AVERAGE(C2:C5002 ) (=30.196) =SUM(F2:F500 2) (=129936) 1299 36 =G500 3=F50 03 (=TRU E) =MAX(F2:F500 2) (=28) =AVERAGE(F2: F5002) (=25.98) C 28 ra =B5003 (=26) te =1/C5008 (=0.036) u =C5009*C5010 (=0.9281) CTq =(G5011/2)*(C5011/ (1-C5011))*C5010 + 1(=1.2304) CT =C5013+C5010 (=1.266) WIP =C5014*F5005 (=32.897)

(52)

51 The results from a slimmer simulation build by the supervisor3 of this project yielded the results as shown in Figure 25. This simulation too shows results which are closer to the designed model for this study than the expected values.

Figure 25. Simulation results from model build by supervisor

Since the values in all the simulations are not equal to the expected values but equal to each other, I believe that the calculation of the WIP in the simulation is correct.

Unit Tests

To follow are unit tests of which the code can be found in Appendix C.

When zero jobs arrive into the system it is to be expected that there are zero jobs in the queue. As is shown in Figure 26 nog queue or departures result from zero arrivals.

Figure 26. Zero arrivals

When there are arrivals but there is no capacity the jobs should move to the queue, as is shown in Figure 27

Figure 27. Jobs move to queue

3 The model is slightly altered in presentation, names have been added and the expected queue length

(53)

52 When the capacity is really high, only the arrivals of the period should be in the queue. Since all the arrivals spent at least one period in the queue. Figure 28 shows that results reflect the expectation.

Figure 28. High capacity

The least amount of arrivals are for the first queue, and each queue is supposed to be assigned a capacity which is equal to the total capacity. So with a capacity of 20 the assigned capacity should be equal to 20, and the queue arrivals should be ascending. Figure 29 shows that this is the case.

Figure 29. Comparison capacity and assigned capacity

The number of queues can be changed in the model, so when only one queue is present the system needs to show that only one queue is fed, as is shown in Figure 30.

Figure 30. One queue

Since there are multiple servers, a test to determine if the last departures from one server are the arrivals for the next server. Figure 31 shows that the departures from server one are the arrivals for server two. The term last departures references to the last departures of an array of departures.

(54)

53

Scenario Tests

Now for some scenario testing, thus the code is similar to the one presented in Appendix A but for the configuration. The system becomes more predictable when changing the arrivals to

deterministic. When one job per period arrives in one queue the queue length should be one, since every job that arrives spends one period in the queue. The result (Figure 32) shows that this is the case.

Figure 32. Queue length per period

When the capacity is set at one and the arrival of the queue to two, the line should show that each period one more job is in the queue. As can be seen in Figure 33.

Figure 33. Ascending queue length

(55)

54

Figure 34. Deterministic arrivals test

Now for scenario testing with variability in the arrivals.

When the utilization is set to 1, by using equal values (26) for arrival rate and capacity the simulation should show that the system is imbalanced. The imbalance is shown by very large queues, and therefore this does not represent a realistic situation. The queue length of this system is shown in Figure 35. It shows that queues of 1200 are reached thus it seems the simulation simulates an imbalanced system.

(56)

55 When the capacity is set to one the queue should grow fairly steadily. As is shown in Figure 36.

(57)

56

Appendix C. Tests Codes

This chapter has the code of test which are performed in chapter 3.4 and in Appendix B.

Test in Chapter 3.4.

(58)

57

(59)

58

Figure 39. Test of FCFS working

(60)

59

(61)

60

Tests in Appendix B.

(62)

61

(63)

62

(64)

63

(65)

64

(66)

65

Appendix D. Results

The results from the simulation are shown below. Summarizing the results in smaller tables is impossible without losing the integrity of the results. Taking the average of averages requires that a weight is given. Since the queue lengths vary per period it is very difficult to assign a certain weight. Therefore the results can only be compared to the results of the other queueing disciplines. In Appendix E, an example is given of how the averages would harm the integrity of the results. Do keep in mind that the CT over all queues is equal for all queueing disciplines, thus the results are valid.

A[0] queue CT_a CV_a CT_b CV_b CT_c CV_c

1 FCFS s1 1.0024 0.0490 1.0225 0.1450 1.1043 0.2771 1 RR s1 1.0000 0.0000 1.0039 0.0625 1.1126 0.2888 1 CGC s1 1.2480 0.4442 1.0970 0.2737 1.0560 0.2181 3 FCFS s1 1.0087 0.0922 1.0271 0.1582 1.1194 0.2898 3 RR s1 1.0005 0.0215 1.0047 0.0681 1.1308 0.3061 3 CGC s1 1.1624 0.3398 1.1023 0.2783 1.0572 0.2198 5 FCFS s1 1.0109 0.1025 1.0214 0.1418 1.1274 0.2961 5 RR s1 1.0040 0.0625 1.0059 0.0764 1.1364 0.3096 5 CGC s1 1.1138 0.2920 1.1052 0.2804 1.0578 0.2208 7 FCFS s1 1.0323 0.1714 1.0316 0.1695 1.1380 0.3033 7 RR s1 1.0167 0.1262 1.0051 0.0709 1.1565 0.3273 7 CGC s1 1.1037 0.2802 1.1226 0.2967 1.0663 0.2335

Table 7. Server 1 KPIs

A[0] queue CT_a CV_a CT_b CV_b CT_c CV_c

1 FCFS s2 1.0000 0.0000 1.0122 0.1083 1.1007 0.2734 1 RR s2 1.0000 0.0000 1.0024 0.0492 1.1050 0.2785 1 CGC s2 1.2539 0.4528 1.0819 0.2560 1.0540 0.2145 3 FCFS s2 1.0075 0.0859 1.0336 0.1744 1.1148 0.2861 3 RR s2 1.0000 0.0000 1.0028 0.0529 1.1298 0.3077 3 CGC s2 1.1465 0.3309 1.0956 0.2727 1.0612 0.2262 5 FCFS s2 1.0162 0.1242 1.0217 0.1427 1.1165 0.2875 5 RR s2 1.0007 0.0259 1.0034 0.0577 1.1295 0.3075 5 CGC s2 1.0959 0.2763 1.0945 0.2703 1.0592 0.2229 7 FCFS s2 1.0171 0.1276 1.0216 0.1422 1.1283 0.2964 7 RR s2 1.0232 0.1470 1.0025 0.0499 1.1340 0.3074 7 CGC s2 1.0814 0.2554 1.1054 0.2801 1.0629 0.2284

Table 8. Server 2 KPIs

A[0] queue CT_a CV_a CT_b CV_b CT_c CV_c

(67)

66

5 CGC s3 1.3071 0.3843 1.2763 0.3693 1.1898 0.3709

7 FCFS s3 1.1602 0.3405 1.1581 0.3382 1.3636 0.3904

7 RR s3 1.0075 0.0858 1.0061 0.0774 1.4982 0.4981

7 CGC s3 1.2940 0.3758 1.3222 0.3762 1.2321 0.4065

Table 9. Server 3 KPIs

A[0] queue CT_a CT_b CT_c CV_a CV_b CV_c

1 FCFS s1 1.0024 1.0225 1.1043 0.0490 0.1450 0.2771 1 FCFS s2 1.0000 1.0122 1.1007 0.0000 0.1083 0.2734 1 FCFS s3 1.0299 1.0787 1.2589 0.1654 0.2530 0.3592 1 RR s1 1.0000 1.0039 1.1126 0.0000 0.0625 0.2888 1 RR s2 1.0000 1.0024 1.1050 0.0000 0.0492 0.2785 1 RR s3 1.0000 1.0041 1.2938 0.0000 0.0638 0.4001 1 CGC s1 1.2480 1.0970 1.0560 0.4442 0.2737 0.2181 1 CGC s2 1.2539 1.0819 1.0540 0.4528 0.2560 0.2145 1 CGC s3 1.5928 1.2368 1.1540 0.5251 0.3604 0.3254 3 FCFS s1 1.0087 1.0271 1.1194 0.0922 0.1582 0.2898 3 FCFS s2 1.0075 1.0336 1.1148 0.0859 0.1744 0.2861 3 FCFS s3 1.1394 1.1930 1.3524 0.3810 0.4091 0.4336 3 RR s1 1.0005 1.0047 1.1308 0.0215 0.0681 0.3061 3 RR s2 1.0000 1.0028 1.1298 0.0000 0.0529 0.3077 3 RR s3 1.0000 1.0041 1.4619 0.0000 0.0637 0.5538 3 CGC s1 1.1624 1.1023 1.0572 0.3398 0.2783 0.2198 3 CGC s2 1.1465 1.0956 1.0612 0.3309 0.2727 0.2262 3 CGC s3 1.4068 1.2938 1.2573 0.4197 0.3759 0.4983 5 FCFS s1 1.0109 1.0214 1.1274 0.1025 0.1418 0.2961 5 FCFS s2 1.0162 1.0217 1.1165 0.1242 0.1427 0.2875 5 FCFS s3 1.1157 1.1458 1.3080 0.2990 0.3262 0.3792 5 RR s1 1.0040 1.0059 1.1364 0.0625 0.0764 0.3096 5 RR s2 1.0007 1.0034 1.1295 0.0259 0.0577 0.3075 5 RR s3 1.0077 1.0041 1.4047 0.0866 0.0636 0.4627 5 CGC s1 1.1138 1.1052 1.0578 0.2920 0.2804 0.2208 5 CGC s2 1.0959 1.0945 1.0592 0.2763 0.2703 0.2229 5 CGC s3 1.3071 1.2763 1.1898 0.3843 0.3693 0.3709 7 FCFS s1 1.0323 1.0316 1.1380 0.1714 0.1695 0.3033 7 FCFS s2 1.0171 1.0216 1.1283 0.1276 0.1422 0.2964 7 FCFS s3 1.1602 1.1581 1.3636 0.3405 0.3382 0.3904 7 RR s1 1.0167 1.0051 1.1565 0.1262 0.0709 0.3273 7 RR s2 1.0232 1.0025 1.1340 0.1470 0.0499 0.3074 7 RR s3 1.0075 1.0061 1.4982 0.0858 0.0774 0.4981 7 CGC s1 1.1037 1.1226 1.0663 0.2802 0.2967 0.2335 7 CGC s2 1.0814 1.1054 1.0629 0.2554 0.2801 0.2284 7 CGC s3 1.2940 1.3222 1.2321 0.3758 0.3762 0.4065

(68)

67

Appendix E. Integrity of Results

This appendix contains a small example of how the integrity of the results, which are extracted from the simulation, are harmed by using the average of averages. In Figure 47, three queueing disciplines are shown which are not RR, FCFS, and CGC. In period 0 each queue has 1 job in the first queue, 3 jobs in the second queue, and 5 jobs in the third queue. The number represent the amount of time the jobs are in the system. On the right of the figure the assigned capacity per queue is shown, the total capacity of the server is 6. So except for period 0 there are 6 jobs leaving the system. The number that corresponds with the job that left the system is averaged below period 2. Below these averages is the average of these averages, and behold they are not equal to each other. Actually the average should be 1.5 for all the queueing disciplines in this figure when weight is accounted for.

Figure 47. Integrity of results

Referenties

GERELATEERDE DOCUMENTEN

In haar nieuwe boek Chinezen van glas maakt de hoofdpersoon zich weliswaar zorgen om het anders- zijn van haar familie (die zelfs ,,iets onbestaanbaars'' wordt verweten), maar dat

Vandaar haar ontvankelijk- heid voor de praatjes van Steve, die aan haar verheven verlangens tegemoet komt met theorieën over `the Sublime' en haar wijs maakt dat het leven

Although this study focuses on evaluating and identifying strains with high general secretion phenotypes by expressing individual cellulase genes relevant for 2G

Hierbij moet echter wel worden bedacht dat de proeflei- der dat weet, maar dat de proefpersonen toch in enige onzekerheid verke- ren over de wijze waarop gegevens bij

This is done by (1) subtracting the relative stock performance over the business cycles from the average sample stock returns and dividing each value by the individual

Examining the profile of doctoral students by race in the five selected disciplines showed that among doctoral enrolments, sociology has a much higher proportion of black

Bestrijding van deze plaag vormt een bottleneck in de geïntegreerde bestrijding, omdat tegen deze insecten middelen moeten worden ingezet die schadelijk zijn voor

From a result by Bergstra and Tiuryn [9] we know that the standard operators of process algebra (alternative-, sequential-, and parallel composition without synchronization) are