-
Notifications
You must be signed in to change notification settings - Fork 44
Description
I discussed this case with @GallLeo some time ago, but I forgot to open a ticket about it. Doing it now. One of his customers has a model of a complicated system where many signals were exchanged through interconnected expandable connectors, representing one single data bus that spans the entire system. The size of the model unexpectedly blew up.
The problem can be formalized as follows: you have
For example, if you have 1000 components with 10 variables each, of which 2 are created on the expandable connector by each model, you have
The corresponding 2,000,000 equations are just a bunch of trivial alias equations. Unfortunately, the Modelica workflow requires to first flatten the model, hence creating the 2 millions variables and alias equations. Then, you have to spend a lot of effort time identifying and removing 2 million alias equations and alias variables. This is really not efficient in terms of memory and time usage and for sure not a scalable solution.
The only way to avoid this quadratic proliferation in the number of connector variables is to add to the system an outer component with an expandable connector, and then to connect the k local variables of each component to the expandable connector of the outer component. Since the outer components are just a pointers and are not instantiated in the model that uses them, the overall system model eventually only gets to have one expandable connector with
This is OK, but is not really very natural or intuitive.
Could there be a way to define expandable connectors that avoids the quadratic explosion of connector variables as the size of the system grows?