title: Nurse scheduling model formulation in AMPL
body: <p>I have been working on a Nurse scheduling problem in AMPL for the following conditions:</p>
  
  <p>Total no. of Nurses=20</p>
  
  <p>Total no. of shits= 3 #morning,day,night</p>
  
  <p>Planning Horizon 7 days: let's say M T W R F Sa Su</p>
  
  <p>Along with following constraints:</p>
  
  <ol>
  <li>Max no. of working days in a week: 5 </li>
  <li>A rest days after 4 continuous
  night shifts.</li>
  <li>Consecutive night and morning shifts are not allowed.</li>
  <li>Demand per shift is 7 nurses.</li>
  <li>A nurse can only work in one shift per day,  i.e. morning, night, day</li>
  </ol>
  
  <p>Cost scenarios:</p>
  
  <pre><code>Morning shift: $12
  Day shift: $13
  Night shift : $15
  </code></pre>
  
  <p>Objective function is to minimize the cost of operation as per Nurse preferences.</p>
  
  <p>Can anyone give me an idea of how this problem can be formulated ?</p>