You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function addToResult!(m::SimulationModel{FloatType,TimeType}, x, time, w_invariant...)::Nothing where {FloatType,TimeType}
the result of getDerivatives is called w_invariant and has the type Tuple, which is immutable. So it can be used directly (without deepcopy) in:
test case
instModel.result.n_w_invariant = 149
instModel.nsegments = 1
length(instModel.x_start) = 17
number of result points = 5509
timing
modified
addToResult!
function addToResult!(m::SimulationModel{FloatType,TimeType}, x, time, w_invariant...)::Nothing where {FloatType,TimeType}
the result of
getDerivatives
is calledw_invariant
and has the typeTuple
, which is immutable. So it can be used directly (withoutdeepcopy
) in:timing with modified
addToResult!
time consumption and storage allocation was reduced dramatically
postscript
in previous
Modia
versions (<=0.8.4
) the same approach was used.used versions
Modia version = "0.9.4-dev"
Julia = 1.7.1
The text was updated successfully, but these errors were encountered: