5

I have run across issues in developing models where the translation time (simulates quickly but takes far too long to translate) has become a serious issue and could use some insight so I can look into resolving this.

So the question is:

What are some of the primary factors that impact the translation time of a model and ideas to address the issue?

For example, things that may have an impact:

  • for loops vs a vectorized method - a basic model testing this didn't seem to impact anything
  • using input variables vs parameters
  • impact of annotations (e.g., Evaluate=true)
  • or tough luck, this is tool dependent (Dymola, OMEdit, etc.) :(
  • use of many connect() - this seems to be a factor (perhaps primary) as it forces translater to do all the heavy lifting

Any insight is greatly appreciated.

Scott G
  • 2,194
  • 1
  • 14
  • 24
  • 1
    Yes, it is tool dependent. During his PhD, Frenkel published some benchmarks that give some hints. https://modelica.org/events/modelica2011/Proceedings/pages/papers/07_1_ID_183_a_fv.pdf – Lukas Exel Jan 18 '17 at 23:32
  • 1
    The [ScalableTestSuite](https://github.com/casella/ScalableTestSuite) might also be interesting, and the paper describing it: https://dx.doi.org/10.3384/ecp15118459 – matth Jan 19 '17 at 08:14
  • Thank you for both those references. I'll take a look at those for some additional insight. – Scott G Jan 19 '17 at 17:11
  • 2
    Note that it not only depends on the tool - but also the version of the tool. – Hans Olsson Jan 20 '17 at 15:34

1 Answers1

1

Clearly the answer to this question if naturally open ended. There are many things to consider when computation times may be a factor.

For distributed models (e.g., finite difference) the use of simple models and then using connect equations to link them in the appropriate order is not the best way to produce the models. Experience has shown that this method significantly increases the translation time to unbearable lengths. It is better to create distributed models in the same approach that is used the MSL Dynamic pipe (not exactly like it but similar).

Changing the approach as described is significantly faster in translational time (orders of magnitude for larger models, >~100,000 equations) than using connect statements as the number of distributed elements increases to larger numbers. This was tested using Dymola 2017 and 2017FD01.

Some related materials pointed out by others that may be useful for more information have been included below:

Scott G
  • 2,194
  • 1
  • 14
  • 24