Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/core/dynamicalsystem_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,24 @@ errormsg(ds) = error("Not yet implemented for dynamical system of type $(nameof(

export current_state, initial_state, current_parameters, current_parameter, initial_parameters, isinplace,
current_time, initial_time, successful_step, isdeterministic, isdiscretetime, dynamic_rule,
reinit!, set_state!, set_parameter!, set_parameters!, step!, observe_state, referrenced_sciml_model, named_variables
reinit!, set_state!, set_parameter!, set_parameters!, step!, observe_state, referrenced_sciml_model,
referenced_sciml_prob, named_variables

###########################################################################################
# Symbolic support
###########################################################################################
# Simply extend the `referrenced_sciml_prob` and you have symbolic indexing support!
import SymbolicIndexingInterface
"""
referrenced_sciml_prob(ds::Dynamical system)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
referrenced_sciml_prob(ds::Dynamical system)
referrenced_sciml_prob(ds::DynamicalSystem)


Return `ds.integ.sol.prob` if there is a referenced model.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should say what it returns instead of the field that it returns. Internal fields are not public.

Otherwise return `nothing`.

The same function can be called with the alias `referenced_sciml_prob`.
"""
referrenced_sciml_prob(::DynamicalSystem) = nothing
const referenced_sciml_prob = referrenced_sciml_prob # Alias with correct spelling (exported)

# The rest are all automated!
"""
Expand Down
Loading