Staff Scheduling Model: STAFFDEM
This covering model assigns start days to employees to cover staffing needs, minimizing the total number of staff, subject to the requirement that each staff member must have two consecutive days off each week. A detailed discussion of this model may be found in Using Sets.
MODEL:
SETS:
DAYS / MON TUE WED THU FRI SAT SUN/:
REQUIRED, START;
ENDSETS
DATA:
REQUIRED = 20 16 13 16 19 14 12;
ENDDATA
MIN = @SUM( DAYS( I): START( I));
@FOR( DAYS( J):
@SUM( DAYS( I) | I #LE# 5:
START( @WRAP( J - I + 1, 7)))
>= REQUIRED( J)
);
END
Model: STAFFDEM