Detail error when cannot gennerate time table

Started by canhathuongnhau, December 08, 2016, 02:44:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

canhathuongnhau

Dear Mr Liviu,

I have trouble to find exactly errors when fet-cl can not generate time_table. My fet file and difficult_activities are attacked. You can see it.
When investigation, I found that the reason is my constraint Break Time is not compatial with activities.
My Constraint Break Time are at fourth hour, fifth hour, nineth hour and tenth hour. And there are activities which have duration 4 hour.
So fet cannot generate time table.

In Difficult_activities.txt you write:
"The activity which might cause problems might be the next activity in the initial order of evaluation. This activity is listed below:
Id: 157 (T:362019278, S:Hóa học, AT:Sáng, St:11A2)"
This error is not easy to find reason why can not generate time table.

Please can you show more detail error and constraints that are effected to clearly to easy understanding error.
Hopefully, I can hear your reply as soon as possible. Thanks so much.






Liviu Lalescu

I do not understand. The break forbidding duration 4 activities is only on one day.

canhathuongnhau

Mr Liviu, Thanks for reply my question.
Have you generate timetable from my fet file?. The break forbidding duration 4 activities is only on one day. But In my time table there are 3 constraints activities preferred time slots (all students learn between first hour and fifth hour, "A_sub" subject is only at first hour on Monday and "B_sub" subject is only at fifth on Saturday).
After Deleting BreakTime at fourth hour,  fifth hour, nineth hour and tenth hour then i generated time table normally.
So I want to show detail constraints that affected to cannot generate time table in one text file like difficult_activities.txt file. Please can you help me solved this problem?


Liviu Lalescu

I generated your file. The constraints seem not contradictory. Just the whole timetable might be too constrained. I do not understand how to improve, sorry.

Give me an activity which cannot be placed in no slot at all.

canhathuongnhau

Mr Liviu, You can see activities as 63, 65, 66, 67.  I found it in soft_conficts when generate time table from fet gui. Please can you help me the way to show difficult constraint that make impossible generate timetable?
Thanks so much.

Liviu Lalescu

The activity with id 63 can be placed at the first hour of any day. I don't understand.

canhathuongnhau

Mr Liviu, I know that id 63 can be placed if it placed before the other activity which has the same attribute with id 63.
Quote from: canhathuongnhau on December 09, 2016, 03:57:44 AM
Please can you help me the way to show difficult constraint that make impossible generate timetable?
Thanks so much.

Do you have any suggest for me to solve this problem. Thanks so much!

Liviu Lalescu

In the current algorithm, FET cannot show the difficult constraints. It can only show the difficult activities.

Volker Dirr

#8
The dataset is impossible.
It is very easy to prove that.
please check teacher 362019278.
that teacher is teaching 24 hours.
now check his activities. all activities should be in the morning. in the morning are only 5*5=25 free time slots. but you set also 2 breaks in the morning. so there are only 25-2=23 slots left.
it is impossible to set 24 hours into 23 free slots.
see attached file if you still don't understand.

Liviu Lalescu

Indeed, Volker.

Volker suggested to add a test for this. I added this in the TODO, but it is not at all easy:

---
298---------------------------------------------------------
From canhathuongnhau and Volker Dirr (on forum):

Volker:

The dataset is impossible.
It is very easy to prove that.
Please check teacher T.
That teacher is teaching 24 hours.
Now check his activities. All activities should be in the morning. In the morning are only 5*5=25 free time slots. But you set also 2 breaks in
the morning. So there are only 25-2=23 slots left.
It is impossible to set 24 hours into 23 free slots.

Could we add a test for this?

Liviu:

It is easy to add such a test for such a case, but there are many more other situations in which this test will not work. Like there are more "groups" of
activities, each one with its preferred time slots.
---

canhathuongnhau

Thanks Mr Liviu and Mr Volker.
@Mr Volker: I understood that impossible activity in your attacked.
@Mr Liviu: At present FET is best for timetable. But I think if FET can show difficult contraints, it will be awesome.
Thanks  so much!

   

Liviu Lalescu

Thank you for the appreciation! :)  Unfortunately, FET can only report difficult activities, and not difficult constraints, because of the algorithm. But you can consider the difficult activity, and see its constraints, direct and indirect.

Volker Dirr

#12
I think your request "show impossible constraints" is pretty difficult/impossible.

why? because check your example file.
the constraints break is possible if you set only this constraint, but not the other.
the constraint allowed morning hours is also possible if you set only this constraint and not the break.
so fet can't say that the break or the times in the morning hours is not allowed, because in fact both are allowed. only if you use both at the same time, then one of it - but not both - is wrong. so about which one should FET complain? it could max complains only about both, even only one is "wrong".
now think a bit more. if the teacher have less activities, then the constraints are not wrong. they are allowed.
so in fact it is (maybe) not a constraint that is wrong. it is ONE of the 24 activities. but which one?

so FET can't complain about A wrong constaint in this case. It could max complain that "if teacher X has got 24 activities, then he can't have that 2 constraints also at that time" or "if teacher x has got that 2 constraint, then he can't have got 24 activities".
But even this warning will be dificult to code, since because of highly needed speed optimization that 2 constraints are internaly merged to a single allowed time slots constraints. FET can't differ them in the generation code anymore.
So the max possible warning we might code is "teacher X has got Y hours but only Z free slots" and then you must be yourself clever enough so see if you added the wrong number of activities, if you added to many activitiy tags to activities, if you use to many constraints, ...
But like Liviu said: it will be difficult to code such a check. it is easy in your case, but i know a lot of other examples where it is very very difficult (impossible?) to check it before generating. 

canhathuongnhau

Mr Liviu and Mr Volker, both of  your information is so good for me.  Everything in mine is clear. My questions is a bit silly.
Thanks you so much all of you!