Version:
v11.0
[release notes]

# Module 5.1: Timed and hybrid models

So far, we have used discrete event models, which are also called untimed models. As mentioned in Module 1, continuous-time systems have to be discretized to be able to synthesize a supervisor for them. In a discrete event model, actions that the system can perform, like opening a gate, an elevator moving between floors, or a car breaking until it stands still, are all completed instantaneously. In a real system however, such actions take time. Validation through simulation with a discrete event model is thus not fully representative of the behavior of the real system.

CIF support modeling discrete event systems. However, it also allows modeling systems that exhibit time-related behavior. If a model contains only variables that change their value over time, without any discrete events, we call this a continuous model. If a model has timed behavior as well as discrete events that can occur, we call it a hybrid model. Hybrid models allow us to add timed behavior to a discrete event model, which we can then simulate to validate the controlled system with greater fidelity. That is, if the hybrid model represents the timing of the system accurately enough.

A simple way to add timed behavior to a CIF model is to use the always present `time` variable. Though, as we will see later in this module, this has its shortcomings. A better alternative is typically to use continuous variables, which we will also discuss later in this module. Related to the concept of time is the concept of urgency, which can be used to prevent passage of time. We will also revisit the concepts of deadlock and livelock, given that these notions are affected by adding time to models. And we will discuss the `tau` event, which can be convenient when modeling hybrid models.

## Quiz

[ { type: 'multiple-choice', question: "Which of the following statements are true?", answers: [ "Hybrid models are used for simulation, because a discrete event model can not be simulated.", "A hybrid model can be more realistic than a discrete event model, and therefore prove more valuable for validation.", "A hybrid model can be used for simulation, but not for synthesis.", "Hybrid models have both discrete event and timed behavior.", "Both discrete event and hybrid models can be simulated, but hybrid models more accurately represent the system." ], correctAnswer: '2, 3, 4' } ];