diff options
author | 2021-02-16 09:01:25 +0100 | |
---|---|---|
committer | 2021-02-16 09:01:25 +0100 | |
commit | bc403272d867f82edd623179d82c080e57154c1a (patch) | |
tree | 3551ba142ed725595ee684981fc8973cade2ebf4 /Tests/MODELS2020-CaseStudies/case.study.pledge.run/src/run/RunGeneratorConfig.xtend | |
parent | add dreal-timeout flag (diff) | |
download | VIATRA-Generator-bc403272d867f82edd623179d82c080e57154c1a.tar.gz VIATRA-Generator-bc403272d867f82edd623179d82c080e57154c1a.tar.zst VIATRA-Generator-bc403272d867f82edd623179d82c080e57154c1a.zip |
CrossingScenario case study is ready for serverdreal-integration
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.xtend | 18 |
1 files changed, 15 insertions, 3 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 eddb8bb5..78d86504 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 | |||
@@ -39,6 +39,7 @@ class RunGeneratorConfig { | |||
39 | static var RUNTIME = 1500 | 39 | static var RUNTIME = 1500 |
40 | static var NUM_SOLVER = "z3" | 40 | static var NUM_SOLVER = "z3" |
41 | static var DREAL_PATH = "" | 41 | static var DREAL_PATH = "" |
42 | static var DREAL_TIMEOUT = "-2" | ||
42 | // static var SCOPE_PROPAGATOR = "typeHierarchy" | 43 | // static var SCOPE_PROPAGATOR = "typeHierarchy" |
43 | 44 | ||
44 | static var DOMAIN = "FamilyTree" // "FamilyTree", "Satellite", "Taxation" | 45 | static var DOMAIN = "FamilyTree" // "FamilyTree", "Satellite", "Taxation" |
@@ -75,6 +76,9 @@ class RunGeneratorConfig { | |||
75 | val drp = new Option("drp", "drealPath", true, "path to dreal executeable") | 76 | val drp = new Option("drp", "drealPath", true, "path to dreal executeable") |
76 | options.addOption(drp) | 77 | options.addOption(drp) |
77 | 78 | ||
79 | val drto = new Option("drto", "drealTimeout", true, "drealTimeout") | ||
80 | options.addOption(drto) | ||
81 | |||
78 | // val sp = new Option("sp", "scopePropagator", true, "scope Propagator") | 82 | // val sp = new Option("sp", "scopePropagator", true, "scope Propagator") |
79 | // options.addOption(sp) | 83 | // options.addOption(sp) |
80 | // | 84 | // |
@@ -82,7 +86,7 @@ class RunGeneratorConfig { | |||
82 | options.addOption(d) | 86 | options.addOption(d) |
83 | 87 | ||
84 | val hh = new Option("hh", "household", true, "number of households") | 88 | val hh = new Option("hh", "household", true, "number of households") |
85 | options.addOption(hh) | 89 | options.addOption(hh) |
86 | 90 | ||
87 | val CommandLineParser parser = new BasicParser | 91 | val CommandLineParser parser = new BasicParser |
88 | val formatter = new HelpFormatter() | 92 | val formatter = new HelpFormatter() |
@@ -110,6 +114,8 @@ class RunGeneratorConfig { | |||
110 | if(nsIn !== null && nsIn.equals("dreal")) NUM_SOLVER = "dreal-local" | 114 | if(nsIn !== null && nsIn.equals("dreal")) NUM_SOLVER = "dreal-local" |
111 | val drpIn = cmd.getOptionValue("drealPath") | 115 | val drpIn = cmd.getOptionValue("drealPath") |
112 | if(drpIn !== null) DREAL_PATH = drpIn | 116 | if(drpIn !== null) DREAL_PATH = drpIn |
117 | val drtoIn = cmd.getOptionValue("drealTimeout") | ||
118 | if(drtoIn !== null) DREAL_TIMEOUT = drtoIn | ||
113 | // val spIn = cmd.getOptionValue("scopePropagator") | 119 | // val spIn = cmd.getOptionValue("scopePropagator") |
114 | // if(spIn !== null ) SCOPE_PROPAGATOR = spIn | 120 | // if(spIn !== null ) SCOPE_PROPAGATOR = spIn |
115 | val dIn = cmd.getOptionValue("domain") | 121 | val dIn = cmd.getOptionValue("domain") |
@@ -136,14 +142,16 @@ class RunGeneratorConfig { | |||
136 | ", SIZE=" + SIZE_LB + "to" + SIZE_UB + | 142 | ", SIZE=" + SIZE_LB + "to" + SIZE_UB + |
137 | ", Runs=" + RUNS + | 143 | ", Runs=" + RUNS + |
138 | ", ModelsPerRun=" + MODELS + | 144 | ", ModelsPerRun=" + MODELS + |
139 | ", Runtime=" + RUNTIME + ">>") | 145 | ", Runtime=" + RUNTIME + |
146 | ", dreal-timeout=" + DREAL_TIMEOUT + ">>") | ||
140 | if (isTaxation) println("<<Households: " + HOUSEHOLD + ">>") | 147 | if (isTaxation) println("<<Households: " + HOUSEHOLD + ">>") |
141 | 148 | ||
142 | var naming = DOMAIN + "/size" + toStr(SIZE_LB) + "to" + toStr(SIZE_UB) + | 149 | var naming = DOMAIN + "/size" + toStr(SIZE_LB) + "to" + toStr(SIZE_UB) + |
143 | "r" + RUNS + | 150 | "r" + RUNS + |
144 | "n" + MODELS + | 151 | "n" + MODELS + |
145 | "rt" + RUNTIME + | 152 | "rt" + RUNTIME + |
146 | "ns" + NUM_SOLVER | 153 | "ns" + NUM_SOLVER + |
154 | "drto" + DREAL_TIMEOUT | ||
147 | if (isTaxation) naming = naming + "hh" + HOUSEHOLD | 155 | if (isTaxation) naming = naming + "hh" + HOUSEHOLD |
148 | val outputPath = "measurements/" + "models/" + naming + "_" + formattedDate | 156 | val outputPath = "measurements/" + "models/" + naming + "_" + formattedDate |
149 | val debugPath = "measurements/" + "debug/" + naming + "_" + formattedDate | 157 | val debugPath = "measurements/" + "debug/" + naming + "_" + formattedDate |
@@ -211,6 +219,10 @@ class RunGeneratorConfig { | |||
211 | numSolverEntry.value = NUM_SOLVER | 219 | numSolverEntry.value = NUM_SOLVER |
212 | val drealPathEntry = configScope.entries.get(2) as CustomEntry | 220 | val drealPathEntry = configScope.entries.get(2) as CustomEntry |
213 | drealPathEntry.value = DREAL_PATH | 221 | drealPathEntry.value = DREAL_PATH |
222 | if (DREAL_TIMEOUT != "-2") { | ||
223 | val drealTimeoutEntry = configScope.entries.get(3) as CustomEntry | ||
224 | drealTimeoutEntry.value = DREAL_TIMEOUT | ||
225 | } | ||
214 | // val scopePropEntry = configScope.entries.get(3) as CustomEntry | 226 | // val scopePropEntry = configScope.entries.get(3) as CustomEntry |
215 | // scopePropEntry.value = SCOPE_PROPAGATOR | 227 | // scopePropEntry.value = SCOPE_PROPAGATOR |
216 | 228 | ||