Changes between Initial Version and Version 1 of Ticket #4071


Ignore:
Timestamp:
2016-10-13T18:26:09Z (8 years ago)
Author:
Francesco Casella
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4071 – Description

    initial v1  
    4040end S;
    4141}}}
    42 Model M0 has 10 variables and equations. Model M contains 5 instances of model M0, so it has 50 variables. Model S contains 10000 instances of M, so it has half a million equations. This test case has no physical meaning, but its structure is representative of many large-scale models, which contain large numbers of instances of the same basic models.
     42Model M0 has 10 variables and equations. Model M contains 5 instances of model M0, so it has 50 variables and equations. Model S contains 10000 instances of M, so it has half a million variables and equations. This test case has no physical meaning, but its structure is representative of many large-scale models, which contain large numbers of instances of the same basic models.
    4343
    44 I have run instantiateModel(S) with and without {{{-d=newInst}}} on my i5 4200 @1.6 GHz, using OpenModelica-v1.11.0-dev-127-g043a756-64bit on Windows 10. These are the results
     44I have run {{{instantiateModel(S)}}} with and without {{{-d=newInst}}} on my i5 4200 @1.6 GHz, using OpenModelica-v1.11.0-dev-127-g043a756-64bit on Windows 10. These are the results
    4545||  || Time [s] || Memory [MB] ||
    4646||oldInst|| 120|| 4500||
     
    5151On the other hand, I was hoping for a much more drastic improvement. The performance with newInst is around 20000 equations/s, which seems to me still quite slow, and about 5 kB/equation, which still seems to me an excessive amount of memory. I have tried a test case with half instances in model S, and both time and memory is halved, so it makes sense to compute this kind of average quantities.
    5252
    53 Note that the model doesn't have connections, doesn't use inheritance, and only uses basic Real types. At the end of the day is just re-instantiating the same model over and over again.
     53Note that the model doesn't have connections, doesn't use inheritance, and only uses basic Real types. At the end of the day, it is just re-instantiating the same model over and over again.
    5454
    55 Q1: are there further optimizations possible, to exploit the repeated instances of the same class
     55Q1: are there further optimizations possible, to exploit the repeated instances of the same class?
    5656
    5757Q2: can you explain the memory usage of 5 kB for each variable/equation?