Skip to content

Commit 4ea88e9

Browse files
committed
up
1 parent 76d27ab commit 4ea88e9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/src/model_creation/dsl_description.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,8 +671,8 @@ sol[:Xtot]
671671
```
672672
similarly, we can plot the values of $Xtot$ and $Ytot$ using
673673
```@example obs1
674-
using plots
675-
plot(sol; idxs=[:Xtot, :Ytot], label=["Total X" "Total Y"])
674+
using Plots
675+
plot(sol; idxs = [rn.Xtot, rn.Ytot], label = ["Total X" "Total Y"])
676676
```
677677

678678
If we only wish to provide a single observable, the `begin ... end` block is note required. E.g., to record only the total amount of $X$ we can use:

docs/src/model_simulation/TOBEREMOVED_advanced_simulations.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,13 @@ has to bundle them together in a `CallbackSet`, here follows one example:
245245
rn = @reaction_network begin
246246
(k,1), X1 <--> X2
247247
end
248-
u0 = [:X1 => 10.0,:X2 => 0.0]
248+
u0 = [:X1 => 10.0, :X2 => 0.0]
249249
tspan = (0.0, 20.0)
250250
p = [:k => 1.0]
251251
oprob = ODEProblem(rn, u0, tspan, p)
252252
253253
ps_cb_1 = PresetTimeCallback([3.0, 7.0], integ -> integ[:X1] += 5.0)
254-
ps_cb_2 = PresetTimeCallback([5.0], integ -> integ[:k] = 5.0)
254+
ps_cb_2 = PresetTimeCallback([5.0], integ -> integ.ps[:k] = 5.0)
255255
256256
sol = solve(deepcopy(oprob), Tsit5(); callback=CallbackSet(ps_cb_1, ps_cb_2))
257257
plot(sol)
@@ -350,7 +350,7 @@ It is possible to use a different noise scaling expression for each reaction. He
350350
```@example ex3
351351
rn_4 = @reaction_network begin
352352
(p, d), 0 <--> X
353-
(p, d), 0 <--> Y, ([noise_scaling=0.0, noise_scaling=0.0])
353+
(p, d), 0 <--> Y, ([noise_scaling=0.0], [noise_scaling=0.0])
354354
end
355355
356356
u0_4 = [:X => 10.0, :Y => 10.0]

0 commit comments

Comments
 (0)