Skip to content
MathWorks - Mobile View
  • Sign In to Your MathWorks AccountSign In to Your MathWorks Account
  • Access your MathWorks Account
    • My Account
    • My Community Profile
    • Link License
    • Sign Out
  • Products
  • Solutions
  • Academia
  • Support
  • Community
  • Events
  • Get MATLAB
MathWorks
  • Products
  • Solutions
  • Academia
  • Support
  • Community
  • Events
  • Get MATLAB
  • Sign In to Your MathWorks AccountSign In to Your MathWorks Account
  • Access your MathWorks Account
    • My Account
    • My Community Profile
    • Link License
    • Sign Out

Videos and Webinars

  • MathWorks
  • Videos
  • Videos Home
  • Search
  • Videos Home
  • Search
  • Contact sales
  • Trial software
4:29 Video length is 4:29.
  • Description
  • Full Transcript
  • Related Resources

Understanding Discrete-Event Simulation, Part 1: What Is Discrete-Event Simulation?

From the series: Understanding Discrete-Event Simulation

Learn the basics of discrete-event simulation, and explore how you can use it to build a process model in this MATLAB® Tech Talk by Will Campbell. Discrete-event simulation is a simple, yet versatile, way of describing a dynamic system. It uses a series of instantaneous occurrences, or discrete events. Using basic concepts like entities, queues, gates, and servers, you can build complex models to explore fundamental questions such as latency, utilization, and bottlenecks.  

Today we’re going to talk about discrete-event simulation, a simple yet versatile way of describing a dynamic system. Simulations rely on a model of a real-world process to imitate time-dependent behavior. The discrete-event approach models a process as a series of instantaneous occurrences, or discrete events. In between these events, the system is approximated as fixed and unchanging.

We can illustrate this concept by developing a model of an elevator. An elevator consists of a shaft, a hoisting mechanism, and a car…each with its own set of sub components. We have to decide which of these details to include in our model. Is it important to know how pushing a button on the car’s control panel affects things like current in the circuit, rotation of the motor, and displacement of the door? Do we need to understand these details millisecond by millisecond? Maybe. Such information would be important if you were using the simulation to design the elevator’s microcontroller software. But if the task at hand were different, if instead we wanted to determine the elevator’s ability to accommodate passenger traffic, then modeling millisecond-level behavior probably isn’t necessary.

So instead, let’s focus on the series of events that describe the elevator’s behavior. We’ll start with the door opening. Once that task completes, passengers enter the elevator and push a button. After that, the doors begin to close, and the elevator starts to move. The car then stops at the desired floor, the doors open, passengers get out, and the door closes again. In between these events, things are continuously changing in the real world. However, a discrete-event simulation would ignore those dynamics and approximate the passengers as being in a fixed state when not experiencing an event. Anything between events is inconsequential, which keeps the model simple and enables us to focus on the information that matters to us: things like transit time, elevator utilization, and passenger throughput.

We can contrast a continuous dynamic simulation with a discrete-event simulation by plotting a hypothetical set of outputs for both. Here we have three lines that represent the positions of the doors and the car’s center of gravity. Any value on the Y axis is acceptable in a continuous representation. But with a discrete-event approach, the Y axis would be comprised of discrete states, and state changes would correspond to discrete events. In this case, the events all occur at different points in time, but there’s nothing precluding multiple events from happening at a single instance. The simulation is really just a schedule of events executed one after the other, and time is only an artifact being tracked behind the scenes. Another way to think about this is to arrange everything onto an event calendar. Some dates will have multiple events while others will have no activity at all.

So here we have but one of many methods for visually expressing a discrete-event simulation of an elevator, one that centers on the passengers’ experience. Passengers are modeled as individual units, or entities, moving through the elevator system. Passengers waiting for the elevator are modeled as entities sitting in queues, a model component that holds the entities until an event permits their departure. In this case, the arrival of the elevator signals that the passengers can move to the next step by opening a gate in the model. Once on the elevator, transit is modeled with what’s known as a server.

The server holds the entities for a prescribed amount of time, which in our case is the time it takes to get to the desired floor.

So with basic concepts like entities, queues, gates, and servers, discrete-event simulations enable us explore fundamental questions about a process. In our case, we can use the simulation to answer how long passengers spend in the elevator, how often the elevator is idle, and which floors demand the most usage. But questions regarding system latency, resource utilization, and bottleneck identification are so ubiquitous that you find discrete-event simulation applied to problems as diverse as bank teller services and communication network traffic. We can delve into such topics another time, but for now, you’ve got the big picture.

Related Products

  • SimEvents
  • Global Optimization Toolbox
  • Optimization Toolbox
  • Simulink
  • Stateflow

3 Ways to Speed Up Model Predictive Controllers

Read white paper

A Practical Guide to Deep Learning: From Data to Deployment

Read ebook

Bridging Wireless Communications Design and Testing with MATLAB

Read white paper

Deep Learning and Traditional Machine Learning: Choosing the Right Approach

Read ebook

Hardware-in-the-Loop Testing for Power Electronics Control Design

Read white paper

Predictive Maintenance with MATLAB

Read ebook

Electric Vehicle Modeling and Simulation - Architecture to Deployment : Webinar Series

Register for Free

How much do you know about power conversion control?

Start quiz

Feedback

Featured Product

SimEvents

  • Request Trial
  • Get Pricing

Up Next:

Learn how discrete-event simulation can help you solve problems related to scheduling, resource allocation, and capacity planning in this MATLAB Tech Talk by Will Campbell.
3:54
Understanding Discrete-Event Simulation, Part 2: Why Use...
View full series (5 Videos)

Related Videos:

43:50
Applications of Discrete Event Simulation in the Aerospace...
2:27
Discrete Event Simulation with SimEvents
44:37
Operations Research and Optimization of Discrete Event...
3:02
Model a Discrete Event System, Part 4: Assigning Attributes
2:26
Model a Discrete Event System, Part 1: Overview

View more related videos

MathWorks - Domain Selector

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

  • Switzerland (English)
  • Switzerland (Deutsch)
  • Switzerland (Français)
  • 中国 (简体中文)
  • 中国 (English)

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文Chinese
    • English
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

  • Contact sales
  • Trial software

MathWorks

Accelerating the pace of engineering and science

MathWorks is the leading developer of mathematical computing software for engineers and scientists.

Discover…

Explore Products

  • MATLAB
  • Simulink
  • Student Software
  • Hardware Support
  • File Exchange

Try or Buy

  • Downloads
  • Trial Software
  • Contact Sales
  • Pricing and Licensing
  • How to Buy

Learn to Use

  • Documentation
  • Tutorials
  • Examples
  • Videos and Webinars
  • Training

Get Support

  • Installation Help
  • MATLAB Answers
  • Consulting
  • License Center
  • Contact Support

About MathWorks

  • Careers
  • Newsroom
  • Social Mission
  • Customer Stories
  • About MathWorks
  • Select a Web Site United States
  • Trust Center
  • Trademarks
  • Privacy Policy
  • Preventing Piracy
  • Application Status

© 1994-2022 The MathWorks, Inc.

  • Facebook
  • Twitter
  • Instagram
  • YouTube
  • LinkedIn
  • RSS

Join the conversation