    public static IntervalCategoryDataset createDataset(final ProjectSchedule input) {
        final ProjectSchedule solution = GanttPanel.CLONER.cloneSolution(input);
        final TaskSeriesCollection collection = new TaskSeriesCollection();
        for (final Project p : solution.getProblem().getProjects()) {
            final TaskSeries series = new TaskSeries("P" + p.getId());
            for (final Job j : p.getJobs()) {
                if (j.isSink() || j.isSource()) {
                    continue;
                }
                final Allocation a = solution.getAllocation(j);
                if (!a.isInitialized()) {
                    continue;
                }
                series.add(new Task("J" + j.getId(), new SimpleTimePeriod(GanttPanel.date(a.getStartDate()),
                        GanttPanel.date(a.getDueDate()))));
            }
            collection.add(series);
        }
        return collection;
    }

    public static IntervalCategoryDataset createDataset(final ProjectSchedule input) {
        final ProjectSchedule solution = GanttPanel.CLONER.cloneSolution(input);
        final TaskSeriesCollection collection = new TaskSeriesCollection();
        for (final Project p : solution.getProblem().getProjects()) {
            final TaskSeries series = new TaskSeries("P" + p.getId());
            for (final Job j : p.getJobs()) {
                if (j.isSink() || j.isSource()) {
                    continue;
                }
                final Allocation a = solution.getAllocation(j);
                if (!a.isInitialized()) {
                    continue;
                }
                series.add(new Task("J" + j.getId(), new SimpleTimePeriod(GanttPanel.date(a.getStartDate()),
                        GanttPanel.date(a.getDueDate() + 1))));
            }
            collection.add(series);
        }
        return collection;
    }
