What Are Partitions?
Partitions are components of a model that execute independently as atomic tasks. In multi-tasking models, partitions are created from model components. Periodic partitions are scheduled as a function of sample times in a model. In export-function models, the root function-call inputs are defined as partitions. These partitions have a schedule associated with it, which tells order in which the partitions execute.
With partitions, you can separate parts of the model which you can explicitly control. You can think of periodic partitions as components that run at specific rates in a model. Aperiodic partitions are components that run at specified hit times. The schedule of these partitions have an impact on simulation and code generation.
The Schedule Editor enables you to partition the model and interact with those partitions. The Schedule Editor shows partitions, the connections between them, and the ordering of the partitions
There are three types of partitions:
| Types of Partitions | Image | Description |
|---|---|---|
| Implicit |
| Automatically created by Simulink®. Blocks running at the base rate show up as an implicit partition. |
| Periodic |
| User-defined partitions from the atomic subsystems and/or Model blocks. Periodic partitions can also be defined by export-functions. These partitions execute based on their sample time and thus their execution is periodic. |
| Aperiodic |
| Aperiodic partitions are partitions which have no constraints and
can be made to execute at any time. Specify the hit times in the
Property Inspector of the Schedule Editor, at which you want to
run the aperiodic partition. You can also use events in the Schedule Editor to
schedule execution of the aperiodic partitions. |
The blocks running at the base rate in the model is shown as an implicit partition in the Schedule Editor. The base rate is the fastest discrete rate in the model. D1 denotes the base rate. D1 annotation also appears in the Timing Legend.
The default partitions that are already present in the model are also implicit partitions.
The partition colors match their rate.