-
Notifications
You must be signed in to change notification settings - Fork 4
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
base: main
Are you sure you want to change the base?
RateSystem #117
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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!)
There was a problem hiding this comment.
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.
We would like to add functionality for Rate dependent forcing functionality and easy system creation of non-autonomous systems