08-31-2004, 11:49 PM
Ok I work temporaraly at a hospitall, and they asked me to write this program:
Every week one of the employees has the task to be 24 hours a day availlable for technicall services. At the beginning of each year they can fill in a form, which weeks the don't are availleble.
This program must be able to read this form and automaticly fills in which employee has the task.
Here is what I did I created an array wich looks like this:
Weeks(MaxEmployees, 52)
Then The form is conferted in a data stroke wich has 53 entry's like this:
DATA 0,0,0,0,0,1,1,1,0,1,0........ etc. untill 53
A 0 is availlable and a 1 Not. The part I get stuck is to get an Output wich is an array where each emplyee gets divided. Like this:
Task(Weeks) = "EmployeeName"
I gave every Emplyee a number, but they don't want to get planned to do two weeks after eachotter so each empoyee has a variable wich hold track off how many weeks the already have to do so the one with the lesser weeks is gonna be next unless he has a 1 in his data stroke.
How do I do this is my question.
I hope you understand my englisch, its hard for me to descripe the idea I have in my mind. I also can't show you what I have so far cause the program is on my works computer and I type this at home, I'll try to post this later.
Every week one of the employees has the task to be 24 hours a day availlable for technicall services. At the beginning of each year they can fill in a form, which weeks the don't are availleble.
This program must be able to read this form and automaticly fills in which employee has the task.
Here is what I did I created an array wich looks like this:
Weeks(MaxEmployees, 52)
Then The form is conferted in a data stroke wich has 53 entry's like this:
DATA 0,0,0,0,0,1,1,1,0,1,0........ etc. untill 53
A 0 is availlable and a 1 Not. The part I get stuck is to get an Output wich is an array where each emplyee gets divided. Like this:
Task(Weeks) = "EmployeeName"
I gave every Emplyee a number, but they don't want to get planned to do two weeks after eachotter so each empoyee has a variable wich hold track off how many weeks the already have to do so the one with the lesser weeks is gonna be next unless he has a 1 in his data stroke.
How do I do this is my question.
I hope you understand my englisch, its hard for me to descripe the idea I have in my mind. I also can't show you what I have so far cause the program is on my works computer and I type this at home, I'll try to post this later.