Package net.sourceforge.ganttproject.task.algorithm

Examples of net.sourceforge.ganttproject.task.algorithm.RecalculateTaskScheduleAlgorithm.run()


                .createDependency(task2, task1, new FinishStartConstraintImpl());
        //
        task1.setEnd(new GanttCalendar(2000, 01, 04));
        RecalculateTaskScheduleAlgorithm alg = taskManager
                .getAlgorithmCollection().getRecalculateTaskScheduleAlgorithm();
        alg.run(task1);
        //
        assertEquals("Unexpected start of supertask=" + supertask,
                new GanttCalendar(2000, 01, 01), supertask.getStart());
        assertEquals("Unexpected end of supertask=" + supertask,
                new GanttCalendar(2000, 01, 05), supertask.getEnd());
View Full Code Here


    public void forwardScheduling() {
        RecalculateTaskScheduleAlgorithm alg = getTaskManager()
                .getAlgorithmCollection().getRecalculateTaskScheduleAlgorithm();
        try {
            alg.run();
        } catch (TaskDependencyException e) {
          myUIFacade.showErrorDialog(e);
        }
    }
View Full Code Here

                RecalculateTaskScheduleAlgorithm alg = myTaskManager
                        .getAlgorithmCollection()
                        .getRecalculateTaskScheduleAlgorithm();
                if (!alg.isRunning()) {
                    try {
                        alg.run(task);
                    } catch (TaskDependencyException e) {
                      if (!GPLogger.log(e)) {
                        e.printStackTrace(System.err);
                      }
                      getUIFacade().showErrorDialog(e);
View Full Code Here

                new FinishStartConstraintImpl());
        task1.setEnd(new GanttCalendar(2000, 01, 03));
        //
        RecalculateTaskScheduleAlgorithm alg = taskManager
                .getAlgorithmCollection().getRecalculateTaskScheduleAlgorithm();
        alg.run(task1);
        //
        assertEquals("Unexpected value of end of task=" + task3,
                new GanttCalendar(2000, 01, 05), task3.getEnd());
    }
View Full Code Here

        // task1 XX
        // task3 X
        // task2 XX
        RecalculateTaskScheduleAlgorithm alg = taskManager
                .getAlgorithmCollection().getRecalculateTaskScheduleAlgorithm();
        alg.run(task1);
        assertEquals("Unexpected value of start of task=" + task3,
                new GanttCalendar(2000, 01, 03), task3.getStart());
        //
        // decrease length of task1 again
        task1.setEnd(new GanttCalendar(2000, 01, 02));
View Full Code Here

        // task2 XX
        //
        // because task3 depends on task2 with "finish-start" constraint
        alg = taskManager.getAlgorithmCollection()
                .getRecalculateTaskScheduleAlgorithm();
        alg.run(task1);
        assertEquals("Unexpected value of start of task=" + task3,
                new GanttCalendar(2000, 01, 03), task3.getStart());
    }

    public void testFinishFinishConstraintOnMovingEndDateForward()
View Full Code Here

        // task1 xxxxx
        // task2 xxx
        task1.setEnd(new GanttCalendar(2000, 01, 05));
        RecalculateTaskScheduleAlgorithm alg = taskManager
                .getAlgorithmCollection().getRecalculateTaskScheduleAlgorithm();
        alg.run(task1);
        assertEquals("Unexpected end of task=" + task2, new GanttCalendar(2000,
                01, 05), task2.getEnd());
    }

    public void testStartStartConstraintOnMovingStartDateForward()
View Full Code Here

        task1.setStart(new GanttCalendar(2000, 01, 04));
        task1.setDuration(task1Duration);
        //
        RecalculateTaskScheduleAlgorithm alg = taskManager
                .getAlgorithmCollection().getRecalculateTaskScheduleAlgorithm();
        alg.run(task1);
        assertEquals("Unexpected start of task=" + task2, new GanttCalendar(
                2000, 01, 04), task2.getStart());
    }

    public void testStartFinishConstraintOnMovingStartDateForward()
View Full Code Here

        task1.setStart(new GanttCalendar(2000, 01, 04));
        task1.setDuration(task1Duration);
        //
        RecalculateTaskScheduleAlgorithm alg = taskManager
                .getAlgorithmCollection().getRecalculateTaskScheduleAlgorithm();
        alg.run(task1);
        assertEquals("Unexpected end of task=" + task2, new GanttCalendar(2000,
                01, 04), task2.getEnd());

    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.