Products & Services Solutions Academia Support User Community Company

Examples


Use this list to find examples in the documentation.

Working with Signals

Running a Demo Simulation
Building a Simple Hybrid Model
Creating a Random Signal for Switching
Resampling a Signal Based on Events
Sending Queue Length to the Workspace

Queuing Systems

Building a Simple Discrete-Event Model
Event Calendar Usage for a Queue-Server Model
Waiting Time in LIFO Queue
Serving Preferred Customers First
Preemption by High-Priority Entities
M/M/5 Queuing System
Using Servers in Shifts
Varying Queue Capacity Between Runs Using Rapid Simulation

Routing Entities

Selecting the First Available Server
Using an Attribute to Select an Output Port
Round-Robin Approach to Choosing Inputs
A Packet Switch
Cascaded Switches with Skewed Distribution
Compound Switching Logic
Choosing the Shortest Queue

Attributes of Entities

Role of Attributes in SimEvents Models
Setting Attributes
Varying Attribute Values Between Runs Using Rapid Simulation

Counting Entities

Counting Simultaneous Departures from a Server
Resetting a Counter After a Transient Period

Working with Events

Comparing Types of Signal-Based Events
Observing Service Completions
Detecting Collisions by Comparing Events
Opening a Gate Upon Random Events
Counting Events from Multiple Sources
Choices of Values for Event Priorities
Effects of Specifying Event Priorities

Server States

Failure and Repair of a Server
Adding a Warmup Phase

Batching

Varying Fluid Flow Rate Based on Batching Logic

Gates

Controlling Joint Availability of Two Servers
Synchronizing Service Start Times with the Clock
Opening a Gate Upon Entity Departures
First Entity as a Special Case

Timeouts

Basic Example Using Timeouts
Defining Entity Paths on Which Timeouts Apply
Dropped and Timed-Out Packets
Rerouting Timed-Out Entities to Expedite Handling
Limiting the Time Until Service Completion

Discrete Event Subsystems

Comparing the Lengths of Two Queues
Normalizing a Statistic to Use for Routing
Ending the Simulation Upon an Event
Sending Unrepeated Data to the MATLAB Workspace
Focusing on Events, Not Values
Detecting Changes from Empty to Nonempty
Logging Data About the First Entity on a Path
Using Entity-Based Timing for Choosing a Port
Performing a Computation on Selected Entity Paths

Troubleshooting

Plotting Entity Departures to Verify Timing
Plotting Event Counts to Check for Simultaneity
Time-Based Addition of Event-Based Signals
Intergeneration Time of Zero at Simulation Start
Absence of Sample Time Hit at Simulation Start
Faulty Logic in Feedback Loop
Deadlock Resulting from Loop in Entity Path
Invalid Connection of Event-Based Random Number Generator
Sequence of Departures and Statistical Updates
Using a #n Signal as a Trigger

Statistics

Fraction of Dropped Messages
Computing a Time Average of a Signal
Resetting an Average Periodically
Computing an Ensemble Average Using MATLAB Code
Varying the Number of Servers Using MATLAB Code
Computing an Ensemble Average Using Rapid Simulation

Timers

Basic Example Using Timer Blocks
Timing Multiple Entity Paths with One Timer
Restarting a Timer from Zero
Timing Multiple Processes Independently

Rapid Simulation

Computing an Ensemble Average Using Rapid Simulation
Varying Attribute Values Between Runs Using Rapid Simulation
Varying Queue Capacity Between Runs Using Rapid Simulation

Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS