Merge branch 'pairing2' of gitlab.jeudego.org:tournois/pairgoth into pairing2

This commit is contained in:
Claude Brisson
2023-10-02 10:10:14 +02:00
3 changed files with 997 additions and 997 deletions

View File

@@ -414,7 +414,7 @@ sealed class Solver(
//private val standingScore by lazy { computeStandingScore() }
// Decide each pairable group based on the main criterion
private val groupsCount get() = (mainLimits.second - mainLimits.first).toInt()
private val groupsCount get() = 1 + (mainLimits.second - mainLimits.first).toInt()
private val _groups by lazy {
pairables.associate { pairable -> Pair(pairable.id, pairable.main.toInt()) }
}

View File

@@ -211,6 +211,7 @@ class BasicTests: TestBase() {
// Maps to store name pairs and costs
val map1 = HashMap<Pair<String, String>, List<Double>>()
val map2 = HashMap<Pair<String, String>, List<Double>>()
var count: Int = 1
for (file in listOf(file1, file2)) {
@@ -237,17 +238,16 @@ class BasicTests: TestBase() {
}
// Add to map
if (file == file1) {
if (count == 1) {
map1[Pair(name1, name2)] = costs
} else {
map2[Pair(name1, name2)] = costs
}
}
count += 1
}
}
var diff_found = false
for ((key, value) in map1) {
// Check if key exists in both
@@ -291,7 +291,7 @@ class BasicTests: TestBase() {
logger.info("games for round 1: {}", games_np.toString())
logger.info("Compare weights with itself")
assertTrue(compare_weights("weights.txt", "weights_clone.txt"), "Weights not equal to itselft")
assertTrue(compare_weights("weights.txt", "weights.txt"), "Weights not equal to itselft")
logger.info("Compare weights with opengotha")
assertTrue(compare_weights("weights.txt", "opengotha/simpleswiss_weightsonly_R1.txt"), "Not matching opengotha weights")

File diff suppressed because it is too large Load Diff