Faculty Scheduling Using Genetic Algorithms - PowerPoint PPT Presentation

1 / 42
About This Presentation
Title:

Faculty Scheduling Using Genetic Algorithms

Description:

Hold tournaments to find good genetic material ... Replace tournament losers with newly created schedules. Hold next tournament and repeat until solved ... – PowerPoint PPT presentation

Number of Views:102
Avg rating:3.0/5.0
Slides: 43
Provided by: monr83
Category:

less

Transcript and Presenter's Notes

Title: Faculty Scheduling Using Genetic Algorithms


1
Faculty Scheduling Using Genetic Algorithms
  • By Kevin Soule
  • April 17, 2006

2
Problem Defined
  • Many classes to schedule.
  • Limited resources (professors, rooms ..).
  • Unhappy professors, students.
  • Successful solution may not exist.
  • Very large search space.

3
Search Space
  • Assume a small problem of 10 courses, 5 rooms, 3
    professors and 10 time periods
  • Search space becomes
  • 150 choices for first class (5x3x10)
  • 149 choices are then left for second, and so on
  • Final number of total search space
  • 150! / 140! Or 6.0 x 1023
  • You can imagine a large problem would be huge

4
Needed to Represent an Individual Class
  • Class name
  • Section number (multiplies of same class)
  • Professor name
  • Starting time
  • Location
  • Days of the week
  • Hours of class time per week

5
Inputs Required
  • Courses to schedule-all sections
  • Room availability and restrictions
  • Professor availability and preferences

6
Input Creation and Organization
  • Random and Manually Entered
  • Program created to handle each
  • Data Stored in Three Integer Files
  • Course
  • Professor
  • Room
  • Random Input Data created based on actual
    values/trends noticed on college schedules

7
Random Input Proportions Used
  • Number of different courses ½ total number of
    sections offered
  • Number of professors 1/5 total sections
  • Number of rooms ½ total number of professors
  • 50 chance a room can hold a given course
  • 33 chance a professor has a preference on when
    they teach

8
Course Input Data
9
Professor Input Data
10
Main Problems - Conflicts
  • Room
  • Certain rooms unavailable for certain classes
  • (I.E. Computer lab needed and no computers in
    room)
  • Professor
  • Professor not trained to teach certain courses
  • Time
  • Some classes should not be taught at same time
  • (Calculus 101 and CS 101)
  • Combinations of the above
  • Professor cant be in two places at once
  • Rooms cant hold two classes at same time

11
Minor Problems
  • Professor Preferences
  • No early/late classes
  • Teach many of same class to limit prep time
  • Doesnt like certain classes
  • Wants to teach certain number/ Cant teach too
    many
  • Student Needs
  • Different sections of same class should be at
    different times
  • Most classes in prime time of day

12
Schedule Representation
  • Each class stores 7 unique parameters
  • A programming object is created
  • Each schedule has potentially hundreds of classes
  • An array of class objects is formed
  • Each trial run will create a population of
    schedules
  • An array of arrays is set up
  • Usually about 50 schedules worth

13
Determining a Good Schedule
  • A list of constraints to our solution is decided
    up front
  • These constraints are weighted on how important
    they are to the final solution
  • Two basic constraint categories
  • Hard constraints
  • Soft constraints
  • Hard constraints are impossible situations
  • Soft constraints are usually preferences and
    annoying schedule quirks

14
Comparing Schedules in Population
  • Each created schedule is searched to find any
    failed constraints
  • Each failed constraint found will give that
    schedule a weighted demerit value
  • The sum of all demerits for each schedule is
    called its fitness.
  • The fitness value can be used to compare
    schedules with one another

15
GA Programming Steps
  • Load in all input data
  • Build initial population of schedules
  • Hold tournaments to find good genetic material
  • Creation of new schedule with crossover
    techniques
  • Mutation of schedules to infuse new genetic
    material
  • Replace tournament losers with newly created
    schedules.
  • Hold next tournament and repeat until solved

16
Genetic Programs Attempted
  • Base program as explained (control)
  • Base program with greedy procedure
  • Ordered Greed Program
  • Ordered Greed/Base Hybrid
  • Mutation only

17
Base with Greedy Procedure
  • Greedier attempt at building the population
  • Placing classes into the schedule is still
    random, but multiple random attempts are tried
    and only the best is placed
  • Gives a much better initial population with only
    slightly more processing time

18
Ordered Greed Program
  • Instead of a population of schedules, a
    population of permutations is created instead
  • To place each course into a schedule, lists of
    possible professors and viable rooms are created
    and methodically tested for every time slot
  • Courses are only placed into the schedule once a
    location is found that breaks no hard constraints

19
Ordered Greed Continued
  • Since this is a population of permutations,
    regular crossovers can not be done
  • Crossovers that generate new permutations were
    tried and tested amongst each other
  • Partially-Matched
  • Ordered
  • Merging
  • Mutations were also different- a small swap of
    values inside the permutation

20
Hybrid Program
  • Born out of the tendencies of Ordered Greed to
    solve all hard constraints, and the basic program
    doing better with most soft constraints
  • Starts Ordered Greed
  • Ends Base program

21
Mutation Only Program
  • Generational type program
  • Mutation seemingly had such a powerful effect in
    the results of the other programs
  • Discarding tournaments and crossover procedures
    altogether

22
Optimizing Parameters
  • Crossover (both base and OG)
  • Population Size
  • Tournament Size
  • Mutation Rates (both base and OG)
  • Greedy Parameter

23
(No Transcript)
24
(No Transcript)
25
(No Transcript)
26
(No Transcript)
27
(No Transcript)
28
(No Transcript)
29
(No Transcript)
30
(No Transcript)
31
Final Comparison of Programs
  • All five programs were then set up with best set
    of parameters
  • Hundreds of trials were done comparing each of
    them on many sets of inputs.
  • Results were a little misleading

32
(No Transcript)
33
(No Transcript)
34
Summary of Final Results
35
Possible Improvements
  • Retest parameters for longer times with same sets
    of input data.
  • Adding seniority of Faculty to the Mix
  • Using more efficient pre-built GAs
  • Such as GA-LIB
  • Using Bit Streams to store schedules
  • Inputting a real world example
  • Fixing the sharing of resources problem

36
Questions?
  • Thanks for coming

37
Hard Constraints
  • Professor signed up for two classes at the same
    time
  • Room scheduled for two classes at the same time
  • Professor teaching a class they are not trained
    for
  • Professor teaching more classes then their
    maximum load
  • Room holding a class that it can not accommodate

38
Soft Constraints
  • Professor preferences for evening or morning
    classes
  • Professor teaching both on same day
  • Professor teaching class they do not wish to
    teach
  • Professor teaching more or less credits then they
    wish
  • Different sections of the same class being held
    the same time
  • Different section of the same class being taught
    by different professors

39
Build Initial Population of Schedules
  • Decide on Random Build or Ordered Greed
  • Random Build creates each schedule by randomly
    picking all needed information for every class
    with no regard to constraints
  • Ordered Greed attempts to place classes into
    schedules only if they do not violate constraints
  • Ordered Greed gives a much better initial
    population while Random Build is much quicker

40
Tournaments
  • Randomly pick a handful of schedules from the
    array
  • Pick the two best and two worst from this
    selection
  • Use the two best to create new schedules using
    crossover
  • The two worst will be replaced with the newly
    created ones

41
Crossover
  • Method that takes parts from two schedules in
    order to create new ones, much like a child is
    formed by taking DNA pieces from both parents.
  • Regular Crossover types
  • Uniform
  • One-point
  • Two-point
  • Ordered Greed Crossover types
  • Partially-Matched
  • Ordered
  • Merging

42
Mutations
  • Regular mutations are needed on newly created
    schedules in order to introduce genetic diversity
  • When mutation is done one class is randomly
    given a new room, professor, and time
  • Experimentation was done to determine rate of
    mutation for both how often a schedule is
    mutated and how many classes of that schedule are
    changed
Write a Comment
User Comments (0)
About PowerShow.com