Variability and Type Calculation for Equation of Modelica model
Junjie Tang, Jianwan Ding, Liping Chen, Xiong Gong · Linköping electronic conference proceedings · 2011
Differential algebraic equations (DAEs), translated from Modelica model, is usually represented by bipartite graph.One of basic premises of creating bipartite graph is to determine types of variables and equations.Type calculation of Modelica equation has been researched and a serial of rules for variability and type calculation has been concluded in this paper.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.