Use the MATLAB Discrete Event System block to write a custom N-Server from which specific entities can be selected using a key lookup. Passengers enter from the IN port of the block and are
A technique for allocating resources from multiple resource pools. It shows how to choose a pool from which to draw a resource, based on given criteria.
These examples show how you can create MATLAB based custom visualization for entities. The example illustrates the visualization of a restaurant layout with customer entities entering,
Use entity priority to sequence entity departures when multiple entities are available to depart. The example models an airport check-in counter where passengers arrive to be checked in.
Use a MATLAB Discrete Event System block to model a single server that can pause service. The input port IN receives entities to be served. Additionally, the system may receive sporadic pause
Model a single-queue single-server system with a single traffic source and an infinite storage capacity. In the notation, the M stands for Markovian; M/M/1 means that the system has a
Different ways to generate and initialize entities and their attribute values.
Model a single-queue single-server system in which the interarrival time and the service time are uniformly distributed with fixed means of 1.1 and 1, respectively. The queue has an
Have you ever been in a supermarket checkout and wondered why you are in the slowest line? This example shows how queuing systems can be modeled in SimEvents for this type of application. Two
Model a single-queue single-server system that has a Poisson arrival process and a server with constant service time. The queue has an infinite storage capacity. In the notation, the M
A hybrid system with both continuous time and discrete event sections. The discrete event part models tanks, represented by entities, which are being queued and need to be filled up. Each
Use a Discrete-Event Chart block to model a queue-server that can flush entities when it receives a message on the "FlushCmd" port.
How, depending on the workload, a AT90S8535 microcontroller uses a dynamic voltage scaling (DVS) feature to adjust the input voltage. By lowering the input voltage when the workload is low,
The Dining Philosophers problem is a classical problem, originally formulated by E.W. Dijkstra, to demonstrate classical problems in computer science and the programming of concurrent
Model a customer scheduler using the SimEvents MATLAB Discrete-Event System block. The model includes a Scheduler block that can simulate a multicore system with an arbitrary number of
Model the task scheduling of a control application using SimEvents blocks. SimEvents expands Simulink with the capability to model and simulate architectural components of a real-time
Model a central resource that manages distributed processing according to an explicit formula. The example describes a distribution center that manages a series of processes that each job
Model and optimize the use of shared resources in a system, to identify resource deficiencies and improve capacity planning. The example is based on a batch production process, where
Use SimEvents to model a process such as the boarding of an aircraft. The process consists of multiple activities such as "Disembark", "SecurityCheck", "Refueling" etc. Some activities
A production system that uses kanbans to manage production activities. Analysis of simulation results highlights problems in the system and suggests ways to improve its performance.
Model a manufacturing plant. The plant consists of an assembly line that processes jobs based on a pre-determined schedule. This example walks you through a workflow for:
The model of a permanent magnet DC motor. The mode logic and dynamics of the DC motor are both modeled using Stateflow.
This model shows a simple use of Simulink functions in Stateflow. Starting from R2008b, you can use Simulink function call subsystems in Stateflow just like other function objects such as
A model that demonstrates a basic temperature control simulation that allows you to enter the temperatures and the power of the air conditioner that you want to use.
Model a popular toy called "Newton's cradle" which consists of a row of seven identical balls which are hung from a common height. At rest they are arranged such that they just touch each other.
Models an intersection of two 1-way roads controlled by a Stateflow® traffic light system. The Stateflow® chart uses active state outputs and a mask. The behavior of the traffic lights is
The use of flow charts in a Stateflow® C chart to create C statements such as the FOR loop. This particular example shows how you can create a simple FOR Loop that defines an array variable. The
How a WHILE loop and a DO-WHILE can be implemented in Stateflow® in order to create a variable array. The equivalent statements in C-Code are as follows:
This model shows how you can schedule a Simulink algorithm using Stateflow.
This model shows a re-visit of the classic tetris game which has been shipping with Stateflow® to use some of the more modern programming paradigms and features. It shows the use of the
The use of flow charts in Stateflow® to create C or MATLAB® statements such as the IF - ELSE statement. This particular example shows how you can create a simple IF - ELSE statement in Stateflow.
The use of Simulink® and Stateflow® to model a hydraulic servomechanism controlled by a pulse-width modulated (PWM) solenoid. This type of motion control system is used in industrial,
The example shows the ability of Stateflow® to accept matrix input signals from Simulink® and also output matrix signals to Simulink. In this particular example, we are multiplying a [2x2]
This model shows how you can design switching controllers by combining the power of Stateflow and Simulink functions.
The State Transition Matrix view for a simple model of a debouncing logic that uses State Transition Tables in Stateflow® (new in R2012b).
Design a fault detection, isolation, and recovery (FDIR) application for a pair of aircraft elevators with redundant actuators. The fault detection control logic used in this model is the
Use Stateflow® to model a bang-bang control system that regulates the temperature of a boiler. The boiler dynamics are modeled in Simulink® in a boiler plant model.
Model a home alarm system including motion sensors. Like in modern alarm systems, if the system detects an intrusion, it allows a certain (small) time for the alarm to be disabled, otherwise
This model shows the basic semantics of absolute time temporal logic in Stateflow®.
This model shows a method for measuring the frequency response of a continuous time system (plant) using Stateflow®. It illustrates several features of Stateflow® such as the
This model shows how to define continuous time state variables and their derivatives in Stateflow®. The dynamics of a bouncing ball can be defined in terms of two continuous time variables,
The concept of a graphical function and how it can be used to simplify your Stateflow® model. In this example, we pass two inputs in the Stateflow chart. The first input is a sine wave with
The advantage of using the EVERY function to call a graphical function when certain events occur. Notice how complicated it becomes when you try to accomplish the same behavior without the
Model a launch abort system. An aircraft is launched into outer space. If an anomaly or fault occurs during the launch, the operation is aborted, and the aircraft is sent back down to Earth.