Skip to content

Commit 5d00f2f

Browse files
Merge pull request #75 from SciML/as/param-timeseries
feat: add `is_parameter_timeseries` trait, improve parameter timeseries indexing
2 parents c9c7b6c + 7b26af0 commit 5d00f2f

21 files changed

+2046
-436
lines changed

Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ SafeTestsets = "0.0.1"
1919
StaticArrays = "1.9"
2020
StaticArraysCore = "1.4"
2121
Test = "1"
22+
Zygote = "0.6.67"
2223
julia = "1.10"
2324

2425
[extras]
@@ -27,6 +28,7 @@ Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
2728
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
2829
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
2930
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
31+
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
3032

3133
[targets]
32-
test = ["Aqua", "Pkg", "Test", "SafeTestsets", "StaticArrays"]
34+
test = ["Aqua", "Pkg", "Test", "SafeTestsets", "StaticArrays", "Zygote"]

docs/make.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ makedocs(sitename = "SymbolicIndexingInterface.jl",
1212
format = Documenter.HTML(analytics = "UA-90474609-3",
1313
assets = ["assets/favicon.ico"],
1414
canonical = "https://docs.sciml.ai/SymbolicIndexingInterface/stable/"),
15-
pages = pages)
15+
pages = pages,
16+
checkdocs = :exports)
1617

1718
deploydocs(repo = "github.com/SciML/SymbolicIndexingInterface.jl.git";
1819
push_preview = true)

docs/src/api.md

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,39 @@ allvariables
3030

3131
```@docs
3232
observed
33+
parameter_observed
34+
ParameterObservedFunction
35+
```
36+
37+
#### Parameter timeseries
38+
39+
If the index provider contains parameters that change during the course of the simulation
40+
at discrete time points, it must implement the following methods to ensure correct
41+
functioning of [`getu`](@ref) and [`getp`](@ref) for value providers that save the parameter
42+
timeseries. Note that there can be multiple parameter timeseries, in case different parameters
43+
may change at different times.
44+
45+
```@docs
46+
is_timeseries_parameter
47+
timeseries_parameter_index
48+
ParameterTimeseriesIndex
3349
```
3450

3551
## Value provider interface
3652

53+
### State indexing
54+
55+
```@docs
56+
Timeseries
57+
NotTimeseries
58+
is_timeseries
59+
state_values
60+
set_state!
61+
current_time
62+
getu
63+
setu
64+
```
65+
3766
### Parameter indexing
3867

3968
```@docs
@@ -51,24 +80,14 @@ If a solution object saves a timeseries of parameter values that are updated dur
5180
simulation (such as by callbacks), it must implement the following methods to ensure
5281
correct functioning of [`getu`](@ref) and [`getp`](@ref).
5382

54-
```@docs
55-
parameter_timeseries
56-
parameter_values_at_time
57-
parameter_values_at_state_time
58-
```
59-
60-
61-
### State indexing
83+
Parameter timeseries support requires that the value provider store the different
84+
timeseries in a [`ParameterTimeseriesCollection`](@ref).
6285

6386
```@docs
64-
Timeseries
65-
NotTimeseries
66-
is_timeseries
67-
state_values
68-
set_state!
69-
current_time
70-
getu
71-
setu
87+
is_parameter_timeseries
88+
get_parameter_timeseries_collection
89+
ParameterTimeseriesCollection
90+
with_updated_parameter_timeseries_values
7291
```
7392

7493
### Batched Queries and Updates

0 commit comments

Comments
 (0)