The conditional equations associated with an event become active when the condition of the equations switches from the value false and true. There are basically two groups of conditional equation constructs in Modelica: if-equations and when-equations. In the Diode example below different equations are specified.
The if-equation in the ideal diode example below, specifies different equations for the variable v in two different operating regions: the v = s in the region s and the equation v = 0 in the region s >= 0.