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

RateSystem #117

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

RateSystem #117

wants to merge 6 commits into from

Conversation

raphael-roemer
Copy link
Collaborator

We would like to add functionality for Rate dependent forcing functionality and easy system creation of non-autonomous systems

src/RateSys.jl Outdated Show resolved Hide resolved
src/RateSys.jl Outdated Show resolved Hide resolved
src/RateSys.jl Outdated Show resolved Hide resolved
src/RateSys.jl Outdated Show resolved Hide resolved
src/RateSys.jl Outdated Show resolved Hide resolved
src/RateSys.jl Outdated Show resolved Hide resolved
src/RateSys.jl Outdated Show resolved Hide resolved
src/RateSys.jl Outdated Show resolved Hide resolved
src/RateSys.jl Outdated Show resolved Hide resolved
src/RateSys.jl Outdated Show resolved Hide resolved
Copy link
Collaborator

@reykboerner reykboerner left a comment

Choose a reason for hiding this comment

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

Thanks a lot for working on this!

I very much like the idea of starting with the general mathematical formulation \dot x = f(x(t), lambda(t)), and have made a suggestion of how this could be reflected more in the way a user would define a RateSystem.

One thing I am unsure about is whether we just need a constructor function RateSystem that returns either a CoupledODEs or CoupledSDEs, or whether we need an additional type in order to pass the necessary information about the rate system to the methods we want to add.

Maybe we can brainstorm the methods we would like to add here and think about whether they work with a CoupledODEs or whether we need more.

src/RateSys.jl Outdated
# t_i autonomous t_ni non-autonomous t_nf autonomous t_f
# | | | |

using DynamicalSystems
Copy link
Collaborator

Choose a reason for hiding this comment

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

It should be sufficient to use DynamicalSystemsBase.

src/RateSys.jl Outdated

# we write

function RateSyst(tni,tnf,f,λ,p_λ,initvals)
Copy link
Collaborator

Choose a reason for hiding this comment

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

In my opinion, these are quite many positional arguments, which makes it less user-friendly. What do you think of reorganising this in the following structure:

RateSystem(ds::ContinuousTimeDynamicalSystem, rate_protocol::function)

where ds can be a CoupledODEs or a CoupledSDEs and rate_protocol is your λ function that determines how the parameters change over time. This function could have the structure

rate_protocol(u, p_lambda, t; t_start=0.0, t_end=Inf, kwargs...)

i.e. it would contain all the input arguments needed to define the rate forcing function. Behind the scenes, this would then create and return a new CoupledODEs or CoupledSDEs with the explicit time dependence specified by rate_protocol.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The naming here is just a suggestion, but generally I think we should give more descriptive names than just lambda or tnf (clarity over brevity!)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This sounds great, thanks Reyk! However, rate_protocol should not depend on u, in my opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants