Skip to content

Commit 52ef894

Browse files
authored
Merge pull request #147 from ModiaSim/DiffEqBase-issue
Fix DiffEqBase issue #791
2 parents 1789334 + c1b6a84 commit 52ef894

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/CodeGeneration.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,11 @@ SimulationModel{MonteCarloMeasurements.StaticParticles{T,N}}(args...; kwargs...)
498498

499499
timeType(m::SimulationModel{FloatType,TimeType}) where {FloatType,TimeType} = TimeType
500500

501+
# The following rule is important for DiffEqBase version 6.91.6 and later
502+
# (https://github.com/SciML/DiffEqBase.jl/issues/791)
503+
if Base.isdefined(DiffEqBase, :anyeltypedual)
504+
DiffEqBase.anyeltypedual(::SimulationModel) = Any
505+
end
501506

502507
positive(m::SimulationModel, args...; kwargs...) = Modia.positive!(m.eventHandler, args...; kwargs...)
503508
negative(m::SimulationModel, args...; kwargs...) = Modia.negative!(m.eventHandler, args...; kwargs...)

0 commit comments

Comments
 (0)