-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Collisionhandling of instantanious, depend events #519
Comments
Just copied from my discussion on Slack with @freemin7:
So my suggestion would be to
At a first glance that seems doable, but since I'm not familiar with all details of VectorContinuousCallback it would be good if some other people could comment on this proposal. |
Yes I think we should move it to callback_cache, after all it's supposed to store all that. I also think that we should set the value of |
Since @ChrisRackauckas hasn't commented yet. I assume it is fine by him. I poked him about the proposal. I will look into it but probably still need help as i am not familiar with the inner workings as much. |
Agreed. It would make things cleaner to do per-callback caching, and it would make it easier to maintain.
Agreed: both are good points. For the first, if we are dealing with a whole array of callbacks, then a small array of integers is probably the least of our optimization worries. So these are all good suggestions. I fully trust David and Kanav's opinions here. |
I will look into working on it this weekend but i am still really unsure where to get started. I will poke @kanav99 on Slack. |
Hello, has any further work been done to solve this? I am currently facing this issue for a different system with units that can have simultaneous events (coupled neurons that fire synchronously). Would really appreciate some insight into how to deal with this! Thanks! |
We can have a chat in the JuliaLang Slack. |
Yeah it's not too hard to solve it now. We just need to add a step after the rootfind to find if any other events are within epsilon of the event, and if so... and boom there's the part I don't like. Easy implementation: if so, then allocate an array of indices for the events that coincide. Then extend the So I'm thinking, two dispatches, But honestly it's not hard to implement, so we should just decide and do the easy thing now. A quick way to do this is:
That gets a working version of this out there. Then go downstream and add the cache array, and go do more tests to see if a better definition of "instantaneous" is needed. Thoughts? |
I had a discussion which clarified something. @KalelR s issue is about simultaneous events not working. This should not stop @KalelR from getting simpler solution @ChrisRackauckas proposed before someone implements what is necessary for my case. I see two ways forward:
I encouraged @KalelR to start a second issue about fixing VectorCallback. That way this issue can remain focused on the newly termed GroupedCallback. Thoughts? |
What's the difference between |
Sorry i turned this into a blog entry but i wanted to document all my ideas. For my future sake. Maybe it turns out that all the special cases i imagine In my mind the semantics of
[1] and warn users if the model is ill-defined and have a bunch options to address those issues. Ignoring higher order collisions can be acceptable. Ignoring some classes of rapid collisions can be too. Those tradeoffs could be expressed in the modelling language without having to write a specialized solver for domain X where they are required. Does this demonstrate that they are distinct concepts? |
To help out with some errors in occurring in #515 and to allow handling of proper collisions There is no way to handle this with idx only. A change to VectorCallback or the creation of the new callback is required.
There are still open questions how to do this without allocations and what kind of array to pass.
@kanav99 offered to help me and to figure things out.
The text was updated successfully, but these errors were encountered: