Skip to content

Commit

Permalink
falttening works with SpatialMassActionJump
Browse files Browse the repository at this point in the history
  • Loading branch information
Vilin97 committed Feb 10, 2022
1 parent 8150047 commit 24d4824
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/problem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ function JumpProblem(prob, aggregator::AbstractAggregatorAlgorithm, jumps::JumpS
## Spatial jumps handling
if spatial_system !== nothing && hopping_constants !== nothing && !is_spatial(aggregator) # check if need to flatten
prob, maj = flatten(maj, prob, spatial_system, hopping_constants; kwargs...)
# TODO check if flattening can work with SpatialMassActionJump
end
## Constant Rate Handling
t,end_time,u = prob.tspan[1],prob.tspan[2],prob.u0
Expand Down
2 changes: 1 addition & 1 deletion test/spatial/ABC.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ grids = [CartesianGridRej(dims), CartesianGridIter(dims), Graphs.grid(dims)]
jump_problems = JumpProblem[JumpProblem(prob, NSM(), spatial_majumps, hopping_constants=hopping_constants, spatial_system = grid, save_positions=(false,false)) for grid in grids]
push!(jump_problems, JumpProblem(prob, DirectCRDirect(), spatial_majumps, hopping_constants=hopping_constants, spatial_system = grids[1], save_positions=(false,false)))
# setup flattenned jump prob
push!(jump_problems, JumpProblem(prob, NRM(), majumps, hopping_constants=hopping_constants, spatial_system = grids[1], save_positions=(false,false)))
push!(jump_problems, JumpProblem(prob, NRM(), spatial_majumps, hopping_constants=hopping_constants, spatial_system = grids[1], save_positions=(false,false)))
# test
for spatial_jump_prob in jump_problems
solution = solve(spatial_jump_prob, SSAStepper())
Expand Down

0 comments on commit 24d4824

Please sign in to comment.