diff options
author | 2020-07-07 15:00:13 +0200 | |
---|---|---|
committer | 2020-07-07 15:00:13 +0200 | |
commit | a7b9a3eef14fc165909d00c65bb6fc1744a8ebd8 (patch) | |
tree | dd816939088926b3009432afa22be0e2a116436f /Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit | |
parent | Add modified VIATRA-DSE version (diff) | |
download | VIATRA-Generator-a7b9a3eef14fc165909d00c65bb6fc1744a8ebd8.tar.gz VIATRA-Generator-a7b9a3eef14fc165909d00c65bb6fc1744a8ebd8.tar.zst VIATRA-Generator-a7b9a3eef14fc165909d00c65bb6fc1744a8ebd8.zip |
Trying to fix performance regressions
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit')
6 files changed, 102 insertions, 24 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend index b9056685..b58033d7 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend | |||
@@ -43,6 +43,7 @@ import org.eclipse.viatra.dse.api.DesignSpaceExplorer | |||
43 | import org.eclipse.viatra.dse.api.DesignSpaceExplorer.DseLoggingLevel | 43 | import org.eclipse.viatra.dse.api.DesignSpaceExplorer.DseLoggingLevel |
44 | import org.eclipse.viatra.dse.solutionstore.SolutionStore | 44 | import org.eclipse.viatra.dse.solutionstore.SolutionStore |
45 | import org.eclipse.viatra.dse.statecode.IStateCoderFactory | 45 | import org.eclipse.viatra.dse.statecode.IStateCoderFactory |
46 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.PunishSizeObjective | ||
46 | 47 | ||
47 | class ViatraReasoner extends LogicReasoner { | 48 | class ViatraReasoner extends LogicReasoner { |
48 | val PartialInterpretationInitialiser initialiser = new PartialInterpretationInitialiser() | 49 | val PartialInterpretationInitialiser initialiser = new PartialInterpretationInitialiser() |
@@ -86,17 +87,24 @@ class ViatraReasoner extends LogicReasoner { | |||
86 | workspace, | 87 | workspace, |
87 | viatraConfig.nameNewElements, | 88 | viatraConfig.nameNewElements, |
88 | viatraConfig.typeInferenceMethod, | 89 | viatraConfig.typeInferenceMethod, |
90 | viatraConfig.calculateObjectCreationCosts, | ||
89 | viatraConfig.scopePropagatorStrategy, | 91 | viatraConfig.scopePropagatorStrategy, |
90 | viatraConfig.hints, | 92 | viatraConfig.hints, |
91 | viatraConfig.documentationLevel | 93 | viatraConfig.documentationLevel |
92 | ) | 94 | ) |
93 | 95 | ||
94 | dse.addObjective(new ModelGenerationCompositeObjective( | 96 | val compositeObjective = new ModelGenerationCompositeObjective( |
95 | basicScopeGlobalConstraint ?: new ScopeObjective, | 97 | basicScopeGlobalConstraint ?: new ScopeObjective, |
96 | method.unfinishedMultiplicities.map[new UnfinishedMultiplicityObjective(it)], | 98 | method.unfinishedMultiplicities.map[new UnfinishedMultiplicityObjective(it)], |
97 | wf2ObjectiveConverter.createCompletenessObjective(method.unfinishedWF), | 99 | wf2ObjectiveConverter.createCompletenessObjective(method.unfinishedWF), |
98 | viatraConfig | 100 | viatraConfig |
99 | )) | 101 | ) |
102 | dse.addObjective(compositeObjective) | ||
103 | if (viatraConfig.punishSize) { | ||
104 | val punishObjective = new PunishSizeObjective | ||
105 | punishObjective.level = compositeObjective.level + 1 | ||
106 | dse.addObjective(punishObjective) | ||
107 | } | ||
100 | 108 | ||
101 | val extremalObjectives = Lists.newArrayListWithExpectedSize(viatraConfig.costObjectives.size) | 109 | val extremalObjectives = Lists.newArrayListWithExpectedSize(viatraConfig.costObjectives.size) |
102 | for (entry : viatraConfig.costObjectives.indexed) { | 110 | for (entry : viatraConfig.costObjectives.indexed) { |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend index e33a2590..a2f6de22 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend | |||
@@ -57,11 +57,12 @@ class ViatraReasonerConfiguration extends LogicSolverConfiguration { | |||
57 | 57 | ||
58 | public var runIntermediateNumericalConsistencyChecks = true | 58 | public var runIntermediateNumericalConsistencyChecks = true |
59 | 59 | ||
60 | public var punishSize = true | 60 | public var punishSize = false |
61 | public var scopeWeight = 2 | 61 | public var scopeWeight = 1 |
62 | public var conaintmentWeight = 1 | 62 | public var conaintmentWeight = 2 |
63 | public var nonContainmentWeight = 1 | 63 | public var nonContainmentWeight = 1 |
64 | public var unfinishedWFWeight = 1 | 64 | public var unfinishedWFWeight = 1 |
65 | public var calculateObjectCreationCosts = false | ||
65 | 66 | ||
66 | public var ScopePropagatorStrategy scopePropagatorStrategy = new ScopePropagatorStrategy.Polyhedral( | 67 | public var ScopePropagatorStrategy scopePropagatorStrategy = new ScopePropagatorStrategy.Polyhedral( |
67 | PolyhedralScopePropagatorConstraints.Relational, PolyhedralScopePropagatorSolver.Clp) | 68 | PolyhedralScopePropagatorConstraints.Relational, PolyhedralScopePropagatorSolver.Clp) |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java index 09575384..a2de1abc 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java | |||
@@ -18,7 +18,6 @@ import java.util.List; | |||
18 | import java.util.PriorityQueue; | 18 | import java.util.PriorityQueue; |
19 | import java.util.Random; | 19 | import java.util.Random; |
20 | 20 | ||
21 | import org.apache.log4j.Level; | ||
22 | import org.apache.log4j.Logger; | 21 | import org.apache.log4j.Logger; |
23 | import org.eclipse.emf.ecore.EObject; | 22 | import org.eclipse.emf.ecore.EObject; |
24 | import org.eclipse.emf.ecore.util.EcoreUtil; | 23 | import org.eclipse.emf.ecore.util.EcoreUtil; |
@@ -29,6 +28,8 @@ import org.eclipse.viatra.dse.objectives.Fitness; | |||
29 | import org.eclipse.viatra.dse.objectives.ObjectiveComparatorHelper; | 28 | import org.eclipse.viatra.dse.objectives.ObjectiveComparatorHelper; |
30 | import org.eclipse.viatra.dse.solutionstore.ISolutionFoundHandler; | 29 | import org.eclipse.viatra.dse.solutionstore.ISolutionFoundHandler; |
31 | import org.eclipse.viatra.dse.solutionstore.SolutionStore; | 30 | import org.eclipse.viatra.dse.solutionstore.SolutionStore; |
31 | import org.eclipse.viatra.query.runtime.api.IPatternMatch; | ||
32 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher; | ||
32 | 33 | ||
33 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel; | 34 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel; |
34 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner; | 35 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner; |
@@ -137,10 +138,9 @@ public class BestFirstStrategyForModelGeneration implements IStrategy { | |||
137 | // ViatraQueryEngine engine = context.getQueryEngine(); | 138 | // ViatraQueryEngine engine = context.getQueryEngine(); |
138 | // matchers = new LinkedList<ViatraQueryMatcher<? extends IPatternMatch>>(); | 139 | // matchers = new LinkedList<ViatraQueryMatcher<? extends IPatternMatch>>(); |
139 | // for(IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> p : this.method.getAllPatterns()) { | 140 | // for(IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> p : this.method.getAllPatterns()) { |
140 | // ViatraQueryMatcher<? extends IPatternMatch> matcher = p.getMatcher(engine); | 141 | // ViatraQueryMatcher<? extends IPatternMatch> matcher = p.getMatcher(engine); |
141 | // matchers.add(matcher); | ||
142 | // } | 142 | // } |
143 | 143 | // | |
144 | final ObjectiveComparatorHelper objectiveComparatorHelper = context.getObjectiveComparatorHelper(); | 144 | final ObjectiveComparatorHelper objectiveComparatorHelper = context.getObjectiveComparatorHelper(); |
145 | this.comparator = new Comparator<TrajectoryWithFitness>() { | 145 | this.comparator = new Comparator<TrajectoryWithFitness>() { |
146 | @Override | 146 | @Override |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend index 481f4ce1..27208cf4 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend | |||
@@ -9,13 +9,13 @@ import java.util.List | |||
9 | import org.eclipse.viatra.dse.base.ThreadContext | 9 | import org.eclipse.viatra.dse.base.ThreadContext |
10 | import org.eclipse.viatra.dse.objectives.Comparators | 10 | import org.eclipse.viatra.dse.objectives.Comparators |
11 | import org.eclipse.viatra.dse.objectives.IObjective | 11 | import org.eclipse.viatra.dse.objectives.IObjective |
12 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PrimitiveElement | ||
12 | 13 | ||
13 | class ModelGenerationCompositeObjective implements IThreeValuedObjective { | 14 | class ModelGenerationCompositeObjective implements IThreeValuedObjective { |
14 | val IObjective scopeObjective | 15 | val IObjective scopeObjective |
15 | val List<UnfinishedMultiplicityObjective> unfinishedMultiplicityObjectives | 16 | val List<UnfinishedMultiplicityObjective> unfinishedMultiplicityObjectives |
16 | val UnfinishedWFObjective unfinishedWFObjective | 17 | val UnfinishedWFObjective unfinishedWFObjective |
17 | var PartialInterpretation model = null | 18 | var PartialInterpretation model = null |
18 | val boolean punishSize | ||
19 | val int scopeWeight | 19 | val int scopeWeight |
20 | val int conaintmentWeight | 20 | val int conaintmentWeight |
21 | val int nonContainmentWeight | 21 | val int nonContainmentWeight |
@@ -28,7 +28,7 @@ class ModelGenerationCompositeObjective implements IThreeValuedObjective { | |||
28 | ViatraReasonerConfiguration configuration) | 28 | ViatraReasonerConfiguration configuration) |
29 | { | 29 | { |
30 | this( | 30 | this( |
31 | scopeObjective, unfinishedMultiplicityObjectives, unfinishedWFObjective, configuration.punishSize, | 31 | scopeObjective, unfinishedMultiplicityObjectives, unfinishedWFObjective, |
32 | configuration.scopeWeight, configuration.conaintmentWeight, configuration.nonContainmentWeight, | 32 | configuration.scopeWeight, configuration.conaintmentWeight, configuration.nonContainmentWeight, |
33 | configuration.unfinishedWFWeight | 33 | configuration.unfinishedWFWeight |
34 | ) | 34 | ) |
@@ -38,13 +38,12 @@ class ModelGenerationCompositeObjective implements IThreeValuedObjective { | |||
38 | IObjective scopeObjective, | 38 | IObjective scopeObjective, |
39 | List<UnfinishedMultiplicityObjective> unfinishedMultiplicityObjectives, | 39 | List<UnfinishedMultiplicityObjective> unfinishedMultiplicityObjectives, |
40 | UnfinishedWFObjective unfinishedWFObjective, | 40 | UnfinishedWFObjective unfinishedWFObjective, |
41 | boolean punishSize, int scopeWeight, int conaintmentWeight, int nonContainmentWeight, int unfinishedWFWeight) | 41 | int scopeWeight, int conaintmentWeight, int nonContainmentWeight, int unfinishedWFWeight) |
42 | { | 42 | { |
43 | this.scopeObjective = scopeObjective | 43 | this.scopeObjective = scopeObjective |
44 | this.unfinishedMultiplicityObjectives = unfinishedMultiplicityObjectives | 44 | this.unfinishedMultiplicityObjectives = unfinishedMultiplicityObjectives |
45 | this.unfinishedWFObjective = unfinishedWFObjective | 45 | this.unfinishedWFObjective = unfinishedWFObjective |
46 | 46 | ||
47 | this.punishSize = punishSize | ||
48 | this.scopeWeight = scopeWeight | 47 | this.scopeWeight = scopeWeight |
49 | this.conaintmentWeight = conaintmentWeight | 48 | this.conaintmentWeight = conaintmentWeight |
50 | this.nonContainmentWeight = nonContainmentWeight | 49 | this.nonContainmentWeight = nonContainmentWeight |
@@ -63,7 +62,7 @@ class ModelGenerationCompositeObjective implements IThreeValuedObjective { | |||
63 | scopeObjective.createNew, | 62 | scopeObjective.createNew, |
64 | ImmutableList.copyOf(unfinishedMultiplicityObjectives.map[createNew as UnfinishedMultiplicityObjective]), | 63 | ImmutableList.copyOf(unfinishedMultiplicityObjectives.map[createNew as UnfinishedMultiplicityObjective]), |
65 | unfinishedWFObjective.createNew as UnfinishedWFObjective, | 64 | unfinishedWFObjective.createNew as UnfinishedWFObjective, |
66 | punishSize, scopeWeight, conaintmentWeight, nonContainmentWeight, unfinishedWFWeight | 65 | scopeWeight, conaintmentWeight, nonContainmentWeight, unfinishedWFWeight |
67 | ) | 66 | ) |
68 | } | 67 | } |
69 | 68 | ||
@@ -77,16 +76,14 @@ class ModelGenerationCompositeObjective implements IThreeValuedObjective { | |||
77 | var containmentMultiplicity = 0.0 | 76 | var containmentMultiplicity = 0.0 |
78 | var nonContainmentMultiplicity = 0.0 | 77 | var nonContainmentMultiplicity = 0.0 |
79 | for(multiplicityObjective : unfinishedMultiplicityObjectives) { | 78 | for(multiplicityObjective : unfinishedMultiplicityObjectives) { |
79 | val multiplicity = multiplicityObjective.getFitness(context) | ||
80 | // println(multiplicityObjective.name + "=" + multiplicity) | ||
80 | if(multiplicityObjective.containment) { | 81 | if(multiplicityObjective.containment) { |
81 | containmentMultiplicity+=multiplicityObjective.getFitness(context) | 82 | containmentMultiplicity+=multiplicity |
82 | } else { | 83 | } else { |
83 | nonContainmentMultiplicity+=multiplicityObjective.getFitness(context) | 84 | nonContainmentMultiplicity+=multiplicity |
84 | } | 85 | } |
85 | } | 86 | |
86 | val size = if(punishSize) { | ||
87 | 0.9/model.newElements.size | ||
88 | } else { | ||
89 | 0 | ||
90 | } | 87 | } |
91 | 88 | ||
92 | var sum = 0.0 | 89 | var sum = 0.0 |
@@ -94,7 +91,9 @@ class ModelGenerationCompositeObjective implements IThreeValuedObjective { | |||
94 | sum += containmentMultiplicity*conaintmentWeight | 91 | sum += containmentMultiplicity*conaintmentWeight |
95 | sum += nonContainmentMultiplicity*nonContainmentWeight | 92 | sum += nonContainmentMultiplicity*nonContainmentWeight |
96 | sum += unfinishedWFsFitness*unfinishedWFWeight | 93 | sum += unfinishedWFsFitness*unfinishedWFWeight |
97 | sum+=size | 94 | |
95 | // println('''scope=«scopeFitnes», containment=«containmentMultiplicity», nonContainment=«nonContainmentMultiplicity», wf=«unfinishedWFsFitness», sum=«sum»''') | ||
96 | |||
98 | return sum | 97 | return sum |
99 | } | 98 | } |
100 | 99 | ||
@@ -112,7 +111,7 @@ class ModelGenerationCompositeObjective implements IThreeValuedObjective { | |||
112 | 111 | ||
113 | override isHardObjective() { true } | 112 | override isHardObjective() { true } |
114 | 113 | ||
115 | override satisifiesHardObjective(Double fitness) { fitness <= 0.9 } | 114 | override satisifiesHardObjective(Double fitness) { fitness < 0.01 } |
116 | 115 | ||
117 | override setComparator(Comparator<Double> comparator) { | 116 | override setComparator(Comparator<Double> comparator) { |
118 | throw new UnsupportedOperationException("Model generation objective comparator cannot be set.") | 117 | throw new UnsupportedOperationException("Model generation objective comparator cannot be set.") |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/PunishSizeObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/PunishSizeObjective.xtend new file mode 100644 index 00000000..8505661c --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/PunishSizeObjective.xtend | |||
@@ -0,0 +1,70 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
4 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PrimitiveElement | ||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.IThreeValuedObjective | ||
6 | import java.util.Comparator | ||
7 | import org.eclipse.viatra.dse.base.ThreadContext | ||
8 | import org.eclipse.viatra.dse.objectives.Comparators | ||
9 | import org.eclipse.xtend.lib.annotations.Accessors | ||
10 | |||
11 | class PunishSizeObjective implements IThreeValuedObjective { | ||
12 | @Accessors int level = 3 | ||
13 | |||
14 | override createNew() { | ||
15 | this | ||
16 | } | ||
17 | |||
18 | override init(ThreadContext context) { | ||
19 | // Nothing to initialize. | ||
20 | } | ||
21 | |||
22 | override getComparator() { | ||
23 | Comparators.LOWER_IS_BETTER | ||
24 | } | ||
25 | |||
26 | override getFitness(ThreadContext threadContext) { | ||
27 | val model = threadContext.model | ||
28 | if (model instanceof PartialInterpretation) { | ||
29 | val size = model.newObjectCount | ||
30 | // println('''size=«size»''') | ||
31 | size as double | ||
32 | } else { | ||
33 | throw new IllegalArgumentException("notifier must be a PartialInterpretation") | ||
34 | } | ||
35 | } | ||
36 | |||
37 | override getBestPossibleFitness(ThreadContext threadContext) { | ||
38 | getFitness(threadContext) | ||
39 | } | ||
40 | |||
41 | override getWorstPossibleFitness(ThreadContext threadContext) { | ||
42 | val model = threadContext.model | ||
43 | if (model instanceof PartialInterpretation) { | ||
44 | (model.newObjectCount + model.maxNewElements) as double | ||
45 | } else { | ||
46 | throw new IllegalArgumentException("notifier must be a PartialInterpretation") | ||
47 | } | ||
48 | } | ||
49 | |||
50 | private def getNewObjectCount(PartialInterpretation interpretation) { | ||
51 | interpretation.newElements.reject[it instanceof PrimitiveElement].size | ||
52 | } | ||
53 | |||
54 | override getName() { | ||
55 | typeof(PunishSizeObjective).name | ||
56 | } | ||
57 | |||
58 | override isHardObjective() { | ||
59 | false | ||
60 | } | ||
61 | |||
62 | override satisifiesHardObjective(Double fitness) { | ||
63 | true | ||
64 | } | ||
65 | |||
66 | override setComparator(Comparator<Double> comparator) { | ||
67 | throw new UnsupportedOperationException("Model generation objective comparator cannot be set.") | ||
68 | } | ||
69 | |||
70 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ScopeObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ScopeObjective.xtend index 7abc5cb8..b61bd20b 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ScopeObjective.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ScopeObjective.xtend | |||
@@ -25,7 +25,7 @@ class ScopeObjective implements IObjective{ | |||
25 | val interpretation = context.model as PartialInterpretation | 25 | val interpretation = context.model as PartialInterpretation |
26 | var res = interpretation.minNewElementsHeuristic.doubleValue | 26 | var res = interpretation.minNewElementsHeuristic.doubleValue |
27 | for(scope : interpretation.scopes) { | 27 | for(scope : interpretation.scopes) { |
28 | res += scope.minNewElementsHeuristic | 28 | res += scope.minNewElementsHeuristic * 2 |
29 | } | 29 | } |
30 | return res | 30 | return res |
31 | } | 31 | } |