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

More efficient membership check in AbstractZonotope #3321

Merged
merged 1 commit into from
May 8, 2023

Conversation

schillic
Copy link
Member

@schillic schillic commented May 7, 2023

The previous implementation added a dummy dimension for optimization. But here we are only interested in feasibility, and zonotopes are always bounded, so that is redundant.
(This also allows to replace some vectors by single instances. They are internally converted to a vector again, but maybe one day we have a more efficient solver bridge.)

# master
julia> @time [1.0, 0.2]  Z
  0.000699 seconds (1.80 k allocations: 65.766 KiB)
false

julia> @time [1.0, 0.1]  Z
  0.000720 seconds (1.80 k allocations: 65.500 KiB)
true

# this PR:
julia> @time [1.0, 0.2]  Z
  0.000492 seconds (1.70 k allocations: 59.750 KiB)
false

julia> @time [1.0, 0.1]  Z
  0.000697 seconds (1.70 k allocations: 59.500 KiB)
true

@schillic schillic marked this pull request as ready for review May 7, 2023 09:29
@schillic schillic merged commit bb1804d into master May 8, 2023
@schillic schillic deleted the schillic/membership_zonotope branch May 8, 2023 04:59
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