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

Weighted versions of properties #67

Closed
DominikPeters opened this issue Mar 25, 2023 · 3 comments
Closed

Weighted versions of properties #67

DominikPeters opened this issue Mar 25, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@DominikPeters
Copy link
Contributor

DominikPeters commented Mar 25, 2023

The current versions of the properties are not right in cases where voters have weights (where for priceability, a voter's initial budget should be proportional to her weight, and for EJR and the like, the coalition needs to have total weight at least ell * total_weight/k). The algorithms should be generalized.

For writing tests, it would be useful to give the Profile class a method named something like convert_to_weighted(), which would combine several voters with the same approval set into a single voter with an appropriate weight. Then in tests, we can test for various instances that check_property(profile, committee) == check_property(profile.convert_to_weighted(), committee). (Alternatively one could keep things immutable and have a function that returns a copy of the profile with voters collapsed.)

@martinlackner
Copy link
Owner

Temporary fix: all relevant methods check whether the profile has unit weights (and throw a NotImplementedError otherwise)

@martinlackner martinlackner added the enhancement New feature or request label Mar 27, 2023
@martinlackner
Copy link
Owner

I have added convert_to_weighted and convert_to_unit_weights methods for Profile.

@martinlackner
Copy link
Owner

Implemented by PR #68

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants