Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Factors that Impact Translation Time

Tags:

modelica

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.

like image 673
Scott G Avatar asked Nov 08 '22 03:11

Scott G


1 Answers

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:

  • https://modelica.org/events/modelica2011/Proceedings/pages/papers/07_1_ID_183_a_fv.pdf
  • Scalable Test Suite : https://dx.doi.org/10.3384/ecp15118459
like image 98
Scott G Avatar answered Dec 01 '22 18:12

Scott G