This presentation illustrates how to use Sparx Enterprise Architect Parametric Model features found in the Systems Engineering and Ultimate editions to simulate queuing systems.
1. Creating Queuing Systems Simulations
with Sparx EA SysML Parametric Models
1
Copyrights (c) 2011-2013 Pragmatic Cohesion Consulting
Add Performance Analysis to your EA Processes and System Models
with Queuing Systems Simulations
2. Queuing Systems Simulation
• This presentation illustrates how to use Sparx
Enterprise Architect Parametric Model features
found in the Systems Engineering and Ultimate
editions to simulate queuing systems.
• The presentation assumes that user is already
familiar with the use of Parametric Models. We
recommend reading the following reference for an
introduction to Parametric Models: Embedded
Systems Development using SysML Chapter 5.
2
Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
3. Queuing Systems
• Queuing Systems are generally made of waiting lines (also called
queues) and processing centers that perform some operation or
provide a service on people/items taken from queues.
• A typical example would be customers waiting in line at a bank to
be serviced by tellers or automated teller machines.
3
Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
4. Queuing System Simulation Item
Repository
• We use the Enterprise
Architect SysML Block
Definition Constraint
Blocks to define several
generic modeling
elements that will be
combined to create
Queuing System
Simulation parametric
models.
4
Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
5. Queuing System Simulation Elements
Repository
• We have defined four main groups of modeling elements:
– Source elements: they model the arrival of the queuing system
items such as customers arrival or work items submission.
– Queue elements: they model the waiting lines or queues of
source items. No queue rules such as First In first Out (FIFO) or
Last In First Out (LIFO) are enforced.
– Service elements: they model actions performed on a source
item when it is time to process or service it.
– Routing elements: they model routing items between services
and queues.
• Each element behavior is scripted
• The states of the Queuing System Simulation elements are
evaluated at time intervals controlled by the progression of
a global variable t representing the passage of time.
5
Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
6. Queuing System Simulation Elements
Repository
• Source elements:
– Custom Arrival: It
generates a number of
items at specific values
of t. User defines the
number of items
created for any value
of t.
bdd [Package] QueueSimulationItemRepository [QueueSimulationItemReposit...
t output
6
Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
7. Queuing System Simulation Elements
Repository
• Source elements:
– Simple Source: It
generates an item if
the value of a random
variable is between
the parameters P1 and
P2
bdd [Package] QueueSimulationItemRepository [QueueSimulationItemRepositor...
P1 : Real
output : RealP2 : Real
7
Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
8. Queuing System Simulation Elements
Repository
• Queue elements:
– Simple Queue: It is the
first queue an item
enters from a Source
element.
bdd [Package] QueueSimulationItemRepository [QueueSimulationItemRepository]
input : Real ItemsInQueue : Real
output : Real
8
Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
9. Queuing System Simulation Elements
Repository
• Queue elements:
– Next Queue: It is a
Queue that follows a
Service element.
bdd [Package] QueueSimulationItemRepository [QueueSimulationItemRepository]
input : Real
ItemsInQueue : RealPreviousQueue : Real
output : Real
9
Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
10. Queuing System Simulation Elements
Repository
• Queue elements:
– Sink: It is a Queue
from which no items
are taken from once
they enter it.
bdd [Package] QueueSimulationItemRepository [QueueSimulationItemRepositor...
input : Real
ItemsInSink : RealPreviousQueue : Real
10
Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
11. Queuing System Simulation Elements
Repository
• Queue elements:
– Simple Buffer: It is a
buffer that moves
input items into
output items.
bdd [Package] QueueSimulationItemRepository [QueueSimulationItemRepository]
input : Real output : Real
11
Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
12. Queuing System Simulation Elements
Repository
• Service elements:
– Simple Service: It is a
service center that
does not create any
defects. It processes
one item at the time at
a rate set by P.
bdd [Package] QueueSimulationItemRepository [QueueSimulationItemRepository]
input : Real
P : Real
output : Real
12
Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
13. Queuing System Simulation Elements
Repository
• Service elements:
– Service with Defects:
It is a service center
that can create
defects. It processes
one item at the time at
a rate set by P. It
generates defective
items at a rate set by
DP
bdd [Package] QueueSimulationItemRepository [QueueSimulationItemRepository]
P : Real
DP : Real
output : Real
defectOutput : Real
input : Real
passOutput : Real
13
Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
14. Queuing System Simulation Elements
Repository
• Routing elements:
– Splitter: It randomly
routes an item to
either output 1 or
output 2 based on a
splitting ratio P.
bdd [Package] QueueSimulationItemRepository [QueueSimulationItemRepository]
P
input
output1
output2
14
Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
15. Queuing System Simulation Elements
Repository
• Routing elements:
– Merger: It combines
two inputs into a
single output.
bdd [Package] QueueSimulationItemRepository [QueueSimulationIte...
input1
input2
output
15
Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
16. Queuing System Simulation Models
• We use the Enterprise
Architect SysML
Parametrics Property
and Constraint Property
objects to create
Queuing System
Simulation models.
• An example of a model is
presented next.
16
Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
18. Work Items Queuing System
Parametric Model
• In this model, Work items are submitted over time according to a custom
schedule.
• Work items once created enter an Unassigned Work Queue
• The Work Assignment Service then assigns work items one at a time to a
Work Assigned Queue
• The Work completion and Verification Service then takes one job at the
time from the Work Assigned Queue and completes it. Upon completion
the Work item is tested for defects
• If a Work item is not defective, it is added to the Work Completed Sink
otherwise it remains in the Work Assigned Queue for re-processing
• If a Work item is found defective, it is recorded in the Detected Defects
Queue
• The Detected Defects Queue only serves as a counter of the number of
defective Work Items found. We could have used a Sink Queue Element
instead but the behavior is the same as long as the Queue Output Rate
parameter is set to zero.
18
Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
19. Configuring and Running the
Parametric Model
19
Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
21. Simulation Results A
Input
Parameters
Values
t 0 to 200 step 0.05
Work
Assignment
Rate
0.5
Work
Completion
Rate
0.25
Work Defect
Rate
0.15
ZeroRate 0
Outputs Min Max Mean
Completed Work count 0 657 404
Defective Work
detected
0 114 71.75
Work Assigned Queue 0 178 65.5
Unassigned Work
Queue
0 115 12.67
Work is fully completed at t = 152.35
21
Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
23. Simulation Results B (Higher Work
Defect Rate)
Input
Parameters
Values
t 0 to 200 step 0.05
Work
Assignment
Rate
0.5
Work
Completion
Rate
0.25
Work Defect
Rate
0.30
ZeroRate 0
Outputs Min Max Mean
Completed Work count 0 657 352
Defective Work
detected
0 301 153.6
Work Assigned Queue 0 232 117.8
Unassigned Work
Queue
0 115 12.67
Work is fully completed at t = 187.65
23
Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
24. Copyrights (c) 2011-2013 Pragmatic
Cohesion Consulting
24
Contact didier@pragmaticohesion.com to find out how to
create Systems and Processes Performance Analysis
Models with your Sparx EA SysML Edition
http://pragmaticohesion.com/
Compute the following Performance Measures:
• Workloads
• Processing Times
• Utilizations