Opened 7 years ago

#4877 new enhancement

Optionally prune all the equations in a model that are not needed to compute the outputs

Reported by: Francesco Casella Owned by: Willi Braun
Priority: high Milestone: Future
Component: Backend Version:
Keywords: Cc:

Description

In 2011, together with PhD student Vincenzo Manzoni, I proposed a method to prune the dependency graph of the equations in a Modelica model to only keep those equations that are strictly necessary to compute the top-level outputs of a model, see paper Minimal Equation Sets for Output Computation in Object-Oriented Models.

This could be very useful in a number of cases:

  • to speed up the computation of models in FMUs, by eliminating the computation of equations that may be included in the model for monitoring purposes, but that are not required to compute the output
  • to get simplified models very cheap, e.g., if you build a planar MultiBody system models, only put the motion on the plane as output, and evaluate the parameters, it could automatically remove all the equations for decoupled out-of-plane dynamics without the need of explicitly using different models for that purpose. This is particularly useful for systems that have some planar parts, and some full 3D motion mixed up.
  • to automatically remove the computation of unneded thermodynamical properties in thermofluid models with equation-based fluid models

Unfortunately, as far as I understand, nobody has ever tried to implement this in a Modelica tool - at the time, we only tried it out manually on toy models. For me, it would be particularly interesting to see how much this method can help in real-life cases. In fact, it could turn out that in some cases of industrial relevance, you can get a significant speed-up, at practically zero cost for the modeller, as it would only be necessary to declare the top-level interesting outputs.

From what I understand of the development in PR #2349, implementing this additional feature should be rather straightforward, because all the required data structures and graph-analysis algorithms are already there. In a nutshell, it is only necessary to build the dependency graph from the outputs, adding the implicit dependency between each state variable and its corresponding derivative to the explicit dependencies in equations.

Are you interested in this development?

Change History (0)

Note: See TracTickets for help on using tickets.