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

Create Hybrid Systems #14

Closed
Datseris opened this issue Aug 3, 2017 · 7 comments
Closed

Create Hybrid Systems #14

Datseris opened this issue Aug 3, 2017 · 7 comments

Comments

@Datseris
Copy link
Member

Datseris commented Aug 3, 2017

Hybrid systems are a special type of dynamical system that switches between being continuous and discrete. An example could be the bouncing ball.

It will probably be a tiny bit tricky to implement them, but it has to be made as general as possible.

One need to have 2 equations of motion, one for continuous and one for discrete. Then a callback type function has to be created that will stop the ODE solving of DifferentialEquations and switch to discrete evolution (until some other kind of callback stops or for a specified amount of steps... implementation will show the best way...).

@ChrisRackauckas
Copy link
Member

DifferentialEquations already does hybrid systems through its event handling interface (and the jump problems help here as well). In fact, the bouncing ball is the documentation example: http://docs.juliadiffeq.org/latest/features/callback_functions.html#ContinuousCallback-Examples-1

@Datseris
Copy link
Member Author

Yeap that was exactly what I was looking at when I wrote this issue. The bouncy ball.

One would most likely make a new type, subtype of ContinuousDynamicalSystem that would work exactly like ContiniousDS with simply an extra field called "callback" or something.

The this would allow pretty clear and straight forward communication with DiffEq, since to establish this the only thing necessary is to have a ODEProblem(ds::DynamicalSystem) method.

@ChrisRackauckas
Copy link
Member

Or you just add a callback keyword to your ContiniousDS ?

@Datseris
Copy link
Member Author

So that the field callback would always exist but by default would be initialized in e.g. nothing ? Does the ODE handle nothing? How is the representation of missing callbacks?

@ChrisRackauckas
Copy link
Member

It handles nothing by using no callbacks. That's the default.

@Datseris
Copy link
Member Author

Datseris commented Oct 21, 2017

Yeap. Awesome, this seems like the best idea! To add an extra field to ContinuousDS!

But wait a moment. This does not allow the motion to turn fully discrete until another second callback, right?

I mean, a problem becoming fully discrete, then after some condition becomes continuous again?

@Datseris
Copy link
Member Author

This issue was moved to JuliaDynamics/DynamicalSystemsBase.jl#5

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

No branches or pull requests

2 participants