Back to ITC overview



if we would use subjects instead of ITimeIntervals

we need the following class. It adds a
subject to an orgroup, but hides the other
timeintervals:
class SubjectWrapper implements ISubject {
getTimeIntervals() {
return Collections.singleton(oneTI);
}
}

How can we optimize orgroups and timeintervals with the same algorithm?

Because an orgroup does not have only one
room ...
e.g. orgroup.getTimeIntervals (only for the room optimization?)

Def. of No Collision Principle

No Collision Principle = NCP
  1. split(subjects);if too many visitors=> ordered list of all timeintervals
  2. Def.:
    void tryBigger(OrGroup og, int i) {
    for(int n = i+1;; n++) {
    OrGroup tmp = og.or(s_n).clone();
    if(tmp.getCollisions() == 0) {
    or use: if(tmp.getAssignments() == og.getAssignments() + s_n.getAssignments();
    with og.and(s_n) == 0 it is slower?
    TODO check possible rooms
    ogList.add(tmp);
    tryBigger(tmp, n);
    }}}
  3. for(i=timeintervals){
    tryBigger(one = new OrGroup(ti_i), i);
    (TODO assign rooms here??)
    I dont know which orgoup of the ti will be realized
    ogList.addAll(one.getAll());
    ogList.add(ti_i);always add single subject to orgroups
    }
    1. sort(ogList);

Again in German
  1. Teile ein Fach in mehrere Kinderfächer, falls Besucherzahl zu hoch.
  2. Sortiere ISubject's nach Besucherzahl
  3. Wähle erstes Fach und bilde OrGroup anhand von personen collisionen (+order der TI's). Notiere dabei wie stark ein bestimmtes Fach an der OrGroup klebt (TreeMap<Fixierung, ISubject>). Fixierung hoch, falls IFeature's verschieden und IRaster ähnlich. Breche nach N/t Fächern ab, wobei N Gesamtanzahl der Fächer ist und z.B. t = 10 gilt.
  4. Wähle nächstes (besucherstarkes) Fach analog zu 3. - jetzt kann aber auch ein schach fixiertes Fach aus vorhergehenden OrGroup's genommen werden, falls Fixierung an neuer OrGroup höher.
  5. List<OrGroup>, wobei OrGroup's jetzt ein oder mehr Fächer haben können
  6. TODO Sortiere in timetable ein und weise Räume zu
  7. LATER finde ähnliche OrGruppen mit maximalem x = orGroup1.getPersonSet().and(orGroup2.getPersonSet())

  1. Für ITC: jedes Fach hat nur ein TI => verwerfe OrGroup's mit fascher Reihenfolge der TI's in 2.

No Collision Principle could have the name Min-Max Collision Principle, because



NCP with Input

change start time and rooms (do not newly create or assign)

NCP pro's:

decrease of the number of subjects (orgroup)
decrease of the number of slots per week (and groups) - more important
no test against collisions necessary


NCP contra's:

high memoryusage, time?
rooms collision are not mentioned


NCP with Input contra's

we cannot optimize a given timetable (only create!)
so that it can be useful for GA, too
room capacity does not fit
so: splitting of orgroup necessary
too many orgroups?
too long calculation to create orgroups?


New Algorithm:


  1. Clustering/Grouping: Divide all ITimeInterval's in T clusters, where T is the number of timeslotsPerDay * days. Every cluster has a startTime, so only group those ITimeInterval's together which can take place at this time and without a collision.
  2. While clustering it is necessary to assign IRoom's to ITimeInterval's, because otherwise we wouldn't know if such a cluster could exist.
  3. Can we do a 'Cluster assignment to timeslots'? Or is this too difficult, because we have to recognize the raster of every ITimeInterval?

IAlgorithm

boolean findsOnlyLocalOptimum
boolean optimizesRoomCollision
(boolean optimizesRoomGap)
boolean optimizesSubjectCollision
boolean optimizesSubjectGap
boolean optimizesSubjectSplitting
boolean needsInput (GA)
boolean optimizesExisting or: useOnlyWithInput (NCP)