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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix A<br />

Implementation<br />

This appendix lists the implementation of key points in the implementation of the heuris-<br />

tics and methods they use.<br />

A.1 Neighborhoods<br />

A.1.1 Inversion neighborhood<br />

1 package changes ;<br />

2<br />

3 import java . util . LinkedHashSet ;<br />

4<br />

5 import ds.Day ;<br />

6 import ds. <strong>Doctor</strong> ;<br />

7 import ds. Schedule ;<br />

8 import ds. Shift ;<br />

9<br />

10 public class N_invertion extends Change {<br />

11<br />

12 private static final long serialVersionUID = -717097533016180053 L;<br />

13<br />

14 public N_invertion ( int maxRotation , RotationInt rotationInt ) {<br />

15 setChangeType ( ChangeType . nRotation );<br />

16 setRotationInt ( rotationInt );<br />

17 setN ( maxRotation );<br />

18 }<br />

19<br />

20 public Change nextChange ( Schedule s) {<br />

21<br />

22 Change c = new Change ();<br />

23<br />

24 LinkedHashSet < Shift > list = new LinkedHashSet < Shift >() ;<br />

25<br />

26 // find shifts to invert<br />

59

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

Saved successfully!

Ooh no, something went wrong!