From 6f9df0525e9c707c7951f3ed165d63494b1d7949 Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson Date: Fri, 5 Jan 2024 12:32:56 +0100 Subject: [PATCH] format --- src/systems/connectors.jl | 2 +- src/systems/diffeqs/abstractodesystem.jl | 14 +++++++++----- src/systems/jumps/jumpsystem.jl | 2 +- src/utils.jl | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/systems/connectors.jl b/src/systems/connectors.jl index 42ad27fb2b..9c47498ea6 100644 --- a/src/systems/connectors.jl +++ b/src/systems/connectors.jl @@ -410,7 +410,7 @@ end function generate_connection_equations_and_stream_connections(csets::AbstractVector{ <:ConnectionSet, -}) + }) eqs = Equation[] stream_connections = ConnectionSet[] diff --git a/src/systems/diffeqs/abstractodesystem.jl b/src/systems/diffeqs/abstractodesystem.jl index 6df6d6fb09..9999874d35 100644 --- a/src/systems/diffeqs/abstractodesystem.jl +++ b/src/systems/diffeqs/abstractodesystem.jl @@ -892,7 +892,8 @@ function DiffEqBase.ODEProblem{iip, specialize}(sys::AbstractODESystem, u0map = check_length = true, kwargs...) where {iip, specialize} has_difference = any(isdifferenceeq, equations(sys)) - has_difference && error("The operators Difference and DiscreteUpdate are deprecated. Use ShiftIndex instead.") + has_difference && + error("The operators Difference and DiscreteUpdate are deprecated. Use ShiftIndex instead.") f, u0, p = process_DEProblem(ODEFunction{iip, specialize}, sys, u0map, parammap; t = tspan !== nothing ? tspan[1] : tspan, check_length, kwargs...) @@ -955,7 +956,8 @@ function DiffEqBase.DAEProblem{iip}(sys::AbstractODESystem, du0map, u0map, tspan parammap = DiffEqBase.NullParameters(); check_length = true, kwargs...) where {iip} has_difference = any(isdifferenceeq, equations(sys)) - has_difference && error("The operators Difference and DiscreteUpdate are deprecated. Use ShiftIndex instead.") + has_difference && + error("The operators Difference and DiscreteUpdate are deprecated. Use ShiftIndex instead.") f, du0, u0, p = process_DEProblem(DAEFunction{iip}, sys, u0map, parammap; implicit_dae = true, du0map = du0map, check_length, kwargs...) @@ -965,7 +967,7 @@ function DiffEqBase.DAEProblem{iip}(sys::AbstractODESystem, du0map, u0map, tspan kwargs = filter_kwargs(kwargs) DAEProblem{iip}(f, du0, u0, tspan, p; differential_vars = differential_vars, - kwargs...) + kwargs...) end function generate_history(sys::AbstractODESystem, u0; kwargs...) @@ -982,7 +984,8 @@ function DiffEqBase.DDEProblem{iip}(sys::AbstractODESystem, u0map = [], check_length = true, kwargs...) where {iip} has_difference = any(isdifferenceeq, equations(sys)) - has_difference && error("The operators Difference and DiscreteUpdate are deprecated. Use ShiftIndex instead.") + has_difference && + error("The operators Difference and DiscreteUpdate are deprecated. Use ShiftIndex instead.") f, u0, p = process_DEProblem(DDEFunction{iip}, sys, u0map, parammap; t = tspan !== nothing ? tspan[1] : tspan, symbolic_u0 = true, @@ -1035,7 +1038,8 @@ function DiffEqBase.SDDEProblem{iip}(sys::AbstractODESystem, u0map = [], sparsenoise = nothing, kwargs...) where {iip} has_difference = any(isdifferenceeq, equations(sys)) - has_difference && error("The operators Difference and DiscreteUpdate are deprecated. Use ShiftIndex instead.") + has_difference && + error("The operators Difference and DiscreteUpdate are deprecated. Use ShiftIndex instead.") f, u0, p = process_DEProblem(SDDEFunction{iip}, sys, u0map, parammap; t = tspan !== nothing ? tspan[1] : tspan, symbolic_u0 = true, diff --git a/src/systems/jumps/jumpsystem.jl b/src/systems/jumps/jumpsystem.jl index 6fe2b503e1..3633c9c7b3 100644 --- a/src/systems/jumps/jumpsystem.jl +++ b/src/systems/jumps/jumpsystem.jl @@ -492,7 +492,7 @@ function (ratemap::JumpSysMajParamMapper{ U, V, W, -})(params) where {U <: AbstractArray, + })(params) where {U <: AbstractArray, V <: AbstractArray, W} updateparams!(ratemap, params) [convert(W, value(substitute(paramexpr, ratemap.subdict))) diff --git a/src/utils.jl b/src/utils.jl index b08f708339..ea290598c5 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -258,7 +258,7 @@ Throw error when difference/derivative operation occurs in the R.H.S. """ @noinline function throw_invalid_operator(opvar, eq, op::Type) if op === Difference - error("The Difference operator is deprecated, use ShiftIndex instead") + error("The Difference operator is deprecated, use ShiftIndex instead") elseif op === Differential optext = "derivative" end