[rules-users] Equal shift assignment based on employment form

Geoffrey De Smet ge0ffrey.spam at gmail.com
Fri Nov 15 03:28:25 EST 2013


On 12-11-13 14:22, ns wrote:
> Hi,
>
> I would like to distribute shifts equally among employees based on their
> employment form (full time or part time: 100%, 75%, 50%, ...). I have a
> variable for each employee that holds the employment form. How do I make
> sure all shifts get distributed equally, so that somebody that works 50% of
> the time only gets half the shifts assigned than someone who works 100%.
See the new docs section "fairness" of 6.0.0.Final (not yet released):
https://github.com/droolsjbpm/optaplanner/blob/master/optaplanner-docs/src/main/docbook/en-US/images/Chapter-Score_calculation/fairnessScoreConstraints.png
>   
>
> And how do I make sure shifts that employee need to do are distributed
> equally over time. So for example we have 20 shifts a month and 5 employees.
> How do I make sure I get a plan like e1, e2, e3, e4, e5, e1, e2, e3, e4, e5,
> ... Instead of e1, e1, e1, e1, e1, e2, e2, e2, e2, e2. Thanks.
2 ways (depending on your goals):
- penalize multiple gaps in a row (using the squared trick as shown above)
- count the number of assignments per week and penalize the square of it.

HTH
>
> Kind regards,
>
> Nick
>
>
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/Equal-shift-assignment-based-on-employment-form-tp4026746.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