예제 #1
0
def main():
    students, schedule = StudentMaker.schedule_from_file()
    schedule = Scheduler.postProcess(schedule)

    final_mapping = [4, 19, 12, 17, 0, 7, 1, 13, 8, 5, 10, 2, 11, 14, 9, 15, 16, 3, 18, 6]

    mapping = []
    for i in range(ClassData.FINAL_SLOTS):
        mapping.append(i)

    #print sum(StudentScheduler.scheduleBadness(students, schedule, mapping))

    #mapp = StudentScheduler.optimizeSchedule(students, schedule, 10)

    #print sum(StudentScheduler.scheduleBadness(students, schedule, mapp))

    id = 1463
    print len(students)
예제 #2
0
def main():
    
    start = time.time()
    students, course_obj_dict = getStudents(4000)
    print 'Created students'
    
    all_courses = course_obj_dict.values()

    initialThingy = Scheduler.initializeSchedule(all_courses)
    print 'initialized schedule'
    
    tentSchedule = Scheduler.scheduler(1000, initialThingy)
    print 'minimized conflicts in schedule'
    
    postSchedule = Scheduler.postProcess(tentSchedule)
    end = time.time()
    print 'output schedule for preference maximization'

    print Scheduler.conflictsBySlot

    print end-start