diff --git a/src/FMI2/sim.jl b/src/FMI2/sim.jl index 09b78f07..a7894b93 100644 --- a/src/FMI2/sim.jl +++ b/src/FMI2/sim.jl @@ -241,7 +241,7 @@ end function fx(c::FMU2Component, dx::AbstractArray{<:Real}, x::AbstractArray{<:Real}, - p::AbstractArray, + p::Tuple, t::Real) c.solution.evals_fx_inplace += 1 @@ -253,7 +253,7 @@ end function fx(c::FMU2Component, x::AbstractArray{<:Real}, - p::AbstractArray, + p::Tuple, t::Real) c.solution.evals_fx_outofplace += 1 @@ -275,7 +275,7 @@ function fmi2SimulateME(c::FMU2Component, tspan::Union{Tuple{Float64, Float64}, end # sets up the ODEProblem for simulating a ME-FMU -function setupODEProblem(c::FMU2Component, x0::AbstractArray{fmi2Real}, tspan::Union{Tuple{Float64, Float64}, Nothing}=nothing; p=[], customFx=nothing) +function setupODEProblem(c::FMU2Component, x0::AbstractArray{fmi2Real}, tspan::Union{Tuple{Float64, Float64}, Nothing}=nothing; p=(), customFx=nothing) if c.fmu.executionConfig.inPlace if customFx === nothing diff --git a/src/FMI3/sim.jl b/src/FMI3/sim.jl index 924b8e7b..c48c4590 100644 --- a/src/FMI3/sim.jl +++ b/src/FMI3/sim.jl @@ -229,7 +229,7 @@ end function fx(c::FMU3Instance, dx::AbstractArray{<:Real}, x::AbstractArray{<:Real}, - p::AbstractArray, + p::Tuple, t::Real) # if isa(t, ForwardDiff.Dual) @@ -657,12 +657,12 @@ function fmi3SimulateME(c::FMU3Instance, t_start::Union{Real, Nothing} = nothing end # sets up the ODEProblem for simulating a ME-FMU -function setupODEProblem(c::FMU3Instance, x0::AbstractArray{fmi3Float64}, t_start::fmi3Float64, t_stop::fmi3Float64; p=[], customFx=nothing) +function setupODEProblem(c::FMU3Instance, x0::AbstractArray{fmi3Float64}, t_start::fmi3Float64, t_stop::fmi3Float64; p=(), customFx=nothing) if customFx === nothing customFx = (dx, x, p, t) -> fx(c, dx, x, p, t) end - p = [] + p = () c.problem = ODEProblem(customFx, x0, (t_start, t_stop), p,) return c.problem