University Course Timetabling Data Format (v2.1)
Input/output data format is XML, with the following structure:

<?xml version="1.0" encoding="UTF-8"?>
<!--Purdue University Timetabling-->
<timetable version="2.1" term="2006Fal" created="Tue Mar 28 14:20:34 EST 2006" nrDays="7" slotsPerDay="288">
Header attributes:
attributedescription
versiondata format version
termterm (e.g., 2004Fal or 2005Spr)
createddate of generation of this file
nrDaysnumber of days per week
slotsPerDaynumber of time slots per day
  <rooms>
    <room id="1" capacity="40" location="460,438"/>
    <room id="2" capacity="44" location="465,485"/>
    <room id="3" capacity="49" location="451,435"/>
    ...
    <room id="51" capacity="474" location="476,445"/>
  </rooms>
Room attributes:
attributedescription
idroom identification
capacityroom capacity
locationroom location coordinates [x,y]
Distance between rooms in meters: 10 * ((x2-x1)^2 + (y2-y1)^2)^1/2
  <classes>
    <class id="1" course="1" expectedCapacity="127" roomCapacity="127" nrRooms="1" department="1" startDay="233" endDay="344">
      <instructor id="1" solution="true"/>
      <room id="51" pref="0"/>
      <room id="50" pref="0"/>
      <room id="37" pref="0" solution="true"/>
      <room id="36" pref="0"/>
      <time days="1010100" start="90" length="12" pref="32"/>
      <time days="1010100" start="102" length="12" pref="0"/>
      <time days="1010100" start="114" length="12" pref="0"/>
      <time days="1010100" start="126" length="12" pref="0" solution="true"/>
      <time days="1010100" start="138" length="12" pref="0"/>
      <time days="1010100" start="150" length="12" pref="0"/>
      <time days="1010100" start="162" length="12" pref="0"/>
      <time days="1010100" start="174" length="12" pref="0"/>
      <time days="1010100" start="186" length="12" pref="0"/>
      <time days="1010100" start="198" length="12" pref="8"/>
    </class>
    <class id="2" course="2" expectedCapacity="58" roomCapacity="58" nrRooms="1" department="1" startDay="233" endDay="344">
      <instructor id="2" solution="true"/>
      <room id="29" pref="0"/>
      ...
      <time days="1010100" start="90" length="12" pref="13"/>
      ...
    </class>
    ...
    <class id="822" course="638" expectedCapacity="52" roomCapacity="52" nrRooms="1" department="64" startDay="233" endDay="344">
      <instructor id="466" solution="true"/>
      <room id="20" pref="-2" solution="true"/>
      ...
      <days="1000000" start="90" length="12" pref="4" solution="true"/>
      ...
    </class>
  </classes>
Class attributes:

attributedescription
idclass identification
coursecourse identification (classes are grouped into courses)
expectedCapacityexpected number of students attending the class
roomCapacityminimal size of the room that can be used
nrRoomsnumber of rooms the class needs (it is usually 1, but there are some cases where a class needs two rooms)
departmentdepartment identification (each class belongs to a department)
startDay
endDay
interval of days when the class is being taught
(e.g., there are some classes that take place only in the first half of the term)

A class can contain an instructor. It also contains one or more rooms and one or more times where it can take place. Only the valid instructors, rooms and times are listed (e.g., there is no need to check class.roomCapacity with room.capacity). If there is a solution (class is placed somewhere), it consists from a selection of one instructor (if there is one), class.nrRooms rooms and one time.
Instructor attributes:
attributedescription
idinstructor identification
solutiontrue, if this instructor belongs to the solution (i.e., placement of this class that is in the solution contain this instructor)


Room attributes:
attributedescription
idroom identification
prefroom preference (combined from room preference, building preference and preferences on room features)
solutiontrue, if this room belongs to the solution (i.e., placement of this class that is in the solution contains this room)


Time attributes:
attributedescription
daysa bitmap of days (first Monday, second Tuesday, ...), e.g., 1010100 means Monday+Wednesday+Friday
startstating slot (0 ... timetable.nrSlotsPerDay-1)
lengthlength of class, in the number of slots (it's here because there can be alternatives, e.g., 2x75 or 3x50)
prefnormalized time preference on the given time
solutiontrue, if this time belongs to the solution (i.e., placement of this class that is in the solution contain this time)

  <groupConstraints>
    <constraint id="1" type="BTB" pref="R">
      <class id="390"/>
      <class id="391"/>
    </constraint>
    ...
    <constraint id="25" type="BTB_TIME" pref="2">
      <class id="509"/>
      <class id="510"/>
      <class id="511"/>
      <class id="512"/>
    </constraint>
    ...
    <constraint id="177" type="DIFF_TIME" pref="R">
      <class id="115"/>
      <class id="114"/>
      <class id="113"/>
      <class id="112"/>
    </constraint>
  </groupConstraints>
Group (distribution) constraint attributes:
Each group constraint has defined its type, its preference or requirement and a list of classes.
attributedescription
idconstraint identification
typeconstraint type (see [Group Constraint Types])
prefconstraint is either required or prohibited (hard constraint):
   R .. constraint is required,
   P .. constraint is prohibited
or it is preferred or discouraged (soft constraint):
   -2 .. strongly preferred,
   -1 .. preferred,
   1 .. discouraged,
   2 .. strongly discouraged

  <students>
    <student id="1">
      <class id="786"/>
      <class id="791"/>
    </student>
    <student id="2">
      <class id="583"/>
    </student>
    ...
    <student id="29035">
      <class id="630"/>
    </student>
  </students>
Each student contains a list of classes s/he is enrolled in.
In order to keep number of student conflicts as low as possible, enrollments of two students which are enrolled in different classes of the same course can be swapt.
</timetable>