aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/run/RunGeneratorConfig.xtend
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/run/RunGeneratorConfig.xtend')
-rw-r--r--Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/run/RunGeneratorConfig.xtend15
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
25import org.apache.commons.cli.Options 25import org.apache.commons.cli.Options
26import org.apache.commons.cli.ParseException 26import org.apache.commons.cli.ParseException
27import org.eclipse.core.runtime.NullProgressMonitor 27import org.eclipse.core.runtime.NullProgressMonitor
28import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigEntry
29import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl.ConfigEntryImpl
30import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.CustomEntry
28 31
29class RunGeneratorConfig { 32class 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