CategoryPlot plot = createBoxAndWhiskerChartPlot(dataset, "Best " + scoreLevelLabel, NumberFormat.getInstance(locale)); JFreeChart chart = new JFreeChart("Best " + scoreLevelLabel + " distribution summary (higher is better)", JFreeChart.DEFAULT_TITLE_FONT, plot, true); bestScoreDistributionSummaryChartFileList.add(writeChartToImageFile(chart, "bestScoreDistributionSummaryLevel" + scoreLevelIndex));
"Problem scale", NumberFormat.getInstance(locale), "Best " + scoreLevelLabel, NumberFormat.getInstance(locale)); JFreeChart chart = new JFreeChart( "Best " + scoreLevelLabel + " scalability summary (higher is better)", JFreeChart.DEFAULT_TITLE_FONT, plot, true);
"Time spent", new MillisecondsSpentNumberFormat(locale), "Best " + scoreLevelLabel, NumberFormat.getInstance(locale)); JFreeChart chart = new JFreeChart( "Best " + scoreLevelLabel + " per time spent summary (higher left is better)", JFreeChart.DEFAULT_TITLE_FONT, plot, true);
private void writeBestScoreSummaryChart() { // Each scoreLevel has its own dataset and chartFile List<DefaultCategoryDataset> datasetList = new ArrayList<>(CHARTED_SCORE_LEVEL_SIZE); for (SolverBenchmarkResult solverBenchmarkResult : plannerBenchmarkResult.getSolverBenchmarkResultList()) { String solverLabel = solverBenchmarkResult.getNameWithFavoriteSuffix(); for (SingleBenchmarkResult singleBenchmarkResult : solverBenchmarkResult.getSingleBenchmarkResultList()) { String problemLabel = singleBenchmarkResult.getProblemBenchmarkResult().getName(); if (singleBenchmarkResult.hasAllSuccess()) { double[] levelValues = ScoreUtils.extractLevelDoubles(singleBenchmarkResult.getAverageScore()); for (int i = 0; i < levelValues.length && i < CHARTED_SCORE_LEVEL_SIZE; i++) { if (i >= datasetList.size()) { datasetList.add(new DefaultCategoryDataset()); } datasetList.get(i).addValue(levelValues[i], solverLabel, problemLabel); } } } } bestScoreSummaryChartFileList = new ArrayList<>(datasetList.size()); int scoreLevelIndex = 0; for (DefaultCategoryDataset dataset : datasetList) { String scoreLevelLabel = plannerBenchmarkResult.findScoreLevelLabel(scoreLevelIndex); CategoryPlot plot = createBarChartPlot(dataset, "Best " + scoreLevelLabel, NumberFormat.getInstance(locale)); JFreeChart chart = new JFreeChart("Best " + scoreLevelLabel + " summary (higher is better)", JFreeChart.DEFAULT_TITLE_FONT, plot, true); bestScoreSummaryChartFileList.add(writeChartToImageFile(chart, "bestScoreSummaryLevel" + scoreLevelIndex)); scoreLevelIndex++; } }
CategoryPlot plot = createBarChartPlot(dataset, "Winning " + scoreLevelLabel + " difference", NumberFormat.getInstance(locale)); JFreeChart chart = new JFreeChart("Winning " + scoreLevelLabel + " difference summary (higher is better)", JFreeChart.DEFAULT_TITLE_FONT, plot, true); winningScoreDifferenceSummaryChartFileList.add(
private void writeScoreCalculationSpeedSummaryChart() { List<XYSeries> seriesList = new ArrayList<>(plannerBenchmarkResult.getSolverBenchmarkResultList().size()); for (SolverBenchmarkResult solverBenchmarkResult : plannerBenchmarkResult.getSolverBenchmarkResultList()) { String solverLabel = solverBenchmarkResult.getNameWithFavoriteSuffix(); XYSeries series = new XYSeries(solverLabel); for (SingleBenchmarkResult singleBenchmarkResult : solverBenchmarkResult.getSingleBenchmarkResultList()) { if (singleBenchmarkResult.hasAllSuccess()) { long problemScale = singleBenchmarkResult.getProblemBenchmarkResult().getProblemScale(); long scoreCalculationSpeed = singleBenchmarkResult.getScoreCalculationSpeed(); series.add((Long) problemScale, (Long) scoreCalculationSpeed); } } seriesList.add(series); } XYPlot plot = createScalabilityPlot(seriesList, "Problem scale", NumberFormat.getInstance(locale), "Score calculation speed per second", NumberFormat.getInstance(locale)); JFreeChart chart = new JFreeChart("Score calculation speed summary (higher is better)", JFreeChart.DEFAULT_TITLE_FONT, plot, true); scoreCalculationSpeedSummaryChartFile = writeChartToImageFile(chart, "scoreCalculationSpeedSummary"); }
"Worst " + scoreLevelLabel + " difference percentage", NumberFormat.getPercentInstance(locale)); JFreeChart chart = new JFreeChart("Worst " + scoreLevelLabel + " difference percentage" + " summary (higher is better)", JFreeChart.DEFAULT_TITLE_FONT, plot, true);
String scoreLevelLabel = subSingleBenchmarkResult.getSingleBenchmarkResult().getProblemBenchmarkResult() .findScoreLevelLabel(scoreLevelIndex); JFreeChart chart = new JFreeChart(subSingleBenchmarkResult.getName() + " picked move type best " + scoreLevelLabel + " diff statistic", JFreeChart.DEFAULT_TITLE_FONT, plot, true);
String scoreLevelLabel = subSingleBenchmarkResult.getSingleBenchmarkResult().getProblemBenchmarkResult() .findScoreLevelLabel(scoreLevelIndex); JFreeChart chart = new JFreeChart(subSingleBenchmarkResult.getName() + " picked move type step " + scoreLevelLabel + " diff statistic", JFreeChart.DEFAULT_TITLE_FONT, plot, true);
String scoreLevelLabel = subSingleBenchmarkResult.getSingleBenchmarkResult().getProblemBenchmarkResult() .findScoreLevelLabel(scoreLevelIndex); JFreeChart chart = new JFreeChart(subSingleBenchmarkResult.getName() + " constraint match total best " + scoreLevelLabel + " diff statistic", JFreeChart.DEFAULT_TITLE_FONT, plot, true);
private void writeTimeSpentScalabilitySummaryChart() { List<XYSeries> seriesList = new ArrayList<>(plannerBenchmarkResult.getSolverBenchmarkResultList().size()); for (SolverBenchmarkResult solverBenchmarkResult : plannerBenchmarkResult.getSolverBenchmarkResultList()) { String solverLabel = solverBenchmarkResult.getNameWithFavoriteSuffix(); XYSeries series = new XYSeries(solverLabel); for (SingleBenchmarkResult singleBenchmarkResult : solverBenchmarkResult.getSingleBenchmarkResultList()) { if (singleBenchmarkResult.hasAllSuccess()) { long problemScale = singleBenchmarkResult.getProblemBenchmarkResult().getProblemScale(); long timeMillisSpent = singleBenchmarkResult.getTimeMillisSpent(); series.add((Long) problemScale, (Long) timeMillisSpent); } } seriesList.add(series); } XYPlot plot = createScalabilityPlot(seriesList, "Problem scale", NumberFormat.getInstance(locale), "Time spent", new MillisecondsSpentNumberFormat(locale)); JFreeChart chart = new JFreeChart("Time spent scalability summary (lower is better)", JFreeChart.DEFAULT_TITLE_FONT, plot, true); timeSpentScalabilitySummaryChartFile = writeChartToImageFile(chart, "timeSpentScalabilitySummary"); }
for (int scoreLevelIndex = 0; scoreLevelIndex < plotList.size(); scoreLevelIndex++) { String scoreLevelLabel = problemBenchmarkResult.findScoreLevelLabel(scoreLevelIndex); JFreeChart chart = new JFreeChart( problemBenchmarkResult.getName() + " step " + scoreLevelLabel + " statistic", JFreeChart.DEFAULT_TITLE_FONT, plotList.get(scoreLevelIndex), true);
XYPlot plot = new XYPlot(seriesCollection, domainAxis, rangeAxis, renderer); plot.setOrientation(PlotOrientation.HORIZONTAL); return new JFreeChart("Project Job Scheduling", JFreeChart.DEFAULT_TITLE_FONT, plot, true);
private void writeWorstScoreCalculationSpeedDifferencePercentageSummaryChart() { DefaultCategoryDataset dataset = new DefaultCategoryDataset(); for (SolverBenchmarkResult solverBenchmarkResult : plannerBenchmarkResult.getSolverBenchmarkResultList()) { String solverLabel = solverBenchmarkResult.getNameWithFavoriteSuffix(); for (SingleBenchmarkResult singleBenchmarkResult : solverBenchmarkResult.getSingleBenchmarkResultList()) { String problemLabel = singleBenchmarkResult.getProblemBenchmarkResult().getName(); if (singleBenchmarkResult.hasAllSuccess()) { double worstScoreCalculationSpeedDifferencePercentage = singleBenchmarkResult.getWorstScoreCalculationSpeedDifferencePercentage(); dataset.addValue(worstScoreCalculationSpeedDifferencePercentage, solverLabel, problemLabel); } } } CategoryPlot plot = createBarChartPlot(dataset, "Worst score calculation speed difference percentage", NumberFormat.getPercentInstance(locale)); JFreeChart chart = new JFreeChart("Worst score calculation speed difference percentage" + " summary (higher is better)", JFreeChart.DEFAULT_TITLE_FONT, plot, true); worstScoreCalculationSpeedDifferencePercentageSummaryChartFile = writeChartToImageFile(chart, "worstScoreCalculationSpeedDifferencePercentageSummary"); }
private JFreeChart createChart(CheapTimeSolution solution) { TangoColorFactory tangoColorFactory = new TangoColorFactory(); NumberAxis rangeAxis = new NumberAxis("Period"); rangeAxis.setRange(-0.5, solution.getGlobalPeriodRangeTo() + 0.5); XYPlot taskAssignmentPlot = createTaskAssignmentPlot(tangoColorFactory, solution); XYPlot periodCostPlot = createPeriodCostPlot(tangoColorFactory, solution); XYPlot capacityPlot = createAvailableCapacityPlot(tangoColorFactory, solution); CombinedRangeXYPlot combinedPlot = new CombinedRangeXYPlot(rangeAxis); combinedPlot.add(taskAssignmentPlot, 5); combinedPlot.add(periodCostPlot, 1); combinedPlot.add(capacityPlot, 1); combinedPlot.setOrientation(PlotOrientation.HORIZONTAL); return new JFreeChart("Cheap Power Time Scheduling", JFreeChart.DEFAULT_TITLE_FONT, combinedPlot, true); }
private void writeTimeSpentSummaryChart() { DefaultCategoryDataset dataset = new DefaultCategoryDataset(); for (SolverBenchmarkResult solverBenchmarkResult : plannerBenchmarkResult.getSolverBenchmarkResultList()) { String solverLabel = solverBenchmarkResult.getNameWithFavoriteSuffix(); for (SingleBenchmarkResult singleBenchmarkResult : solverBenchmarkResult.getSingleBenchmarkResultList()) { String problemLabel = singleBenchmarkResult.getProblemBenchmarkResult().getName(); if (singleBenchmarkResult.hasAllSuccess()) { long timeMillisSpent = singleBenchmarkResult.getTimeMillisSpent(); dataset.addValue(timeMillisSpent, solverLabel, problemLabel); } } } CategoryPlot plot = createBarChartPlot(dataset, "Time spent", new MillisecondsSpentNumberFormat(locale)); JFreeChart chart = new JFreeChart("Time spent summary (lower time is better)", JFreeChart.DEFAULT_TITLE_FONT, plot, true); timeSpentSummaryChartFile = writeChartToImageFile(chart, "timeSpentSummary"); }
seriesIndex++; JFreeChart chart = new JFreeChart(problemBenchmarkResult.getName() + " best solution mutation statistic", JFreeChart.DEFAULT_TITLE_FONT, plot, true); graphFile = writeChartToImageFile(chart, problemBenchmarkResult.getName() + "BestSolutionMutationStatistic");
seriesIndex++; JFreeChart chart = new JFreeChart(problemBenchmarkResult.getName() + " score calculation speed statistic", JFreeChart.DEFAULT_TITLE_FONT, plot, true); graphFile = writeChartToImageFile(chart, problemBenchmarkResult.getName() + "ScoreCalculationSpeedStatistic");
seriesIndex++; JFreeChart chart = new JFreeChart(problemBenchmarkResult.getName() + " memory use statistic", JFreeChart.DEFAULT_TITLE_FONT, plot, true); graphFile = writeChartToImageFile(chart, problemBenchmarkResult.getName() + "MemoryUseStatistic");
JFreeChart chart = new JFreeChart(problemBenchmarkResult.getName() + " move count per step statistic", JFreeChart.DEFAULT_TITLE_FONT, plot, true); graphFile = writeChartToImageFile(chart, problemBenchmarkResult.getName() + "MoveCountPerStepStatistic");