Automatic Activity Planning?

Started by Christoph Voelker, May 11, 2019, 03:40:49 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Christoph Voelker

Hello there,

the visible output of phase one (Einsatzplan_students_subjects_table.html) is already really nice.

But as we didn't care about a *minimum* of target hours yet, but only that the maximum is not passed over - is there a possibility to sum up the actual hours for each teacher and show it in another output?

Something like:
Teacher   TargetHours    ActualHours
AAA      26      20
BBB      24      24
...

Or is this information in some other file that I could import/convert with GNU Octave?

Greetings and thanks a lot,
Christoph

Liviu Lalescu

Hello,

I will think of the minimum target hours for teachers, but I think it is very difficult to impossible.

What you ask should be very easy.

The information could be derived from _activities.csv file which is generated by phase1 in fet-results. This file is CSV and on each line you have a teacher and a total duration.

But I could very easily write the code to output what you need as an HTML file.

Let me know what you choose.

Christoph Voelker

If you can "easily" write code to generate another HTML file like:

Teacher   TargetHours    ActualHours     Difference
AAA      26      20     -6
BBB      24      24      0
...

... well, Dear Liviu, how could I say "no" to such an offer?!?


Liviu Lalescu

 :)

OK, beginning work. The order of teachers in this table should be the order of the FET days in the phase1 file?

Christoph Voelker


Liviu Lalescu


Christoph Voelker

Thanks a lot. This is looking very good. I can make multiple tables and then check manually the Einsatzplan_teachers_working_hours_table(s).html for negative differences.

I think I can maybe also make this automatic: I could start FET from GNU Octave and generate timetables until no teacher has a difference which is maybe < -6 or so ... while ... do ...

Or is there a possiblity to make this an "overall" contraint?

Liviu Lalescu

I think that what you suggest (an "overall" constraint) is equivalent to min working hours for each teacher.

Please allow me to think at it.

Liviu Lalescu

It is possible to customize FET so that it will generate timetables and dropping them until finding a good one. But I don't like the idea.

Liviu Lalescu

#54
Hey, I think there is good news! :)

Just think of the negative/inverse of the constraint activities occupy max real time slots from selection. Add all the activities, select all the slots of the other teachers without the teacher in discussion (T1), and max occupied so that the minimum is respected for T1.

Say that all the activities have duration 2000 real hours in total. And T1 should have minimum occupied 18. Then max occupied for our constraint will be 2000-18=1982 real time slots, selection = all the slots without those of FET day T1, activities = all of them.

I am very curious if this will work. Let me know (if you can design such a file from GNU Octave).

A bad thing is that the .fet file will get very large, because each constraint will select many slots. I expect sizes of even 100-200 MB. If size is too large, I could devise a new constraint occupy min, but it is tedious and also I prefer to keep the number of constraints to a minimum and simplest possible.

I am not sure of the speed of generation. We need to test. I hope it will be OK, but might be slower. I hope not much slower.

Liviu Lalescu

If the speed of generation will be much slower, unacceptably slow, I have some ideas on how to improve it. But I am waiting and hoping they won't be needed.

Christoph Voelker

Hello,

thanks for the idea, I think I managed to generate this by Octave code. The FET File is 64 MB.

So, I thought about some "general" minimum value, so I edited the Excel file that the same general value is subtracted from every individual TargetHour. The idea was to distribute the "minus hours" equally over all teachers ...

But at the moment it won't solve, it stops at 337/340 activities. I think it's a bit problematic that this ActivitiesOccupyMaxRealTimeSlotsFromSelection needs a weighting of 100%?

Many greetings!

Christoph Voelker

It also doesn't solve when I have really really low values for the minimum hours. Hm, maybe I made some error in the generating code ...  ???

Christoph Voelker

I'll send you Excel File and compressed FET File :)

Liviu Lalescu

It is impossible to have <100% for occupy max constraints.

Maybe you need to lower the constraints which allow <100%.

If you want, you can send me the files.

OK :)