Hacker News new | ask | show | jobs
by choeger 2185 days ago
That's absolutely true. A severe limitation of Modelica's type system is that you cannot constrain your modeling domain to something that is always solvable, or at least analyzable. You cannot, for instance, limit yourself to linear equations. In my opinion it would be the library author's responsibility to constrain the usage of their models in a way that prevents typical modeling errors (as in your example, the switch).
1 comments

But, of course, what is solvable changes and/or is implementation dependent. Modelica doesn't say much on the topic of impulses. In theory, a vendor could support variable index systems along with the ability to resolve impulses. It is a conscious decision not to codify contemporary constraints on solvers/methods into the language. Of course, Sebastien Furic did quite a bit of work along the lines you are describing but he was unable to persuade the group to accept such constraints.