FET Forum

FET Development => Suggestions => Topic started by: Corfiot on September 26, 2018, 11:43:42 AM

Title: More detailed placement failure info if space or time set
Post by: Corfiot on September 26, 2018, 11:43:42 AM
Hello,

I make schedules and then save them locked in a new FET file. This leaves the general constraints in the file alongside the newly added specific locking rules. If I later make a change to the placement of an activity (time or space) FET only says that it can't be placed.

I would like FET to list me all the rules conflicting with the two locked time/space rules for the activity so I can pinpoint which "general" constraint is the problem. This would save me A LOT of time.

Eg:
Activity #111: Blah blah, teacher blah, students blah
  TIME LOCK (day X - time Y) PLACEMENT  FAILED BECAUSE:
      this rule
      that rule
  SPACE LOCK (room Z) PLACEMENT FAILED BECAUSE:
     this rule
     that rule

For example, it should be obvious that a rule max students hours daily that blocks a set of locked activities on the same day for that student set is easily detectable as the culprit.

Or, a max teachers gaps per week rule when all other relevant activities to a teacher are placed, would also be easy to identify if we're placing a time-locked activity.

Best Regards,
George
Title: Re: More detailed placement failure info if space or time set
Post by: Volker Dirr on September 26, 2018, 08:14:16 PM
Quote from: Corfiot on September 26, 2018, 11:43:42 AM
For example, it should be obvious that a rule max students hours daily that blocks a set of locked activities on the same day for that student set is easily detectable as the culprit.

hmm.. in fact this is difficult and maybe even wrong. Why should it complain at a special activity about that? You might just unlock an other activity of the students set that day.
Title: Re: More detailed placement failure info if space or time set
Post by: Corfiot on September 26, 2018, 08:57:46 PM
So if you have lets say 3 activities on the same day all locked and you e.g. add another one that breaks a pre-existing max hours daily rule, it would be difficult to let the user know why you failed to place the activity? I don't think so.

I do not want to unlock anything else at this point, I want to know which rule is blocking my change so I can decide how to proceed. I may make the rule more lax instead of moving other activities.

Title: Re: More detailed placement failure info if space or time set
Post by: Volker Dirr on September 26, 2018, 11:32:44 PM
there is no move funktion in that dialog, only a lock/unlock. There is no advantage in such information if you can't move. but moving is to difficult in FET because of it's internal structure. it is in the TODO, but very difficult to code. If you want to move activities it is easier with TiTiTo, but it won't tell you broken constraints, you need to check that yourself.
Title: Re: More detailed placement failure info if space or time set
Post by: Corfiot on September 27, 2018, 11:32:46 AM
Quote from: Volker Dirr on September 26, 2018, 11:32:44 PM
there is no move funktion in that dialog, only a lock/unlock. There is no advantage in such information if you can't move.
This is irrelevant. I can live with moving an activity by going to another dialog. I'm not looking for a UI upgrade, just some more information so I can decide what to do, why my schedule fails to be built.

Quote from: Volker Dirr on September 26, 2018, 11:32:44 PM
but moving is to difficult in FET because of it's internal structure. it is in the TODO, but very difficult to code.
Again, I don't want FET to move things for me. I can go change the locking constraints myself.

Is it really difficult to code a check on a partially-generated schedule for some of these rules? You have the partial schedule in memory, you have the latest activity that failed to be placed and all you need to do is run a check for all rules that apply to this activity in that context. Blindly, on a STATIC schedule. Then display which rules fail and stop.

I can probably do it myself or try to get some nerds from the CompSci dept next door to do this if we're lucky. I think it would make the 'display last activity that failed to be placed and stop generation" button HEAPS more useful and seriously mitigate FET's main issue: it's great for initial generation but sucks for changes to a locked schedule.

Quote from: Volker Dirr on September 26, 2018, 11:32:44 PM
If you want to move activities it is easier with TiTiTo, but it won't tell you broken constraints, you need to check that yourself.
I will look into TiTiTo soon, again thanks for the heads up.

--George
Title: Re: More detailed placement failure info if space or time set
Post by: Volker Dirr on September 27, 2018, 05:43:44 PM
Yes, it is difficult to code. The internal data is used totaly different then the data of a user. you can't modify the source so easy. Your request is in the TODO, but it will take much time to code it.
Title: Re: More detailed placement failure info if space or time set
Post by: Liviu Lalescu on September 27, 2018, 06:09:39 PM
Quote from: Corfiot on September 26, 2018, 11:43:42 AM
Hello,

I make schedules and then save them locked in a new FET file. This leaves the general constraints in the file alongside the newly added specific locking rules. If I later make a change to the placement of an activity (time or space) FET only says that it can't be placed.

I would like FET to list me all the rules conflicting with the two locked time/space rules for the activity so I can pinpoint which "general" constraint is the problem. This would save me A LOT of time.

Eg:
Activity #111: Blah blah, teacher blah, students blah
  TIME LOCK (day X - time Y) PLACEMENT  FAILED BECAUSE:
      this rule
      that rule
  SPACE LOCK (room Z) PLACEMENT FAILED BECAUSE:
     this rule
     that rule

For example, it should be obvious that a rule max students hours daily that blocks a set of locked activities on the same day for that student set is easily detectable as the culprit.

Or, a max teachers gaps per week rule when all other relevant activities to a teacher are placed, would also be easy to identify if we're placing a time-locked activity.

Best Regards,
George

I added this also in the TODO. Thank you for suggesting!

It is not difficult, just tedious. And I would prefer, if implementing it, to add it maybe as a custom version. Do you need it in the official FET?
Title: Re: More detailed placement failure info if space or time set
Post by: Corfiot on September 27, 2018, 06:29:50 PM
Liviu, I think it would kick ass in the official FET because anyone who gets stuck on a timetable generation would get some extra info on what's going on. This would help people who take over a position and are working with files that the previous person created. Also, it would help with moving a single activity in an otherwise fully locked timetable, which is usually what happens: you make a timetable, you show it to everyone and then people request changes one at a time.

If you could find the easiest rule check to implement and send me some code I could see if I can replicate it and do the tedious work for the others.

Finally, I don't mind having a custom version of FET to maintain, although I would prefer not having this extra work.

Best regards,
George
Title: Re: More detailed placement failure info if space or time set
Post by: Volker Dirr on September 27, 2018, 06:42:52 PM
"anyone who gets stuck" = yes, you are right in that point.

"it would help with moving a single activity" = no, it won't help in that point, since it can't pinpoint a lot of constraints correct. for example max hours

i fear you are mixing 2 different ideas.

"you show it to everyone and then people request changes one at a time." =  In that case in fact you didn't done your homework correct. you need to ask needed stuff BEFORE generating. not after. THAT will save MUCH time.
Title: Re: More detailed placement failure info if space or time set
Post by: Corfiot on September 27, 2018, 06:50:54 PM
I will take your word on how unreliable FET is at finding broken rules in a fully locked timetable. If I get time I'll look at the code and make smarter suggestions.

As for being prepared.... The politics of a university do not place power in the hands of the guys who make the timetables. Instead it's in the hands of the faculty, who are the people being managed. It's inefficient as hell, I know. But if the dean wants that 2-4pm timeslot in room B3 two weeks after the semester started, you'd better get it DONE and screw all the rules...

I usually fight for the students' rights to have breaks at lunch and not have like 8 hours straight but those restrictions make creating a timetable take longer and then I have to explain myself. It's a complicated mess, which is why I try to save as much time when making changes as possible.

Title: Re: More detailed placement failure info if space or time set
Post by: Volker Dirr on September 27, 2018, 07:02:35 PM
I sadly understand what you are talking about. The bad stuff is that there will be nearly always a minor "bug" in the dataset and you can spent MUCH time into doing it better but you need to stop optimizing after some time.

In fact i like all suggestions that can improve timetables. I just try to optimize the suggestion some more to make them a bit better. So don't stop suggesting. I only try to talk about all advantages and disadvantages BEFORE implementing new features. Since that will save us a lot of work. It won't help us to implement each suggestion without talking about it; since in worst case we will see later that it is not as good as expected and/or that there might be better solutions.
Title: Re: More detailed placement failure info if space or time set
Post by: Liviu Lalescu on September 27, 2018, 09:48:04 PM
Quote from: Corfiot on September 27, 2018, 06:29:50 PM
Liviu, I think it would kick ass in the official FET because anyone who gets stuck on a timetable generation would get some extra info on what's going on. This would help people who take over a position and are working with files that the previous person created. Also, it would help with moving a single activity in an otherwise fully locked timetable, which is usually what happens: you make a timetable, you show it to everyone and then people request changes one at a time.

If you could find the easiest rule check to implement and send me some code I could see if I can replicate it and do the tedious work for the others.

Finally, I don't mind having a custom version of FET to maintain, although I would prefer not having this extra work.

Best regards,
George

1) This may be implemented only for fixed timetables (or having the first n activities fixed, and having a contradiction in these n activities).

2) I tried something (for students early max beginnings at second hour and max gaps per week), see attached (you can diff the official and the attached file) (overwrite the official FET and recompile generate.cpp, then run the provided example. You need to enable the terminal output, I only used cout<<"text" for now). Unfortunately, it is much complicated than my treatment. Because my change of fixing activity id 58 to an added hour (hour 7) the students max gaps per week cannot be respected. But FET will report the students early, because of the interaction between constraints (in the early constraint I take care of the max gaps constraint).