Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add is_parameter_timeseries trait, improve parameter timeseries indexing #75

Merged
merged 11 commits into from
Jun 13, 2024
Merged
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
Loading