2

I am running the very same model but with a different number of equations:

  • Case 1. - number of equations < 10000
  • Case 2. and number of equations > 10000

The number of equations is changed by changing the discretization (number of nodes).

  • Case 1. (9974 eq.) - Runs without any problems and simulation is rather quick (total time 18sec).
  • Case 2. ( 10410 eq.) – The simulation time increase drastically ~1h++.

I tried using:

--maxSizeNonlinearTearing=11000 flag by adding it in the “Simulation Setup” -> “Translation Flags” -> “Additional Translation Flag”.

However, the simulation time hasn't changed, it is still extremely long compared to 18sec, which doesn't make sense. So I assume, that the tearing flag didn't work.

In addition, I tried to use two flags at the same time:

--maxSizeNonlinearTearing=11000 --maxSizeLinearTearing=1000”

I separated flags by adding one space as it is indicated in the pop-up window when one hovers over the "Additional Translation Flags". After initiating the simulation I get the message:

"Invalid type of flag maxSizeNonlinearTearing, expected an integer value but got a list of values.."

So most likely I am not using them correctly. I tried to find some information on https://www.openmodelica.org/doc/OpenModelicaUsersGuide/latest/omchelptext.html

but I couldn't find any example. As a non-computer scientist, I think that there is a scarcity of simple, real-life examples.

It would be great if anyone could advise how to deal with OpenModelica flags and models with over 10000 equations.

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Tomillo
  • 157
  • 7
  • I know Francesco Casella has a [suite of scalable test programs](https://github.com/casella/ScalableTestSuite) which can be scaled to many equations - maybe this can help you? – Christoph Nov 13 '19 at 08:08
  • The way you used two translation flags looks correct to me and works in my OMEdit. (Provided you didn't add the stray quote sign " at the end). – AnHeuermann Nov 13 '19 at 11:00
  • @AnHeuermann actually I don't get an error anymore by using these flags. However, the simulation does not speed up and takes ages. I think it is illogical as the first case takes just a few seconds and the difference between the cases in the number of equations is ~800. Just that in the case 2 it is above 10k. – Tomillo Nov 14 '19 at 15:10
  • If you have the latest build, you can try using --tearingMethod=minimalTearing It should speed up the compilation time, but could result in worse simulation time. From my experience compilation time on models with big algebraic loops is worse than simulation time. – kabdelhak Nov 14 '19 at 15:42
  • 1
    Sounds still strange and could be a bug in OpenModelica. Can you share your (or even better a minimal working example) model and open a bug ticket on https://trac.openmodelica.org/OpenModelica/newticket? You can add me or kabdelhak as owner. – AnHeuermann Nov 15 '19 at 10:57
  • Maybe you also want to try `--daeMode`. DAEMode could be beneficial for large models with many nonlinear loops. – kabdelhak Dec 18 '19 at 08:00

0 Answers0