Changes between Initial Version and Version 2 of Ticket #4871


Ignore:
Timestamp:
2018-04-12T16:43:56Z (7 years ago)
Author:
Francesco Casella
Comment:

See also #3568. In fact, almost a duplicate ticket, except that I added the explicit reference to the generated code in this one.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4871 – Description

    initial v2  
    1919This function needs to compute der(C._v) = -source.i/C.C. The denominator of this expression is a parameter-dependent expression, so it should be checked to be non-zero only once during initialization, and then computed with a plain division during simulation. With the current implementation, the check that it is non-zero is re-done times and again at each f(x,t) evaluation.
    2020
    21 The overhead of this macro in models that have lots of divisions can be substantial: a comparison with the mu-Modelica tool on a simple ODE model, using the same DASSL solver, showed that the slow-down factor can be as high as 6X.
     21The overhead of this macro in models that have lots of divisions can be substantial: a comparison with the mu-Modelica tool on a simple ODE model, using the same DASSL solver, showed that the slow-down factor can be as high as 4X.