Skip to content

Commit 35f2709

Browse files
Merge pull request #2245 from sathvikbhagavan/sb/fix_dependency_docstrings
docs: fix the dependency graphs example in the docstrings
2 parents 7d0d846 + 81166d5 commit 35f2709

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/systems/dependency_graphs.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ rate₁ = β * S * I
2222
rate₂ = γ * I + t
2323
affect₁ = [S ~ S - 1, I ~ I + 1]
2424
affect₂ = [I ~ I - 1, R ~ R + 1]
25-
j₁ = ConstantRateJump(rate₁, affect₁)
26-
j₂ = VariableRateJump(rate₂, affect₂)
25+
j₁ = ModelingToolkit.ConstantRateJump(rate₁, affect₁)
26+
j₂ = ModelingToolkit.VariableRateJump(rate₂, affect₂)
2727
2828
# create a JumpSystem using these jumps
2929
@named jumpsys = JumpSystem([j₁, j₂], t, [S, I, R], [β, γ])
@@ -66,8 +66,8 @@ Example:
6666
Continuing the example started in [`equation_dependencies`](@ref)
6767
6868
```julia
69-
digr = asgraph(equation_dependencies(odesys),
70-
Dict(s => i for (i, s) in enumerate(states(odesys))))
69+
digr = asgraph(equation_dependencies(jumpsys),
70+
Dict(s => i for (i, s) in enumerate(states(jumpsys))))
7171
```
7272
"""
7373
function asgraph(eqdeps, vtois)
@@ -109,7 +109,7 @@ Example:
109109
Continuing the example started in [`equation_dependencies`](@ref)
110110
111111
```julia
112-
digr = asgraph(odesys)
112+
digr = asgraph(jumpsys)
113113
```
114114
"""
115115
function asgraph(sys::AbstractSystem; variables = states(sys),
@@ -136,7 +136,7 @@ Example:
136136
Continuing the example of [`equation_dependencies`](@ref)
137137
138138
```julia
139-
variable_dependencies(odesys)
139+
variable_dependencies(jumpsys)
140140
```
141141
"""
142142
function variable_dependencies(sys::AbstractSystem; variables = states(sys),
@@ -188,7 +188,7 @@ Example:
188188
Continuing the example in [`asgraph`](@ref)
189189
190190
```julia
191-
dg = asdigraph(digr)
191+
dg = asdigraph(digr, jumpsys)
192192
```
193193
"""
194194
function asdigraph(g::BipartiteGraph, sys::AbstractSystem; variables = states(sys),
@@ -230,7 +230,7 @@ Example:
230230
Continuing the example of `equation_dependencies`
231231
232232
```julia
233-
eqeqdep = eqeq_dependencies(asgraph(odesys), variable_dependencies(odesys))
233+
eqeqdep = eqeq_dependencies(asgraph(jumpsys), variable_dependencies(jumpsys))
234234
```
235235
"""
236236
function eqeq_dependencies(eqdeps::BipartiteGraph{T},
@@ -269,7 +269,7 @@ Example:
269269
Continuing the example of `equation_dependencies`
270270
271271
```julia
272-
varvardep = varvar_dependencies(asgraph(odesys), variable_dependencies(odesys))
272+
varvardep = varvar_dependencies(asgraph(jumpsys), variable_dependencies(jumpsys))
273273
```
274274
"""
275275
function varvar_dependencies(eqdeps::BipartiteGraph{T},

0 commit comments

Comments
 (0)