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

Randomize Winner on Objective Value Tie #227

Merged
merged 3 commits into from
May 25, 2022
Merged

Randomize Winner on Objective Value Tie #227

merged 3 commits into from
May 25, 2022

Conversation

nlordell
Copy link
Contributor

This PR just randomizes the rated settlements before "stable"-sorting them. This makes it so in case of a tie in the objective value, solvers are treated equally.

Test Plan

CI and Rust compiler.

@nlordell nlordell requested a review from a team as a code owner May 24, 2022 16:51
@codecov-commenter
Copy link

codecov-commenter commented May 24, 2022

Codecov Report

Merging #227 (08e9329) into main (83448ca) will increase coverage by 0.00%.
The diff coverage is 0.00%.

❗ Current head 08e9329 differs from pull request most recent head 29f01bc. Consider uploading reports for the commit 29f01bc to get more accurate results

@@           Coverage Diff           @@
##             main     #227   +/-   ##
=======================================
  Coverage   64.47%   64.48%           
=======================================
  Files         189      189           
  Lines       39051    39053    +2     
=======================================
+ Hits        25177    25182    +5     
+ Misses      13874    13871    -3     

@@ -658,6 +658,10 @@ impl Driver {
self.metrics.settlement_simulation_succeeded(solver.name());
}

// Before sorting, make sure to shuffle the settlements. This is make sure we give
Copy link
Contributor

@MartinquaXD MartinquaXD May 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is making sure we don't give preference...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤣

Unfortunately rustc doesn't check my English grammar and semantics. Maybe Rust edition 2024?

@nlordell nlordell enabled auto-merge (squash) May 25, 2022 11:15
@nlordell nlordell merged commit a3b8f48 into main May 25, 2022
@nlordell nlordell deleted the random-tie-breaker branch May 25, 2022 11:18
@github-actions github-actions bot locked and limited conversation to collaborators May 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants