Need C# Genetic algorithm to solve scheduling problem

Hi..
I'm looking for C# code to solve a scheduling problem were 100 people have signed up for 4 classes that only have 25 seats.  How to fill the classes bases on first come first serve.
thx
LVL 1
JElsterAsked:
Who is Participating?
 
Aaron TomoskyConnect With a Mentor SD-WAN SimplifiedCommented:
If it's in SQL you can pull the top 25 by time. Repeat.
0
 
TommySzalapskiCommented:
Umm, what's the issue? They can all go into a class. Is the issue that they all want the same class? If it's first come first served, then you just assign them in the order they arrived to whichever class they want. I'm not seeing where the genetic algorithm is needed.
For a genetic algorithm, you need to have something to optimize. What are you optimizing here?
0
 
JElsterAuthor Commented:
Thanks... What if... I have 4 classes , 100 Students... and each student must take 2 of the classes. How do I assign the students.. how many students can I have in each class.  I'm trying to optimize the number of students in a class
0
 
ozoCommented:
If you have 4 classes , 100 Students... and each student must take 2 of the classes.
then at least one class must have at least 50 students.
if classes only have 25 seats, at least 25 of them must stand.
If you are trying to minimize the number of students standing,
then you only need to insure that all seats are filled.
0
 
tliottaCommented:
What is "optimize"?

Assumptions seem to include that all four classes are given once and that the four run concurrently... otherwise there is no known direction to go.

But if students "must" take two classes, then it doesn't fit with concurrent classes, and maybe not single sessions.

And if classes may be presented more than once or if they are presented at different times, the whole problem might be moot. All students might easily get all four classes.

Too much is either unknown or contradictory.

Tom
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.