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
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
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
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
Use a Discrete-Event Chart block to model a queue-server that can flush entities when it receives a message on the "FlushCmd" port.
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
Open the model to investigate the bicycle assembly line that mathces set of wheels to the corresponding frame for assembly.
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,
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
How stochastic network traffic causes timing latency and uncertainty in an anti-lock braking system (ABS) that uses Control Area Network (CAN) communications. The model is
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
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.
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 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
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:
Model random failures and scheduled maintenance of a machine during regular operation. In the model, the machine can transition between three different states.
Combine Stateflow® with Simulink® to efficiently model hybrid systems. This type of modeling is particularly useful for systems that have numerous possible operational modes based on
Model an automotive drivetrain with Simulink®. Stateflow® enhances the Simulink model with its representation of the transmission control logic. Simulink provides a powerful
Compares the behavior of messages, events, and data in Stateflow®.
Models an intersection of one-way roads controlled using a distributed control system. In order to coordinate the traffic light state between the two charts, the two charts communicate
To use extrinsic functions that are not supported for code generation within a chart that uses MATLAB as the action language, you must use coder.extrinsic. When you declare a function with
A model calling functions across Simulink® and Stateflow®. The slexPrinterExample model has three computer clients sharing a printer. Each computer creates print jobs by calling the
Model an automotive passenger power window system using Model-Based Design with Simulink®, Stateflow®, Fixed-Point Designer™ and DSP System Toolbox™. The Control System design meets a
Interface Simulink® bus signals with a Stateflow® chart. It also demonstrates how to:
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 temporalCount
This model shows how you can design switching controllers by combining the power of Stateflow® and Simulink® functions.
This model shows how you can schedule a Simulink® algorithm using Stateflow®.
The modeling of the Simulink® clutch example using Simulink based states inside a Stateflow® chart. For a detailed explanation of the physical system, see
This continuous-time chart defines two absolute time delays in transitions.
Binding events gives control of a function-call subsystem to a single state in a chart. This control does not work when you allow other events to trigger the function-call subsystem through a
This model shows the use of super step semantics on a Stateflow® chart which allows the chart to repeatedly take all possible transitions from the current state to get to a stable state
Stateflow® local and output data in charts can explicitly inherit properties from Simulink.Signal objects in the model workspace or base workspace. This process is called signal
This model shows a variation of the classic tic-tac-toe game with an interesting twist. Only the last three moves of each player count. Thus the user needs to also account for the order in which
This model triggers a function-call subsystem with a trigger event E that binds to a state of a chart. In the Solver pane of the Model Configuration Parameters dialog box, the model specifies a
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
Models a media player by using string data in two Stateflow® C action language charts. The model plays a clip of music and other pre-recorded sounds. During simulation, the charts use strings
Use custom C code to define constants that apply to all charts in your model.
How Mealy and Moore machines can be used in signal processing applications; in this case, for sequence recognition. In the Moore machine, actions can only be state actions, whereas in the