}
evNumber = evCounter++;
assToNumber.put(ass, evNumber);
Event event = ass.getEvent();
algo.addEvent(evNumber, event.getDuration());
// TODO NOW avoid that an event would have been assigned to two days
for (Person person : event.getPersons()) {
Integer pNo = personToInteger.get(person);
if (pNo == null) {
pNo = pCounter++;
personToInteger.put(person, pNo);
}
algo.addResourceTo(pNo, evNumber);
}
// add a weight to each allowed slot (=> trees get the multiple weight -> this does not matter)
RasterConstraint rasterC = event.getConstraint(RasterConstraint.class);
BitRaster raster = rasterC.getRaster().getForbidden();
int duration = event.getDuration();
for (int slot = raster.getNextFree(0, duration);
slot >= 0 && slot < slotsPerWeek;
slot = raster.getNextFree(slot + 1, duration)) {
algo.incSlotWeight(evNumber, slot, 1);// event.getPersons().size());
}