FET Forum

FET Support (English) => Get Help => Topic started by: Paul the dolphin on October 09, 2014, 10:06:29 PM

Title: Dolphins schedule
Post by: Paul the dolphin on October 09, 2014, 10:06:29 PM
Hello all,

I am in need of some serious scheduling help. I found this program via a friend of mine but cant make much sense of it. I work with kids, dolphins, therapist and time and its one big mess. Currently we try to plan everything from the head but that's taking too much time. I am trying to figure out wether I can do the scheduling, or better yet generate the schedule automatically via FET.

My assignment: distribute the kids combined with on of 12 therapist over 5 dolphins and 4 timeslot

However
Some kids have limits, like specific therapist and dolphins (one or both)
Some therapist have limits on their day
etc.

I want to know if the program can, when there is no restriction and no preference for time or dolphin or therapist automatically distribute these and put them in a schedule? And if so, how do I realize that?

thank you for your help
Title: Re: Dolphins schedule
Post by: Volker Dirr on October 09, 2014, 10:29:55 PM
Hi Paul,

i need a bit more information:

if i understand correct then you have 4 timeslots per day.

how many dolphins, therapist and stundes can you have max a the same time (in one slot)?

So for example, tell me something about the following points:
a) if one kid wants a therapie, then of course it need one therapist and one dolphin.
b) if one kid wants a therapie, do you need sometimes 2 therapists and/or 2 dolphins?
c) if two kids want a therapie, can they share one dolphin and/or therapist in the same timeslot?
d) is it possible to do two courses at the same time? (so can you have a kid, therapist and dolphin for one course and at the same time an other course with an other kid, therapist and dolphin.)
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 09, 2014, 11:08:03 PM
hey Volker dirr,

Thanks for your interest:

the kids are here for 2 weeks in which they have therapy every weekday. at the beginning of the weekday they become a time, dolphin and therapist. We rever to an individual therapy as as session for example I as a therapist have a session in the 2nd time slot with dolphin x and kid x.

We have 4 time slot and 5 dolphins of which 4 can work at any time.
the table is time(y-axis) and dolphins (x-axis).

Each Kid in the end needs 1 time slot, 1 therapist and 1 dolphin, there is no sharing and this stays the same for the 2 weeks they are here.

Some kids have been her before and have a preference for a therapist and a dolphin.
Some kids cant do any late session or any early session due to medical reasons.

Example of a typical period of 16 kids
4 kids time, dolphin and therapist are set
6 Kids therapist and dolphin are set
4 kids can pick between 2 different therapist and 2 dolphins (however each therapist has 2 dolphins he can work with)
2 kids are open any therapist, dolphin and time will fit

If I register all this info for each kid; time constraints yes/no and what time, therapist constrainst yes/no and who and dolphins yes/no and who, is it possible for the program to spit out a schedule or multiple schedules with solutions were it picked filled in the blanks (all the kids who do not have dolphin,time and therapist set in stone)?





Title: Re: Dolphins schedule
Post by: Volker Dirr on October 10, 2014, 12:14:00 AM
Hi Paul,

Maybe the custom FET version will work best:
http://lalescu.ro/liviu/fet/forum/index.php?topic=1633.0
Let's see what Liviu think about.



You need to use some tricks if you want to use the official FET version:

FET -> Data -> Days and hours -> Days: Add 14 days (or 10 days if you don't work Saturday and Sunday)
FET -> Data -> Days and hours -> Hours: Add 4 hours

FET -> Data -> Subject -> course" (or what ever you want)

FET -> Data -> Students -> Years: add the kids names as "year".
FET -> Data -> Activity tags -> add the kids names (once again) as "activity tags".

FET -> Data -> Rooms: add the therapist as "room".
FET -> Data -> Rooms: add the dolphins also as "room"

FET -> Data -> Time constraints -> Students -> a students set is not available: set students available times here

FET -> Data -> Space constraints -> Rooms -> room is not available: set the therapists available times here

FET -> Data -> Activities -> add activities: Now add activities here. You must do it this way:
split the activity into as many parts as you have days. Set weight 100%.
a) add the students name (no teacher and no activity tags). And "add activity".
b) add a second activity. Again same number of days and weight. But this time without students and teachers, but with the activity tag as student.

FET -> Data -> Time constraints  -> activities  -> same starting time (day+hour)  -> add  -> check the "add multiple activities" check-box  -> select the two activities you just generated.

If you already now the therapist:
FET -> Data -> Space constraints -> Students -> home room: add therapist to students.
If you don't know the therapist:
FET -> Data -> Space constraints -> Activities -> occupy max different rooms: add 14 (10) activities of the activities with students name (YEAR!)

If you already now the dolphin:
FET -> Data -> Space constraints -> activity tag -> preferred room: add dolphin to kid (activity tag).
If you don't know the dolphin:
FET -> Data -> Space constraints -> Activities -> occupy max different rooms: add 14 (10) activities of the activities with kid name (activity tag)

repeat this until all data is included.

As LAST step:
FET -> Data -> Time constraints  -> activities  -> max simultaneous: select all activities at one. Select all time slots and set max 2*4=8. add.

now generate the timetabe.

Hmmm... maybe it's easier with the mapr custom version. It's late now. I will think about that tomorrow again. Maybe Liviu will answer earlier.

Title: Re: Dolphins schedule
Post by: Volker Dirr on October 10, 2014, 12:00:19 PM
Sorry, small bug in last post. i modified it from:
"FET -> Data -> Time constraints  -> activities  -> max simultaneous: select all activities at one. Select all time slots and set max 4. add."

into

"FET -> Data -> Time constraints  -> activities  -> max simultaneous: select all activities at one. Select all time slots and set max 2*4=8. add."
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 10, 2014, 09:46:11 PM
Hey Volker, I have followed the steps but get the following error :

Simulation impossible! Maybe you can consider lowering the constraints. The partial results were saved in the directory C:\Users\cdtc065\fet-results\timetables\test run-single

Additional information relating impossible to schedule activities:

Please check the constraints related to the activity below, which might be impossible to schedule:

No: 1, Id: 31 (T:, S:Therapy, AT:Merel K, St:)

To give you some more insight; an example of next weeks schedule

Therapyplan -
                                    
         

Dolphin 1           Dolphin 2              Dolphin 3     Dolphin 4     Dolphin 5         Time slot

Pat 1                                           Pat 2               Pat 3              Pat 4               
Therapist 1                                  Therapist 2     Therapist 3    Therapist 4       08:00-10:00
   
Pat 5                 Pat 6                  Pat 7               Pat 8              Pat 9           
Therapist 5    Therapist 6      Therapist 1     Therapist 2    Therapist 4        10:30-12:30
   
                         Pat 10                Pat 11             Pat 12            Pat 13     
                    Therapist 7         Therapist 6     Therapist 2   Therapist 8       13:00-15:00

Pat 14               Pat 15                                                             Pat 16
Therapist 7       Therapist 6                                                      Therapist 8       15:30-17:30   
         
This schedule was made based on the following infromation (tx = timeslot, Dx=dolphin, Px= therapist):
pat 1,   restricted t1, D/P=free
pat 2,   restricted t1 + prefer P3, D=free
pat 3,   restricted t1 or t2 + P3, D=free
pat 4,   restricted t1 + prefer P5, D=free
pat 5,   restricted t2 + prefer P5, D=free
pat 6,   restricted t1 or t2 + P/6/9 (random speech therapist), D=free
pat 7,   restricted t2, D/P=free
pat 8,   restricted t1 or t2 + P/2/3/4/5/7 (random Physical therapist), D=free
pat 9,   restricted t1 or t2 + P/2/3/4/5/7, D=free
pat 10, restricted P7 + D2, tx=free
pat 11, restricted P/6/9/, tx/D=free
pat 12, restricted P2, tx/D=free
pat 13, tx/P/D=Free
pat 14, restricted P7 + t4 + D3
pat 15, restricted p/6/9/, tx/D=free
pat 16, tx/P/D=Free

other rules followed:

Difference between prefer and restricted P; Some kids need a specific therapist, other prefer a therapist but dont "need" it.
Need>prefer

P3 works in t1 and t2
P3 has 1 pat this period
P5 has 1 pat this period
P1/4/7/8 have 2 pats this period
P2/6 have 3 patients this period
P9 is on holiday

Dolphin 1 has off in at least 1 tx
Dolphin 2 has off in at least 1 tx
Dolphin 3 + 4 have off set in t4
Only fill all dolphins in one tx as last resort, a back up dolphin is preferable (not much room for that in this schedule)
however restrictions>back up dolphin

Therapist who have 3 pats (P2/6) preferably don't have both t1 and t4
This varies amongst therapist, havent really gotten to their prefrences yet.

If possible no sessions in t4

Relationship D and P in descending order of preference:
P1 = 2,1,3
P2 = 4,3,2
P3 = 4,2,1
P4 = 5,3,4
P5 = 1,3,4
P6 = 2,1,3
P7 = 1,2,3,4
P8 = 5
P9 = 5

I hope this makes sense, this is what we're dealing with here :)

Title: Re: Dolphins schedule
Post by: Volker Dirr on October 10, 2014, 09:48:39 PM
Difficult to help if i haven't got that example file. Maybe sent it to me.

Did you enter your whole dataset or just one dataset so far?
Please check easy dataset first.
So check if it work with one course (dolphin-pat-therapist) correct.
We can check bugs easier if you start and check easy dataset first.
Title: Re: Dolphins schedule
Post by: Volker Dirr on October 10, 2014, 09:52:35 PM
hm... i see that i forgot that there is a relationship between P and D. let me think one more time.
Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 11, 2014, 11:16:09 AM
Quote from: Paul the dolphin on October 10, 2014, 09:46:11 PM
To give you some more insight; an example of next weeks schedule

Therapyplan -
                                    
         

Dolphin 1           Dolphin 2              Dolphin 3     Dolphin 4     Dolphin 5         Time slot

Pat 1                                           Pat 2               Pat 3              Pat 4               
Therapist 1                                  Therapist 2     Therapist 3    Therapist 4       08:00-10:00
   
Pat 5                 Pat 6                  Pat 7               Pat 8              Pat 9           
Therapist 5    Therapist 6      Therapist 1     Therapist 2    Therapist 4        10:30-12:30
   
                         Pat 10                Pat 11             Pat 12            Pat 13     
                    Therapist 7         Therapist 6     Therapist 2   Therapist 8       13:00-15:00

Pat 14               Pat 15                                                             Pat 16
Therapist 7       Therapist 6                                                      Therapist 8       15:30-17:30   
         
This schedule was made based on the following infromation (tx = timeslot, Dx=dolphin, Px= therapist):
pat 1,   restricted t1, D/P=free
pat 2,   restricted t1 + prefer P3, D=free
pat 3,   restricted t1 or t2 + P3, D=free
pat 4,   restricted t1 + prefer P5, D=free
pat 5,   restricted t2 + prefer P5, D=free
pat 6,   restricted t1 or t2 + P/6/9 (random speech therapist), D=free
pat 7,   restricted t2, D/P=free
pat 8,   restricted t1 or t2 + P/2/3/4/5/7 (random Physical therapist), D=free
pat 9,   restricted t1 or t2 + P/2/3/4/5/7, D=free
pat 10, restricted P7 + D2, tx=free
pat 11, restricted P/6/9/, tx/D=free
pat 12, restricted P2, tx/D=free
pat 13, tx/P/D=Free
pat 14, restricted P7 + t4 + D3
pat 15, restricted p/6/9/, tx/D=free
pat 16, tx/P/D=Free

other rules followed:

Difference between prefer and restricted P; Some kids need a specific therapist, other prefer a therapist but dont "need" it.
Need>prefer

P3 works in t1 and t2
P3 has 1 pat this period
P5 has 1 pat this period
P1/4/7/8 have 2 pats this period
P2/6 have 3 patients this period
P9 is on holiday

Dolphin 1 has off in at least 1 tx
Dolphin 2 has off in at least 1 tx
Dolphin 3 + 4 have off set in t4
Only fill all dolphins in one tx as last resort, a back up dolphin is preferable (not much room for that in this schedule)
however restrictions>back up dolphin

Therapist who have 3 pats (P2/6) preferably don't have both t1 and t4
This varies amongst therapist, havent really gotten to their prefrences yet.

If possible no sessions in t4

Relationship D and P in descending order of preference:
P1 = 2,1,3
P2 = 4,3,2
P3 = 4,2,1
P4 = 5,3,4
P5 = 1,3,4
P6 = 2,1,3
P7 = 1,2,3,4
P8 = 5
P9 = 5

I hope this makes sense, this is what we're dealing with here :)

I think it makes a lot of sense. It might be possible in FET, even if with a custom version.

Let us try to develop a solution.

You have activities (number of patients * number of days per week), each with duration 1, to be allocated each one to a period, to a dolphin, and to a therapist.

You can consider a FET "day" to have 4x5 "hours per day", and allocate activities to slots (hours x dolphins), and then to rooms, which are therapists. Or maybe consider a FET "day" to have 4x5x9 slots per day (hours x dolphins x therapists), and allocate activities only to slots. Or, considering that each day is the same, consider a FET "week" to have a dimension from 4x5x9 and the slots per day to have the rest of the two dimensions.

Official FET can handle max 35 days per week and 60 hours per day, but these can be increased in a custom version.

Then, there are many constraints available in FET. One that can be very nice is activities occupy max time slots from selection, to specify that for instance a dolphin can have maximum 3 activities from 4 selected slots. Other constraints are preferred time slots, with variable weight.

The last constraint, preferences of therapists for dolphins, seems difficult/impossible for me with the above approaches. But might be possible in a custom version. Or maybe by some tricks.

I'll let you consider these approaches and maybe come back with specific questions.
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 11, 2014, 11:54:36 AM
Liviu,

Thank you for your post, i am however not yet with such experience that i can translate your remarks into a concrete input into fet but i am willing to learn! As for specific question, would it be possible to develop a custom fet perhaps solely for this purpose? There are going to be people working with who arent very computer friendly, so any help i can get is appreciated!
Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 11, 2014, 03:10:45 PM
Hello, Paul,

I hope I have some nice news! Please see the attached file, and let me know if the file and the timetable I obtained are good. I might have forgot something, resulting in an error - but I hope not.

If you see the all time constraints window, you can read the comments in the order I added them, explaining the procedure.

Only one constraint missing, backup dolphins (which should be possible in a custom version), but the rest is official FET.

Also, in your text there is an error? Pat 14, restricted to D3, but in the Therapyplan it is to Dolphin 1.

If you generate, the nicest timetable to see is activities timetable days vertical.
Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 12, 2014, 07:24:38 AM
I thought, and also the backup dolphin is possible. But only with 100% weight. See attached file, I made backup dolphins for t1, t3, and t4 (for all four slots it seems impossible).
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 13, 2014, 04:37:25 PM
excuse my language but

HOLY SHIT you pulled it off. I am really impressed!

In the files I saw this:

"probably mistake in problem description: in your table, Pat 14 is to Dolphin 1, but in rules in first paragraph it is restricted to P7 + t4 + D3. I made it restricted to D1."

you were right it was supposed to be "restricted"

and

"Third paragraph, "only fill all dolphins in one tx as last resort, a backup dolphin is preferable..." - it is possible, but only with 100% weight in official FET. I added this backup dolphin for t1, t3, and t4. For all four slots it seems impossible."

Would it be possible to give a preferences order for back up dolphins, for exampe preferably backup in t1 and t3 or any other combination?

Now the most important question....

Teach me master

where do i input what for the next schedule?

Thanks again, I wasnt expecting such tremendous help or these great results!
Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 13, 2014, 06:28:08 PM
I am glad it works!

Quote from: Paul the dolphin on October 13, 2014, 04:37:25 PM
Would it be possible to give a preferences order for back up dolphins, for exampe preferably backup in t1 and t3 or any other combination?

Either a custom version (but I am not sure if it is possible), or just make more files and try each one (there are not many variants).

Quote
Now the most important question....

Teach me master

where do i input what for the next schedule?

You need to open the .fet file (not the data_and_timetable one, which is locked). And see each variable I have input, in the Data menu and then in the Time->All (all time constraints). I added comments when a time constraints block begins, to explain what I have done. Please go through these, as a first step, then come back here with specific questions about constraints, but preferably one at a time. I will try to answer as my time permits.

There is a thing which may be improved in my style. Instead of adding students years as "Pat 1", ..., and subjects as "s1", do not add years, but add subjects as "Pat 1", and activities as having only subject (no teachers and no students). The output HTML will be nicer.

PS: Please let me know if I may add the input .fet file and your description of the problem as an official example. In what directory? (country, city, organization) (if affirmative).
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 14, 2014, 02:21:04 PM
Hi again,

I have started trying to understand what you did here and I think I understand how to set the restrictions.

Most of the non patient restriction stay the same  so i wont have to edit them in a new period, which makes me happy.

I however don't understand the backup dolphin where you said only 2 or 3 will work, however you inputted for all 4 sessions?

I tried throwing out all the "patx" and changed the "subjects" to "pat x" however it would not hold. I probably need to adjust all the time constraints right?

Also would it be possible to condense printable schedule to something similar as above, so that it displays only 4 timeslots instead of 9 times each one? In other words that the therapist is placed under the the pat and x-axis is tx=4 and y=dolphinsx?

I would be honored if you would use this problem as a general solution and example, however it is very important to me that in no way any reference is found to "dolphins" or in "dolphins" in combination with "therapist". I would like to keep this a little under the hood if you understand :)

For next period, I am going to try to input the needed variables myself and come back to you how it worked out. Meanwhile the people I work with are very happy so far. This basically frees up over 80 hours a year!

If it works out I am going to discuss donation possibilities with my superiors, do you have a donation site?

Thanks again and i will come back to you soon!





Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 14, 2014, 03:01:26 PM
Quote from: Paul the dolphin on October 14, 2014, 02:21:04 PM
Hi again,

I have started trying to understand what you did here and I think I understand how to set the restrictions.


It can be easy, once you get accustomed to using tricks in the program. In the majority of the constraints all activities are implied, and a useful button is "All". Also, you can click on the table heading.

Quote

Most of the non patient restriction stay the same  so i wont have to edit them in a new period, which makes me happy.

I however don't understand the backup dolphin where you said only 2 or 3 will work, however you inputted for all 4 sessions?


The second constraint is inactive (begins with X - ). You can de/activate constraints in all time constraints dialog.

Quote

I tried throwing out all the "patx" and changed the "subjects" to "pat x" however it would not hold. I probably need to adjust all the time constraints right?


I think when you remove the students year you remove the activity. I am attaching a good modified file for you to use.

Quote

Also would it be possible to condense printable schedule to something similar as above, so that it displays only 4 timeslots instead of 9 times each one? In other words that the therapist is placed under the the pat and x-axis is tx=4 and y=dolphinsx?


I propose you the attached two files. One is directly available in the results (activities.xml), the other one - you need to export to CSV after generating.

To do exactly what you need might be possible as a custom version, but the idea is for you to use the official FET preferably, because you can always use the latest version.

Quote

I would be honored if you would use this problem as a general solution and example, however it is very important to me that in no way any reference is found to "dolphins" or in "dolphins" in combination with "therapist". I would like to keep this a little under the hood if you understand :)


Hmm, the idea was to show the exact use to dolphins scheduling (and show your above posts). Maybe in the future you'll change the policy - until then I'll respect your privacy (but remember that this forum is public).

Quote

For next period, I am going to try to input the needed variables myself and come back to you how it worked out. Meanwhile the people I work with are very happy so far. This basically frees up over 80 hours a year!

If it works out I am going to discuss donation possibilities with my superiors, do you have a donation site?


Thank you for your nice thoughts! This would be highly appreciated! The donations page is visible on the FET homepage.

Quote

Thanks again and i will come back to you soon!
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 14, 2014, 04:10:24 PM
Hi Liviu,

I checked out the new file and works nicely! Also did the csv file and its was quite clear,perhaps a possibility would be to make an excel file that translate the info from the csv to the the appropriate format, I would like to do things as automatic as possible of course!

After the trail runs here I will speak to my superiors about formal disclosure.

Thanks again


Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 14, 2014, 04:37:44 PM
It is easy to make a custom version for what you need, but I don't recommend this, for the reason above. Excel I don't know.

I could write you a separate program to process activities.xml into a nice HTML. The only important thing is that activities are in order, with the id of the patient.

Let me know.

About the constraints with weight <100.0%: you can adjust the weight as you prefer, as long as the timetable is still possible. So you can obtain better timetables. The preferred slots are processed so that FET starts generation having for each position the largest not-allowed value from all the constraints.
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 15, 2014, 02:52:06 PM
As discussed I'd like to keep using the non custom version of FET.

If you could write an xml program that translates it into a schedule as discussed that would be great, i have no skills in xml at all. Would that program also work with the other "multiple timetable generation? Best would be that the xml program gives an html or processable file (like word or excel) with all the 10 option when the option multiple is used. Is that difficult/ time consuming to build?
Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 15, 2014, 03:07:13 PM
Quote from: Paul the dolphin on October 15, 2014, 02:52:06 PM
As discussed I'd like to keep using the non custom version of FET.

If you could write an xml program that translates it into a schedule as discussed that would be great, i have no skills in xml at all. Would that program also work with the other "multiple timetable generation? Best would be that the xml program gives an html or processable file (like word or excel) with all the 10 option when the option multiple is used.

I am thinking. Maybe it is better to derive a custom version. Because probably there will not be significant future changes in FET algorithm (significant for you). And we can skip outputting all those timetables, and just output the significant one - condensed days horizontal. And this change will be made in a single source file - so it is easy to update your custom version if the official FET gets important changes. With only a button you will get the HTML timetables. Do you want all of them in a single file, or an index? (I refer to generating multiple).

If you want a separate program to generate HTML from activities.xml, it can be done. But you need to execute firstly FET, then this second program.

In a custom version, we might work on some constraints types, if needed.

In both cases we could make a simple space separated text file with the solution(s).

I am sorry if I keep on oscillating between a custom version and the official version + an additional program. I think now that more appropriate may be a custom one. I will begin working a bit later and let you know.

Quote
Is that difficult/ time consuming to build?

It should not be difficult. Maybe some time consuming.
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 15, 2014, 04:34:25 PM
Useability would be highly appreciated so i think the custom were we the output is t1234-dolphins with therapist and patient in the grid is most favourable. However I will fare on your expert opinion on the matter of custom vs. regular version + extra program.

If there arent any distinct pro's or con's between index and 1 file and would opt for the easiest solution
Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 16, 2014, 09:39:40 AM
I did it. Please get the custom version from http://lalescu.ro/liviu/fet/download/custom/dolphins/

Please let me know.

Separate files. I did not make an index file, because some timetables might not be complete. However, it should be easy to access each file. Let me know and we can improve if necessary.
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 16, 2014, 03:48:50 PM
Hey Liviu,

this is exactly what I wanted! Why isnt this software markted throughout the world? It amazing especially the support!
I can't wait to see how it preforms next week in the trail session!

Paul
Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 16, 2014, 04:02:25 PM
Thank you for the appreciation! It is marketed, as free software :-)

Don't forget: if the timetable still solves, you can raise the weight of the constraints with weight <100.0%, as you wish. Each slot will be not allowed with the maximum of all the values of the constraints. For instance, if the slot is not preferred (X) with 90% from dolphins/therapists preferences and not preferred with 95% from not preferred t4, the resultant is 95%. However, I am not sure if you can improve my data file - you must play a bit to check.
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 17, 2014, 03:48:06 PM
my coworker Ricarda asked me to send you this:

Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 17, 2014, 03:53:07 PM
Quote from: Paul the dolphin on October 17, 2014, 03:48:06 PM
my coworker Ricarda asked me to send you this:

LOL :-))  Thank you!

I have to admit I was a bit skeptical at the beginning, but when Volker answered and asked for more details and you provided that nice table, I began to think that it was possible.
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 22, 2014, 03:06:57 PM
Hey liviu,

I have started with the new schedule and have run into a few problems. Can you take a look at it?

Paul

Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 22, 2014, 03:22:40 PM
Maybe you could tell me:

- What did you change;

- The new requirements (those which are different)?
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 22, 2014, 03:26:14 PM
So after a few tweaks I got this. I left out 2 patients which share a spot with one of the patients visible here.

Problems is, somehow im not getting dolphin 3 off in the first session and i cant get any therapist onto dolphin 2

Paul
Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 22, 2014, 04:23:51 PM
To get the dolphin 3 off in the first session, use activities preferred time slots.

I think I spot 3 problems in your file:

1) Time off in 4 - you made it 100%. I think you need 90% for the beginning.

2) You make for Dolphin 3 only 2 activities per day?

3) Activity 13 has allowed only slot "t2 Sebastiaan - Dolphin 4". And it seems that from the other constraints of type max occupied even this slot is impossible. If I deactivate activities 8 and 10 (the first activities in the initial order, then comes 13), the timetable is possible. So I guess you made an error here.

I advise you to do a progressive approach - add constraints a few at a time.

PS: Maybe you could name your input files differently, so we don't mix them.
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 22, 2014, 04:26:52 PM
here goes

ptn 1, no rest.
ptn 2, no rest.
ptn 3, p8, d/t free
ptn 4, t1, p/d free
ptn 5, t2, p/d free
ptn 6, t2, P5 d=free
ptn 7, t2, p3 d free
ptn 8, t2 d/p free
ptn 9, t3, p5 d=free
ptn 10, t3 or t4, p2, d free

ptn 11 is a shadow client who comes the second week, has no effects on schedule, just different patient in the same time slot with the same therapist and dolphin of ptn 10
ptn 12 is with ptn 4 the same but a little different, they both have different therapist, which we can slot in later. These are very rare occurences and dont need a work around or something.

However, ptn 5 and 6 are brother and sister who need to be in the same timeslot, which is variable as well (either t2 or t3). In the current case we dont have that problem since p5 only does 2 kids and has to work pat 9 in t3 result automatically in t2 for p5 and p6. So the question is in other situation might we pair 2 kids in 1 random timeslot distrubuted over 2 therapist and 2 dolphins? (not a problem now, but might be in the future.

Who works how many clients and new set dolphin preferences
p1=2            3,2
p2=2            4,3
p3=1            4,3
p4=2            5,2
p5=2            1,3
p6=0            2,1
p7=2            3,1
p8=1            5
p9=0            5

Dolphin restrictions:
D3 has first session off
back up dolphin in first 3 sessions (same, excluded the 4th session of a backup dolphin)

general:
preferably no 4th session at all (same)












Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 22, 2014, 04:39:25 PM
adjusted according to your remarks, however dolphin 2 gets spared, why wont the program put ptn 4 with dolphin 2 and a random therapist in t1, most obvious option?
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 22, 2014, 05:11:20 PM
made some more adjustments, mainly text revision to order the time restraints

Still cant generate something where dolphin 2 gets to work.
Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 22, 2014, 05:52:38 PM
Quote from: Paul the dolphin on October 22, 2014, 04:26:52 PM
here goes

ptn 1, no rest.
ptn 2, no rest.
ptn 3, p8, d/t free
ptn 4, t1, p/d free
ptn 5, t2, p/d free
ptn 6, t2, P5 d=free
ptn 7, t2, p3 d free
ptn 8, t2 d/p free
ptn 9, t3, p5 d=free
ptn 10, t3 or t4, p2, d free

ptn 11 is a shadow client who comes the second week, has no effects on schedule, just different patient in the same time slot with the same therapist and dolphin of ptn 10
ptn 12 is with ptn 4 the same but a little different, they both have different therapist, which we can slot in later. These are very rare occurences and dont need a work around or something.

However, ptn 5 and 6 are brother and sister who need to be in the same timeslot, which is variable as well (either t2 or t3). In the current case we dont have that problem since p5 only does 2 kids and has to work pat 9 in t3 result automatically in t2 for p5 and p6. So the question is in other situation might we pair 2 kids in 1 random timeslot distrubuted over 2 therapist and 2 dolphins? (not a problem now, but might be in the future.

Who works how many clients and new set dolphin preferences
p1=2            3,2
p2=2            4,3
p3=1            4,3
p4=2            5,2
p5=2            1,3
p6=0            2,1
p7=2            3,1
p8=1            5
p9=0            5

Dolphin restrictions:
D3 has first session off
back up dolphin in first 3 sessions (same, excluded the 4th session of a backup dolphin)

general:
preferably no 4th session at all (same)

OK, please check the attached  :)

I did not care about pat 11 and 12, nor about 5 and 6's problem. But I think it may be possible to customize further the custom dolphins FET version to make two activities have the same time slot (for pat 5 and 6).

Please let me know.

Edited to add: I added backup session for t4, but should not matter.
Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 22, 2014, 06:22:41 PM
Hmm, in my solution I added maximum working slots for each therapist, in total 12. The file has only 10 activities, so FET will leave 2 slots for random therapists unoccupied. In my solution above P1 does not work (but you required 2 slots for him).
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 22, 2014, 08:07:24 PM
One of the 12 gets treated by a random therapist, the one who isnt doing 2 yet.
The other one gets done by p2 in t3 in the 2nd week, she isnt on the schedule yet.

Forgot to add 1 kid; ptn 11, all free which might explain the differences
Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 22, 2014, 08:13:01 PM
OK.

I forgot: it is better to keep all activities (16) and just activate and deactivate them as needed. Because it is very hard if you removed an activity to add a new one - you need to edit almost every constraint.
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 23, 2014, 01:36:04 PM
Hey hey,

yesterday I got it to work; I got a good schedule with all ptn's planned in. The reason the second dolphin wasnt scheduled was due to it no being preferred first by any therapist. This resulted in the incomplete schedule on my side. Unknown to me FET rather kept an activity out of the schedule than to pick a second dairy dolphin even when I decreased dolphin preferences from 100-95-90 to 95-90. Any ideas on this?

Could you take a look at how set up the preferences of the therapists for the dolphins?

Thanks

Paul
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 23, 2014, 01:48:57 PM
if it all checks out, i m going to try to make a clean format based on your last file which I can use to fill out each new period with clear directions for the others to use
Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 23, 2014, 02:04:59 PM
Why aren't you using my previous file? It has all 16 activities and you can simply reuse it in the future, if you get for instance 14 activities, by just inactivating two. But you cannot reuse your file.

Also, your new file is a kind of disordered for me, but I don't disagree if it is good for you.

To say that Dolphin 3 does not work in t1 you need to use activities preferred time slots with 100% (anyway, I saw that this is inactive in your set), not max occupied slots.

Also, for preferences, you are making a mistake. You said, for instance, for the last preferences, of Sebastiaan, that he should always take Dolphin 4 (100%), but may choose between Dolphin 3 and 4 with 90%, so sometimes the chosen dolphin might be different from Dolphin 3 and 4 (but will always be on Dolphin 4, because of the previous constraint). You need to switch the weights.

But your files solves? You said it does not solve.
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 23, 2014, 02:16:28 PM
Thanks for the input liviu,

I use the file you send. I going to add some comments to make it easier for my coworkers to work with and some constraints so it will be easier to select/deselect when needed; i dont think they will understand it in depth enough to make their own new constraints just (de)selecting and adjusting to new period. Could you check it when I'm done with it? That will probably be next week somewhere. So far so good in any case. Next week the management is back so i can start presenting the plans

Thanks!
Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 23, 2014, 02:24:03 PM
OK, I'll try  :)

The first half of the constraints should remain the same (before the "END GENERIC CONSTRAINTS" comment). Take care, included in these generic constraints is that P9 does not work (you may remove if needed).

If you add comments on multiple lines for the constraints, maybe you can add some spaces at the beginning of a new line, so I can distinct between constraints and comments.

So, the therapists/dolphins preferences problems are solved now?

PS: I now thought that you want to derive your own data file, in your style. But I might not be able to spot your errors, so please forgive me in this case. I'll try.
Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 23, 2014, 02:53:10 PM
You may ask me specific questions about the constraints. For instance, the maximum number of working hours for a therapist is set by a constraint activities occupy max time slots from selection, unless this number is 0, in which case we need to use activities preferred time slots. We can only specify the maximum number (and not the minimum number), but I guess that's OK for our case.
Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 23, 2014, 03:55:35 PM
If really needed, the FET-dolphins custom version could be customized further, so the user can input simply the data in his paper view and FET will derive its own constraints. For instance, the user might input: "pat 1 restricted to t1 any P" and FET to generate the constraints.

But this is tedious to add, and useless if you play some more with FET and learn how to add the constraints fast enough, using those 16 activities and the GENERIC CONSTRAINTS from the basic example.
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 27, 2014, 05:33:48 PM
hey liviu,

I finished the file, can you take a look at it?

I found that Merel doesn't get placed in the schedule any idea whats wrong?

Can you explain me again how it works with preferred dolphins? How do i set for 1st and 2nd preference and after 3rd = any dolphin?

Mashi danki!
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 27, 2014, 05:40:53 PM
In this clear file, none of the kids have any limits, so it should be easy.
Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 27, 2014, 08:09:08 PM
Yes, everything seems OK, without a constraint to restrict that teacher (Merel) from any activity. See the attached file, I commented that constraint with LIVIU and I deactivated it.

Also, preferred time constraints without any X are useless (but I think you want to add some X's later?)

I do not understand: "after 3rd any dolphin". I think you mean two dolphins necessary and first dolphin preferred.

Mashi danki? :)
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 28, 2014, 12:00:37 PM
HEy Liviu,


reply's :)

1. Isnt that weird, that with the adding of the time constraint for merel not working and deactivating it, the scheduling works.

2. Yes I know, this way the other therapist only needs to place x's and put in the names of the children, making it very easy to use.

3. About the dolhins the following. We have a first preference and a second, after that is free for all. Can you explain how it works to me again with the contraints and the preferences?

thanks!
Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 28, 2014, 12:39:28 PM
1. Deactivated constraint is equivalent to no constraint added.

3. Therapist Mirte prefers dolphins Bonnie, then if not possible, Nubia, then if not possible, any other from the other three. See attached. Add X with 99% to other three (first constraint), then X with 90% to Nubia (second constraint). The last 90% can be added also to the other three, because the largest value (99%) will win (and adding X to all four is easier for the user). Two constraints.

You can change these values, but Nubia's value (or all four's value, three+Nubia) must be lower than the other three's value.

I hope I am not mistaking.
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 28, 2014, 02:50:25 PM
Hey liviu,

I changed all the dolphin preferences as you said, from 100 to 99 and 95 to 90. This results in more undesireable combinations. Any idea why?
Title: Re: Dolphins schedule
Post by: Liviu Lalescu on October 28, 2014, 03:05:32 PM
Maybe 't4 not preferred' will win, because it is 95%.

Change from 100 (99) to 99.99 or 99.999 and from 95 (90) to 99 or 99.75.

(100-99.999)%=1e-5, in 1 out of 1/1e-5=100,000 cases the constraint will be skipped. This is how FET (approximately) computes.

You can go to 6 decimal digits, if FET still solves the file (99.999999).
Title: Re: Dolphins schedule
Post by: Paul the dolphin on October 28, 2014, 05:21:29 PM
ok that seems to work. Next week I get the chance to do it together with our managment, lets keep our fingers crossed!