Computing.Net > Forums > Programming > Algorithm for generating a schedule . .

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Algorithm for generating a schedule . .

Reply to Message Icon

Name: zeta77
Date: November 13, 2001 at 12:35:04 Pacific
Comment:

Hello. I have an access database that consists of 5 tables: one of student information including a student ID, one of teacher information including a teacher ID, one of course information including a course ID, one the refers to a student and course (the student wants to take that class) and one that refers to a teacher and a course (a teacher that can teach that class). What I need to do is to generate a schedule of classes that allows the most students to take the classes they want. The school day is 7 periods long and each student is required to take 6 classes. Each teacher must teach 5 classes. The problem is that, for lets say calculus, there are only enought students interested to fill 3 classes, so I can't be offered all periods. The only algorithm I thought of (very inefficient) is to generate all possible schedules and determine for each how many students cannot take all there classes. Establish a max number of these unfulfilled students and discard those schedules that are above that number. The max number can also be dynamically changed as each successive permutation is generated. Any ideas would be great!!



Sponsored Link
Ads by Google

Response Number 1
Name: Apple
Date: November 15, 2001 at 11:47:34 Pacific
Reply:

how much info is being provided?
I assume you know which students want which classes and which teachers can teach which classes.

The problem is very large as is. pick it apart. What are the class size limits? Are there too many students to fit in the class? How many classes would be required to fit all students who want the class if only the minimum number attend? if the maximum number attend? Is this number of classes greater than the number of teachers who can teach it?

These kinds of questions break down your problem into a set of functions that will make your program easier.

Generating all possible permutations should not be necessary if you take out the impossibilities before hand. Set limits. Then run the permutations.


0
Reply to Message Icon

Related Posts

See More


using rundll32 static vs dynamic lib



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Algorithm for generating a schedule . .

Unix script for generating a report www.computing.net/answers/programming/unix-script-for-generating-a-report/15065.html

Algorithm for generating random num www.computing.net/answers/programming/algorithm-for-generating-random-num/9348.html

A batch file to generate a shortcut www.computing.net/answers/programming/a-batch-file-to-generate-a-shortcut/14801.html