27.07.2013 Views

The Doctor Rostering Problem - Asser Fahrenholz

The Doctor Rostering Problem - Asser Fahrenholz

The Doctor Rostering Problem - Asser Fahrenholz

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix B. GAMS Model 78<br />

46 c(day , shift , doctor ) define requests for days off or shifts off<br />

( meaning you can have a shift up to or af<br />

ter a shift off )<br />

47 /(8.3. jst ) 1, (9.3. jst ) 1, (16.3. jst ) 1,<br />

48 (9.3. pzh ) 1, (19.3. pzh ) 1,<br />

49 (1.3. hp) 1, (4.3. hp) 1, (9.3. hp) 1, (18.3. hp) 1, (23.3. hp) 1,<br />

50 (1.3. sda ) 1, (9.3. sda ) 1, (12.3. sda ) 1, (15.2. sda ) 1, (15.3. sda )<br />

1, (26.2. sda ) 1, (26.3. sda ) 1,<br />

51 (8.2. hmm ) 1, (8.3. hmm ) 1, (9.2. hmm ) 1, (9.3. hmm ) 1, (10.2. hmm ) 1,<br />

(10.3. hmm ) 1, (11.2. hmm ) 1, (11.3. hmm ) 1,<br />

(12.2. hmm ) 1, (12.3. hmm ) 1,<br />

GAMS Rev 140 Sun Sparc / SOLAR<br />

10/28/08 18:25:02 Page 2<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 />

52 (13.2. hmm ) 1, (13.3. hmm ) 1, (14.2. hmm ) 1, (14.3. hmm ) 1,<br />

53 (1.2. osj ) 1, (1.3. osj ) 1, (2.2. osj ) 1, (2.3. osj ) 1, (3.2. osj ) 1,<br />

(3.3. osj ) 1, (4.2. osj ) 1, (4.3. osj ) 1, (5.<br />

2. osj ) 1, (5.3. osj ) 1, (6.2. osj ) 1,<br />

54 (6.3. osj ) 1, (7.2. osj ) 1, (7.3. osj ) 1<br />

55 /<br />

56 s(day , shift ) define extra doctor demands<br />

57 /(1.2) 1, (8.2) 1, (15.2) 1, (22.2) 1/<br />

58<br />

59 VARIABLES<br />

60 x(day , shift , doctor ) doctors on shifts<br />

61 y(day , shift , doctor , index ) counting var<br />

62 z solution value<br />

63 k(day , shift , doctor , index ) counter the the y- vars<br />

64 dmax doctor max<br />

65 dmin doctor min ;<br />

66<br />

67<br />

68 BINARY VARIABLE x(day , shift , doctor ), y(day , shift , doctor , index ), k(day , shift<br />

, doctor , index );<br />

69 POSITIVE VARIABLE dmax , dmin ;<br />

70<br />

71 EQUATIONS<br />

72 VALUE define objective function<br />

73<br />

74 H0a no two assignment shifts in a row<br />

75 H0b no eveningshift after an afternoonshift<br />

76 H0c no nightshift before a noonshift<br />

77 H1 doctor cannot have a noon shift after an evening<br />

shift<br />

78 H2 doctor cannot have a noon shift nor an afternoon<br />

shift after a night shift<br />

79 H3a no shifts must be granted that has been blocked<br />

80 H3b no shifts must be granted that has requested off<br />

81 H4 doctor demands<br />

82 H5 no other assignments<br />

83

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!