diff options
author | Aren Babikian <aren.babikian@mail.mcgill.ca> | 2021-01-06 07:08:59 +0100 |
---|---|---|
committer | Aren Babikian <aren.babikian@mail.mcgill.ca> | 2021-01-06 07:08:59 +0100 |
commit | 43fcf6e297c4c305eb8f5cf3c91f8e507d440b83 (patch) | |
tree | d4d9b610a46364982fb740309a8c2d6ae1ff899f /Tests/MODELS2020-CaseStudies/case.study.pledge.run/src | |
parent | Merge branch 'dreal-integration' of https://github.com/viatra/VIATRA-Generato... (diff) | |
download | VIATRA-Generator-43fcf6e297c4c305eb8f5cf3c91f8e507d440b83.tar.gz VIATRA-Generator-43fcf6e297c4c305eb8f5cf3c91f8e507d440b83.tar.zst VIATRA-Generator-43fcf6e297c4c305eb8f5cf3c91f8e507d440b83.zip |
prepping measurement setup w/ dreal
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/case.study.pledge.run/src')
-rw-r--r-- | Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/run/RunGeneratorConfig.xtend | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/run/RunGeneratorConfig.xtend b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/run/RunGeneratorConfig.xtend index e4d6fe9f..e1d9b9d9 100644 --- a/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/run/RunGeneratorConfig.xtend +++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/run/RunGeneratorConfig.xtend | |||
@@ -25,6 +25,9 @@ import org.apache.commons.cli.Option | |||
25 | import org.apache.commons.cli.Options | 25 | import org.apache.commons.cli.Options |
26 | import org.apache.commons.cli.ParseException | 26 | import org.apache.commons.cli.ParseException |
27 | import org.eclipse.core.runtime.NullProgressMonitor | 27 | import org.eclipse.core.runtime.NullProgressMonitor |
28 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigEntry | ||
29 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl.ConfigEntryImpl | ||
30 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.CustomEntry | ||
28 | 31 | ||
29 | class RunGeneratorConfig { | 32 | class RunGeneratorConfig { |
30 | static var SIZE_LB = 20 | 33 | static var SIZE_LB = 20 |
@@ -34,6 +37,7 @@ class RunGeneratorConfig { | |||
34 | static var RUNS = 10 | 37 | static var RUNS = 10 |
35 | static var MODELS = 10 | 38 | static var MODELS = 10 |
36 | static var RUNTIME = 1500 | 39 | static var RUNTIME = 1500 |
40 | static var NUM_SOLVER = "z3" | ||
37 | 41 | ||
38 | static var DOMAIN = "FamilyTree" // "FamilyTree", "Satellite", "Taxation" | 42 | static var DOMAIN = "FamilyTree" // "FamilyTree", "Satellite", "Taxation" |
39 | static val QUERIES = true | 43 | static val QUERIES = true |
@@ -62,6 +66,9 @@ class RunGeneratorConfig { | |||
62 | 66 | ||
63 | val rt = new Option("rt", "runtime", true, "runtime limit") | 67 | val rt = new Option("rt", "runtime", true, "runtime limit") |
64 | options.addOption(rt) | 68 | options.addOption(rt) |
69 | |||
70 | val ns = new Option("ns", "numericSolver", true, "what numeric solver to use") | ||
71 | options.addOption(ns) | ||
65 | 72 | ||
66 | val d = new Option("d", "domain", true, "domain") | 73 | val d = new Option("d", "domain", true, "domain") |
67 | options.addOption(d) | 74 | options.addOption(d) |
@@ -91,6 +98,8 @@ class RunGeneratorConfig { | |||
91 | if(nmIn !== null) MODELS = Integer.parseInt(nmIn) | 98 | if(nmIn !== null) MODELS = Integer.parseInt(nmIn) |
92 | val rtIn = cmd.getOptionValue("runtime") | 99 | val rtIn = cmd.getOptionValue("runtime") |
93 | if(rtIn !== null) RUNTIME = Integer.parseInt(rtIn) | 100 | if(rtIn !== null) RUNTIME = Integer.parseInt(rtIn) |
101 | val nsIn = cmd.getOptionValue("numericSolver") | ||
102 | if(nsIn !== null && nsIn.equals("dreal")) NUM_SOLVER = "dreal" | ||
94 | val dIn = cmd.getOptionValue("domain") | 103 | val dIn = cmd.getOptionValue("domain") |
95 | if(dIn !== null) DOMAIN = dIn | 104 | if(dIn !== null) DOMAIN = dIn |
96 | val hhIn = cmd.getOptionValue("household") | 105 | val hhIn = cmd.getOptionValue("household") |
@@ -109,7 +118,7 @@ class RunGeneratorConfig { | |||
109 | // ///////////////////////// | 118 | // ///////////////////////// |
110 | // BEGIN RUN | 119 | // BEGIN RUN |
111 | println( | 120 | println( |
112 | "<<DOMAIN: " + DOMAIN + ", SIZE=" + SIZE_LB + "to" + SIZE_UB + ", Runs=" + RUNS + ", ModelsPerRun=" + | 121 | "<<DOMAIN: " + DOMAIN + ", NumSolver=" + NUM_SOLVER + ", SIZE=" + SIZE_LB + "to" + SIZE_UB + ", Runs=" + RUNS + ", ModelsPerRun=" + |
113 | MODELS + ", Runtime=" + RUNTIME + ">>") | 122 | MODELS + ", Runtime=" + RUNTIME + ">>") |
114 | if (isTaxation) println("<<Households: " + HOUSEHOLD + ">>") | 123 | if (isTaxation) println("<<Households: " + HOUSEHOLD + ">>") |
115 | 124 | ||
@@ -173,10 +182,12 @@ class RunGeneratorConfig { | |||
173 | } | 182 | } |
174 | } | 183 | } |
175 | // workspace.writeModel(config, '''x.xmi''') | 184 | // workspace.writeModel(config, '''x.xmi''') |
176 | // Runtime | 185 | // Config |
177 | val configScope = genTask.config as ConfigSpecification | 186 | val configScope = genTask.config as ConfigSpecification |
178 | val runtimeEntry = configScope.entries.get(0) as RuntimeEntry | 187 | val runtimeEntry = configScope.entries.get(0) as RuntimeEntry |
179 | runtimeEntry.millisecLimit = RUNTIME | 188 | runtimeEntry.millisecLimit = RUNTIME |
189 | val numSolverEntry = configScope.entries.get(1) as CustomEntry | ||
190 | numSolverEntry.value = NUM_SOLVER | ||
180 | 191 | ||
181 | // Output locations | 192 | // Output locations |
182 | val debug = genTask.debugFolder as FileSpecification | 193 | val debug = genTask.debugFolder as FileSpecification |