simulation lecture 6 - faculteit wiskunde en informaticamarko/2wb05/lecture6.pdf · 2wb05...

18
2WB05 Simulation Lecture 6: Process-interaction approach Marko Boon http://www.win.tue.nl/courses/2WB05 December 6, 2012

Upload: dinhkiet

Post on 09-Mar-2018

221 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Simulation Lecture 6 - Faculteit Wiskunde en Informaticamarko/2WB05/lecture6.pdf · 2WB05 Simulation Lecture 6: Process-interaction approach ... In Arena you can construct simulation

2WB05 SimulationLecture 6: Process-interactionapproach

Marko Boonhttp://www.win.tue.nl/courses/2WB05

December 6, 2012

Page 2: Simulation Lecture 6 - Faculteit Wiskunde en Informaticamarko/2WB05/lecture6.pdf · 2WB05 Simulation Lecture 6: Process-interaction approach ... In Arena you can construct simulation

2/18

Department of Mathematics and Computer Science

This approach focusses on describing processes;In the event-scheduling approach one regards a simulation as executing a sequence of events ordered in time;but no time elapses within an event.The process-interaction approach provides a process for each entity in the system; and time elapses during aprocess.

In production systems we have processes for:

• Arrivals

• Buffers

• Machines

• Exit

Process-Interaction approach

Page 3: Simulation Lecture 6 - Faculteit Wiskunde en Informaticamarko/2WB05/lecture6.pdf · 2WB05 Simulation Lecture 6: Process-interaction approach ... In Arena you can construct simulation

3/18

Department of Mathematics and Computer Science

Example: Single-stage production system

Machine

BufferArrivals Exit

A single machine processes jobs in order of arrival. The interarrival times and processing times are exponentialwith parameters λ and µ (with λ < µ).

• What is the mean waiting time?

• What is the mean queue length?

• What is the mean length of a busy period?

• How does the performance change if we speed up the machine?

Process-Interaction approach

Page 4: Simulation Lecture 6 - Faculteit Wiskunde en Informaticamarko/2WB05/lecture6.pdf · 2WB05 Simulation Lecture 6: Process-interaction approach ... In Arena you can construct simulation

4/18

Department of Mathematics and Computer Science

Arrival process

Generate arrival after random (exponential) time units

arrival

Process-Interaction approach

Page 5: Simulation Lecture 6 - Faculteit Wiskunde en Informaticamarko/2WB05/lecture6.pdf · 2WB05 Simulation Lecture 6: Process-interaction approach ... In Arena you can construct simulation

5/18

Department of Mathematics and Computer Science

Buffer process

Add job to buffer and remove job from buffer (if there is any)

0 1 n n+1

Process-Interaction approach

Page 6: Simulation Lecture 6 - Faculteit Wiskunde en Informaticamarko/2WB05/lecture6.pdf · 2WB05 Simulation Lecture 6: Process-interaction approach ... In Arena you can construct simulation

6/18

Department of Mathematics and Computer Science

Machine process

Process job (if there is any)

idle

busy

Process-Interaction approach

Page 7: Simulation Lecture 6 - Faculteit Wiskunde en Informaticamarko/2WB05/lecture6.pdf · 2WB05 Simulation Lecture 6: Process-interaction approach ... In Arena you can construct simulation

7/18

Department of Mathematics and Computer Science

Exit process

Accept completed job and do accounting

departure accounting

Process-Interaction approach

Page 8: Simulation Lecture 6 - Faculteit Wiskunde en Informaticamarko/2WB05/lecture6.pdf · 2WB05 Simulation Lecture 6: Process-interaction approach ... In Arena you can construct simulation

8/18

Department of Mathematics and Computer Science

The specification language χ :

Modelling and simulation tool for the design of manufacturing systems

The language χ has been developed by the Systems Engineering group

For documentation, see http://se.wtb.tue.nl/sewiki/chi

Process-Interaction approach

Page 9: Simulation Lecture 6 - Faculteit Wiskunde en Informaticamarko/2WB05/lecture6.pdf · 2WB05 Simulation Lecture 6: Process-interaction approach ... In Arena you can construct simulation

9/18

Department of Mathematics and Computer Science

Implementation in χ

G EMBa b c

Processes: G, B, M, E.

Channels: a, b, c.

Jobs are generated in G, then they are sent over channel a to B. When M is idle, the first job is sent over channelb to M. After a delay, the job is sent over channel c to exit process E.

Process-Interaction approach

Page 10: Simulation Lecture 6 - Faculteit Wiskunde en Informaticamarko/2WB05/lecture6.pdf · 2WB05 Simulation Lecture 6: Process-interaction approach ... In Arena you can construct simulation

10/18

Department of Mathematics and Computer Science

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

0 10 20 30 40 50 60 70 80 90 100

Mean sojourn time as a function of the number of jobs processed for λ = 1 and µ = 2

Process-Interaction approach

Page 11: Simulation Lecture 6 - Faculteit Wiskunde en Informaticamarko/2WB05/lecture6.pdf · 2WB05 Simulation Lecture 6: Process-interaction approach ... In Arena you can construct simulation

11/18

Department of Mathematics and Computer Science

Example: Single-stage production system with three parallel machines

G EMBa b c

M

M

Process-Interaction approach

Page 12: Simulation Lecture 6 - Faculteit Wiskunde en Informaticamarko/2WB05/lecture6.pdf · 2WB05 Simulation Lecture 6: Process-interaction approach ... In Arena you can construct simulation

12/18

Department of Mathematics and Computer Science

Example: Two-stage production system

JobsMachine 1 Machine 2

Jobs are processed by two machines in series. Each machine has its own local buffer and processes jobs inorder of arrival. The interarrival and processing times of jobs are exponential with parameters λ, µ1 and µ2.

What is the mean (overall) sojourn time?

Process-Interaction approach

Page 13: Simulation Lecture 6 - Faculteit Wiskunde en Informaticamarko/2WB05/lecture6.pdf · 2WB05 Simulation Lecture 6: Process-interaction approach ... In Arena you can construct simulation

13/18

Department of Mathematics and Computer Science

In the χ program we only have to change the model:

G EMBa b c

MBd e

Process-Interaction approach

Page 14: Simulation Lecture 6 - Faculteit Wiskunde en Informaticamarko/2WB05/lecture6.pdf · 2WB05 Simulation Lecture 6: Process-interaction approach ... In Arena you can construct simulation

14/18

Department of Mathematics and Computer Science

The simulation system Arena

In Arena you can construct simulation models without programming, but simply with click, drag and drop...

At the department of Mathematics and Computer science we have a limited license. See the TU/e softwareinstallation page for more details how to get access.

Book with CD-ROM:

W. David Kelton, Randall P. Sadowski, Deborah A. Sadowski:Simulation with Arena. 3rd ed., London: McGraw-Hill, 2004

Process-Interaction approach

Page 15: Simulation Lecture 6 - Faculteit Wiskunde en Informaticamarko/2WB05/lecture6.pdf · 2WB05 Simulation Lecture 6: Process-interaction approach ... In Arena you can construct simulation

15/18

Department of Mathematics and Computer Science

M|M|1 in Arena

Process-Interaction approach

Page 16: Simulation Lecture 6 - Faculteit Wiskunde en Informaticamarko/2WB05/lecture6.pdf · 2WB05 Simulation Lecture 6: Process-interaction approach ... In Arena you can construct simulation

16/18

Department of Mathematics and Computer Science

M|M|3 in Arena

Just change the capacity of the Service resource from 1 to 3.

Process-Interaction approach

Page 17: Simulation Lecture 6 - Faculteit Wiskunde en Informaticamarko/2WB05/lecture6.pdf · 2WB05 Simulation Lecture 6: Process-interaction approach ... In Arena you can construct simulation

17/18

Department of Mathematics and Computer Science

Two M|M|1 queues in series

Duplicate the server and change the name of the resource of the second server!

Process-Interaction approach

Page 18: Simulation Lecture 6 - Faculteit Wiskunde en Informaticamarko/2WB05/lecture6.pdf · 2WB05 Simulation Lecture 6: Process-interaction approach ... In Arena you can construct simulation

18/18

Department of Mathematics and Computer Science

Simulation of a queueing network:

network = QueueingNetworkProcess[gamma, P, EB, c];Table[QueueProperties[{network, i}], {i, 1, Length[EB]}]data = RandomFunction[network, {0, 1000}];ListLinePlot[data]Table[QueueProperties[{data, i}], {i, 1, Length[EB]}]

Mathematica 9