Skip to content

Commit

Permalink
Merge pull request #75 from SciML/as/param-timeseries
Browse files Browse the repository at this point in the history
feat: add `is_parameter_timeseries` trait, improve parameter timeseries indexing
  • Loading branch information
ChrisRackauckas authored Jun 13, 2024
2 parents c9c7b6c + 7b26af0 commit 5d00f2f
Show file tree
Hide file tree
Showing 21 changed files with 2,046 additions and 436 deletions.
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ SafeTestsets = "0.0.1"
StaticArrays = "1.9"
StaticArraysCore = "1.4"
Test = "1"
Zygote = "0.6.67"
julia = "1.10"

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

[targets]
test = ["Aqua", "Pkg", "Test", "SafeTestsets", "StaticArrays"]
test = ["Aqua", "Pkg", "Test", "SafeTestsets", "StaticArrays", "Zygote"]
3 changes: 2 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ makedocs(sitename = "SymbolicIndexingInterface.jl",
format = Documenter.HTML(analytics = "UA-90474609-3",
assets = ["assets/favicon.ico"],
canonical = "https://docs.sciml.ai/SymbolicIndexingInterface/stable/"),
pages = pages)
pages = pages,
checkdocs = :exports)

deploydocs(repo = "github.com/SciML/SymbolicIndexingInterface.jl.git";
push_preview = true)
51 changes: 35 additions & 16 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,39 @@ allvariables

```@docs
observed
parameter_observed
ParameterObservedFunction
```

#### Parameter timeseries

If the index provider contains parameters that change during the course of the simulation
at discrete time points, it must implement the following methods to ensure correct
functioning of [`getu`](@ref) and [`getp`](@ref) for value providers that save the parameter
timeseries. Note that there can be multiple parameter timeseries, in case different parameters
may change at different times.

```@docs
is_timeseries_parameter
timeseries_parameter_index
ParameterTimeseriesIndex
```

## Value provider interface

### State indexing

```@docs
Timeseries
NotTimeseries
is_timeseries
state_values
set_state!
current_time
getu
setu
```

### Parameter indexing

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

```@docs
parameter_timeseries
parameter_values_at_time
parameter_values_at_state_time
```


### State indexing
Parameter timeseries support requires that the value provider store the different
timeseries in a [`ParameterTimeseriesCollection`](@ref).

```@docs
Timeseries
NotTimeseries
is_timeseries
state_values
set_state!
current_time
getu
setu
is_parameter_timeseries
get_parameter_timeseries_collection
ParameterTimeseriesCollection
with_updated_parameter_timeseries_values
```

### Batched Queries and Updates
Expand Down
Loading

0 comments on commit 5d00f2f

Please sign in to comment.