diff options
author | 2020-07-07 17:48:54 +0200 | |
---|---|---|
committer | 2020-07-07 17:48:54 +0200 | |
commit | b13b083b683d28365f4956bae1c6e3e7ac8fab1c (patch) | |
tree | 1701a775a2e18ac83be4b28146069382dd09ddae /Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme | |
parent | Trying to fix performance regressions (diff) | |
download | VIATRA-Generator-b13b083b683d28365f4956bae1c6e3e7ac8fab1c.tar.gz VIATRA-Generator-b13b083b683d28365f4956bae1c6e3e7ac8fab1c.tar.zst VIATRA-Generator-b13b083b683d28365f4956bae1c6e3e7ac8fab1c.zip |
Restore inverse punishSize
Diffstat (limited to 'Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme')
-rw-r--r-- | Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/SolverLoader.xtend | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/SolverLoader.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/SolverLoader.xtend index bc4fa42f..a549df00 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/SolverLoader.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/SolverLoader.xtend | |||
@@ -16,6 +16,7 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePro | |||
16 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.CostObjectiveConfiguration | 16 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.CostObjectiveConfiguration |
17 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.CostObjectiveElementConfiguration | 17 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.CostObjectiveElementConfiguration |
18 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.DiversityDescriptor | 18 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.DiversityDescriptor |
19 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.PunishSizeStrategy | ||
19 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner | 20 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner |
20 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasonerConfiguration | 21 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasonerConfiguration |
21 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.ObjectiveKind | 22 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.ObjectiveKind |
@@ -110,7 +111,12 @@ class SolverLoader { | |||
110 | } | 111 | } |
111 | if (config.containsKey("fitness-punishSize")) { | 112 | if (config.containsKey("fitness-punishSize")) { |
112 | val stringValue = config.get("fitness-punishSize") | 113 | val stringValue = config.get("fitness-punishSize") |
113 | c.punishSize = Boolean.parseBoolean(stringValue) | 114 | c.punishSize = switch (stringValue) { |
115 | case "false": PunishSizeStrategy.NONE | ||
116 | case "true": PunishSizeStrategy.SMALLER_IS_BETTER | ||
117 | case "inverse": PunishSizeStrategy.LARGER_IS_BETTER | ||
118 | default: throw new IllegalArgumentException("Unknown punish size strategy: " + stringValue) | ||
119 | } | ||
114 | } | 120 | } |
115 | if (config.containsKey("fitness-scope")) { | 121 | if (config.containsKey("fitness-scope")) { |
116 | val stringValue = config.get("fitness-scope") | 122 | val stringValue = config.get("fitness-scope") |