You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/model_simulation/simulation_introduction.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -222,6 +222,17 @@ sol = solve(sprob, STrapezoid(); seed = 12345, abstol = 1e-1, reltol = 1e-1) # h
222
222
plot(sol)
223
223
```
224
224
225
+
### [SDE simulations with fixed time stepping](@id simulation_intro_SDEs_fixed_dt)
226
+
StochasticDiffEq implements SDE solvers with adaptive time stepping. However, when using a non-adaptive solver (or using the `adaptive = false` argument to turn adaptive time stepping off for an adaptive solver) a fixed time step `dt` must be designated. Here we simulate the same `SDEProblem` which we struggled with previously, but using the non-adaptive [`EM`](https://en.wikipedia.org/wiki/Euler%E2%80%93Maruyama_method) solver and a fixed `dt`:
We note that this approach also enables us to successfully simulate the SDE we previously struggled with.
233
+
234
+
Generally, using a smaller fixed `dt` provides a more exact simulation, but also increases simulation runtime.
235
+
225
236
### [Scaling the noise in the chemical Langevin equation](@id simulation_intro_SDEs_noise_saling)
226
237
When using the CLE to generate SDEs from a CRN, it can sometimes be desirable to scale the magnitude of the noise. This can be done by introducing a *noise scaling term*, with each noise term generated by the CLE being multiplied with this term. A noise scaling term can be set using the `@default_noise_scaling` option:
227
238
```@example simulation_intro_sde
@@ -338,9 +349,10 @@ end
338
349
```
339
350
This type of model will generate so called *variable rate jumps*. Simulation of such model is non-trivial (and Catalyst currently lacks a good interface for this). A detailed description of how to carry out jump simulations for models with time-dependant rates can be found [here](https://docs.sciml.ai/JumpProcesses/stable/tutorials/simple_poisson_process/#VariableRateJumps-for-processes-that-are-not-constant-between-jumps).
340
351
352
+
341
353
---
342
354
## [Citation](@id simulation_intro_citation)
343
-
When you simulate Catalyst models in your research, please cite the corresponding paper(s) to support the package authors. For ODE simulations:
355
+
When you simulate Catalyst models in your research, please cite the corresponding paper(s) to support the simulation package authors. For ODE simulations:
0 commit comments