public void writeGraphFiles(BenchmarkReport benchmarkReport) {
XYPlot plot = createPlot(benchmarkReport);
int seriesIndex = 0;
for (SingleBenchmarkResult singleBenchmarkResult : problemBenchmarkResult.getSingleBenchmarkResultList()) {
XYIntervalSeries series = new XYIntervalSeries(singleBenchmarkResult.getSolverBenchmarkResult().getNameWithFavoriteSuffix());
XYItemRenderer renderer = new YIntervalRenderer();
if (singleBenchmarkResult.isSuccess()) {
BestSolutionMutationSingleStatistic singleStatistic = (BestSolutionMutationSingleStatistic)
singleBenchmarkResult.getSingleStatistic(problemStatisticType);
for (BestSolutionMutationStatisticPoint point : singleStatistic.getPointList()) {
long timeMillisSpent = point.getTimeMillisSpent();
long mutationCount = point.getMutationCount();
double yValue = mutationCount;
// In an XYInterval the yLow must be lower than yHigh
series.add(timeMillisSpent, timeMillisSpent, timeMillisSpent,
yValue, (yValue > 0.0) ? 0.0 : yValue, (yValue > 0.0) ? yValue : 0.0);
}
}
XYIntervalSeriesCollection dataset = new XYIntervalSeriesCollection();
dataset.addSeries(series);
plot.setDataset(seriesIndex, dataset);
if (singleBenchmarkResult.getSolverBenchmarkResult().isFavorite()) {
// Make the favorite more obvious
renderer.setSeriesStroke(0, new BasicStroke(2.0f));
}
plot.setRenderer(seriesIndex, renderer);
seriesIndex++;
}
JFreeChart chart = new JFreeChart(problemBenchmarkResult.getName() + " best solution mutation statistic",