@Override
    public SubSingleBenchmarkRunner<Solution_> call() {
        MDC.put(NAME_MDC, subSingleBenchmarkResult.getName());
        Runtime runtime = Runtime.getRuntime();
        ProblemBenchmarkResult<Solution_> problemBenchmarkResult = subSingleBenchmarkResult.getSingleBenchmarkResult().getProblemBenchmarkResult();
        Solution_ problem = problemBenchmarkResult.readProblem();
        if (!problemBenchmarkResult.getPlannerBenchmarkResult().hasMultipleParallelBenchmarks()) {
            runtime.gc();
            subSingleBenchmarkResult.setUsedMemoryAfterInputSolution(runtime.totalMemory() - runtime.freeMemory());
        }
        logger.trace("Benchmark problem has been read for subSingleBenchmarkResult ({}).",
                subSingleBenchmarkResult);

        SolverConfig solverConfig = subSingleBenchmarkResult.getSingleBenchmarkResult().getSolverBenchmarkResult().getSolverConfig();
        if (subSingleBenchmarkResult.getSingleBenchmarkResult().getSubSingleCount() > 1) {
            solverConfig = new SolverConfig(solverConfig);
            solverConfig.offerRandomSeedFromSubSingleIndex((long) subSingleBenchmarkResult.getSubSingleBenchmarkIndex());
        }
        // Intentionally create a fresh solver for every SingleBenchmarkResult to reset Random, tabu lists, ...
        Solver<Solution_> solver = solverConfig.buildSolver(solverConfigContext);

        for (SubSingleStatistic subSingleStatistic : subSingleBenchmarkResult.getEffectiveSubSingleStatisticMap().values()) {
            subSingleStatistic.open(solver);
            subSingleStatistic.initPointList();
        }

        Solution_ solution = solver.solve(problem);
        long timeMillisSpent = solver.getTimeMillisSpent();

        DefaultSolverScope<Solution_> solverScope = ((DefaultSolver<Solution_>) solver).getSolverScope();
        SolutionDescriptor<Solution_> solutionDescriptor = solverScope.getSolutionDescriptor();
        problemBenchmarkResult.registerScale(solutionDescriptor.getEntityCount(solution),
                solutionDescriptor.getGenuineVariableCount(solution),
                solutionDescriptor.getMaximumValueCount(solution),
                solutionDescriptor.getProblemScale(solution));
        subSingleBenchmarkResult.setScore(solutionDescriptor.getScore(solution));
        subSingleBenchmarkResult.setTimeMillisSpent(timeMillisSpent);
        subSingleBenchmarkResult.setScoreCalculationCount(solverScope.getScoreCalculationCount());

        for (SubSingleStatistic subSingleStatistic : subSingleBenchmarkResult.getEffectiveSubSingleStatisticMap().values()) {
            subSingleStatistic.close(solver);
            subSingleStatistic.hibernatePointList();
        }
        if (!warmUp) {
            problemBenchmarkResult.writeSolution(subSingleBenchmarkResult, solution);
        }
        MDC.remove(NAME_MDC);
        return this;
    }
@Override
    public SubSingleBenchmarkRunner<Solution_> call() {
        MDC.put(NAME_MDC, subSingleBenchmarkResult.getName());
        Runtime runtime = Runtime.getRuntime();
        ProblemBenchmarkResult<Solution_> problemBenchmarkResult = subSingleBenchmarkResult.getSingleBenchmarkResult().getProblemBenchmarkResult();
        Solution_ problem = problemBenchmarkResult.readProblem();
        if (!problemBenchmarkResult.getPlannerBenchmarkResult().hasMultipleParallelBenchmarks()) {
            runtime.gc();
            subSingleBenchmarkResult.setUsedMemoryAfterInputSolution(runtime.totalMemory() - runtime.freeMemory());
        }
        logger.trace("Benchmark problem has been read for subSingleBenchmarkResult ({}).",
                subSingleBenchmarkResult);

        SolverConfig solverConfig = subSingleBenchmarkResult.getSingleBenchmarkResult().getSolverBenchmarkResult().getSolverConfig();
        if (subSingleBenchmarkResult.getSingleBenchmarkResult().getSubSingleCount() > 1) {
            solverConfig = new SolverConfig(solverConfig);
            solverConfig.offerRandomSeedFromSubSingleIndex((long) subSingleBenchmarkResult.getSubSingleBenchmarkIndex());
        }
        
        Solver<Solution_> solver = solverConfig.buildSolver(solverConfigContext);

        for (SubSingleStatistic subSingleStatistic : subSingleBenchmarkResult.getEffectiveSubSingleStatisticMap().values()) {
            subSingleStatistic.open(solver);
            subSingleStatistic.initPointList();
        }

        Solution_ solution = solver.solve(problem);
        long timeMillisSpent = solver.getTimeMillisSpent();

        DefaultSolverScope<Solution_> solverScope = ((DefaultSolver<Solution_>) solver).getSolverScope();
        SolutionDescriptor<Solution_> solutionDescriptor = solverScope.getSolutionDescriptor();
        problemBenchmarkResult.registerScale(solutionDescriptor.getEntityCount(solution),
                solutionDescriptor.getGenuineVariableCount(solution),
                solutionDescriptor.getMaximumValueCount(solution),
                solutionDescriptor.getProblemScale(solution));
        subSingleBenchmarkResult.setScore(solutionDescriptor.getScore(solution));
        subSingleBenchmarkResult.setTimeMillisSpent(timeMillisSpent);
        subSingleBenchmarkResult.setScoreCalculationCount(solverScope.getScoreCalculationCount());

        for (SubSingleStatistic subSingleStatistic : subSingleBenchmarkResult.getEffectiveSubSingleStatisticMap().values()) {
            subSingleStatistic.close(solver);
            subSingleStatistic.hibernatePointList();
        }
        if (!warmUp) {
            problemBenchmarkResult.writeSolution(subSingleBenchmarkResult, solution);
        }
        MDC.remove(NAME_MDC);
        return this;
    }
@ Override public SubSingleBenchmarkRunner < Solution_ > call ( ) { MDC . put ( NAME_MDC , subSingleBenchmarkResult . getName ( ) ) ; Runtime runtime = Runtime . getRuntime ( ) ; ProblemBenchmarkResult < Solution_ > problemBenchmarkResult = subSingleBenchmarkResult . getSingleBenchmarkResult ( ) . getProblemBenchmarkResult ( ) ; Solution_ problem = problemBenchmarkResult . readProblem ( ) ; if ( ! problemBenchmarkResult . getPlannerBenchmarkResult ( ) . hasMultipleParallelBenchmarks ( ) ) { runtime . gc ( ) ; subSingleBenchmarkResult . setUsedMemoryAfterInputSolution ( runtime . totalMemory ( ) - runtime . freeMemory ( ) ) ; } logger . trace ( "Benchmark problem has been read for subSingleBenchmarkResult ({})." , subSingleBenchmarkResult ) ; SolverConfig solverConfig = subSingleBenchmarkResult . getSingleBenchmarkResult ( ) . getSolverBenchmarkResult ( ) . getSolverConfig ( ) ; if ( subSingleBenchmarkResult . getSingleBenchmarkResult ( ) . getSubSingleCount ( ) > 1 ) { solverConfig = new SolverConfig ( solverConfig ) ; solverConfig . offerRandomSeedFromSubSingleIndex ( ( long ) subSingleBenchmarkResult . getSubSingleBenchmarkIndex ( ) ) ; } // Intentionally create a fresh solver for every SingleBenchmarkResult to reset Random, tabu lists, ... Solver < Solution_ > solver = solverConfig . buildSolver ( solverConfigContext ) ; for ( SubSingleStatistic subSingleStatistic : subSingleBenchmarkResult . getEffectiveSubSingleStatisticMap ( ) . values ( ) ) { subSingleStatistic . open ( solver ) ; subSingleStatistic . initPointList ( ) ; } Solution_ solution = solver . solve ( problem ) ; long timeMillisSpent = solver . getTimeMillisSpent ( ) ; DefaultSolverScope < Solution_ > solverScope = ( ( DefaultSolver < Solution_ > ) solver ) . getSolverScope ( ) ; SolutionDescriptor < Solution_ > solutionDescriptor = solverScope . getSolutionDescriptor ( ) ; problemBenchmarkResult . registerScale ( solutionDescriptor . getEntityCount ( solution ) , solutionDescriptor . getGenuineVariableCount ( solution ) , solutionDescriptor . getMaximumValueCount ( solution ) , solutionDescriptor . getProblemScale ( solution ) ) ; subSingleBenchmarkResult . setScore ( solutionDescriptor . getScore ( solution ) ) ; subSingleBenchmarkResult . setTimeMillisSpent ( timeMillisSpent ) ; subSingleBenchmarkResult . setScoreCalculationCount ( solverScope . getScoreCalculationCount ( ) ) ; for ( SubSingleStatistic subSingleStatistic : subSingleBenchmarkResult . getEffectiveSubSingleStatisticMap ( ) . values ( ) ) { subSingleStatistic . close ( solver ) ; subSingleStatistic . hibernatePointList ( ) ; } if ( ! warmUp ) { problemBenchmarkResult . writeSolution ( subSingleBenchmarkResult , solution ) ; } MDC . remove ( NAME_MDC ) ; return this ; }
************************************************************************
************************************************************************