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 A. Implementation 75<br />

74 if ( bestChange . indexOf ( changeScore ) == bestChange . size ()<br />

- 1) {<br />

75 bestChange . add ( new Pair < Change , Pair < Double , Integer<br />

> >(c, new Pair < Double , Integer >( scoreInc , vioInc )));<br />

76 break myFor ;<br />

77 }<br />

78 }<br />

79 }<br />

80 }<br />

81 }<br />

82<br />

83 switch ( RCLsize ) {<br />

84 case Best :<br />

85 bestChange . setSize (1) ;<br />

86 break ;<br />

87 case Fifty :<br />

88 bestChange . setSize (( int ) ( bestChange . size () * 0.5) );<br />

89 break ;<br />

90 case TwentyFive :<br />

91 bestChange . setSize (( int ) ( bestChange . size () * 0.25) );<br />

92 break ;<br />

93 case SeventyFive :<br />

94 bestChange . setSize (( int ) ( bestChange . size () * 0.75) );<br />

95 break ;<br />

96 default :<br />

97 break ;<br />

98 }<br />

99 double randDoc = Math . random () * bestChange . size ();<br />

100 Change out = bestChange . get (( int ) randDoc ). getE ();<br />

101<br />

102 return out ;<br />

103 }<br />

Listing A.2: Day assignments

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

Saved successfully!

Ooh no, something went wrong!