?
Solved

Need C# Genetic algorithm to solve scheduling problem

Posted on 2011-04-21
5
Medium Priority
?
1,916 Views
Last Modified: 2012-06-22
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
0
Comment
Question by:JElster
5 Comments
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 35445419
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
 
LVL 39

Accepted Solution

by:
Aaron Tomosky earned 2000 total points
ID: 35445452
If it's in SQL you can pull the top 25 by time. Repeat.
0
 
LVL 1

Author Comment

by:JElster
ID: 35446921
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
 
LVL 85

Expert Comment

by:ozo
ID: 35446937
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
 
LVL 27

Expert Comment

by:tliotta
ID: 35450289
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

Featured Post

A Cyber Security RX to Protect Your Organization

Join us on December 13th for a webinar to learn how medical providers can defend against malware with a cyber security "Rx" that supports a healthy technology adoption plan for every healthcare organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Prime numbers are natural numbers greater than 1 that have only two divisors (the number itself and 1). By “divisible” we mean dividend % divisor = 0 (% indicates MODULAR. It gives the reminder of a division operation). We’ll follow multiple approac…
This article covers the basics of data encryption, what it is, how it works, and why it's important. If you've ever wondered what goes on when you "encrypt" data, you can look here to build a good foundation for your personal learning.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Suggested Courses
Course of the Month16 days, 7 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question