diff options
Diffstat (limited to 'Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/app')
2 files changed, 8 insertions, 7 deletions
diff --git a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/app/Main.xtend b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/app/Main.xtend index 2add9f0e..dfde6593 100644 --- a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/app/Main.xtend +++ b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/app/Main.xtend | |||
@@ -18,9 +18,9 @@ import org.eclipse.emf.ecore.EReference | |||
18 | class Main { | 18 | class Main { |
19 | var static Domain d = Domain.Yakindumm; | 19 | var static Domain d = Domain.Yakindumm; |
20 | val static String suffix = '.xmi' | 20 | val static String suffix = '.xmi' |
21 | val static String OUTPUT_FOLDER = "Inputs/yakindumm/human/humanInput100/"; | 21 | val static String OUTPUT_FOLDER = "Inputs/measurement2/yakindu/Alloy/"; |
22 | val static String INPUT_FOLDER = "outputs/Human/"; | 22 | val static String INPUT_FOLDER = "outputs/measurement2/yakindu/Alloy/"; |
23 | val static int NUM_RUNS = 100; | 23 | val static int NUM_RUNS = 1; |
24 | 24 | ||
25 | static class RWInformation{ | 25 | static class RWInformation{ |
26 | public var String inputFolder; | 26 | public var String inputFolder; |
@@ -37,7 +37,6 @@ class Main { | |||
37 | def static void main(String[] args){ | 37 | def static void main(String[] args){ |
38 | //init model | 38 | //init model |
39 | var EPackage metamodel; | 39 | var EPackage metamodel; |
40 | |||
41 | //init viatra engine for the violation checker | 40 | //init viatra engine for the violation checker |
42 | ReteEngine.getClass(); | 41 | ReteEngine.getClass(); |
43 | 42 | ||
diff --git a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/app/PartialInterpretationMetricDistance.xtend b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/app/PartialInterpretationMetricDistance.xtend index 4c9246d1..697b2639 100644 --- a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/app/PartialInterpretationMetricDistance.xtend +++ b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/app/PartialInterpretationMetricDistance.xtend | |||
@@ -162,9 +162,11 @@ class PartialInterpretationMetricDistance { | |||
162 | def double[] calculateFeature(int step, int violations){ | 162 | def double[] calculateFeature(int step, int violations){ |
163 | var features = newDoubleArrayOfSize(2); | 163 | var features = newDoubleArrayOfSize(2); |
164 | //constant term | 164 | //constant term |
165 | features.set(0, 1); | 165 | features.set(0, 1); //a |
166 | features.set(0, Math.sqrt(step) + 30) | 166 | features.set(0, Math.sqrt(step) + 30) // b |
167 | features.set(1, 1.0 / (step + 30) ); | 167 | features.set(1, 1.0 / (step + 30) );// c |
168 | |||
169 | |||
168 | // features.set(2, violations); | 170 | // features.set(2, violations); |
169 | // features.set(3, Math.pow(violations, 2)); | 171 | // features.set(3, Math.pow(violations, 2)); |
170 | 172 | ||