@Test public void testCreateSchedule() throws Exception { JsspPhenotypeEvaluator evaluator = new JsspPhenotypeEvaluator(_jobsDefinition); Integer[] jobArray = new Integer[] {1,1,1,2,2,2}; double[] objVal = evaluator.evaluateSchedule(jobArray, true); assertEquals (12, (int)objVal[0]); Schedule s = evaluator.getSchedule(); assertNotNull(s); List<Pair<ScheduleCell>> criticalPath = s.findCriticalPath(); assertNotNull(criticalPath); assertEquals(1, criticalPath.size()); }
public List<Pair<ScheduleCell>> findCriticalPath() throws Exception { if(!_isCommited) throw new Exception("Schedule is not commited, so not ready, run Schedule.Commit() first."); ArrayList<Pair<ScheduleCell>> results = new ArrayList<Pair<ScheduleCell>>(); findCriticalPath(_mostDistantCell, results); return Collections.unmodifiableList(results); }
Schedule { public List<Pair<ScheduleCell>> findCriticalPath() throws Exception { if(!_isCommited) throw new Exception("Schedule is not commited, so not ready, run Schedule.Commit() first."); ArrayList<Pair<ScheduleCell>> results = new ArrayList<Pair<ScheduleCell>>(); findCriticalPath(_mostDistantCell, results); return Collections.unmodifiableList(results); } }
Schedule { public List<Pair<ScheduleCell>> findCriticalPath() throws Exception { if(!_isCommited) throw new Exception("Schedule is not commited, so not ready, run Schedule.Commit() first."); ArrayList<Pair<ScheduleCell>> results = new ArrayList<Pair<ScheduleCell>>(); findCriticalPath(_mostDistantCell, results); return Collections.unmodifiableList(results); } Schedule(int numJobs, int numMachines); }
Schedule { public List<Pair<ScheduleCell>> findCriticalPath() throws Exception { if(!_isCommited) throw new Exception("Schedule is not commited, so not ready, run Schedule.Commit() first."); ArrayList<Pair<ScheduleCell>> results = new ArrayList<Pair<ScheduleCell>>(); findCriticalPath(_mostDistantCell, results); return Collections.unmodifiableList(results); } Schedule(int numJobs, int numMachines); void addCell(int jobIndex, int machineIndex, ScheduleCell newCell); List<Pair<ScheduleCell>> findCriticalPath(); void Commit(); }
Schedule { public List<Pair<ScheduleCell>> findCriticalPath() throws Exception { if(!_isCommited) throw new Exception("Schedule is not commited, so not ready, run Schedule.Commit() first."); ArrayList<Pair<ScheduleCell>> results = new ArrayList<Pair<ScheduleCell>>(); findCriticalPath(_mostDistantCell, results); return Collections.unmodifiableList(results); } Schedule(int numJobs, int numMachines); void addCell(int jobIndex, int machineIndex, ScheduleCell newCell); List<Pair<ScheduleCell>> findCriticalPath(); void Commit();  }