Create an Equivalence Class Set
There are two types of equivalence class sets:
Reusable equivalence class set
A reusable equivalence class set can apply or be shared among different signals (channel, parameters, and measurements) in the same project. For example, you have several signals reading the engine temperature. All signals can share the same hot equivalence class set, so all signals falling within this equivalence class set will be considered to be hot, independently of the signal name and value.
Select View|Declaration Editor. Click Edit Equivalence Class Sets in the Equivalence Class Set section to create and edit reusable equivalence class sets in the Equivalence Class Set Editor, see Figure "Create a reusable equivalence class set".
Select the Equivalence Class Set Editor in this way as well:
- View|Equivalence Class Set Editor
- View|Declaration Editor|Tools|Equivalence Class Set Editor
In the Equivalence Class Set Editor, click Create a new equivalence class set to the left of the toolbar and give the equivalence class set a name. Select this equivalence class set and click Create a new equivalence class to the right of the toolbar. Enter a name, an interval, see Interval setting, and a representative if needed; and set a group name if necessary.
Single-use equivalence class set
A single use equivalence class set can only be linked to one signal (channel, parameter, or measurement). It is created by selecting a signal and selecting <custom> from the Equivalence Class Set drop-down list. You can create and edit single-use equivalence classes only in the Equivalence Class Set section in the Declaration Editor.
Equivalence classes must be of the following form. Consider a and b to be numbers.
- [a,b]: closed interval
Contains all values greater or equal to a and smaller or equal to b[a,b] := { x ∈ R ∣ a ≤ x ≤ b }
- ]a,b[: open interval
Contains all values greater than a and smaller than b]a,b[ := { x ∈ R ∣ a < x < b }
- [a,b[: right open interval
Contains all values greater or equal to a and smaller than b[a,b[ := { x ∈ R ∣ a ≤ x < b }
- ]a,b]: left open interval
Contains all values greater than a and smaller or equal to b]a,b] := { x ∈ R ∣ a < x ≤ b }
Use dtmin
or dtmax
to access the minimum and maximum values of the data type. For example, ]0,dtmax] is an interval that covers all available positive numbers.
Equivalence classes should not overlap. Otherwise, a warning shows up while creating the equivalence class set, see Group Equivalence Classes.
Min, max and random values will always be inside the equivalence class even when the signals are treated with a scaling.