diff --git a/src/systems/diffeqs/odesystem.jl b/src/systems/diffeqs/odesystem.jl index c453625ac3..508cb8cfe5 100644 --- a/src/systems/diffeqs/odesystem.jl +++ b/src/systems/diffeqs/odesystem.jl @@ -163,7 +163,7 @@ struct ODESystem <: AbstractODESystem check_equations(equations(cevents), iv) end if checks == true || (checks & CheckUnits) > 0 - u = __get_unit_type(dvs, ps) + u = __get_unit_type(dvs, ps, iv) check_units(u, deqs) end new(tag, deqs, iv, dvs, ps, tspan, var_to_name, ctrls, observed, tgrad, jac, diff --git a/src/systems/diffeqs/sdesystem.jl b/src/systems/diffeqs/sdesystem.jl index abff555682..5f3f9fb00f 100644 --- a/src/systems/diffeqs/sdesystem.jl +++ b/src/systems/diffeqs/sdesystem.jl @@ -134,7 +134,7 @@ struct SDESystem <: AbstractODESystem check_equations(equations(cevents), iv) end if checks == true || (checks & CheckUnits) > 0 - u = __get_unit_type(dvs, ps) + u = __get_unit_type(dvs, ps, iv) check_units(u, deqs, neqs) end new(tag, deqs, neqs, iv, dvs, ps, tspan, var_to_name, ctrls, observed, tgrad, jac, diff --git a/src/systems/discrete_system/discrete_system.jl b/src/systems/discrete_system/discrete_system.jl index e28076eb97..dedb7bf6b3 100644 --- a/src/systems/discrete_system/discrete_system.jl +++ b/src/systems/discrete_system/discrete_system.jl @@ -103,7 +103,7 @@ struct DiscreteSystem <: AbstractTimeDependentSystem check_parameters(ps, iv) end if checks == true || (checks & CheckUnits) > 0 - u = __get_unit_type(dvs, ps, ctrls) + u = __get_unit_type(dvs, ps, iv, ctrls) check_units(u, discreteEqs) end new(tag, discreteEqs, iv, dvs, ps, tspan, var_to_name, ctrls, observed, name, diff --git a/src/systems/jumps/jumpsystem.jl b/src/systems/jumps/jumpsystem.jl index 7b7061fd61..6fe2b503e1 100644 --- a/src/systems/jumps/jumpsystem.jl +++ b/src/systems/jumps/jumpsystem.jl @@ -112,7 +112,7 @@ struct JumpSystem{U <: ArrayPartition} <: AbstractTimeDependentSystem check_parameters(ps, iv) end if checks == true || (checks & CheckUnits) > 0 - u = __get_unit_type(states, ps) + u = __get_unit_type(states, ps, iv) check_units(u, ap, iv) end new{U}(tag, ap, iv, states, ps, var_to_name, observed, name, systems, defaults,