@Override public void explore() { while (!(isInterrupted || initialPopulation.size() >= populationSize)) { while (lengthRemaining > 0) { lengthRemaining--; context.executeRandomActivationId(); boolean gcSatisfied = context.checkGlobalConstraints(); if (!gcSatisfied) { context.backtrack(); lengthRemaining++; } } initialPopulation.add(new TrajectoryWithStateFitness(dsm.getTrajectoryInfo(), context.calculateFitness())); dsm.undoUntilRoot(); lengthRemaining = newLength(); } }
boolean globalConstraintsAreSatisfied = context.checkGlobalConstraints(); if (!globalConstraintsAreSatisfied) { boolean isSuccessfulUndo = context.backtrack();
boolean globalConstraintsAreSatisfied = context.checkGlobalConstraints(); if (!globalConstraintsAreSatisfied) { boolean isSuccessfulUndo = context.backtrack();
@Override public void explore() { boolean globalConstraintsAreSatisfied = context.checkGlobalConstraints(); if (!globalConstraintsAreSatisfied) { boolean isSuccessfulUndo = context.backtrack(); if (!context.checkGlobalConstraints()) { logger.debug("Global contraint is not satisifed, backtrack."); context.backtrack();
boolean globalConstraintsAreSatisfied = context.checkGlobalConstraints(); if (!globalConstraintsAreSatisfied) { boolean isSuccessfulUndo = context.backtrack();
final ObjectiveComparatorHelper objectiveComparatorHelper = context.getObjectiveComparatorHelper(); boolean globalConstraintsAreSatisfied = context.checkGlobalConstraints(); if (!globalConstraintsAreSatisfied) { logger.info("Global contraint is not satisifed in the first state. Terminate."); logger.info("The new state is already visited."); context.backtrack(); } else if (!context.checkGlobalConstraints()) { logger.debug("Global contraint is not satisifed."); context.backtrack();
boolean globalConstraintsAreSatisfied = context.checkGlobalConstraints(); if (!globalConstraintsAreSatisfied) { logger.info("Global contraint is not satisifed in the first state. Terminate."); } else if (!context.checkGlobalConstraints()) { logger.debug("Global contraint is not satisifed."); } else if (context.calculateFitness().isSatisifiesHardObjectives()) {