JosefCevik / JWManagement

GNU Affero General Public License v3.0
57 stars 30 forks source link

Allocation Assistant #43

Open MarvinZeising opened 7 years ago

MarvinZeising commented 7 years ago

The Allocation Assistant should be a mechanism that can either be fired manually by a shift planner or in regular intervals like every end of the week.

The assistant should

It should be possible to configure the assistant in what it is supposed to do. Like if it should only do the first one of the three tasks described above or only two or all three.

The latter needs a prioritization algorithm. I have two ideas for that:

  1. Loop through these shifts and in each one look for the requester with the fewest accepted requests for this week. If that equals for two or more requesters, it should choose the requester with fewest left-open requests for this week.
  2. Loop through the users, beginning at the one with the fewest accepted requests this week to the one with the most. Every one gets one accepted request, then it starts all over again until no open request is left.

Thoughts on this are welcome.

KMicha commented 5 years ago

Nice approach. The priority of the shifts should be sorted as well (possible for 1 and 2) Start with the shifts with the lowest number of requests (sum of accepted and open requestors)