private BruteForceStepScope createNextStepScope( BruteForceSolverPhaseScope bruteForceSolverPhaseScope, BruteForceStepScope completedBruteForceStepScope) { if (completedBruteForceStepScope == null) { completedBruteForceStepScope = new BruteForceStepScope(bruteForceSolverPhaseScope); completedBruteForceStepScope.setScore(bruteForceSolverPhaseScope.getStartingScore()); completedBruteForceStepScope.setStepIndex(-1); } bruteForceSolverPhaseScope.setLastCompletedBruteForceStepScope(completedBruteForceStepScope); BruteForceStepScope bruteForceStepScope = new BruteForceStepScope(bruteForceSolverPhaseScope); bruteForceStepScope.setStepIndex(completedBruteForceStepScope.getStepIndex() + 1); bruteForceStepScope.setSolutionInitialized(true); return bruteForceStepScope; }
public void stepTaken(BruteForceStepScope bruteForceStepScope) { super.stepTaken(bruteForceStepScope); bruteForceEntityWalker.stepTaken(bruteForceStepScope); BruteForceSolverPhaseScope bruteForceSolverPhaseScope = bruteForceStepScope.getBruteForceSolverPhaseScope(); // TODO The steps are too fine, so debug log is too much. Yet we still want some debug // indication logger.debug( " Step index ({}), time spend ({}), score ({}), {} best score ({}).", new Object[] { bruteForceStepScope.getStepIndex(), bruteForceSolverPhaseScope.calculateSolverTimeMillisSpend(), bruteForceStepScope.getScore(), (bruteForceStepScope.getBestScoreImproved() ? "new" : " "), bruteForceSolverPhaseScope.getBestScore() }); }