Presentation is loading. Please wait.

Presentation is loading. Please wait.

This tutorial will talk you through a very basic workbench queueing simulation. The queueing system modelled is of customers entering an infinite capacity.

Similar presentations


Presentation on theme: "This tutorial will talk you through a very basic workbench queueing simulation. The queueing system modelled is of customers entering an infinite capacity."— Presentation transcript:

1 This tutorial will talk you through a very basic workbench queueing simulation. The queueing system modelled is of customers entering an infinite capacity queue at non-random intervals. That is their arrival times are precisely known. This will enable us to understand precisely what happens when we run the model. The random case isn’t any more difficult and will be dealt with later. Similarly the length of time taken to serve them is non-random. We set up the model and generate and check some results Just follow the screenshots.

2 Opening screen: From file choose ‘new’ to create a new model

3 We are making a model from scratch so choose model here.

4 Now we have to add some modules to our model.

5 Let’s give the model some modules. Right click on the icon in the workspace and choose ‘specification’

6 We could choose an existing module.. But let’s make a new one.

7 Choose the name and file location where you will store your module…

8 Okay, our model will contain the module ‘tutorial’. Double click on the module icon and a blank workspace appears.

9 Workbench allows us to put many sub-modules inside a module. This is useful for simulating complicated systems. We will create one sub-module into which we will place our queueing system. Click on the icon labelled submodel node

10 Now click in the white workspace area to place the sub-module.. We have to give it a name so ……..

11 Right click on it and choose ‘specification’. When the dialog box opens give it a name.. When you are finished double click on the sub-module. Another blank workspace opens. We can now start to build a queuing system.

12 From the menu choose the ‘source node’ icon and place one in the workspace. Right click on it and choose specifications.. Give it a name… Specify the number of new customers created each time-unit. Here I have chosen a constant, 1, but I could have decided on a random process, e.g. poisson(0.5), a Poisson process with mean equal to 0.5… more about them in a later presentation Specify the inter-arrival time One or more customers will be created every time unit according to the new transactions rule below. You can choose seconds, hours, or arbitrary ‘module units’.

13 Now place a sink-node. Right click to specify it… Give it a name… that’s all that’s of interest for these guys.

14 And now place a service node, where the queueing occurs. Again right click to specify …. Give it a name… How long does it take to serve a customer? Here I have set it as a constant, 2. A later demo will explain how to make the service time an exponential random variable.

15 Now we have to join these nodes together. We do this using a topology arc

16 Having clicked on the topology arc we click near the source node until we find a blue spot. Click on this and drag an arc over to the blue spot near the service node.

17 We have now joined two of the nodes.. Now draw an arc from the service node to the sink

18 Our model has been physically built. Now we need to tell Workbench what data we would like to collect. Open the specifications for the service node and open the ‘type’ tab.

19 Choose the statistics tab and right click in the space below to specify a statistic. Choose the insert a row option.

20 Click on ‘class’ to specify what statistic you would like to collect. You can choose from a Variety of statistics. We will choose population and qpopulation. These are stats on the number of customers in the system and the number of customers in the queue throughout the simulation.

21 Give them a name so that they are easily recognised in the final report.. This is more important in more complicated models where you are collecting data from many nodes and don’t want to get confused between them.

22 Almost ready to run the model, but we have to tell Workbench how long to run it for. Choose ‘Edit Main’ from the ‘Model’ menu at the top of the screen.

23 We fill in data about the length of time we want to run the simulation for. Do we want a warm-up period ( to allow the model to reach steady state) ? In general you should choose yes for this if you are trying to replicate analytical results which are predicated on the system having reached steady state. You can specify how many time-units count as the warm-up period. We won’t need one for our simple model. How long do you want to run your model for? You can specify a fixed number of time-units. Or you can run it until some sort of convergence (in the form of an ever more tightly bounded confidence interval) is observed. Workbench lets you know how quickly things are progressing by issuing reports as time-units elapse. You can specify how often these reports should be made.

24 Now we are ready to build the code.. Chose ‘build’ from the ‘model’ drop down menu.

25 The first time we do this we are told that the module has not been explicitly included in Our model yet and we are asked whether we would like to continue… press yes

26 You are asked to specify the name and location of the workbench model (.wb file).

27 Again you are asked to verify a few things… just say yes..

28 Hopefully it compiles without errors… if there are any errors they will be reported here and you have to go and debug your model..

29 Now press the green arrow on the toolbar … this will run the program..

30 The model runs… Note that it reports every 2 time units as previously specified, so we know that it is running correctly and hasn’t crashed..

31 To examine the data we choose the ‘view results’ option from the toolbar menu.

32 Here is the report that is generated.. Note that we have statistical information about the two quantities that we stipulated, population and queue population. It suggests here that the mean population in the system was 2.9, while the mean queue size was 2. We can verify this easily..

33 Time = 0 Time = 1 Time = 2 Time = 3 Time = 4 Time = 5 Time = 6 Time = 7 Time = 8 Time = 9 Time = 10 Queue Service Finished It is a simple matter to keep track of the system in this case. People join at the rate of 1 per second while people leave every 2 seconds. So the system is empty for the first second, and then a person enters and immediately begins to get served. At t = 2 another person enters and joins the queue while the first person is still getting served etc… What is the average number of people in the system?

34 Well the first row of the last slide represents the first time unit of action. In this period there were an average of zero people in the system (and zero in the queue). So at t=1: The average population during the first time unit was zero… while the average queueing population was also zero. A single customer arrives just at the end of the first time unit and is present for the whole of the second one. So at t = 2: The average population during the first 2 time units was a half… while the average queueing population was zero. We can continue on in this fashion until we get to t = 10.

35 Now the first 10 seconds are shown in the rows marked 0 to 9 So at t= 10 we see that there were 0 customers present for the first time-unit. 1 customers present for the second time-unit. 2 customers present for the third time-unit. 2 customers present for the fourth time-unit. 3 customers present for the fifth time-unit. 3 customers present for the sixth time-unit. 4 customers present for the seventh time-unit. 4 customers present for the eighth time-unit. 5 customers present for the ninth time-unit. 5 customers present for the tenth time-unit. The average number of customers present over the first 10 Seconds is thus 29/10 = 2.9 as reported in our Workbench Results. Verify for yourself the qpop statistic as shown.


Download ppt "This tutorial will talk you through a very basic workbench queueing simulation. The queueing system modelled is of customers entering an infinite capacity."

Similar presentations


Ads by Google