SimEvents® Release Notes
SimEvents® Release Notes
www.mathworks.com Web
comp.soft-sys.matlab Newsgroup
www.mathworks.com/contact_TS.html Technical Support
508-647-7000 (Phone)
508-647-7001 (Fax)
Trademarks
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See
www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand
names may be trademarks or registered trademarks of their respective holders.
Patents
MathWorks products are protected by one or more U.S. patents. Please see
www.mathworks.com/patents for more information.
Contents
Summary by Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
iii
iv Contents
SimEvents® Release Notes
Summary by Version
This table provides quick access to what’s new in each version. For
clarification, see “Using Release Notes” on page 2.
1
SimEvents® Release Notes
• New features
• Changes
• Potential impact on your existing files and practices
Review the release notes for other MathWorks® products required for this
product (for example, MATLAB® or Simulink®). Determine if enhancements,
bugs, or compatibility considerations in other products impact you.
If you are upgrading from a software version other than the most recent one,
review the current release notes and all interim versions. For example, when
you upgrade from V1.0 to V1.2, review the release notes for V1.1 and V1.2.
• New functionality
• Changes to existing functionality
Compatibility issues reported after the product release appear under Bug
Reports at the MathWorks Web site. Bug fixes can sometimes result
in incompatibilities, so review the fixed bugs in Bug Reports for any
compatibility impact.
2
Summary by Version
3
SimEvents® Release Notes
4
Version 3.1 (R2010a) SimEvents® Software
5
SimEvents® Release Notes
These blocks now appear in the output of the sedb.blklist function and are
valid as inputs to the sedb.blkinfo function:
The sedb.blklist function sorts its Command Window output and cell array
output by block names instead of by block identifiers.
Compatibility Considerations
If you have code that manipulates or indexes into the output cell array from
sedb.blklist, you might need to update the code to reflect new rows or a
different sequence of rows.
6
Version 3.1 (R2010a) SimEvents® Software
In V3.1 (R2010a), a pending entity is an entity that has tried and failed to
depart from the block in which the entity resides.
When a block produces a pe output signal, the signal has an update (that is, a
sample time hit) whenever there is a change in the set of pending entities that
the block stores. The signal value is:
When a block produces a #pe output signal, the signal has an update
whenever there is a change in the set of pending entities that the block stores.
The signal value is the number of pending entities that the block stores.
Compatibility Considerations
If your models use the pe or #pe signal to control simulation behavior,
perform computations, or return results, your models might behave
differently. The table summarizes the behavioral changes most likely to affect
your models. For typical uses of the #pe signal, in which redundant sample
time hits with the same value do not matter, the behavioral changes do not
change the simulation results.
7
SimEvents® Release Notes
8
Version 3.1 (R2010a) SimEvents® Software
• Event-Based Entity When you configure the block to produce an error if an entity fails to
Generator depart, the error situation does not cause a sample time hit in pe.
In this configuration, the block cannot store any pending entities, so
• Time-Based Entity
there is no storage action to cause a sample time hit in pe.
Generator
You see the effect of this change if, after the error occurs, you
examine pe in the workspace or in a plot.
• Infinite Server If a pending entity departs and one or more pending entities remain
in the block, the pe signal has a single sample time hit of 1. In
• N-Server
earlier versions, in this situation, the signal has a sample time hit
of 0 followed by a sample time hit of 1.
Example
In the next model, at T = 0.5, one pending entity departs from the
server and one pending entity remains. In V3.1 (R2010a), pe has
a sample time hit to indicate the departure of the pending entity.
The value is 1 because the block still contains another pending
entity. In earlier versions, pe has a sample time hit of 0 followed
by a sample time hit of 1.
9
SimEvents® Release Notes
10
Version 3.1 (R2010a) SimEvents® Software
• Get Attribute
• Set Attribute
11
SimEvents® Release Notes
This feature requires Real-Time Workshop® software and uses the Rapid
Simulation target.
12
Version 3.0 (R2009b) SimEvents® Software
13
SimEvents® Release Notes
New features and changes introduced in this version are described here:
14
Version 2.4 (R2009a) SimEvents® Software
15
SimEvents® Release Notes
Compatibility Considerations
The debugger behavior produces slightly different information, with a
different format, compared to the information produced by the event logging
parameters. The closest approximations to the previous behavior use the
detail and runtoend functions of the debugger.
sedebug(model)
detail none
detail('ev',1,'cal',1)
runtoend
16
Version 2.4 (R2009a) SimEvents® Software
detail none
detail('ev',1)
runtoend
sedebug(model)
detail none
detail('en',1)
runtoend
17
SimEvents® Release Notes
Compatibility Considerations
If your legacy model includes a Discrete Event Signal to Workspace block in
an atomic subsystem, update the model as follows:
1 Move the Discrete Event Signal to Workspace block outside the atomic
subsystem.
18
Version 2.3 (R2008b) SimEvents® Software
New features and changes introduced in this version are described here:
Tutorial Demos
• Translating Events to Functions Calls
Application Demos
• FIFO Buffer: Functional Model
• FIFO Buffer: Architectural Model
• Anti-Lock Braking System (ABS) Overview
• Batch Production Process
• Kanban Production System
19
SimEvents® Release Notes
20
Version 2.2 (R2008a) SimEvents® Software
Also, the Signal Latch block has moved from the Gates library to the new
Signal Management library.
21
SimEvents® Release Notes
For example, the following figure shows the What’s This? context menu
appearing after a right-click on the Start time parameter in the Solver
pane.
22
Version 2.2 (R2008a) SimEvents® Software
New Demos
SimEvents software Version 2.2 (R2008a) introduces these new demos:
Also, the demo formerly named “Explicit Routing for Distributed Processing”
is now called “Distributed Processing for Multi-Class Jobs.”
23
SimEvents® Release Notes
24
Version 2.1 (R2007b) SimEvents® Software
25
SimEvents® Release Notes
• Event logs show a new kind of event, called an entity request event. This
event is a notification that an entity input port of a block has become
available. To understand the name entity request event, think of the
block as requesting an entity from a preceding block. For example, upon
becoming empty, a single server requests an entity from a preceding block.
A preceding block’s response to the notification might result in an entity
advancement.
26
Version 2.1 (R2007b) SimEvents® Software
Event Block
Entity generation Event-Based Entity Generator
Counter reset Entity Departure Counter
Gate event (gate opening Enabled Gate
or gate closing)
Release Release Gate
Port selection Input Switch, Output Switch, Path Combiner
In earlier versions, event logs show these events only if you select Resolve
simultaneous signal updates according to event priority in the
block dialog box.
Also, event logs and entity logs in Version 2.1 (R2007b) are more readable and
contain hyperlinks that highlight the corresponding blocks.
27
SimEvents® Release Notes
Tutorial Demos
• Server Blocks and Service Time
• Input and Output Switching
• Schedule Timeout and Cancel Timeout Blocks
Application Demos
• Shared Communication Buffer Management
• Processor Sharing Via Time Slicing
The new Input and Output Switching demo replaces these earlier demos:
28
Version 2.1 (R2007b) SimEvents® Software
Also, the G/G/1 Queuing System and Little’s Law demo has a simpler design
using the Attribute Function and Embedded MATLAB Function blocks.
29
SimEvents® Release Notes
Event Block
Entity generation Event-Based Entity Generator
Counter reset Entity Departure Counter
Gate event (gate opening Enabled Gate
or gate closing)
Release Release Gate
Port selection Input Switch, Output Switch, Path Combiner
Also, each entity request event has a system-level priority denoted by SYS2,
and the application processes the event via the event calendar.
30
Version 2.1 (R2007b) SimEvents® Software
For details about supported events and the processing of simultaneous events,
see “Working with Events” and “Managing Simultaneous Events”.
Compatibility Considerations
Most models are unaffected by the change in event processing. However,
some models might behave differently, because events processed immediately
in earlier versions are deferred to the event calendar in SimEvents software
Version 2.1 (R2007b). Models that behave differently tend to involve cycles
in simulation processing and cascades of simultaneous events (for example,
an event has multiple consequences that occur at time T, each of which has
further consequences also at time T).
The model below attempts to simultaneously advance one entity from each
queue, whenever both queues are nonempty.
Suppose that the top queue contains one entity and an entity arrives at
the previously empty bottom queue. Assuming that no block in the model
has its Resolve simultaneous signal updates according to event
priority parameter selected, the entity arrival has the following cascade
of consequences:
31
SimEvents® Release Notes
3 Each of the two Release Gate blocks detects a value-change event at its vc
signal input port. In SimEvents software Version 2.1 (R2007b), each of the
two gates schedules a release event on the event calendar.
5 In Version 2.1 (R2007b), the other gate opens, which has these
consequences:
a An entity advances from the corresponding queue to the sink.
In earlier versions, the gates do not schedule release events on the event
calendar if the corresponding Resolve simultaneous signal updates
according to event priority parameter is not selected. As a result, step 4c
negates the value-change event at the other gate and step 5 does not occur.
This example involves cycles in simulation processing, because an event at
the gate affects the value of the #n signal of a preceding block. This example
involves cascades of simultaneous events, because the new value of 1 for the
condition (A AND B) causes two release events, each of which causes the
condition (A AND B) to assume the value 0.
32
Version 2.1 (R2007b) SimEvents® Software
Compatibility Considerations
The behavior of some simulations changes depending on whether the
application models intermediate transitions in an en or p input signal in
the blocks in the table above.
In the model below, the en signal transitions from 0 to 1 and then from 1 to 0
in the same time instant. Earlier versions model only the latter transition, so
the gate does not open. Version 2.1 (R2007b) models both transitions, so the
gate opens and then closes in the same time instant.
33
SimEvents® Release Notes
34
Version 2.0 (R2007a) SimEvents® Software
35
SimEvents® Release Notes
Compatibility Considerations
If your legacy models contain Get Attribute or Set Attribute blocks from
the earlier library, those blocks continue to work in Version 2.0 (R2007a).
However, the blocks are considered obsolete, as described in “Obsolete Blocks”
on page 43.
You can configure the Entity Combiner block to make the combining operation
reversible via the Entity Splitter block.
The Entity Combiner and Entity Splitter blocks reside in the new Entity
Management library.
36
Version 2.0 (R2007a) SimEvents® Software
Compatibility Considerations
If you save a model containing a queue, server, or Output Switch block using
V2.0 (R2007a), then opening the model in V1.2 (R2006b) produces warnings
like these:
37
SimEvents® Release Notes
Saving the model in the earlier version prevents the warnings from
reappearing, but causes the block to omit timeout-related ports and behavior
if you later open the model in V2.0 (R2007a).
Tutorial Demos
• Transporting Multidimensional Data Using Attributes
• Packet Creation, Transmission and Error Analysis
Application Demos
• Distributed Video Processing
• Distributed Processing Resource Modeling
• Video Streaming Over Bandwidth-Limited Communication Channel
• Bit Timing Recovery Using Fixed-Rate Resampling and SimEvents
38
Version 2.0 (R2007a) SimEvents® Software
in the table below. For details, see “Output Switching Based on a Signal”
and the block’s reference page.
For other changes in this release that affect parameters of the Output Switch
block, see “Timeout Feature Establishes Entity Time Limits” on page 36 and
“Changes in Names of Parameters Related to Event Priorities” on page 41.
Compatibility Considerations
In some cases, the block enhancements let you optionally simplify models that
you do not need to share with users of earlier versions:
• If your model precedes an Output Switch block with a Signal Latch block
to create an initial condition for the p signal, and if the p signal does
not branch to become an input for another block, then you can remove
39
SimEvents® Release Notes
the Signal Latch block and instead use the new Specify initial port
selection option in the switch block.
• If your model precedes an Output Switch block with a Single Server block
whose Service time parameter is zero and whose sole purpose was to
ensure an up-to-date p signal, then you can remove the Single Server
block and instead use the new Store entity before switching option
in the switch block.
If you save a model containing an Output Switch block using V2.0 (R2007a),
then opening the model in V1.2 (R2006b) produces warnings like these:
Saving the model in the earlier version prevents the warnings from
reappearing, but causes the block to omit ports and behavior related to the
V2.0 (R2007a) enhancements if you later open the model in V2.0 (R2007a).
In earlier versions, the block sets the value of the attribute but does not
create it.
40
Version 2.0 (R2007a) SimEvents® Software
The table below itemizes the blocks and parameters that have changed.
41
SimEvents® Release Notes
42
Version 2.0 (R2007a) SimEvents® Software
This change merely renames parameters and does not change the behavior of
affected blocks.
Obsolete Blocks
The table below indicates blocks that are obsolete as of the current version or
that are planned to be removed in a future version.
43
SimEvents® Release Notes
44
Version 1.2 (R2006b) SimEvents® Software
Tutorial Demos
• Entity Combiner for Assembling Components
• Task Sharing with Two Levels of Priority and Preemption
• Multitasking with Dependent Tasks
Application Demos
• Go-Back-N Automatic Repeat Request
• Operating System with Prioritized Task Execution
• Ethernet Local Area Network
• Anti-Lock Braking System (ABS) Model
• Anti-Lock Braking System (ABS) Model with Queuing Delay
• Anti-Lock Braking System (ABS) Model Using CAN Communications
To access the new feature, select Specify event priority for function-call
generation (or, in V2.0 (R2007a), select Resolve simultaneous signal
updates according to event priority). Then set the new Function-call
delay from parameter to Signal port t, as shown. Then connect a
nonnegative-valued signal to the t signal input port that appears on the block.
45
SimEvents® Release Notes
Compatibility Considerations
If you save a model containing the Signal-Based Event to Function-Call Event
or Discrete Event Subsystem block using V1.2 (R2006b), then opening the
model in V1.1 (R2006a) produces warnings like these:
Saving the model in the earlier version prevents the warnings from
reappearing, but causes the Signal-Based Event to Function-Call Event block
to omit the t input port if you later open the model in V1.2 (R2006b).
46
Version 1.2 (R2006b) SimEvents® Software
Compatibility Considerations
If you save a model in which one of the blocks listed above has more than four
entity input ports or more than four entity output ports, then the model will
not work in V1.1 (R2006a).
The initial value of an output signal of a SimEvents block is in effect from the
start of the simulation until the block updates the output signal for the first
time during the simulation. For example, if an N-Server block is configured to
produce a #n output signal representing the number of entities in the server,
then #n has a well-defined initial value of 0 at the start of the simulation. The
initial value persists until the first arrival of an entity at the N-Server block,
which could occur well after the start of the simulation, if at all.
The block reference pages indicate the initial values of the block output
signals.
Compatibility Considerations
If you connect the Signal Latch block to a ts, tr, or vc signal input port of a
SimEvents block, the input port might detect an event at the start of the
simulation in V1.1 (R2006a) that no longer occurs in V1.2 (R2006b). This
is because the Signal Latch block assumes its initial condition in a true
initialization stage in V1.2 (R2006b) rather than slightly after the simulation
start in V1.1 (R2006a). If your model relies on an event at the start of the
simulation (to invoke a discrete event subsystem or generate an event or an
entity, for example), then you might see a change in simulation behavior
between the two versions.
For example, the model below uses a Discrete Event Subsystem block to
compute a signal that indicates whether a gate is open or closed.
47
SimEvents® Release Notes
Subsystem Invoked at Simulation Start in V1.1 (R2006a), but Not V1.2 (R2006b)
In V1.1 (R2006a), the Signal Latch block’s output signal has a sample time hit
at the start of the simulation. This sample time hit invokes the subsystem,
which initializes the gate’s en input signal to 1. As a result, the gate is open at
the start of the simulation. In V1.2 (R2006b), the Signal Latch block does not
have a sample time hit at the start of the simulation, so the initial condition
of the subsystem’s outport determines the initial condition of the gate’s en
input signal. As a result, the gate is closed at the start of the simulation.
48
Version 1.2 (R2006b) SimEvents® Software
• Attribute Scope
• Instantaneous Entity Counting Scope
• Instantaneous Event Counting Scope
• Signal Scope
• X-Y Attribute Scope
• X-Y Signal Scope
The parameters determine how much data the blocks cache, letting you
balance data visibility with simulation efficiency. Caching data lets you view
it later, even if the scope is closed during part or all of the simulation. Caching
less or no data accelerates the simulation and uses less memory. In V1.1
(R2006a), if you have the scope closed for the first T seconds of simulation and
then open the scope, you can view only the data for t>T.
49
SimEvents® Release Notes
The scope blocks also plot initial conditions without a plotting marker. In
V1.1 (R2006a), initial conditions typically do not appear in plots.
Compatibility Considerations
If your legacy models contain scope blocks that plot more than 1000 points,
then the default values of the new Store data when scope is closed and
Limit data points to parameters cause the scope to retain only the last
1000 points. To plot all points, set Store data when scope is closed to
Unlimited.
If you save a model containing a scope block using V1.2 (R2006b), then
opening the model in an earlier version produces warnings about the
parameters that are not in the earlier block. For example,
Saving the model in the earlier version prevents the warnings from
reappearing, but also causes the block to use default values for the new
parameters if you later open the model in V1.2 (R2006b).
50
Version 1.2 (R2006b) SimEvents® Software
Compatibility Considerations
The block behaves the same in V1.1 (R2006a) and V1.2 (R2006b) because the
change merely renames parameters. However, the parameter names in V1.2
(R2006b) more accurately reflect the block’s behavior.
Livelock Detection
SimEvents software can detect livelock during a simulation. When it detects
livelock, it halts the simulation with an error message that indicates too
many simultaneous events. In V1.1 (R2006a), livelock can potentially cause
MATLAB software to crash.
Compatibility Considerations
It is possible for the application to consider a situation to be livelock when
it is actually a large but finite loop. Such simulations might work in V1.1
(R2006a) but not in V1.2 (R2006b).
51
SimEvents® Release Notes
New features and changes introduced in this version are described here.
Parameter Description
Replicate entity when Lets you choose whether the
block accepts arriving entities for
replication only when all entity
output ports are not blocked or
whenever at least one entity output
port is not blocked. The first option
is the default.
If an output port becomes Determines how the block responds
blocked during replication if a departure through one entity
output port causes another entity
output port to become blocked.
Number of entities departed Toggles the optional output signal
#d, representing the number of
departed entities.
52
Version 1.1 (R2006a) SimEvents® Software
Compatibility Considerations
By default in V1.1 (R2006a), when a departure through one entity output port
causes another entity output port to become blocked, the result is a discarded
entity with no error or warning message. If this phenomenon occurs in your
legacy models, then the result in V1.0 (R14SP3+) might be an error message
or incorrect behavior. If you want to learn when this phenomenon occurs in
your legacy models that you simulate using V1.1 (R2006a), then set If an
output port becomes blocked during replication to either Warn and
discard entity, or Error.
The default values of the other new parameters added in V1.1 (R2006a) are
consistent with the block’s behavior in V1.0 (R14SP3+), so legacy models need
no changes to accommodate these new features.
If you save a model containing the Replicate block using V1.1 (R2006a),
then opening the model in V1.0 (R14SP3+) produces warnings about the
parameters that are not in the V1.0 block. For example,
Also, simulating that model under V1.0 causes the block to exhibit its V1.0
behavior, which is to omit a #d output signal and to replicate the arriving
entity only when all entity output ports are not blocked. Saving the model
in V1.0 prevents the warnings from reappearing in V1.0 but also causes the
block to exhibit its V1.0 behavior if you later open the model in V1.1.
53
SimEvents® Release Notes
Introduction to SimEvents
SimEvents software extends Simulink software with tools for modeling and
simulating discrete-event systems using queues and servers. With SimEvents
software you can create a discrete-event simulation model to simulate the
passing of entities through a network of queues, servers, gates, and switches
based on events. The software provides an integrated environment for
modeling hybrid dynamic systems containing continuous-time, discrete-time,
and discrete-event components.
• Create entities
• Store entities in a queue
• Serve or delay entities
• Forbid or allow entities to depart, depending on specified criteria
• Manipulate the paths on which entities travel
54
Version 1.0 (R14SP3+) SimEvents® Software
55
SimEvents® Release Notes
56
Compatibility Summary for SimEvents® Software
• “Attributes Support
Multidimensional Values” on
page 35
• “Timeout Feature Establishes
Entity Time Limits” on page 36
• “Output Switch Block Options for
Storage and Initial Condition” on
page 38
57
SimEvents® Release Notes
58