diff options
Diffstat (limited to 'Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org')
2 files changed, 4 insertions, 1 deletions
diff --git a/Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/objectives/impl/ModelQueriesGlobalConstraint.java b/Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/objectives/impl/ModelQueriesGlobalConstraint.java index 7616b4a2..3a990a1e 100644 --- a/Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/objectives/impl/ModelQueriesGlobalConstraint.java +++ b/Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/objectives/impl/ModelQueriesGlobalConstraint.java | |||
@@ -87,6 +87,8 @@ public class ModelQueriesGlobalConstraint implements IGlobalConstraint { | |||
87 | for (ViatraQueryMatcher<? extends IPatternMatch> matcher : matchers) { | 87 | for (ViatraQueryMatcher<? extends IPatternMatch> matcher : matchers) { |
88 | if ((type.equals(ModelQueryType.NO_MATCH) && matcher.countMatches() > 0) | 88 | if ((type.equals(ModelQueryType.NO_MATCH) && matcher.countMatches() > 0) |
89 | || (type.equals(ModelQueryType.MUST_HAVE_MATCH) && matcher.countMatches() == 0)) { | 89 | || (type.equals(ModelQueryType.MUST_HAVE_MATCH) && matcher.countMatches() == 0)) { |
90 | // System.out.println(type + " " + matcher.countMatches()); | ||
91 | // System.out.println(matcher.getSpecification().getSimpleName()); | ||
90 | return false; | 92 | return false; |
91 | } | 93 | } |
92 | } | 94 | } |
diff --git a/Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/solutionstore/SolutionStore.java b/Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/solutionstore/SolutionStore.java index 578ae277..6e0abd0b 100644 --- a/Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/solutionstore/SolutionStore.java +++ b/Solvers/VIATRA-Solver/org.eclipse.viatra.dse/src/org/eclipse/viatra/dse/solutionstore/SolutionStore.java | |||
@@ -208,10 +208,11 @@ public class SolutionStore { | |||
208 | solutionTrajectory.setFitness(fitness); | 208 | solutionTrajectory.setFitness(fitness); |
209 | 209 | ||
210 | if (acceptOnlyGoalSolutions && !fitness.isSatisifiesHardObjectives()) { | 210 | if (acceptOnlyGoalSolutions && !fitness.isSatisifiesHardObjectives()) { |
211 | // System.out.println("NOT SAVING"); | ||
211 | unsavedSolutionCallbacks(context, solutionTrajectory); | 212 | unsavedSolutionCallbacks(context, solutionTrajectory); |
212 | return; | 213 | return; |
213 | } | 214 | } |
214 | 215 | System.out.println("SAVING SOLUTION"); | |
215 | boolean solutionSaved = solutionSaver.saveSolution(context, id, solutionTrajectory); | 216 | boolean solutionSaved = solutionSaver.saveSolution(context, id, solutionTrajectory); |
216 | 217 | ||
217 | if (solutionSaved) { | 218 | if (solutionSaved) { |