Skip to content

Commit ac22a7a

Browse files
fix: FMI ME state management callback shouldn't ever trigger or reinitialize
1 parent 3789ce3 commit ac22a7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/MTKFMIExt.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ function MTK.FMIComponent(::Val{Ver}; fmu = nothing, tolerance = 1e-6,
238238
finalize_affect = MTK.FunctionalAffect(fmiFinalize!, [], [wrapper], [])
239239
step_affect = MTK.FunctionalAffect(Returns(nothing), [], [], [])
240240
instance_management_callback = MTK.SymbolicDiscreteCallback(
241-
(t != t - 1), step_affect; finalize = finalize_affect, reinitializealg)
241+
(t == t - 1), step_affect; finalize = finalize_affect, reinitializealg = SciMLBase.NoInit())
242242

243243
push!(params, wrapper)
244244
append!(observed, der_observed)

0 commit comments

Comments
 (0)