(*** * This file specifies the Generate Schedule Operation and Objects related to the Operation * See Section 2.3 and 2.6.2 * *) module GenerateScheduleOperation; from Database import all; from ScheduleM import all; from Constraints import all; from ScheduledClass import all; from Time import all; op GenerateSchedule is inputs: rd:RoomDatabase, cd:CourseDatabase, td:InstructorDatabase, cl:ConstraintsList, sch:Schedule; outputs: sch':Schedule, rd':RoomDatabase, cd':CourseDatabase, td':InstructorDatabase, cl':ConstraintsList; description: (* This operation takes the information given to it to create the schedule based off of an algorithm that equally attacks every teachers preference points. At the end of the process, the teacher who has been harmed the most can be viewed by using the operation in the Schedule module called FairnessAlgorithmResults. *); precondition: (* * The Databases are not empty and have valid values *) (rd != nil) and (cd != nil) and (td != nil) and forall (r in rd) (r != nil) and forall(c in cd) (c != nil) and forall (t in td) (t != nil) and (* * For all teachers in the Teacher Database, each course has a preference * and each time has a preference *) forall(teachers in td) (teachers.pref.timePrefs != nil and teachers.pref.coursePrefs != nil) and (* * constraintsList is not nil and has valid constraint values *) cl != nil and forall (c in cl) (c != nil) ; postcondition: (* * For all instructors, all WTU have been used and never double booked and * rooms never double booked. *) (forall(i: Instructor | i in td'.teachers) i.wtu = i.schWTU) and (forall(sc:ScheduledClass | sc in sch'.scheduledClasses.sc) not( exists(sc2:ScheduledClass | sc2 in sch'.scheduledClasses.sc) (sc != sc2) and (sc.startTime = sc2.startTime or sc.endTime = sc2.endTime) and (sc.i = sc2.i) ) ) and (* * For all courses, every section has been scheduled *) forall(c in cd) (c.sn = c.ss) (*and*) (* * For all teachers, given as many of their preferences as mathmatically * possible how do i prove this???? * * The databases have been unaltered (can i define variables for just this * block of rsl? *) (*forall(ro in rd) exists(ro in rd') and (forall(c in cd) exists(c in cd')) and (forall(t in td) exists(t in td')) and *) (* * constraintslist is the same *) (*forall(co in cl) exists(co in cl')*) ; end GenerateSchedule; end GenerateScheduleOperation;