Skip to content

Commit

Permalink
docs: fix the dependency graphs example in the docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
sathvikbhagavan committed Aug 29, 2023
1 parent 01aa166 commit 81166d5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/systems/dependency_graphs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ rate₁ = β * S * I
rate₂ = γ * I + t
affect₁ = [S ~ S - 1, I ~ I + 1]
affect₂ = [I ~ I - 1, R ~ R + 1]
j₁ = ConstantRateJump(rate₁, affect₁)
j₂ = VariableRateJump(rate₂, affect₂)
j₁ = ModelingToolkit.ConstantRateJump(rate₁, affect₁)
j₂ = ModelingToolkit.VariableRateJump(rate₂, affect₂)
# create a JumpSystem using these jumps
@named jumpsys = JumpSystem([j₁, j₂], t, [S, I, R], [β, γ])
Expand Down Expand Up @@ -66,8 +66,8 @@ Example:
Continuing the example started in [`equation_dependencies`](@ref)
```julia
digr = asgraph(equation_dependencies(odesys),
Dict(s => i for (i, s) in enumerate(states(odesys))))
digr = asgraph(equation_dependencies(jumpsys),
Dict(s => i for (i, s) in enumerate(states(jumpsys))))
```
"""
function asgraph(eqdeps, vtois)
Expand Down Expand Up @@ -109,7 +109,7 @@ Example:
Continuing the example started in [`equation_dependencies`](@ref)
```julia
digr = asgraph(odesys)
digr = asgraph(jumpsys)
```
"""
function asgraph(sys::AbstractSystem; variables = states(sys),
Expand All @@ -136,7 +136,7 @@ Example:
Continuing the example of [`equation_dependencies`](@ref)
```julia
variable_dependencies(odesys)
variable_dependencies(jumpsys)
```
"""
function variable_dependencies(sys::AbstractSystem; variables = states(sys),
Expand Down Expand Up @@ -188,7 +188,7 @@ Example:
Continuing the example in [`asgraph`](@ref)
```julia
dg = asdigraph(digr)
dg = asdigraph(digr, jumpsys)
```
"""
function asdigraph(g::BipartiteGraph, sys::AbstractSystem; variables = states(sys),
Expand Down Expand Up @@ -230,7 +230,7 @@ Example:
Continuing the example of `equation_dependencies`
```julia
eqeqdep = eqeq_dependencies(asgraph(odesys), variable_dependencies(odesys))
eqeqdep = eqeq_dependencies(asgraph(jumpsys), variable_dependencies(jumpsys))
```
"""
function eqeq_dependencies(eqdeps::BipartiteGraph{T},
Expand Down Expand Up @@ -269,7 +269,7 @@ Example:
Continuing the example of `equation_dependencies`
```julia
varvardep = varvar_dependencies(asgraph(odesys), variable_dependencies(odesys))
varvardep = varvar_dependencies(asgraph(jumpsys), variable_dependencies(jumpsys))
```
"""
function varvar_dependencies(eqdeps::BipartiteGraph{T},
Expand Down

0 comments on commit 81166d5

Please sign in to comment.