Skip to content

Commit 32cda2c

Browse files
committed
compact checks
1 parent 640eced commit 32cda2c

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/problem.jl

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,17 +187,14 @@ function JumpProblem(prob, aggregator::AbstractAggregatorAlgorithm, jumps::JumpS
187187
if spatial_system !== nothing && hopping_constants !== nothing
188188
(num_crjs(jumps) == num_vrjs(jumps) == 0) ||
189189
error("Spatial aggregators only support MassActionJumps currently.")
190-
if !is_spatial(aggregator)
190+
191+
if is_spatial(aggregator)
192+
kwargs = merge((; hopping_constants, spatial_system), kwargs)
193+
else
191194
prob, maj = flatten(maj, prob, spatial_system, hopping_constants; kwargs...)
192195
end
193196
end
194197

195-
if is_spatial(aggregator)
196-
(num_crjs(jumps) == num_vrjs(jumps) == 0) ||
197-
error("Spatial aggregators only support MassActionJumps currently.")
198-
kwargs = merge((; hopping_constants, spatial_system), kwargs)
199-
end
200-
201198
ndiscjumps = get_num_majumps(maj) + num_crjs(jumps)
202199

203200
# separate bounded variable rate jumps *if* the aggregator can use them

0 commit comments

Comments
 (0)