diff options
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver')
2 files changed, 54 insertions, 47 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 4d2fd741..29478272 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 | |||
@@ -1,6 +1,5 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner | 1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner |
2 | 2 | ||
3 | import ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator.app.PartialInterpretationMetric | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel | 3 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel |
5 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner | 4 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner |
6 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasonerException | 5 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasonerException |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/HillClimbingOnRealisticMetricStrategyForModelGeneration.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/HillClimbingOnRealisticMetricStrategyForModelGeneration.java index 293cd232..53401e81 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/HillClimbingOnRealisticMetricStrategyForModelGeneration.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/HillClimbingOnRealisticMetricStrategyForModelGeneration.java | |||
@@ -59,10 +59,9 @@ public class HillClimbingOnRealisticMetricStrategyForModelGeneration implements | |||
59 | public NumericSolver numericSolver = null; | 59 | public NumericSolver numericSolver = null; |
60 | 60 | ||
61 | // Running | 61 | // Running |
62 | private Queue<TrajectoryWithFitness> trajectoiresToExplore; | 62 | private PriorityQueue<TrajectoryWithFitness> trajectoiresToExplore; |
63 | private SolutionStore solutionStore; | 63 | private SolutionStore solutionStore; |
64 | private SolutionStoreWithCopy solutionStoreWithCopy; | 64 | private SolutionStoreWithCopy solutionStoreWithCopy; |
65 | private SolutionStoreWithDiversityDescriptor solutionStoreWithDiversityDescriptor; | ||
66 | private volatile boolean isInterrupted = false; | 65 | private volatile boolean isInterrupted = false; |
67 | private ModelResult modelResultByInternalSolver = null; | 66 | private ModelResult modelResultByInternalSolver = null; |
68 | private Random random = new Random(); | 67 | private Random random = new Random(); |
@@ -102,9 +101,7 @@ public class HillClimbingOnRealisticMetricStrategyForModelGeneration implements | |||
102 | public SolutionStoreWithCopy getSolutionStoreWithCopy() { | 101 | public SolutionStoreWithCopy getSolutionStoreWithCopy() { |
103 | return solutionStoreWithCopy; | 102 | return solutionStoreWithCopy; |
104 | } | 103 | } |
105 | public SolutionStoreWithDiversityDescriptor getSolutionStoreWithDiversityDescriptor() { | 104 | |
106 | return solutionStoreWithDiversityDescriptor; | ||
107 | } | ||
108 | public int getNumberOfStatecoderFail() { | 105 | public int getNumberOfStatecoderFail() { |
109 | return numberOfStatecoderFail; | 106 | return numberOfStatecoderFail; |
110 | } | 107 | } |
@@ -144,14 +141,14 @@ public class HillClimbingOnRealisticMetricStrategyForModelGeneration implements | |||
144 | this.comparator = new Comparator<TrajectoryWithFitness>() { | 141 | this.comparator = new Comparator<TrajectoryWithFitness>() { |
145 | @Override | 142 | @Override |
146 | public int compare(TrajectoryWithFitness o1, TrajectoryWithFitness o2) { | 143 | public int compare(TrajectoryWithFitness o1, TrajectoryWithFitness o2) { |
147 | return objectiveComparatorHelper.compare(o2.fitness, o1.fitness); | 144 | int diff = Double.compare(o1.fitness.get("violation"), o2.fitness.get("violation")); |
145 | return diff == 0? objectiveComparatorHelper.compare(o2.fitness, o1.fitness) : diff; | ||
148 | } | 146 | } |
149 | }; | 147 | }; |
150 | 148 | ||
151 | this.solutionStoreWithCopy = new SolutionStoreWithCopy(); | 149 | this.solutionStoreWithCopy = new SolutionStoreWithCopy(); |
152 | this.solutionStoreWithDiversityDescriptor = new SolutionStoreWithDiversityDescriptor(configuration.diversityRequirement); | ||
153 | 150 | ||
154 | trajectoiresToExplore = new LinkedList<TrajectoryWithFitness>(); | 151 | trajectoiresToExplore = new PriorityQueue<TrajectoryWithFitness>(11, comparator); |
155 | stateAndActivations = new HashMap<Object, List<Object>>(); | 152 | stateAndActivations = new HashMap<Object, List<Object>>(); |
156 | metricDistance = new PartialInterpretationMetricDistance(domain); | 153 | metricDistance = new PartialInterpretationMetricDistance(domain); |
157 | 154 | ||
@@ -173,7 +170,8 @@ public class HillClimbingOnRealisticMetricStrategyForModelGeneration implements | |||
173 | return; | 170 | return; |
174 | } | 171 | } |
175 | 172 | ||
176 | final Fitness firstFittness = context.calculateFitness(); | 173 | final Fitness firstFittness = calculateFitness(); |
174 | firstFittness.put("violation", (double) getNumberOfViolations(mayMatchers)); | ||
177 | 175 | ||
178 | //final ObjectiveComparatorHelper objectiveComparatorHelper = context.getObjectiveComparatorHelper(); | 176 | //final ObjectiveComparatorHelper objectiveComparatorHelper = context.getObjectiveComparatorHelper(); |
179 | final Object[] firstTrajectory = context.getTrajectory().toArray(new Object[0]); | 177 | final Object[] firstTrajectory = context.getTrajectory().toArray(new Object[0]); |
@@ -205,6 +203,14 @@ public class HillClimbingOnRealisticMetricStrategyForModelGeneration implements | |||
205 | } | 203 | } |
206 | 204 | ||
207 | List<Object> activationIds = selectActivation(); | 205 | List<Object> activationIds = selectActivation(); |
206 | |||
207 | if (activationIds.size() == 0) { | ||
208 | trajectoiresToExplore.remove(currentTrajectoryWithFittness); | ||
209 | currentTrajectoryWithFittness = null; | ||
210 | stateAndActivations.remove(context.getCurrentStateId()); | ||
211 | continue mainLoop; | ||
212 | } | ||
213 | |||
208 | PartialInterpretation model = (PartialInterpretation) context.getModel(); | 214 | PartialInterpretation model = (PartialInterpretation) context.getModel(); |
209 | System.out.println(model.getNewElements().size()); | 215 | System.out.println(model.getNewElements().size()); |
210 | System.out.println("# violations: " + getNumberOfViolations(mayMatchers)); | 216 | System.out.println("# violations: " + getNumberOfViolations(mayMatchers)); |
@@ -246,26 +252,26 @@ public class HillClimbingOnRealisticMetricStrategyForModelGeneration implements | |||
246 | boolean consistencyCheckResult = checkConsistency(currentTrajectoryWithFittness); | 252 | boolean consistencyCheckResult = checkConsistency(currentTrajectoryWithFittness); |
247 | if(consistencyCheckResult == true) { continue mainLoop; } | 253 | if(consistencyCheckResult == true) { continue mainLoop; } |
248 | 254 | ||
249 | // if (context.isCurrentStateAlreadyTraversed()) { | ||
250 | // logger.info("The new state is already visited."); | ||
251 | // context.backtrack(); | ||
252 | // } else if (!checkGlobalConstraints()) { | ||
253 | // logger.debug("Global contraint is not satisifed."); | ||
254 | // context.backtrack(); | ||
255 | // } | ||
256 | |||
257 | int currentSize = model.getNewElements().size(); | 255 | int currentSize = model.getNewElements().size(); |
258 | int targetDiff = targetSize - currentSize; | 256 | int targetDiff = targetSize - currentSize; |
259 | boolean shouldFinish = currentSize >= targetSize; | 257 | boolean shouldFinish = configuration.isWFOptional && currentSize >= targetSize - 1; |
260 | 258 | ||
261 | // does not allow must violations | 259 | // does not allow must violations |
262 | if((getNumberOfViolations(mustMatchers) > 0|| getNumberOfViolations(mayMatchers) > targetDiff) && !allowMustViolation && !shouldFinish) { | 260 | if((getNumberOfViolations(mustMatchers) > 0|| getNumberOfViolations(mayMatchers) > targetDiff) && !allowMustViolation && !shouldFinish) { |
263 | context.backtrack(); | 261 | context.backtrack(); |
264 | }else { | 262 | }else { |
265 | final Fitness nextFitness = calculateFitness(); | 263 | Fitness nextFitness = calculateFitness(); |
264 | |||
265 | if (shouldFinish) { | ||
266 | nextFitness.setSatisifiesHardObjectives(true); | ||
267 | saveSolution(); | ||
268 | } | ||
266 | 269 | ||
270 | |||
267 | // the only hard objectives are configured in the config file | 271 | // the only hard objectives are configured in the config file |
268 | checkForSolution(nextFitness); | 272 | checkForSolution(nextFitness); |
273 | |||
274 | nextFitness.put("violation", (double) getNumberOfViolations(mayMatchers)); | ||
269 | 275 | ||
270 | if (context.getDepth() > configuration.searchSpaceConstraints.maxDepth) { | 276 | if (context.getDepth() > configuration.searchSpaceConstraints.maxDepth) { |
271 | logger.debug("Reached max depth."); | 277 | logger.debug("Reached max depth."); |
@@ -289,9 +295,7 @@ public class HillClimbingOnRealisticMetricStrategyForModelGeneration implements | |||
289 | } | 295 | } |
290 | } | 296 | } |
291 | logger.debug("State is fully traversed."); | 297 | logger.debug("State is fully traversed."); |
292 | trajectoiresToExplore.remove(currentTrajectoryWithFittness); | ||
293 | currentTrajectoryWithFittness = null; | 298 | currentTrajectoryWithFittness = null; |
294 | context.backtrack(); | ||
295 | } | 299 | } |
296 | logger.info("Interrupted."); | 300 | logger.info("Interrupted."); |
297 | } | 301 | } |
@@ -344,8 +348,8 @@ public class HillClimbingOnRealisticMetricStrategyForModelGeneration implements | |||
344 | long start = System.nanoTime(); | 348 | long start = System.nanoTime(); |
345 | int nodeSize = ((PartialInterpretation) context.getModel()).getNewElements().size(); | 349 | int nodeSize = ((PartialInterpretation) context.getModel()).getNewElements().size(); |
346 | double currentValue = calculateCurrentStateValue(nodeSize,violation); | 350 | double currentValue = calculateCurrentStateValue(nodeSize,violation); |
347 | double[] toPredict = metricDistance.calculateFeature(100, violation); | 351 | double[] toPredict = metricDistance.calculateFeature((configuration.typeScopes.maxNewElements + 2), violation); |
348 | if(Math.abs(currentValue - currentStateValue) < 0.001) { | 352 | if(Math.abs(currentValue - currentStateValue) < 0.001 && configuration.realisticGuidance == RealisticGuidance.NodeType) { |
349 | this.method.getStatistics().addMetricCalculationTime(System.nanoTime() - start); | 353 | this.method.getStatistics().addMetricCalculationTime(System.nanoTime() - start); |
350 | return Double.MAX_VALUE; | 354 | return Double.MAX_VALUE; |
351 | } | 355 | } |
@@ -375,13 +379,13 @@ public class HillClimbingOnRealisticMetricStrategyForModelGeneration implements | |||
375 | double unfinishFactor = 50 * (1 - (double)factor / targetSize); | 379 | double unfinishFactor = 50 * (1 - (double)factor / targetSize); |
376 | double nodeTypeFactor = g.getNodeTypeDistance(); | 380 | double nodeTypeFactor = g.getNodeTypeDistance(); |
377 | double normalFactor = 5; | 381 | double normalFactor = 5; |
378 | if(currentNodeTypeDistance <= 0.05 || numNodesToGenerate == 1) { | 382 | if(currentNodeTypeDistance <= 0.03 || numNodesToGenerate == 1) { |
379 | nodeTypeFactor = 0; | 383 | nodeTypeFactor = 0; |
380 | normalFactor = 100; | 384 | normalFactor = 100; |
381 | unfinishFactor = 0; | 385 | unfinishFactor = 0; |
382 | } | 386 | } |
383 | 387 | ||
384 | return 100*(nodeTypeFactor) + normalFactor*(2*g.getNADistance() + g.getMPCDistance() + 2*g.getOutDegreeDistance()) + normalFactor / 5*consistenceWeights + unfinishFactor; | 388 | return 50*(nodeTypeFactor) + normalFactor*(2*g.getNADistance() + g.getMPCDistance() + 2*g.getOutDegreeDistance()) + normalFactor / 5*consistenceWeights + unfinishFactor; |
385 | }else if (domain == Domain.Ecore) { | 389 | }else if (domain == Domain.Ecore) { |
386 | double unfinishFactor = 100 * (1 - (double)factor / targetSize); | 390 | double unfinishFactor = 100 * (1 - (double)factor / targetSize); |
387 | double nodeTypeFactor = g.getNodeTypeDistance(); | 391 | double nodeTypeFactor = g.getNodeTypeDistance(); |
@@ -392,18 +396,18 @@ public class HillClimbingOnRealisticMetricStrategyForModelGeneration implements | |||
392 | unfinishFactor *= 0.5; | 396 | unfinishFactor *= 0.5; |
393 | } | 397 | } |
394 | 398 | ||
395 | return 100*(nodeTypeFactor) + normalFactor*(2*g.getNADistance() + g.getMPCDistance() + 2*g.getOutDegreeDistance()) + normalFactor / 5*consistenceWeights + unfinishFactor; | 399 | return 50*(nodeTypeFactor) + normalFactor*(2*g.getNADistance() + 2*g.getMPCDistance() + 2*g.getOutDegreeDistance()) + normalFactor / 5*consistenceWeights + unfinishFactor; |
396 | }else { | 400 | }else { |
397 | double unfinishFactor = context.calculateFitness().get("CompositeUnfinishednessObjective"); | 401 | double unfinishFactor = 100 * (1 - (double)factor / targetSize); |
398 | double nodeTypeFactor = g.getNodeTypeDistance(); | 402 | double nodeTypeFactor = g.getNodeTypeDistance(); |
399 | double normalFactor = 5; | 403 | double normalFactor = 5; |
400 | if(currentNodeTypeDistance <= 0.05 || numNodesToGenerate == 1) { | 404 | if(currentNodeTypeDistance <= 0.5 || numNodesToGenerate == 1) { |
401 | nodeTypeFactor = 0; | 405 | nodeTypeFactor = 0; |
402 | normalFactor = 100; | 406 | normalFactor = 100; |
403 | //unfinishFactor *= 0.5; | 407 | //unfinishFactor *= 0.5; |
404 | } | 408 | } |
405 | 409 | ||
406 | return 100*(nodeTypeFactor) + normalFactor*(2*g.getNADistance() + 2*g.getMPCDistance() + 2*g.getOutDegreeDistance()) + normalFactor / 5*consistenceWeights + unfinishFactor; | 410 | return 50*(nodeTypeFactor) + normalFactor*(2*g.getNADistance() + 2*g.getMPCDistance() + 2*g.getOutDegreeDistance()) + normalFactor / 5*consistenceWeights + unfinishFactor; |
407 | } | 411 | } |
408 | 412 | ||
409 | }else if(configuration.realisticGuidance == RealisticGuidance.Composite_Without_Violations) { | 413 | }else if(configuration.realisticGuidance == RealisticGuidance.Composite_Without_Violations) { |
@@ -411,13 +415,13 @@ public class HillClimbingOnRealisticMetricStrategyForModelGeneration implements | |||
411 | double unfinishFactor = 50 * (1 - (double)factor / targetSize); | 415 | double unfinishFactor = 50 * (1 - (double)factor / targetSize); |
412 | double nodeTypeFactor = g.getNodeTypeDistance(); | 416 | double nodeTypeFactor = g.getNodeTypeDistance(); |
413 | double normalFactor = 5; | 417 | double normalFactor = 5; |
414 | if(currentNodeTypeDistance <= 0.05 || numNodesToGenerate == 1) { | 418 | if(currentNodeTypeDistance <= 0.5 || numNodesToGenerate == 1) { |
415 | nodeTypeFactor = 0; | 419 | nodeTypeFactor = 0; |
416 | normalFactor = 100; | 420 | normalFactor = 100; |
417 | unfinishFactor = 0; | 421 | unfinishFactor = 0; |
418 | } | 422 | } |
419 | 423 | ||
420 | return 100*(nodeTypeFactor) + normalFactor*(2*g.getNADistance() + g.getMPCDistance() + 2*g.getOutDegreeDistance()) + unfinishFactor; | 424 | return 50*(nodeTypeFactor) + normalFactor*(2*g.getNADistance() + 4 * g.getMPCDistance() + 2*g.getOutDegreeDistance()) + unfinishFactor; |
421 | }else if (domain == Domain.Github) { | 425 | }else if (domain == Domain.Github) { |
422 | double unfinishFactor = 100 * (1 - (double)factor / targetSize); | 426 | double unfinishFactor = 100 * (1 - (double)factor / targetSize); |
423 | double nodeTypeFactor = g.getNodeTypeDistance(); | 427 | double nodeTypeFactor = g.getNodeTypeDistance(); |
@@ -428,7 +432,7 @@ public class HillClimbingOnRealisticMetricStrategyForModelGeneration implements | |||
428 | unfinishFactor *= 0.5; | 432 | unfinishFactor *= 0.5; |
429 | } | 433 | } |
430 | 434 | ||
431 | return 100*(nodeTypeFactor) + normalFactor*(2*g.getNADistance() + g.getMPCDistance() + 2*g.getOutDegreeDistance()) + unfinishFactor; | 435 | return 50*(nodeTypeFactor) + normalFactor*(2*g.getNADistance() + g.getMPCDistance() + 2*g.getOutDegreeDistance()) + unfinishFactor; |
432 | } else { | 436 | } else { |
433 | double unfinishFactor = 100 * (1 - (double)factor / targetSize); | 437 | double unfinishFactor = 100 * (1 - (double)factor / targetSize); |
434 | double nodeTypeFactor = g.getNodeTypeDistance(); | 438 | double nodeTypeFactor = g.getNodeTypeDistance(); |
@@ -439,10 +443,10 @@ public class HillClimbingOnRealisticMetricStrategyForModelGeneration implements | |||
439 | unfinishFactor *= 0.5; | 443 | unfinishFactor *= 0.5; |
440 | } | 444 | } |
441 | 445 | ||
442 | return 100*(nodeTypeFactor) + normalFactor*(2*g.getNADistance() + g.getMPCDistance() + 2*g.getOutDegreeDistance()) + unfinishFactor; | 446 | return 50*(nodeTypeFactor) + normalFactor*(2*g.getNADistance() + g.getMPCDistance() + 2*g.getOutDegreeDistance()) + unfinishFactor; |
443 | } | 447 | } |
444 | }else { | 448 | }else { |
445 | return violation; | 449 | return getNumberOfViolations(mustMatchers) + getNumberOfViolations(mayMatchers); |
446 | } | 450 | } |
447 | } | 451 | } |
448 | 452 | ||
@@ -491,7 +495,11 @@ public class HillClimbingOnRealisticMetricStrategyForModelGeneration implements | |||
491 | private List<Object> selectActivation() { | 495 | private List<Object> selectActivation() { |
492 | List<Object> activationIds; | 496 | List<Object> activationIds; |
493 | try { | 497 | try { |
494 | activationIds = this.activationSelector.randomizeActivationIDs(context.getUntraversedActivationIds()); | 498 | activationIds = new ArrayList<Object>(context.getCurrentActivationIds()); |
499 | if(stateAndActivations.containsKey(context.getCurrentStateId())) { | ||
500 | activationIds.removeAll(stateAndActivations.get(context.getCurrentStateId())); | ||
501 | } | ||
502 | activationIds = this.activationSelector.randomizeActivationIDs(activationIds); | ||
495 | } catch (NullPointerException e) { | 503 | } catch (NullPointerException e) { |
496 | numberOfStatecoderFail++; | 504 | numberOfStatecoderFail++; |
497 | activationIds = Collections.emptyList(); | 505 | activationIds = Collections.emptyList(); |
@@ -501,19 +509,19 @@ public class HillClimbingOnRealisticMetricStrategyForModelGeneration implements | |||
501 | 509 | ||
502 | private void checkForSolution(final Fitness fittness) { | 510 | private void checkForSolution(final Fitness fittness) { |
503 | if (fittness.isSatisifiesHardObjectives()) { | 511 | if (fittness.isSatisifiesHardObjectives()) { |
504 | logger.debug("Solution Found!!"); | 512 | saveSolution(); |
505 | logger.debug("# violations: " + (getNumberOfViolations(mustMatchers))); | ||
506 | if (solutionStoreWithDiversityDescriptor.isDifferent(context)) { | ||
507 | solutionStoreWithCopy.newSolution(context); | ||
508 | solutionStoreWithDiversityDescriptor.newSolution(context); | ||
509 | solutionStore.newSolution(context); | ||
510 | configuration.progressMonitor.workedModelFound(configuration.solutionScope.numberOfRequiredSolutions); | ||
511 | |||
512 | logger.debug("Found a solution."); | ||
513 | } | ||
514 | } | 513 | } |
515 | } | 514 | } |
516 | 515 | ||
516 | private void saveSolution() { | ||
517 | logger.debug("Solution Found!!"); | ||
518 | logger.debug("# violations: " + (getNumberOfViolations(mustMatchers))); | ||
519 | solutionStoreWithCopy.newSolution(context); | ||
520 | solutionStore.newSolution(context); | ||
521 | configuration.progressMonitor.workedModelFound(configuration.solutionScope.numberOfRequiredSolutions); | ||
522 | logger.debug("Found a solution."); | ||
523 | } | ||
524 | |||
517 | public List<String> times = new LinkedList<String>(); | 525 | public List<String> times = new LinkedList<String>(); |
518 | private void saveTimes() { | 526 | private void saveTimes() { |
519 | long forwardTime = context.getDesignSpaceManager().getForwardTime()/1000000; | 527 | long forwardTime = context.getDesignSpaceManager().getForwardTime()/1000000; |
@@ -634,7 +642,7 @@ public class HillClimbingOnRealisticMetricStrategyForModelGeneration implements | |||
634 | } | 642 | } |
635 | 643 | ||
636 | protected void removeSubtreeFromQueue(TrajectoryWithFitness t) { | 644 | protected void removeSubtreeFromQueue(TrajectoryWithFitness t) { |
637 | Queue<TrajectoryWithFitness> previous = this.trajectoiresToExplore; | 645 | PriorityQueue<TrajectoryWithFitness> previous = this.trajectoiresToExplore; |
638 | this.trajectoiresToExplore = new PriorityQueue<>(this.comparator); | 646 | this.trajectoiresToExplore = new PriorityQueue<>(this.comparator); |
639 | for (TrajectoryWithFitness trajectoryWithFitness : previous) { | 647 | for (TrajectoryWithFitness trajectoryWithFitness : previous) { |
640 | if (!containsAsSubstring(trajectoryWithFitness.trajectory, t.trajectory)) { | 648 | if (!containsAsSubstring(trajectoryWithFitness.trajectory, t.trajectory)) { |