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

Fix bouncing-ball example #665

Merged
merged 2 commits into from
Oct 7, 2022
Merged

Fix bouncing-ball example #665

merged 2 commits into from
Oct 7, 2022

Conversation

schillic
Copy link
Member

@schillic schillic commented Oct 3, 2022

There is an error when using GLGM06 with hybrid systems because we do not allow to not intersect with the source invariant anymore (nothing is not a valid parameter anymore because of the restriction to AbstractIntersectionMethod)

intersection_method::AbstractIntersectionMethod=HRepIntersection(), # method to take the concrete intersection in discrete transitions

ivp_distributed = _distribute(ivp, WLtype; intersection_method=intersection_method,
check_invariant=check_invariant_initial_states,
intersect_invariant=intersect_invariant_initial_states)

This means that the else branch below is effectively dead code:

if intersection_method != nothing
STwl = setrep(intersection_method)
X0 = _overapproximate(X0, STwl)
else
STwl = ST
end

That lead to the bouncing ball failing because X0 is converted to an HPolytope, which the discretization cannot deal with. One problem is that discretize did not print any error because it just uses the no-op default method. I now changed the code to at least print an error message if the discretization failed.

There is a similar error in faq.md (which is why the last code block here is not executed). But I did not investigate if we still have an algorithm to support a ConvexHullArray.

@schillic schillic changed the title Schillic/bball Fix bouncing-ball example Oct 3, 2022
@schillic schillic requested a review from mforets October 3, 2022 13:26
@schillic schillic mentioned this pull request Oct 3, 2022
@mforets mforets merged commit bdb40b9 into master Oct 7, 2022
@mforets mforets deleted the schillic/bball branch October 7, 2022 13:29
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.

2 participants