Medicine residency is three to seven years of challenging graduate medical training that puts a lot of mental and physiological burden over the residents. Like other surgical branches, anesthesia and reanimation departments provide 24 h continuous service and the residents are the main providers of this service. The residents are assigned for on-call shifts during their training, as well as working during the regular day shifts. These schedules must address several considerations like preferences of the residents and coverage requirements of two different locations: the intensive care unit (ICU) and the surgery room (SR). In this study we develop a goal programming (GP) model for scheduling the shifts of the residents in the Anesthesia and Reanimation Department of Bezmialem Vakif University Medical School (BUMS). The rules that must be strictly met, like the number of on-duty shifts or preventing block shifts, are formulated as hard constraints. The preferences of the residents like increasing the number of weekends without shifts and assigning duties on the same night to the same social groups are formulated as soft constraints. The penalties for the deviation from the soft constraints are determined by the analytical hierarchy process (AHP). We are able to solve problems of realistic size to optimality in a few seconds. We showed that the proposed formulation, which the department uses currently, has yielded substantial improvements and much better schedules are created with less effort. (C) 2012 Elsevier Ltd. All rights reserved.