[rules-users] How to forsee mid way planning team changes (optaplanner)

Geoffrey De Smet ge0ffrey.spam at gmail.com
Wed Nov 6 08:15:27 EST 2013


On 06-11-13 11:51, ns wrote:
> Hi,
>
> I am working on a planning tool based on the nurse rostering example. I have
> encountered a problem which I do not know how to solve correctly.
>
> Our employees are divided into teams. But sometimes employees switch between
> teams, to for example cover the illness or pregnancy of a colleague. Each
> team has its own shifts.
>
> So for example Optaplanner may propose a roster for a month. In the middle
> of the month the employee changes team. I know this when I start the
> planning. But how do I tell Optaplanner that in the middle of the month the
> employee changes team and hence has different shifts?
Any shift can be assigned to any employee.
But a hard constraint forces that an employee should be assigned to a 
shift of his team,
except... if that employee is switching teams (which can be specified by 
something like EmployeeBelongsToTeamInDateRange instances).

This might require multiple constraints depending on your needs, for example
you might want to add a soft constraint that assigning an employee to an 
other teams shift comes as a score cost
to minimize that happening.

PS: Does he change contract too? If not, for constraints such as "should 
only work 2 consequetive weekends",
it really doesn't matter to which team's his shift belong too, so that 
constraint is unchanged.

>
> Thanks.
>
> Kind regards,
>
> Nick
>
>
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/How-to-forsee-mid-way-planning-team-changes-tp4026663.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



More information about the rules-users mailing list