}
private void loadTasks(String filename)
throws FileNotFoundException, IOException {
try {
TaskContainer tasks = new TaskContainer(model);
StringTokenizer tokenizer = this.openFile(filename);
//ignore header fields
tokenizer.nextToken();
tokenizer.nextToken();
tokenizer.nextToken();
tokenizer.nextToken();
tokenizer.nextToken();
tokenizer.nextToken();
tokenizer.nextToken();
tokenizer.nextToken();
while (tokenizer.hasMoreTokens()) {
Task task = new Task();
int id = Integer.parseInt(tokenizer.nextToken());
task.setId(id);
int place_id = Integer.parseInt(tokenizer.nextToken());
task.setPlace(model.getPlaceContainer().getPlaceById(place_id));
int normtime = Integer.parseInt(tokenizer.nextToken());
task.setNormTime(normtime);
int tp1 = Integer.parseInt(tokenizer.nextToken());
int tp2 = Integer.parseInt(tokenizer.nextToken());
task.setPrefferedTimeInterval(new TimeInterval(tp1, tp2));
int ck1 = Integer.parseInt(tokenizer.nextToken());
task.setDCost1(ck1);
int ck2 = Integer.parseInt(tokenizer.nextToken());
task.setDCost2(ck2);
int ck3 = Integer.parseInt(tokenizer.nextToken());
task.setDCost3(ck3);
tasks.putTask(id, task);
}
model.setTaskContainer(tasks);
}
catch (FileNotFoundException e) {