Skip to content

Commit 42ebdf4

Browse files
committed
accessors to check for given jump types
1 parent 1042481 commit 42ebdf4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/systems/jumps/jumpsystem.jl

+4
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ function JumpSystem(eqs, iv, unknowns, ps;
194194
metadata, gui_metadata, checks = checks)
195195
end
196196

197+
has_massactionjumps(js::JumpSystem) = !isempty(equations(js).x[1])
198+
has_constantratejumps(js::JumpSystem) = !isempty(equations(js).x[2])
199+
has_variableratejumps(js::JumpSystem) = !isempty(equations(js).x[3])
200+
197201
function generate_rate_function(js::JumpSystem, rate)
198202
consts = collect_constants(rate)
199203
if !isempty(consts) # The SymbolicUtils._build_function method of this case doesn't support postprocess_fbody

0 commit comments

Comments
 (0)