The Doctor Rostering Problem - Asser Fahrenholz
The Doctor Rostering Problem - Asser Fahrenholz
The Doctor Rostering Problem - Asser Fahrenholz
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Appendix B. GAMS Model 79<br />
84 B0 no doctor should have both monday noon shifts and<br />
friday afternoon shifts in the same week<br />
85 B1 no doctor should have both friday afternoon shift<br />
and the following monday noon shift<br />
86 B2a shifts should be divided equally - the max var<br />
87 B2b shifts should be divided equally - the min var<br />
88 B3 no doctor should have a noon nor afternoon shifts<br />
two days in a row<br />
89 B4 no doctor should have the afternoon shift the day<br />
after an evening shift<br />
90 B5 no doctor should have the noon shift the same day<br />
as an evening shift<br />
91 B6a no doctor should have the noon shift the day after<br />
an afternoon shift<br />
92 B6b no doctor should have the afternoon shift the day<br />
93<br />
after a noon shift ;<br />
94 VALUE .. z =e= sum (( workingdays ( day ),assignmentshifts ( shift<br />
95<br />
),doctor , index ),y(day , shift , doctor , index ))<br />
+ dmax - dmin ;<br />
96 H0a (day , shift , doctor ) .. x(day , shift , doctor<br />
) + x(day , shift +1 , doctor ) =l= 1;<br />
97 H0b (day , eveningshift ( shift ),doctor ).. x(day , shift -1 ,<br />
doctor ) + b(day , shift , doctor ) =l= 1;<br />
98 H0c (day , nightshift ( shift ),doctor ).. x(day , shift +1 ,<br />
doctor ) + b(day , shift , doctor ) =l= 1;<br />
99 H1(day , noonshift ( shift ),doctor ) .. b(day , shift +2 ,<br />
doctor ) + x( day +1 , shift , doctor ) =l= 1;<br />
100 H2(day , nightshift ( shift ),doctor ) .. b(day , shift , doctor<br />
) + x(day , shift +1 , doctor ) + x(day , shift +2 ,<br />
doctor ) =l= 1;<br />
101 H3a (day , shift , doctor ) .. x(day , shift , doctor<br />
) + b(day , shift , doctor ) =l= 1;<br />
GAMS Rev 140 Sun Sparc / SOLAR<br />
10/28/08 18:25:02 Page 3<br />
G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m<br />
C o m p i l a t i o n<br />
102 H3b (day , shift , doctor ) .. x(day , shift , doctor<br />
) + c(day , shift , doctor ) =l= 1;<br />
103 H4( workingdays ( day ),assignmentshifts ( shift )) .. sum ( doctor ,x(day ,<br />
shift , doctor )) =e= 1 + s(day , shift );<br />
104 H5(day , nonshifts ( shift ),doctor ) .. x(<br />
105<br />
106<br />
day , shift , doctor ) =e= 0;<br />
107 B0( mondays ( day ),noonshift ( shift ),doctor , index0 ( index )) ..x(day , shift , doctor<br />
) + x( day +4 , shift +1 , doctor ) =e=<br />
108 1 + y(day ,<br />
shift , doctor , index ) - k(day , shift , doctor ,in<br />
dex );