Lecture 5 - Elements II - January 27th
Lecture 5 - Elements II - January 27th
Please do not copy or distribute without the written consent of the author.
Dr Estacio Pereira
January 2024.
Schedule
3
Outline
• Basic elements
• Entities attributes
4
5
Elements
General Template Elements III
6
The Set Attribute Element
Opens the
formula editor
7
The Set Attribute Element
Attribute values can be specified using a formula:
• The formula above writes the value of the LX(1) attribute to the trace
window.
10
Global Attributes
• Every model has a collection of attributes that are shared
among the entities.
11
Global Attributes
12
Cost Element
STATISTIC:
Defines a custom statistic.
STATISTIC COLLECT:
Adds an observation to a statistic when
an entity passes through.
13
The Statistic Element
No. Time Observation
• A Statistic Element is a container for 1 0 1
a sequence of time-stamped 2 0 0
observations. 3 3 1
14
The Statistic Element
15
The Statistic Collect Element
VALVE:
Blocks or unblocks a stream of entities.
ACTIVATOR:
Opens or closes a valve when an entity
passes through.
18
Valves and Activators
• A Valve Element must specify:
• The initial state of the valve (open vs. closed).
• AutoClose: the number of entities to allow through the
valve before it is automatically shut; or, zero if there should
be no restriction on entity flow.
19
Valves and Activators
(Open)
(Closed)
Example
20
Batching and Unbatching Entities
BATCH:
Creates a batch from a sequence of
entities.
UNBATCH:
Restores a sequence of entities from a
batch.
21
Batching and Unbatching Entities
Example
22
Batching and Unbatching Entities
• A Batch Element must specify:
• The quantity of entities per batch.
• The entity whose attributes will be echoed by the batch
entity (first vs. last).
23
Batching and Unbatching Entities
WARNING!
DO NOT DO THIS!
24