Simulated Annealing and timetables

J

Jochus

Hi!

I'm study Industrial Enginering Informatics (second year) and we have to
write a a program that writes out HTML timetables of classes (school
classes, I mean ...).

First we have to read in the information:
* how many teachers are there?
* what subjects do teachers give?
* what are the specific classrooms ?
* are there specific hours that teachers wonna give lesson?
.... (and so on ...)

We have to solve this problem with the Simulated Annealing algorithm. But I
can't find a start to begin. We haven't got any information, so we have to
search it up on the internet.

Maybe there's someone who could give me a hint?

Many thnx!

Jochus
 
H

Howard

Jochus said:
Hi!

I'm study Industrial Enginering Informatics (second year) and we have to
write a a program that writes out HTML timetables of classes (school
classes, I mean ...).

First we have to read in the information:
* how many teachers are there?
* what subjects do teachers give?
* what are the specific classrooms ?
* are there specific hours that teachers wonna give lesson?
... (and so on ...)

We have to solve this problem with the Simulated Annealing algorithm. But
I can't find a start to begin. We haven't got any information, so we have
to search it up on the internet.

Maybe there's someone who could give me a hint?

This here's a *language* forum, not an algorithm forum. You might try using
Google.

-Howard
 
T

Thomas Matthews

Jochus said:
Hi!

I'm study Industrial Enginering Informatics (second year) and we have to
write a a program that writes out HTML timetables of classes (school
classes, I mean ...).

First we have to read in the information:
* how many teachers are there?
* what subjects do teachers give?
* what are the specific classrooms ?
* are there specific hours that teachers wonna give lesson?
... (and so on ...)

We have to solve this problem with the Simulated Annealing algorithm. But I
can't find a start to begin. We haven't got any information, so we have to
search it up on the internet.

Maybe there's someone who could give me a hint?

Many thnx!

Jochus

Here is just a start.
From your information:
1. There are zero or more "teachers".
2. Each teacher teaches one or more subjects.
3. Each subject has a duration.
4. There are one or more classrooms.
5. Each classroom has a duration in which it is open.

Looks like there is a need for teachers, subjects, and classrooms:
class Subject
{
string title;
unsigned int duration_minutes;
};

/* A teacher has a name. A teacher has a reference
* or pointer to a subject. This allows sharing
* of subject data.
*/
class Teacher
{
string name;
vector<Subject *> subjects;
};

typedef unsigned int Start_Time;

/* A schedule record has a start time,
* a pointer to the instructor {who is using the
* time} and a pointer to the subject {being taught}.
*/
class Schedule_Record
{
Start_Time start;
Teacher * p_instructor;
Subject * p_subject;
};

typedef vector<Schedule_Record> Schedule;

class Classroom
{
string location; /* i.e. A106 or Eng202 */
Schedule agenda;
};


Now start out writing a simple main() function
which inputs a roster of subjects and get it
working. Next, add in the teachers and the
subjects each teacher is teaching. Test and
get it working correctly. Next, create a container
of classrooms. Add code to list the agenda of
each classroom (and the class location). Get this
working. This is your fundamental program.
Now implement your algorithm into this program.

Suggestions:
1. Use data files for input.
This will make testing a lot easier and automated.
2. Test Early, Test Often, keep the tests.
Read about "Test Driven Development".
3. Save Early, Save Often.
Once the program works (at each stage), save
it {preferably on some other medium than your
harddrive}. This will allow you to revert to
the last working version in case something goes
awry.
4. Read about Databases.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library
 
K

kevin.hall

"Numerical Recipes in C" has a good discussion about simulated
annealing. The book is available in PDF format online. Search google,
and you'll find it.

WARNING #1: You are going to have to specify values for how well a
match is for simulated annealing. For example, you might give a +5
value for every class a teacher teaches that agree with the hours of
teaching the teacher desires. But for the more important topic of is a
particular teacher trained in a subject, you'll give a much more
important value -- say +50 or +100. You'll have to do this for every
variable in your system. Then you can start annealing.

WARNING #2: Annealing can be somewhat touchy. The best parameters are
often found by trial and error -- especially when you are mapping
something qualitative to something quantitative. Experiment a little.

Good luck!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top