I am having a big problem for the past several days with an algorithm design about this problem:
You have an employee assigned to a schedule. That schedule has start/end times, also possibly a lunch and few breaks. During his schedule he is doing his primary work.
The agent has several types of secondary activities, he has to accomplish during his schedule, each activity having a priority(can be the same) and an amount of time. Activities can be broken down to smaller blocks.
Each activity type has it's own definitions for Minimum and Maximum block lengths, and also Minimum interval length between blocks of the same type of activity, and different types of activities. There is also a setting, activity Block Increment step.
Each 5 minute schedule interval has a Score value, the higher the score, the better to place an activity there.
All intervals and blocks are snapped to 5 Minute boundaries.
Assign all the required quantities of activities during the schedule, trying to honor these soft constraints, in the following order:
- to the best possible locations (best score)
- if there is not enough schedule space, assign the activities proportionally to their priority/requirement
- try to assign activities, so that fewer Schedule-Break-Lunch-Activity1-Activity2... transitions occur
Thanks a lot in advance for any fresh idea out there:D