You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ext/CatalystGraphMakieExtension/rn_graph_plot.jl
-1Lines changed: 0 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,6 @@ Notes:
76
76
red arrow from `A` to the reaction node. In `k*A, A+B --> C`, there would be
77
77
red and black arrows from `A` to the reaction node.
78
78
"""
79
-
#TODO: update docs for interacting with plots. The `interactive` flag sets the ability to interactively drag nodes and edges in the generated plot. Only allowed if `GLMakie` is the loaded Makie backend.
80
79
function Catalyst.plot_network(rn::ReactionSystem)
throw(ArgumentError("A non-complete `ReactionSystem` was used as input, this is not permitted."))
110
110
end
111
-
if!isempty(MT.get_systems(rs))
112
-
throw(ArgumentError("A non-flattened (hierarchical) `ReactionSystem` was used as input. `LatticeReactionSystem`s can only be based on non-hierarchical `ReactionSystem`s."))
113
-
end
114
111
iflength(reactions(rs)) !=length(equations(rs))
115
112
throw(ArgumentError("The `ReactionSystem` used as input contain equations (in addition to reactions). This is not permitted."))
116
113
end
117
114
iflength(species(rs)) !=length(unknowns(rs))
118
115
throw(ArgumentError("The `ReactionSystem` used as input contain variable unknowns (in addition to species unknowns). This is not permitted (the input `ReactionSystem` must contain species unknowns only)."))
throw(ArgumentError("The `ReactionSystem` used as input to `LatticeReactionSystem contain events. These will be ignored in any simulations based on the created `LatticeReactionSystem`."))
118
+
throw(ArgumentError("The `ReactionSystem` used as input to `LatticeReactionSystem` contain events. These will be ignored in any simulations based on the created `LatticeReactionSystem`."))
@warn"The `ReactionSystem` used as input to `LatticeReactionSystem` was originally created as a hierarchical model. While this won't necessarily result in errors, it has not been well-tested, and is not recommended."
122
122
end
123
123
if!isempty(observed(rs))
124
-
@warn"The `ReactionSystem` used as input to `LatticeReactionSystem contain observables. It will not be possible to access these from the created `LatticeReactionSystem`."
124
+
@warn"The `ReactionSystem` used as input to `LatticeReactionSystem` contain observables. It will not be possible to access these from the created `LatticeReactionSystem`."
125
125
end
126
126
127
-
# Computes the species which are parts of spatial reactions. Also counts the total number of
127
+
# Computes the species which are parts of spatial reactions. Also counts the total number of
128
128
# species types.
129
129
ifisempty(spatial_reactions)
130
130
spat_species = Vector{BasicSymbolic{Real}}[]
@@ -171,7 +171,7 @@ function LatticeReactionSystem(rs, srs, lattice::SimpleGraph)
171
171
LatticeReactionSystem(rs, srs, DiGraph(lattice))
172
172
end
173
173
174
-
# Creates a LatticeReactionSystem from a CartesianGrid lattice (cartesian grid) or a Boolean Array
174
+
# Creates a LatticeReactionSystem from a CartesianGrid lattice (cartesian grid) or a Boolean Array
175
175
# lattice (masked grid). These two are quite similar, so much code can be reused in a single interface.
Copy file name to clipboardExpand all lines: test/spatial_modelling/lattice_reaction_systems.jl
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -248,7 +248,7 @@ end
248
248
@test_logs (:warn, r"The `ReactionSystem` used as input to `LatticeReactionSystem contain observables. It *") match_mode=:anyLatticeReactionSystem(rs4, [tr], short_path)
249
249
end
250
250
251
-
# Tests for hierarchical input system.
251
+
# Tests for hierarchical input system (should yield a warning).
252
252
let
253
253
t =default_t()
254
254
@parameters d D
@@ -257,7 +257,7 @@ let
257
257
@named rs1 =ReactionSystem(rxs, t)
258
258
@named rs2 =ReactionSystem(rxs, t; systems = [rs1])
@test_logs (:warn, r"The `ReactionSystem` used as input to `LatticeReactionSystem` was originally created as a hierarchical model. While *") match_mode=:anyLatticeReactionSystem(rs2, [TransportReaction(D, X)], CartesianGrid((2,2)))
0 commit comments