[1] https://reference.wolfram.com/system-modeler/UserGuide/Simul...
[2] https://liu.diva-portal.org/smash/get/diva2:801004/FULLTEXT0...
For instance, even finding a set of consistent initial condition requires the solution of a typically nonconvex nonlinear system of equations, which in turn requires a good initial guess (where domain knowledge is needed -- arbitrary guesses may work but often don't). This is a "solved" problem in a sense that algorithms exist that do this, but anyone who's done numerical work know how hard it is to reliably find the solution of an arbitrary nonlinear system of equations -- there's a significant element of luck involved, even with heuristics.
Formulating good models is an art. Good modelers know to avoid issues with numerical scaling (by changing units of measure, doing log or linear scaling, or simply avoiding computation of certain intermediate quantities) and avoidance of singularities (e.g. instead of x/y = z, a better and equivalent formulation is x = y * z because if y is ever 0 during iteration, one avoids div-by-0 errors). It gets even tougher with hybrid models that have discontinuities (switching behavior), because the integrator needs to do a reinitialization every time a switch is encountered. Most solvers do this well (the integrated system up to that point is usually a good initial guess for the NLE system), but not 100% of the time.
When I was doing this stuff full-time, I've often thought of writing a linter that detected poor formulations and suggested improved ones -- sort of like a spell-checker for mathematical models. I never pursued it.
These days I guess this can be done using a language server that can parse equations and generate ASTs. I'm no longer interested in these problems, but I do wonder if anyone has tried to do something like this.
[1] DAEs take the following (implicit) form:
f(ẋ, x, z, θ) = 0, x(0) = x₀
g(x, z, θ) = 0
where x = differential vars, z = algebraic vars, θ = constants. The form is very general and can be used to model any number of continuous dynamic systems. Hybrid systems can be modeled by introducing discrete variables into the mix.
The "object-oriented" part of Modelica is intended to make creating large scale models manageable. You make it sound like the object-oriented features are some kind of facade behind which all kinds of peril lies. But the peril is always there. And my experience of building such models both using a modeling language vs. creating them by hand is that you can't escape the limitations of contemporary numerical/symbolic methods or singular systems. You are, of course, free to hand code models or manually transform them into state space equations if you think there is some benefit to that in the same way. Perhaps it will make it easier to diagnose singular systems. But speaking entirely for me, I find being able to create acausal models using a modeling language gives me a productivity boost that I'd be unwilling to give up.
One particular issue with the circuit model example in the article, for example, is that when you add switching elements you often end up with disconnected sub-diagrams and then the solver chokes trying to determine what the potential of the floating circuit is, even though it has no effect on anything you care about. So then you have to start adding stray capacitances and stray resistances to make the solver happy, etc.