Simple Equality Equations


Simple equality equations is the traditional kind of equation known from mathematics that expresses an equality relation between two expressions. There are two syntactic forms of such equations in Modelica. The first form is
equality equations between two expressions, whereas the second form is used when calling a function with several results.


1 Function f


2 Example Call of f

Try calling f:



3 EqualityEquations

The first equation in the class EqualityEquations involving the function with two inputs and three results is correct, whereas the second equation is illegal since there are expressions in the left hand side.



4 Simulation of EqualityEquations

Errors after simulation of EqualityEquations are shown below. Since it is illegal to write the code (x+1, 3.0, z/y), the simulation cannot be completed.



$Failed

5 EqualityEquationsCorrect


6 Simulation of EqualityEquationsCorrect