Skip to content

Commit bba4aaf

Browse files
committed
doc tweaks
1 parent 6ceef8d commit bba4aaf

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

docs/src/jump_types.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,11 @@ Note that
223223
`SSAStepper` when using systems with only bounded `VariableRateJump`s and the
224224
`Coevolve` aggregator.
225225
- When choosing a different aggregator than `Coevolve`, `SSAStepper` can not
226-
currently be used, and the `JumpProblem` must be coupled to a continuous
227-
problem type such as an `ODEProblem` to handle time-stepping. The continuous
228-
time-stepper treats *all* `VariableRateJump`s as `ContinuousCallback`s, using
229-
the `rate(u, p, t)` function to construct the `condition` function that
230-
triggers a callback.
226+
currently be used, and the `JumpProblem` must be coupled to a continuous
227+
problem type such as an `ODEProblem` to handle time-stepping. The continuous
228+
time-stepper treats *all* `VariableRateJump`s as `ContinuousCallback`s, using
229+
the `rate(u, p, t)` function to construct the `condition` function that
230+
triggers a callback.
231231

232232

233233
#### Defining a Regular Jump

src/jumps.jl

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ performance charactertistics.
5353
see below. These must calculate a time window over which the rate function is bounded by a
5454
constant. Note that it is ok if the rate bound would be violated within the time interval
5555
due to a change in `u` arising from another `ConstantRateJump`, `MassActionJump` or
56-
*bounded* `VariableRateJump being executed, as the chosen aggregator will then handle
56+
*bounded* `VariableRateJump` being executed, as the chosen aggregator will then handle
5757
recalculating the rate bound and interval. *However, if the bound could be violated within
5858
the time interval due to a change in `u` arising from continuous dynamics such as a
5959
coupled ODE, SDE, or a general `VariableRateJump`, bounds should not be given.* This
@@ -91,9 +91,8 @@ affect!(integrator) = integrator.u[1] -= 1
9191
vrj = VariableRateJump(rate, affect!)
9292
```
9393
94-
In case we want to use the `Coevolve` aggregator, we need to pass the rate boundaries and
95-
interval for which the rates apply. The `Coevolve` aggregator allow us to perform discrete
96-
steps with `SSAStepper()`.
94+
To define a bounded `VariableRateJump` that can be used with supporting aggregators such as
95+
`Coevolve`, we must define bounds and a rate interval:
9796
```julia
9897
rateinterval(u,p,t) = (1 / p[1]) * 2
9998
rate(u,p,t) = t * p[1] * u[1]
@@ -105,14 +104,13 @@ vrj = VariableRateJump(rate, affect!; lrate = lrate, urate = urate,
105104
```
106105
107106
## Notes
108-
- When using the `Coevolve` aggregator, `DiscreteProblem` can be used. Otherwise,
109-
`ODEProblem` or `SDEProblem` must be used to be correctly simulated.
110-
- **When not using the `Coevolve` aggregator, `VariableRateJump`s result in `integrator`s
111-
storing an effective state type that wraps the main state vector.** See
112-
[`ExtendedJumpArray`](@ref) for details on using this object. Note that the presence of
113-
*any* `VariableRateJump`s will result in all `ConstantRateJump`, `VariableRateJump` and
114-
callback `affect!` functions receiving an integrator with `integrator.u` an
115-
[`ExtendedJumpArray`](@ref).
107+
- When using an aggregator that supports bounded `VariableRateJump`s, `DiscreteProblem` can
108+
be used. Otherwise, `ODEProblem` or `SDEProblem` must be used.
109+
- **When not using aggregators that support bounded `VariableRateJump`s, or when there are
110+
general `VariableRateJump`s, `integrator`s store an effective state type that wraps the
111+
main state vector.** See [`ExtendedJumpArray`](@ref) for details on using this object. In
112+
this case all `ConstantRateJump`, `VariableRateJump` and callback `affect!` functions
113+
receive an integrator with `integrator.u` an [`ExtendedJumpArray`](@ref).
116114
- Salis H., Kaznessis Y., Accurate hybrid stochastic simulation of a system of coupled
117115
chemical or biochemical reactions, Journal of Chemical Physics, 122 (5),
118116
DOI:10.1063/1.1835951 is used for calculating jump times with `VariableRateJump`s within

0 commit comments

Comments
 (0)