throw new IllegalArgumentException("Read line (" + line
+ ") has a non existing specialismId (" + specialismId + ").");
}
admissionPart.setSpecialism(specialism);
int admissionPartFirstNightIndex = nextFirstNightIndex;
Night admissionPartFirstNight = indexToNightMap.get(admissionPartFirstNightIndex);
if (admissionPartFirstNight == null) {
throw new IllegalStateException(
"The admissionPartFirstNight was not found for admissionPartFirstNightIndex("
+ admissionPartFirstNightIndex + ").");
}
admissionPart.setFirstNight(admissionPartFirstNight);
int admissionPartLastNightIndex = nextFirstNightIndex + admissionPartNightListSize - 1;
// TODO Instead of ensureEnoughNights(lastNightIndex);
// the official score function ignores any broken constraints after the planning horizon
if (admissionPartLastNightIndex >= nightListSize) {
admissionPartLastNightIndex = nightListSize - 1;
}
Night admissionPartLastNight = indexToNightMap.get(admissionPartLastNightIndex);
if (admissionPartLastNight == null) {
throw new IllegalStateException(
"The admissionPartLastNight was not found for admissionPartLastNightIndex("
+ admissionPartLastNightIndex + ").");
}