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

Omit tiebreak section if tiebreaks don't come up #3

Closed
lordmauve opened this issue Aug 28, 2023 · 3 comments
Closed

Omit tiebreak section if tiebreaks don't come up #3

lordmauve opened this issue Aug 28, 2023 · 3 comments
Assignees

Comments

@lordmauve
Copy link

It would shorten the output if the randomised tiebreak order section was omitted unless that specific case comes up.

@larryhastings
Copy link
Owner

Well, it's a teeny bit complicated. Right now the library just prints out what it's doing as it does it, and the randomized tiebreaker order is calculated (and therefore printed) before it begins computing the election. Maybe it sounds dumb, but, I want to do that before computing the election, so that no part of computing the election can be said to have any effect on the randomized tiebreaker order. On the other hand, this means I don't know whether or not we'll hit a tiebreaker at the time I compute the randomized tiebreaker order.

If I suppress printing the randomized tiebreaker order until such time as we actually need a tiebreaker, but I still wanted to print it in order of when it was done, I'd have to start buffering up output, which sounds complicated.

The cheap solution would be to print the randomized tiebreaker order section in the middle of the output, say, just before printing the results of the tiebreaker. Rest assured, election nerds, I'd still compute it in advance, I just wouldn't print it out unless we actually hit a tiebreaker.

I could make that a selectable feature. Does that work for you?

@larryhastings larryhastings self-assigned this Aug 29, 2023
@larryhastings
Copy link
Owner

I changed the meaning of verbosity. Now, at level 1, the permuted tiebreaker doesn't anything at initialization time. Instead, it prints the same information during the tiebreaker round. If verbosity is 2 or higher it prints at initialization time like it used to.

@larryhastings
Copy link
Owner

Fixed in a395164, released as 2.1.

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

No branches or pull requests

2 participants