1 / 14

Timetabling with Genetic Algorithms

Timetabling with Genetic Algorithms. Present by : Kotchaporn Onsuan Advisor : Boonyarit Intiyot , Ph.D. Co-advisor : Asst. Prof. Chawalit Jeenanunta , Ph.D. Timetabling Problem. Determine the “best” timetable. Example: School of Computing • Hundreds of classes per week.

Télécharger la présentation

Timetabling with Genetic Algorithms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Timetabling withGenetic Algorithms Present by : KotchapornOnsuan Advisor : BoonyaritIntiyot , Ph.D. Co-advisor : Asst. Prof. ChawalitJeenanunta, Ph.D.

  2. Timetabling Problem • Determine the “best” timetable. • Example: School of Computing • Hundreds of classes per week. • Complex set of constraints. • Fixed number of rooms and time slots (~50 rooms on different sites, 40 hours in a week)

  3. Constraints Hard constraints – if broken result in invalid timetable • All classes must be scheduled. • No class/lecturers double booked. • Room capacities must not be exceeded and correct room types must be used. Soft constraints – relate to quality of a feasible timetable • Classes scheduled within preferred hours. • Hour for lunch is allowed. • Avoid long runs of consecutive lectures.

  4. Fitness Function • To use GAs for timetable generation, we need a way of evaluating a timetable. • Timetable fitness: • Where is the weight of the constraint

  5. Solution Encoding Approach 1 • Each value (allele) in chromosome represents the timeslot and room given to a module • Large number of allele values, heavy burden on fitness function

  6. Timetabling GA Approach 2 • In the second GA, each allele represents the timeslot assigned to a class • A greedy algorithm assigns the rooms later, taking the classes in order of size and assigning rooms to each in turn

  7. Example การจัดตารางเวลาการทำงานของพยาบาลในโรงพยาบาลลพบุรี แผนกอายุรกรรม มีพยาบาลประจำแผนก 11 คน ประกอบด้วยหัวหน้า แผนก 1 คน พยาบาลวิชาชีพ 6 คน พยาบาลเทคนิค 4 คน เงื่อนไข • รูปแบบการจัดเวลาการทำงานจะแบ่งเวรทำงานออกเป็น 3 เวรในแต่ละวัน เวรละ 8 ชั่วโมง คือ เวรเช้า เวรบ่าย เวรดึก - เวรเช้า คือ ทำงานระหว่างเวลา 8.00 – 16.00 น. - เวรบ่าย คือ ทำงานระหว่างเวลา 16.00 – 24.00 น. - เวรดึก คือ ทำงานระหว่างเวลา 00.00 – 8.00 น.

  8. Example • พยาบาลผลัดเปลี่ยนกันขึ้นเวรตลอดเวลา 24 ชั่วโมง - เวรเช้า อัตราส่วนพยาบาลวิชาชีพต่อพยาบาลเทคนิค (RN:TN)เป็น 2 : 1 - เวรบ่าย อัตราส่วนพยาบาลวิชาชีพต่อพยาบาลเทคนิค (RN : TN) เป็น 1 : 1 - เวรดึก อัตราส่วนพยาบาลวิชาชีพต่อพยาบาลเทคนิค (RN : TN) เป็น 1 : 1 • ในแต่ละเวร ไม่อนุญาตให้เกิดกรณีที่เวรทำงานไม่มีพยาบาลสักคนอยู่เข้ารับเวรอย่างเด็ดขาด • หัวหน้าแผนก จะทำงานเฉพาะเวรเช้า และได้หยุดทำงานในวันเสาร์-อาทิตย์ และวันหยุดนักขัตฤกษ

  9. Example • ใน 1 วัน หากพยาบาลจะต้องทำงานติดต่อกัน หรือต่อเนื่องกัน ไม่ควรเกิน 2 เวร • ใน 1 เดือนพยาบาลแต่ละคนจะมีวันหยุดอย่างน้อย 8 วัน • ในแต่ละเวรทำงานจะต้องมีพยาบาลทำงานครบตามจำนวนที่กำหนดไว้

  10. Example Genetic Algorithm Chromosome Encoding • โครโมโซมในที่นี้ คือ คำตอบจากการสุ่มจัดตารางการทำงานของพยาบาล ประกอบด้วยหมายเลขช่วงเวลาการทำงานต่อกัน โดยเรียงตามวันที่ทำงาน รหัสพยาบาล จำนวนพยาบาลที่อยู่เวร และน้ำหนักเงื่อนไขการจัดตารางของพยาบาลแต่ละคน ดังรูป

  11. Example ฟังก์ชันเป้าหมาย โดยที่ = จำนวนเงื่อนไขทั้งหมด = ค่าน้ำหนักของเงื่อนไขลำดับที่ = ฟังก์ชันการตรวจสอบเงื่อนไขลำดับที่

  12. Example

  13. Example ผลการทดลอง ประมวลผลจัดตารางเวลาการทำงานเดือนเมษายน 2547 แบบไม่มีเงื่อนไข

  14. THANK YOU

More Related