Skip to content

Commit

Permalink
compact checks
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacsas committed Jan 5, 2023
1 parent 640eced commit 32cda2c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/problem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -187,17 +187,14 @@ function JumpProblem(prob, aggregator::AbstractAggregatorAlgorithm, jumps::JumpS
if spatial_system !== nothing && hopping_constants !== nothing
(num_crjs(jumps) == num_vrjs(jumps) == 0) ||
error("Spatial aggregators only support MassActionJumps currently.")
if !is_spatial(aggregator)

if is_spatial(aggregator)
kwargs = merge((; hopping_constants, spatial_system), kwargs)
else
prob, maj = flatten(maj, prob, spatial_system, hopping_constants; kwargs...)
end
end

if is_spatial(aggregator)
(num_crjs(jumps) == num_vrjs(jumps) == 0) ||
error("Spatial aggregators only support MassActionJumps currently.")
kwargs = merge((; hopping_constants, spatial_system), kwargs)
end

ndiscjumps = get_num_majumps(maj) + num_crjs(jumps)

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

0 comments on commit 32cda2c

Please sign in to comment.