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

Bug: get_incumbent_instance_seed_budget_key_differences does not correctly compute the differences. #956

Closed
jeroenrook opened this issue Apr 3, 2023 · 1 comment
Labels

Comments

@jeroenrook
Copy link
Contributor

Description

get_incumbent_instance_seed_budget_key_differences() in intensifier/abstract_intensifier.py should "return the instances that are not part of the lowest intersection of instances for all incumbents.". This does not happen unfortunately.

Steps/Code to Reproduce

Example code:
incumbent_isb_keys = [[1, 2, 3], [1, 2], [1,2,3]]
incumbent_isb_keys = list(set.difference(*map(set, incumbent_isb_keys)))

Expected Results

incumbent_isb_keys = [3]

Actual Results

incumbent_isb_keys = []

Solution

Pull request will follow shortly after, but replacing the line with
intersection_isb_keys = set.intersection(*map(set, incumbent_isb_keys))
union_isb_keys = set.union(*map(set, incumbent_isb_keys))
incumbent_isb_keys = list(union_isb_keys - intersection_isb_keys)
computes the difference correctly.

@alexandertornede
Copy link
Contributor

Thanks for looking into it and fixing it with PR #957.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants