Skip to content

Commit

Permalink
Update time_dependent_parameters.md
Browse files Browse the repository at this point in the history
move `using Catalyst` in docs
  • Loading branch information
TorkelE authored Mar 7, 2025
1 parent b9235fd commit c906855
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/src/model_creation/time_dependent_parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## [Basic example](@id time_dependent_parameters_basic_example)
Let us first consider an easy, quick-start example. We will consider a simple [birth-death model](@ref basic_CRN_library_bd), but where the birth rate is determined by an input parameter (which value depends on time). First, we [define the input parameter programmatically](@ref programmatic_CRN_construction), and its values across all time values using the [DataInterpolations.jl](https://github.com/SciML/DataInterpolations.jl) package. In this example we will use the input function $pIn(t) = (2 + t)/(1 + t)$.
```@example time_dependent_parameters_basic_example
using DataInterpolations
using Catalyst, DataInterpolations
t = default_t()
tend = 10.0
ts = collect(0.0:0.01:tend)
Expand All @@ -13,7 +13,6 @@ nothing # hide
```
Next, we create our model, [interpolating](@ref dsl_advanced_options_symbolics_and_DSL_interpolation) the input parameter into it (making it a function of `t`).
```@example time_dependent_parameters_basic_example
using Catalyst
input = pIn(default_t())
bd_model = @reaction_network begin
$input, 0 --> X
Expand Down

0 comments on commit c906855

Please sign in to comment.