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

Generalize 1D zonotope constraints_list #2146

Merged
merged 6 commits into from
May 1, 2020
Merged

Conversation

schillic
Copy link
Member

@schillic schillic commented May 1, 2020

This fixes a regression uncovered in JuliaReach/MathematicalPredicates.jl#19.

@schillic schillic requested a review from mforets May 1, 2020 08:55
@schillic schillic added the fix 🤕 Fix to a problem that is not too serious label May 1, 2020
@mforets
Copy link
Member

mforets commented May 1, 2020

For the n=1 case, i would try keeping the maximum in absolute value of the first row of the generators matrix. This covers the case with p > 1 and should be cheaper than calling remove_zero_generators (and we can remove the error too).

@schillic
Copy link
Member Author

schillic commented May 1, 2020

For the n=1 case, i would try keeping the maximum in absolute value of the first row of the generators matrix.

I think it should be the sum of the absolute values.

@mforets
Copy link
Member

mforets commented May 1, 2020

Indeed :) it's sum(abs.(x)).

@schillic schillic requested a review from mforets May 1, 2020 13:05
@schillic schillic changed the title Ignore zero generators for 1D zonotope constraints_list Generalize 1D zonotope constraints_list May 1, 2020
test/unit_Zonotope.jl Outdated Show resolved Hide resolved
@schillic schillic added the extension ⬆️ Extension of an existing feature label May 1, 2020
@mforets
Copy link
Member

mforets commented May 1, 2020

this is good to go from my side

@schillic schillic merged commit c6183b9 into master May 1, 2020
@schillic schillic deleted the schillic/zonotope_1d branch May 1, 2020 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension ⬆️ Extension of an existing feature fix 🤕 Fix to a problem that is not too serious
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants