Skip to content

Commit 9b41d17

Browse files
committed
format
1 parent d5cacb3 commit 9b41d17

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

src/aggregators/coevolve.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function aggregate(aggregator::Coevolve, u, p, t, end_time, constant_jumps,
6161

6262
ncrjs = (constant_jumps === nothing) ? 0 : length(constant_jumps)
6363
nvrjs = (variable_jumps === nothing) ? 0 : length(variable_jumps)
64-
nrjs = ncrjs + nvrjs
64+
nrjs = ncrjs + nvrjs
6565
affects! = Vector{AffectWrapper}(undef, nrjs)
6666
rates = Vector{RateWrapper}(undef, nvrjs)
6767
lrates = similar(rates)

src/jumps.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ struct VariableRateJump{R, F, R2, R3, R4, I, T, T2} <: AbstractJump
156156
end
157157

158158
isbounded(::VariableRateJump) = true
159-
isbounded(::VariableRateJump{R,F,R2,Nothing}) where {R,F,R2} = false
159+
isbounded(::VariableRateJump{R, F, R2, Nothing}) where {R, F, R2} = false
160160
haslrate(::VariableRateJump) = true
161-
haslrate(::VariableRateJump{R, F, Nothing}) where {R,F} = false
161+
haslrate(::VariableRateJump{R, F, Nothing}) where {R, F} = false
162162
nullrate(u, p, t::T) where {T <: Number} = zero(T)
163163

164164
"""
@@ -184,7 +184,8 @@ function VariableRateJump(rate, affect!;
184184
end
185185

186186
if lrate !== nothing
187-
(urate !== nothing) || error("If a lower bound rate, `lrate`, is given than an upper bound rate, `urate`, and rate interval, `rateinterval`, must also be provided.")
187+
(urate !== nothing) ||
188+
error("If a lower bound rate, `lrate`, is given than an upper bound rate, `urate`, and rate interval, `rateinterval`, must also be provided.")
188189
end
189190

190191
VariableRateJump(rate, affect!, lrate, urate, rateinterval, idxs, rootfind,

src/problem.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,14 @@ function JumpProblem(prob, aggregator::AbstractAggregatorAlgorithm, jumps::JumpS
186186
## Spatial jumps handling
187187
if spatial_system !== nothing && hopping_constants !== nothing &&
188188
!is_spatial(aggregator)
189+
(num_crjs(jumps) == num_vrjs(jumps) == 0) ||
190+
error("Spatial aggregators only support MassActionJumps currently.")
189191
prob, maj = flatten(maj, prob, spatial_system, hopping_constants; kwargs...)
190192
end
191193

192194
if is_spatial(aggregator)
193-
(num_crjs(jumps) == num_vrjs(jumps) == 0) || error("Spatial aggregators only support MassActionJumps currently.")
195+
(num_crjs(jumps) == num_vrjs(jumps) == 0) ||
196+
error("Spatial aggregators only support MassActionJumps currently.")
194197
kwargs = merge((; hopping_constants, spatial_system), kwargs)
195198
end
196199

0 commit comments

Comments
 (0)