optaplanner-benchmark/src/main/java/org/optaplanner/benchmark/impl/statistic/movecountperstep/MoveCountPerStepProblemStatistic.java
@Override
    public void writeGraphFiles(BenchmarkReport benchmarkReport) {
        Locale locale = benchmarkReport.getLocale();
        NumberAxis xAxis = new NumberAxis("Time spent");
        xAxis.setNumberFormatOverride(new MillisecondsSpentNumberFormat(locale));
        NumberAxis yAxis = new NumberAxis("Accepted/selected moves per step");
        yAxis.setNumberFormatOverride(NumberFormat.getInstance(locale));
        XYPlot plot = new XYPlot(null, xAxis, yAxis, null);
        DrawingSupplier drawingSupplier = new DefaultDrawingSupplier();
        plot.setOrientation(PlotOrientation.VERTICAL);

        int seriesIndex = 0;
        for (SingleBenchmarkResult singleBenchmarkResult : problemBenchmarkResult.getSingleBenchmarkResultList()) {
            XYSeries acceptedSeries = new XYSeries(
                    singleBenchmarkResult.getSolverBenchmarkResult().getNameWithFavoriteSuffix() + " accepted");
            XYSeries selectedSeries = new XYSeries(
                    singleBenchmarkResult.getSolverBenchmarkResult().getNameWithFavoriteSuffix() + " selected");
            XYItemRenderer renderer = new XYLineAndShapeRenderer(true, false);
            if (singleBenchmarkResult.hasAllSuccess()) {
                MoveCountPerStepSubSingleStatistic subSingleStatistic = (MoveCountPerStepSubSingleStatistic)
                        singleBenchmarkResult.getSubSingleStatistic(problemStatisticType);
                List<MoveCountPerStepStatisticPoint> list = subSingleStatistic.getPointList();
                for (MoveCountPerStepStatisticPoint point : list) {
                    long timeMillisSpent = point.getTimeMillisSpent();
                    long acceptedMoveCount = point.getMoveCountPerStepMeasurement().getAcceptedMoveCount();
                    long selectedMoveCount = point.getMoveCountPerStepMeasurement().getSelectedMoveCount();
                    acceptedSeries.add(timeMillisSpent, acceptedMoveCount);
                    selectedSeries.add(timeMillisSpent, selectedMoveCount);
                }
            }
            XYSeriesCollection seriesCollection = new XYSeriesCollection();
            seriesCollection.addSeries(acceptedSeries);
            seriesCollection.addSeries(selectedSeries);
            plot.setDataset(seriesIndex, seriesCollection);

            if (singleBenchmarkResult.getSolverBenchmarkResult().isFavorite()) {
                // Make the favorite more obvious
                renderer.setSeriesStroke(0, new BasicStroke(2.0f));
                // Dashed line for selected move count
                renderer.setSeriesStroke(1, new BasicStroke(
                        2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1.0f, new float[] {2.0f, 6.0f}, 0.0f));
            } else {
                // Dashed line for selected move count
                renderer.setSeriesStroke(1, new BasicStroke(
                        1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1.0f, new float[] {2.0f, 6.0f}, 0.0f));
            }
            // Render both lines in the same color
            Paint linePaint = drawingSupplier.getNextPaint();
            renderer.setSeriesPaint(0, linePaint);
            renderer.setSeriesPaint(1, linePaint);
            plot.setRenderer(seriesIndex, renderer);
            seriesIndex++;
        }

        JFreeChart chart = new JFreeChart(problemBenchmarkResult.getName() + " move count per step statistic",
                JFreeChart.DEFAULT_TITLE_FONT, plot, true);
        graphFile = writeChartToImageFile(chart, problemBenchmarkResult.getName() + "MoveCountPerStepStatistic");
    }
@Override
    public void writeGraphFiles(BenchmarkReport benchmarkReport) {
        Locale locale = benchmarkReport.getLocale();
        NumberAxis xAxis = new NumberAxis("Time spent");
        xAxis.setNumberFormatOverride(new MillisecondsSpentNumberFormat(locale));
        NumberAxis yAxis = new NumberAxis("Accepted/selected moves per step");
        yAxis.setNumberFormatOverride(NumberFormat.getInstance(locale));
        XYPlot plot = new XYPlot(null, xAxis, yAxis, null);
        DrawingSupplier drawingSupplier = new DefaultDrawingSupplier();
        plot.setOrientation(PlotOrientation.VERTICAL);

        int seriesIndex = 0;
        for (SingleBenchmarkResult singleBenchmarkResult : problemBenchmarkResult.getSingleBenchmarkResultList()) {
            XYSeries acceptedSeries = new XYSeries(
                    singleBenchmarkResult.getSolverBenchmarkResult().getNameWithFavoriteSuffix() + " accepted");
            XYSeries selectedSeries = new XYSeries(
                    singleBenchmarkResult.getSolverBenchmarkResult().getNameWithFavoriteSuffix() + " selected");
            XYItemRenderer renderer = new XYLineAndShapeRenderer(true, false);
            if (singleBenchmarkResult.hasAllSuccess()) {
                MoveCountPerStepSubSingleStatistic subSingleStatistic = (MoveCountPerStepSubSingleStatistic)
                        singleBenchmarkResult.getSubSingleStatistic(problemStatisticType);
                List<MoveCountPerStepStatisticPoint> list = subSingleStatistic.getPointList();
                for (MoveCountPerStepStatisticPoint point : list) {
                    long timeMillisSpent = point.getTimeMillisSpent();
                    long acceptedMoveCount = point.getMoveCountPerStepMeasurement().getAcceptedMoveCount();
                    long selectedMoveCount = point.getMoveCountPerStepMeasurement().getSelectedMoveCount();
                    acceptedSeries.add(timeMillisSpent, acceptedMoveCount);
                    selectedSeries.add(timeMillisSpent, selectedMoveCount);
                }
            }
            XYSeriesCollection seriesCollection = new XYSeriesCollection();
            seriesCollection.addSeries(acceptedSeries);
            seriesCollection.addSeries(selectedSeries);
            plot.setDataset(seriesIndex, seriesCollection);

            if (singleBenchmarkResult.getSolverBenchmarkResult().isFavorite()) {
                // Make the favorite more obvious
                renderer.setSeriesStroke(0, new BasicStroke(2.0f));
                // Dashed line for selected move count
                renderer.setSeriesStroke(1, new BasicStroke(
                        2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1.0f, new float[] {2.0f, 6.0f}, 0.0f));
            } else {
                // Dashed line for selected move count
                renderer.setSeriesStroke(1, new BasicStroke(
                        1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1.0f, new float[] {2.0f, 6.0f}, 0.0f));
            }
            // Render both lines in the same color
            Paint linePaint = drawingSupplier.getNextPaint();
            renderer.setSeriesPaint(0, linePaint);
            renderer.setSeriesPaint(1, linePaint);
            plot.setRenderer(seriesIndex, renderer);
            seriesIndex++;
        }

        JFreeChart chart = new JFreeChart(problemBenchmarkResult.getName() + " move count per step statistic",
                JFreeChart.DEFAULT_TITLE_FONT, plot, true);
        graphFile = writeChartToImageFile(chart, problemBenchmarkResult.getName() + "MoveCountPerStepStatistic");
    }
@ Override public void writeGraphFiles ( BenchmarkReport benchmarkReport ) { Locale locale = benchmarkReport . getLocale ( ) ; NumberAxis xAxis = new NumberAxis ( "Time spent" ) ; xAxis . setNumberFormatOverride ( new MillisecondsSpentNumberFormat ( locale ) ) ; NumberAxis yAxis = new NumberAxis ( "Accepted/selected moves per step" ) ; yAxis . setNumberFormatOverride ( NumberFormat . getInstance ( locale ) ) ; XYPlot plot = new XYPlot ( null , xAxis , yAxis , null ) ; DrawingSupplier drawingSupplier = new DefaultDrawingSupplier ( ) ; plot . setOrientation ( PlotOrientation . VERTICAL ) ; int seriesIndex = 0 ; for ( SingleBenchmarkResult singleBenchmarkResult : problemBenchmarkResult . getSingleBenchmarkResultList ( ) ) { XYSeries acceptedSeries = new XYSeries ( singleBenchmarkResult . getSolverBenchmarkResult ( ) . getNameWithFavoriteSuffix ( ) + " accepted" ) ; XYSeries selectedSeries = new XYSeries ( singleBenchmarkResult . getSolverBenchmarkResult ( ) . getNameWithFavoriteSuffix ( ) + " selected" ) ; XYItemRenderer renderer = new XYLineAndShapeRenderer ( true , false ) ; if ( singleBenchmarkResult . hasAllSuccess ( ) ) { MoveCountPerStepSubSingleStatistic subSingleStatistic = ( MoveCountPerStepSubSingleStatistic ) singleBenchmarkResult . getSubSingleStatistic ( problemStatisticType ) ; List < MoveCountPerStepStatisticPoint > list = subSingleStatistic . getPointList ( ) ; for ( MoveCountPerStepStatisticPoint point : list ) { long timeMillisSpent = point . getTimeMillisSpent ( ) ; long acceptedMoveCount = point . getMoveCountPerStepMeasurement ( ) . getAcceptedMoveCount ( ) ; long selectedMoveCount = point . getMoveCountPerStepMeasurement ( ) . getSelectedMoveCount ( ) ; acceptedSeries . add ( timeMillisSpent , acceptedMoveCount ) ; selectedSeries . add ( timeMillisSpent , selectedMoveCount ) ; } } XYSeriesCollection seriesCollection = new XYSeriesCollection ( ) ; seriesCollection . addSeries ( acceptedSeries ) ; seriesCollection . addSeries ( selectedSeries ) ; plot . setDataset ( seriesIndex , seriesCollection ) ; if ( singleBenchmarkResult . getSolverBenchmarkResult ( ) . isFavorite ( ) ) { // Make the favorite more obvious renderer . setSeriesStroke ( 0 , new BasicStroke ( 2.0f ) ) ; // Dashed line for selected move count renderer . setSeriesStroke ( 1 , new BasicStroke ( 2.0f , BasicStroke . CAP_ROUND , BasicStroke . JOIN_ROUND , 1.0f , new float [ ] { 2.0f , 6.0f } , 0.0f ) ) ; } else { // Dashed line for selected move count renderer . setSeriesStroke ( 1 , new BasicStroke ( 1.0f , BasicStroke . CAP_ROUND , BasicStroke . JOIN_ROUND , 1.0f , new float [ ] { 2.0f , 6.0f } , 0.0f ) ) ; } // Render both lines in the same color Paint linePaint = drawingSupplier . getNextPaint ( ) ; renderer . setSeriesPaint ( 0 , linePaint ) ; renderer . setSeriesPaint ( 1 , linePaint ) ; plot . setRenderer ( seriesIndex , renderer ) ; seriesIndex ++ ; } JFreeChart chart = new JFreeChart ( problemBenchmarkResult . getName ( ) + " move count per step statistic" , JFreeChart . DEFAULT_TITLE_FONT , plot , true ) ; graphFile = writeChartToImageFile ( chart , problemBenchmarkResult . getName ( ) + "MoveCountPerStepStatistic" ) ; }
************************************************************************
************************************************************************