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
The [SIR model](https://en.wikipedia.org/wiki/Compartmental_models_in_epidemiology#The_SIR_model) is the simplest model of the spread of an infectious disease. While the real system is very different from the chemical and cellular processes typically modelled with CRNs, it (and several other epidemiological systems) can be modelled using the same CRN formalism. The SIR model consists of three species: susceptible ($S$), infected ($I$), and removed ($R$) individuals, and two reaction events: infection and recovery.
@@ -160,9 +161,11 @@ jplt1 = plot(jsol1; title = "Outbreak")
In chemistry, [cross-coupling](https://en.wikipedia.org/wiki/Cross-coupling_reaction) is when a catalyst combines two substrates to form a product. In this example, the catalyst ($C$) first binds one substrate ($S₁$) to form an intermediary complex ($S₁C$). Next, the complex binds the second substrate ($S₂$) to form another complex ($CP$). Finally, the catalyst releases the now-formed product ($P$). This system is an extended version of the [Michaelis-Menten system presented earlier](@ref basic_CRN_library_mm).
We get a warning, indicating that the simulation was terminated. Furthermore, the resulting plot ends at $t ≈ 12$, meaning that the simulation was not completed (as the simulation's endpoint is $t = 20$). Indeed, we can confirm this by checking the *return code* of the solution object:
COMPLETENESS_ERROR ="A ReactionSystem must be complete before it can be converted to other system types. A ReactionSystem can be marked as complete using the `complete` function."
452
452
453
+
# Used to, when required, display a warning about conservation law removeal and remake.
error("Attempting to convert a non-autonomous `ReactionSystem` (e.g. where some rate depend on $(get_iv(rs))) to a `NonlinearSystem`. This is not possible. if you are intending to compute system steady states, consider creating and solving a `SteadyStateProblem.")
524
548
end
@@ -589,17 +613,19 @@ Notes:
589
613
- `remove_conserved=false`, if set to `true` will calculate conservation laws of the
590
614
underlying set of reactions (ignoring constraint equations), and then apply them to reduce
591
615
the number of equations.
592
-
- Does not currently support `ReactionSystem`s that include coupled algebraic or
593
-
differential equations.
616
+
- `remove_conserved_warn = true`: If `true`, if also `remove_conserved = true`, there will be
617
+
a warning regarding limitations of modifying problems generated from the created system.
594
618
"""
595
619
function Base.convert(::Type{<:SDESystem}, rs::ReactionSystem;
596
620
name =nameof(rs), combinatoric_ratelaws =get_combinatoric_ratelaws(rs),
0 commit comments