Re: [rules-users] [optaplanner] Nurse rostering questions

2014-02-13 Thread Geoffrey De Smet

On 12-02-14 20:55, Karri Niemelä wrote:

 1) So for example when using toy1.xml there is 140 shifts/assigments.
 This means each nurse(11 of them) will get about 10-15 assignments.
 (= DayOfWeekCover/cover/shift/preferred is 2)

 But what if I want to make sure in contract MinNumAssignments = 20 is met?
 DayOfWeekCover/Cover/shift would need to have minimum/maximum instead of 
 preferred?
Not sure what you're asking.
It already has a rule minimumTotalAssignments and a rule 
maximumTotalAssignments:
https://github.com/droolsjbpm/optaplanner/blob/master/optaplanner-examples/src/main/resources/org/optaplanner/examples/nurserostering/solver/nurseRosteringScoreRules.drl#L92

Adjust those as needed.

 2) So I solve/make shifts for february using nurserostering. Then I want to 
 do march.
 a) How to load old data? (Load feb solution and then advance 30 days?)
and mark the old data as immovable (easiest way is in the example 
implementation indeed to advance the planning window beyond the old data)
 b) What if my march data has employee/contract changes?
Expand the domain model of the example implementation to represent this 
complexity.
Then adjust the score rules so they only apply to the active contract of 
an employee.
It gets interesting when an employee switches contract in the middle of 
a planning window...


 Thanks,
 Karri


 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] [optaplanner] Nurse rostering questions

2014-02-13 Thread Karri Niemelä

 Not sure what you're asking.
 It already has a rule minimumTotalAssignments and a rule 
 maximumTotalAssignments:
 https://github.com/droolsjbpm/optaplanner/blob/master/optaplanner-examples/src/main/resources/org/optaplanner/examples/nurserostering/solver/nurseRosteringScoreRules.drl#L92

So taking toy1.xml as basis;
1) start date = 2014-02-01 end date=2014-02-28
2) Adding 5 more nurses (same type of contract), so 10 total
3) MinNumAssignments to 20, MaxNumAssignments 25
4) Solver assigns about 14 assignments per nurse, not the minimum 20.

So the question goes; What would be the easiest route to make sure nurse gets 
assigned at least the minimum number of shifts?

And now this actually leads to bigger question;
Shift weight  minimum number of assignments.
What would be the easiest way to add more “weight” to night shifts (i.e. night 
shift = 2 morning/evening shifts). Example; So if minimum number of assignment 
would be 5, to satisfy you would need to do  2 night shifts and 1 day shifts 
(or 5 day shifts)



Thanks,
Karri
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] [optaplanner] Nurse rostering questions

2014-02-12 Thread Karri Niemelä


1) So for example when using toy1.xml there is 140 shifts/assigments. 
This means each nurse(11 of them) will get about 10-15 assignments. 
(= DayOfWeekCover/cover/shift/preferred is 2)

But what if I want to make sure in contract MinNumAssignments = 20 is met?
DayOfWeekCover/Cover/shift would need to have minimum/maximum instead of 
preferred?

2) So I solve/make shifts for february using nurserostering. Then I want to do 
march.
a) How to load old data? (Load feb solution and then advance 30 days?)
b) What if my march data has employee/contract changes?


Thanks,
Karri


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users