Skip to content

Commit 6ceef8d

Browse files
committed
tutorial bug fix
1 parent e75c34f commit 6ceef8d

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

docs/src/api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ reset_aggregated_jumps!
1515
ConstantRateJump
1616
MassActionJump
1717
VariableRateJump
18+
RegularJump
1819
JumpSet
1920
```
2021

docs/src/tutorials/simple_poisson_process.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -225,16 +225,18 @@ Finally, to efficiently simulate the new jump process we must also specify a
225225
dependency graph. This indicates when a given jump occurs, which jumps in the
226226
system need to have their rates and/or rate bounds recalculated (for example,
227227
due to depending on changed components in `u`). We also assume the convention
228-
that a given jump depends on itself. Since the first (birth) jump modifies the
229-
population size `u[1]`, and the second (death) jump occurs at a rate
230-
proportional to `u[1]`, when the first jump occurs we need to recalculate both
231-
of the rates. In contrast, death does not change `u[1]`, and so the dependencies
232-
of the second (death) jump are only itself. Note that the indices in the graph
233-
correspond to the order in which the jumps appear when the problem is
234-
constructed. The graph below encodes the dependents of the birth and death jumps
235-
respectively
228+
that a given jump depends on itself. Internally, JumpProcesses preserves the
229+
relative ordering of jumps of each distinct type, but always reorders all
230+
`ConstantRateJump`s to appear before any `VariableRateJump`s. As such, the
231+
`ConstantRateJump` representing the death process will have internal index 1,
232+
and our new bounded `VariableRateJump` for birth will have internal index 2.
233+
Since birth modifies the population size `u[1]`, and death occurs at a rate
234+
proportional to `u[1]`, when birth occurs we need to recalculate both of rates.
235+
In contrast, death does not change `u[1]`, and so when death occurs we only need
236+
to recalculate the death rate. The graph below encodes the dependents of the
237+
death (`dep_graph[1]`) and birth (`dep_graph[2]`) jumps respectively
236238
```@example tut1
237-
dep_graph = [[1,2], [2]]
239+
dep_graph = [[1], [1,2]]
238240
```
239241
240242
We can then construct the corresponding problem, passing both jumps to

0 commit comments

Comments
 (0)