Add a test on name order in SeedCost for Split and Random

This commit is contained in:
Quentin Rendu
2023-12-20 10:29:13 +01:00
parent 56ee3f05a7
commit ae14e72871
2 changed files with 10 additions and 5 deletions

View File

@@ -377,7 +377,9 @@ sealed class BaseSolver(
SPLIT_AND_RANDOM -> {
if ((2 * cla1 < groupSize && 2 * cla2 >= groupSize) || (2 * cla1 >= groupSize && 2 * cla2 < groupSize)) {
val randRange = maxSeedingWeight * 0.2
val rand = detRandom(randRange, p1, p2)
val rand: Double
if (p1.nameSeed() > p2.nameSeed()) {rand = detRandom(randRange, p2, p1)}
else {rand = detRandom(randRange, p1, p2)}
maxSeedingWeight - rand
} else {
0.0