Equation type is the type of variable that equation can solve. Equation type is calculated in symbolic by both variability and basic type of its sub-expressions. Generally; type calculation is a bottom-up way as expression is represented in form of tree. But; there are kinds of particular expressions; such as integer(); noEvent(); multi-output function call expression; etc; which may cause type and variability incompatible problem. The issue is discussed in the paper; and several rules for variability and type calculation are present. These rules will helps to debug out obscure errors; and several typical examples are present to show how the rules work.
Keywords: Equation type; equation variability; compatibility of variability and type; model debug
Proceedings of the 8th International Modelica Conference; March 20th-22nd; Technical Univeristy; Dresden; Germany
. Peter Bunus; Peter Fritzson. Methods for Structural Analysis and Debugging of Modelica Models. Proceedings of the 2nd International Modelica Conference; 2002; 10: 157~165
. Ding Jianwan. Research on Methods for Consistency Analysis and Reduction of Declarative Simulation Models: [PhD thesis]. China: Huazhong University of Science & Technology; 2006
. David Broman. Types in the Modelica Language. Proceedings of the 5th International Modelica Conference; 2006; 9:303~315
. Modelica Language Specification V3.2. https://www.modelica.org/.
. Peter Fritzson. Principles of Object-Oriented Modeling and Simulation with Modelica 2.1. Wiley-IEEE Press; New York; USA; 2004
. Futong Lv. Numerical Computing Methods; chapter 5. Tsinghua University Press; 2008.