The root element of the document is <SchedulingPeriod>. This is the opening tag.

<SchedulingPeriod>

The root element of the document.

Attributes

Name Required Type Description
ID Required string A unique ID used to identify the instance.
OrganisationID Optional string Displayed when showing a solution.

Elements

SchedulingPeriod contains a sequence of child elements in the following order:

Name Required Type Description
<MetaInformation> Required MetaInformation MetaInformation contains some information about the problem like start date, end date, author, problem description, literature.
<DayPeriods> Optional DayPeriods A day can be split into periods for defining the cover requirements.
<Skills> Optional Skills Cover can specified for different skills and employees, shifts and workstations associated with different skills. They must be defined here first though.
<SkillGroups> Optional SkillGroups Skills can be grouped together and cover specified for different skill groups. The groups must be defined here first though.
<ShiftTypes> Required ShiftTypes The types of shift to be assigned e.g. early shifts, night shifts etc.
<ShiftGroups> Optional ShiftGroups Shift types may be placed in groups for certain constraints. For example, there may be a number of shift types which have different start times and/or durations but which are all classified as night shifts. Identifying these together in one group can then allow constraints such as maximum number of consecutive shifts from Group X etc.
Cover can also be specified using shift groups.
<Contracts> Required Contracts Each employee can have a different set of constraints. These are specified within contracts which are linked to each employee.
<Employees> Required Employees The employees to be scheduled.
<Workstations> Required Workstations The workstations to be assigned to the employees e.g. cash desk, depot.
<CoverRequirements> Required CoverRequirements The minimum, maximum and preferred numbers of employees working at certain times during the scheduling period.
<MasterWeights> Optional MasterWeights Priorities or weights can be assigned to each constraint within the contracts. For convenience though, it is possible to assign a weight for all constraints of the same type within MasterWeights.
<DayOffRequests> Optional DayOffRequests Dates which employees request not to be working.
<DayOnRequests> Optional DayOnRequests Dates on which employees want to be working.
<ShiftOffRequests> Optional ShiftOffRequests Dates on which employees do not want specific shifts.
<ShiftOnRequests> Optional ShiftOnRequests Dates on which employees want specific shifts.
<TimeOffRequests> Optional TimeOffRequests Times on which employees do not want to be working.
<TimeOnRequests> Optional TimeOnRequests Times on which employees want to be working.
<DayOffRequestsBetweenDates> Optional DayOffRequestsBetweenDates A request for a minimum and maximum number of days off between two dates.
<Partnerships> Optional Partnerships Constraints for two employees to work or not to work together.
<SpecialDays> Optional SpecialDays Special days need to be defined for contraints such as maximum number of working bank holidays.
<SchedulingHistory> Optional SchedulingHistory Some constraints are dependent on previous schedule information. This is specified in SchedulingHistory.
<Assignments> Optional Assignments Contains the assignments for employees to shifts and workstations. These element is only required if a during the day employee timetabling problem (DDETP) has to be solved and the problem is divided in a ETP and DDETP so that the DDETP gets information from the ETP in the element Assignemts.

Example

<?xml version="1.0" encoding="UTF-8"?>
<SchedulingPeriod ID="ExampleProblemID"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:noNamespaceSchemaLocation="SchedulingPeriod-2.2.xsd">

  <StartDate>2007-01-01</StartDate>
  <EndDate>2007-01-28</EndDate>

  <ShiftTypes>
    <Shift ID="E" >
      <StartTime>06:30:00</StartTime>
      <EndTime>14:30:00</EndTime>
    </Shift>
  </ShiftTypes>

  <Contracts>
    <Contract ID="ExampleContract">
      <MaxNumAssignments>20</MaxNumAssignments>
      <MaxConsecutiveWorkingDays>5</MaxConsecutiveWorkingDays>
    </Contract>
  </Contracts>

  <Employees>
    <Employee ID="ExampleEmployee">
      <ContractID>ExampleContract</ContractID>
    </Employee>
  </Employees>

  <CoverRequirements>
    <DayOfWeekCover>
      <Day>Monday</Day>
      <Cover>
        <Shift>E</Shift>
        <Count>1</Count>
        <Type>Required</Type>
      </Cover>
    </DayOfWeekCover>
  </CoverRequirements>

  <DayOffRequests>
    <DayOff weight="10">
      <EmployeeID>ExampleEmployee</EmployeeID>
      <Date>2007-01-01</Date>
    </DayOff>
  </DayOffRequests>

</SchedulingPeriod>

<MetaInformation>

MetaInformation contains some information about the problem.

Parents : SchedulingPeriod

Attributes

None

Elements

MetaInformation contains 7 child elements in any order.

Name Required Type Description
<Type> Optional string Type of the problem (ETP, DDETP, ...).
<LastUpdate> Optional date, time Date and time, when this document was last updated.
<Author> Optional string The author of this document.
<Desc> Optional string A Description of this problem to give more information.
<Aref> Optional Aref Aref contains literature according to the described problem.
<StartDate> Required date The date of the first day in the scheduling period (planning horizon). Specified in the format: YYYY-MM-DD.
<EndDate> Required date The date of the last day in the scheduling period. Specified in the format: YYYY-MM-DD.

Example

  <MetaInformation>
    <Type>DDETP</Type>
    <LastUpdate>2008-03-03T 16:57:00</LastUpdate>
    <Author>Maik Guenther</Author>
    <Desc>Beispieldokument fuer die untertaegige Personaleinsatzplanung</Desc>
    <Aref>
      <Li>Guenther, Maik: Ein XML-Format für ETP inkl. DDETP</Li>
    </Aref>
    <StartDate>2008-03-03</StartDate>
    <EndDate>2008-03-03</EndDate>
  </MetaInformation>

<Aref>

Aref contains literature according to the described problem.

Parents : MetaInformation

Attributes

None

Elements

0 or more Li elements.

Name Required Type Description
<Li> Optional string A reference.

<DayPeriods>

DayPeriods contains the definitions of periods of the day.

Parents : SchedulingPeriod

Attributes

None

Elements

Contains 2 child elements. 1 is required. Which one is optional.

Name Required Type Description
<Period> Optional Period A period in the day defined by a start and end time.
<Day> Optional Day A day divided into periods defined by a start and end time, the number of intervals and the duration of intervals. Each day of the planning horizon can be different.

Example 1

  <DayPeriods>
    <Period ID="1"><Label>1</Label><Start>07:15:00</Start><End>10:00:00</End></Period>
    <Period ID="2"><Label>2</Label><Start>10:00:00</Start><End>15:15:00</End></Period>
    <Period ID="3"><Label>3</Label><Start>15:15:00</Start><End>17:00:00</End></Period>
    <Period ID="4"><Label>4</Label><Start>17:00:00</Start><End>18:00:00</End></Period>
    <Period ID="5"><Label>5</Label><Start>18:00:00</Start><End>23:15:00</End></Period>
    <Period ID="6"><Label>6</Label><Start>23:15:00</Start><End>01:00:00</End></Period>
    <Period ID="7"><Label>7</Label><Start>01:00:00</Start><End>07:15:00</End></Period>
  </DayPeriods>

Example 2

  <DayPeriods>
    <Date ID="2008-03-03" ShortDesc="D1">
      <Start>08:00:00</Start>
      <End>16:00:00</End>
      <TimeIntervalCount>32</TimeIntervalCount>
      <TimeIntervalLength Unit="min">15</TimeIntervalLength>
    </Date>
  </DayPeriods>

<Period>

A period in the day.

Parents : DayPeriods

Attributes

Name Required Type Description
ID Required string A unique ID for this period.

Elements

Period contains 3 child elements in any order.

Name Required Type Description
<Label> optional string A label to use when displaying a roster.
<Start> Required time When the period begins. Specified in the format: hh:mm:ss.
<End> Required time When the period ends. Specified in the format: hh:mm:ss.

Example

  <DayPeriods>
    <Period ID="1"><Label>1</Label><Start>07:15:00</Start><End>10:00:00</End></Period>
    <Period ID="2"><Label>2</Label><Start>10:00:00</Start><End>15:15:00</End></Period>
    <Period ID="3"><Label>3</Label><Start>15:15:00</Start><End>17:00:00</End></Period>
    <Period ID="4"><Label>4</Label><Start>17:00:00</Start><End>18:00:00</End></Period>
    <Period ID="5"><Label>5</Label><Start>18:00:00</Start><End>23:15:00</End></Period>
    <Period ID="6"><Label>6</Label><Start>23:15:00</Start><End>01:00:00</End></Period>
    <Period ID="7"><Label>7</Label><Start>01:00:00</Start><End>07:15:00</End></Period>
  </DayPeriods>

<Day>

A day of the planning horizon.

Parents : DayPeriods

Attributes

Name Required Type Description
ID Required date A unique ID for this day specified in the format: YYYY-MM-DD. If 2 dates are given ID="2008-03-03 2008-03-05", then the following information are for 03.03.2008, 04.03.2008 and 05.03.2008.
ShortDesc Optional string A short description of the day.

Elements

Day contains 4 required child elements.

Name Required Type Description
<Start> Required time When the period begins. Specified in the format: hh:mm:ss.
<End> Required time When the period ends. Specified in the format: hh:mm:ss.
<TimeIntervalCount> Required positiveInteger Number of time intervals at that day.
<TimeIntervalLength> Required positiveInteger Duration of a time interval of that day. The attribute duration=" " defines the timeformat (sek, min, hour, day).

Example

  <DayPeriods>
    <Date ID="2008-03-03" ShortDesc="D1">
      <Start>08:00:00</Start>
      <End>16:00:00</End>
      <TimeIntervalCount>32</TimeIntervalCount>
      <TimeIntervalLength Unit="min">15</TimeIntervalLength>
    </Date>
  </DayPeriods>

<Skills>

Contains skill elements, which can specified for employees, shifts and workstations. They must be defined here first though.

Parents : SchedulingPeriod

Attributes

None

Elements

0 or more <Skill> elements.

Name Required Type Description
<Skill> Optional Skill Cover can specified for different skills and employees, shifts and workstations associated with different skills. They must be defined here first though.

Example

  <Skills>
    <Skill ID="1" ShortDesc="KA">
        <Name>Kassieren</Name>
      </Skill>
    <Skill ID="2" ShortDesc="LA">
      <Name>Lagerist</Name>
    </Skill>
    <Skill ID="3" ShortDesc="BE">
      <Name>Bereichsleiter</Name>
    </Skill>
  </Skills>

<Skill>

Cover can specified for different skills and employees, shifts and workstations associated with different skills. They must be defined here first though.

Parents : Skills

Attributes

Name Required Type Description
ID Required string A unique ID for this skill.
ShortDesc Optional string A short description of the skill.

Elements

Contains 1 element.

Name Required Type Description
<Name> Optional string The Name of the skill.

<SkillGroups>

Skills can be placed in groups for cover constraints.

Parents : SchedulingPeriod

Attributes

None

Elements

SkillGroups contains 0 or more SkillGroup elements.

Name Required Type Description
<SkillGroup> Optional SkillGroup A group of skills.

Example

  <SkillGroups>
    <SkillGroup ID="AorB">
      <Skill>A</Skill>
      <Skill>B</Skill>
    </SkillGroup>
  </SkillGroups>

<SkillGroup>

A group of skills.

Parents : SkillGroups

Attributes

Name Required Type Description
ID Required string A unique ID for this group.

Elements

SkillGroup contains 1 or more Skill elements.

Name Required Type Description
<Skill> Required string A skill ID. Specified in Skills.

Example

    <SkillGroup ID="123">
      <Skill>1</Skill>
      <Skill>2</Skill>
      <Skill>3</Skill>
    </SkillGroup>

<ShiftTypes>

ShiftTypes contains the definitions for the different shifts to be assigned in the scheduling period.

Parents : SchedulingPeriod

Attributes

None

Elements

1 or more Shift elements.

Name Required Type Description
<Shift> Required Shift A specific shift type. For example a night shift.

Example

  <ShiftTypes>
    <Shift ID="E">
      <Description>Early</Description>
      <StartTime>07:00:00</StartTime>
      <EndTime>14:45:00</EndTime>
    </Shift>
    <Shift ID="L3">
      <Description>Late (Registered nurse)</Description>
      <StartTime>13:30:00</StartTime>
      <EndTime>21:15:00</EndTime>
      <Skills>
        <SkillID>1</SkillID>
      </Skills>
    </Shift>
    <Shift ID="N2">
      <Description>Night (Eye trained)</Description>
      <StartTime>21:00:00</StartTime>
      <EndTime>07:15:00</EndTime>
      <Skills>
        <SkillID>3</SkillID>
      </Skills>
    </Shift>
  </ShiftTypes>

<Shift>

A specific shift type. For example, a night shift.

Parents : ShiftTypes

Attributes

Name Required Type Description
ID Required string A unique ID for this shift type.

Elements

Shift contains 10 child elements in any order:

Name Required Type Description
<StartTime> Required time When the shift begins. Specified in the format : hh:mm:ss.
<EndTime> Required time When the shift ends. Specified in the format : hh:mm:ss.
<Label> Optional string A label for the shift when displaying schedules (in a table for example). The ID is used if this element is omitted.
<Description> Optional string A description of the shift when displaying schedules.
<Colour> Optional string A colour for the shift when displaying schedules.
<HoursWorked> Optional nonNegativeDecimal The number of hours counted as work for this shift. If omitted the number of hours is assumed to be the duration between the start time and the end time.
<FreeTimeBefore> Optional nonNegativeDecimal The number of minutes of non work required before this shift. Another shift cannot be assigned if it overlaps with this time period before this shift.
<FreeTimeAfter> Optional nonNegativeDecimal The number of minutes of non work required after this shift. Another shift cannot be assigned if it overlaps with this time period after this shift.
<Skills> Optional Skills Skills required by the employee to cover this shift.
<DayPeriods> Optional DayPeriods The periods of the day this shift covers.

Example

    <Shift ID="D1">
      <Label>D1</Label>
      <Colour>Green</Colour>
      <Description>Head Nurse Day Shift</Description>
      <StartTime>09:00:00</StartTime>
      <EndTime>17:00:00</EndTime>
      <HoursWorked>8.0</HoursWorked>
      <FreeTimeBefore>660</FreeTimeBefore>
      <FreeTimeAfter>480</FreeTimeAfter>
      <Skills>
        <SkillID>1;/SkillID>
      </Skills>
    </Shift>

<Skills>

Skills required by the employee to cover a shift or a workstation. A shift or a workstation must be assigned to an employee who have the necessary skills. If not you can use the constraint <NoSkill>.

Parents : Shift

Attributes

None

Elements

Skills contains 1 or more SkillID elements.

Name Required Type Description
<SkillID> Required string A skill ID. The skills for each employee are specified in Employees. The optional attribute Level represents the necessary skill-level. No ID means, that no skill is required an no Level means, that it is only necessary for an employee to be skilled to work in this shift

Example

    <Shift ID="D">
      <StartTime>09:00:00</StartTime>
      <EndTime>17:00:00</EndTime>
      <Description>A shift requiring lots of skills!</Description>
      <Skills>
        <SkillID Level="50">1</SkillID>
        <SkillID>3</SkillID>
        <SkillID>12</SkillID>
      </Skills>
    </Shift>

<DayPeriods>

The periods in the day this shift covers.

Parents : Shift

Attributes

None

Elements

DayPeriods contains 1 or more Period elements.

Name Required Type Description
<Period> Required string A period ID. Day periods are defined in DayPeriods.

Example

  <Shift ID="ET">
    <Label>ET</Label>
    <Colour>#00FF00</Colour>
    <StartTime>17:00:00</StartTime>
    <EndTime>01:00:00</EndTime>
    <HoursWorked>8</HoursWorked>
    <DayPeriods>
      <Period>4</Period>
      <Period>5</Period>
      <Period>6</Period>
    </DayPeriods>
  </Shift>

<ShiftGroups>

Shift types can be placed in groups for some constraints.

Parents : SchedulingPeriod

Attributes

None

Elements

ShiftGroups contains 0 or more ShiftGroup elements.

Name Required Type Description
<ShiftGroup> optional ShiftGroup A group of shift types.

Example

  <ShiftGroups>
    <ShiftGroup ID="N">
      <Shift>N</Shift>
      <Shift>N2</Shift>
    </ShiftGroup>
    <ShiftGroup ID="L">
      <Shift>L</Shift>
      <Shift>L2</Shift>
      <Shift>L3</Shift>
    </ShiftGroup>
    <ShiftGroup ID="E">
      <Shift>E</Shift>
      <Shift>E2</Shift>
      <Shift>E3</Shift>
    </ShiftGroup>
  </ShiftGroups>

<ShiftGroup>

A group of shift types.

Parents : ShiftGroups

Attributes

Name Required Type Description
ID Required string A unique ID for this group.

Elements

ShiftGroup contains 1 or more Shift elements.

Name Required Type Description
<Shift> required string The ID of a shift type. Specified in Shift attribute 'ID'.

Example

    <ShiftGroup ID="EarlyAndNight">
      <Shift>Early</Shift>
      <Shift>Night</Shift>
    </ShiftGroup>

<Contracts>

Contains the contracts for the employees.

Parents : SchedulingPeriod

Attributes

None

Elements

Contracts contains 1 or more Contract elements.

Name Required Type Description
<Contract> optional Contract Contains the working preferences and requirements for each employee with this contract.

Example

  <Contracts>

    <Contract ID="ExampleContract">
      <MaxHoursWorked>160.0</MaxHoursWorked>
      <CompleteWeekends weight="10">true</CompleteWeekends>
      <MaxConsecutiveWorkingWeekends weight="10">1</MaxConsecutiveWorkingWeekends>
      <MaxNumAssignments weight="5">20</MaxNumAssignments>
      <MaxShiftTypes>
        <MaxShiftType><ShiftType>E</ShiftType><Value>10</Value></MaxShiftType>
        <MaxShiftType><ShiftType>N</ShiftType><Value>5</Value></MaxShiftType>
      </MaxShiftTypes>
    </Contract>

    <Contract ID="ExampleContract2">
      <MinHoursWorked>80.0</MinHoursWorked>
      <MaxConsecutiveWorkingWeekends>2</MaxConsecutiveWorkingWeekends>
      <IdenticalShiftTypesDuringWeekend>true</IdenticalShiftTypesDuringWeekend>
      <MaxNumAssignments weight="20">10</MaxNumAssignments>
      <MaxHoursPerWeek>40.0</MaxHoursPerWeek>
    </Contract>

  </Contracts>

<Contract>

The working preferences and requirements for each employee assigned this contract.

Parents : Contracts

Attributes

Name Required Type Description
ID Required string A unique ID for this contract.
ShortDesc Optional string A short description of the skill.

Elements

Contract may contain 0 or more of the following elements in any order. Each element has an optional attribute Type="hard" or Type="soft". If the attribute Type is not specified, then a soft-constraint is supposed. For a hard-constraint no value is required. If the optional attribute Unit="sek/min/hour/day" is given, then the error points are for the duration of a violation.

Name Required Type Attributes Description
<MaxWorkstationsPerDay> optional nonNegativeInteger on (optional) The maximum number of workstations assigned to the employee each day.
weight (optional)
<MinWorkstationsPerDay> optional nonNegativeInteger on (optional) The minimum number of workstations assigned to the employee each day.
weight (optional)
<MaxShiftsPerDay> optional nonNegativeInteger on (optional) The maximum number of shifts assigned to the employee each day.
weight (optional)
<MaxNumAssignments> optional nonNegativeInteger on (optional) The maximum number of shifts assigned to the employee in the scheduling period.
weight (optional)
<MaxConsecutiveWorkingDays> optional nonNegativeInteger on (optional) The maximum number of consecutive days with shifts assigned.
weight (optional)
<MinConsecutiveWorkingDays> optional nonNegativeInteger on (optional) The minimum number of consecutive days with shifts assigned.
weight (optional)
<MaxConsecutiveWorkingDaysQuadratic> optional nonNegativeInteger on (optional) The maximum number of consecutive days with shifts assigned. Deviations are penalised in proportion to the square of the weight.
weight (optional)
<MinConsecutiveWorkingDaysQuadratic> optional nonNegativeInteger on (optional) The minimum number of consecutive days with shifts assigned. Deviations are penalised in proportion to the square of the weight.
weight (optional)
<MaxConsecutiveFreeDays> optional nonNegativeInteger on (optional) The maximum number of consecutive days without any shifts.
weight (optional)
<MinConsecutiveFreeDays> optional nonNegativeInteger on (optional) The minimum number of consecutive days without any shifts.
weight (optional)
<MaxWorkingBankHolidays> optional nonNegativeInteger on (optional) The maximum number of bank holidays to assign shifts on.
weight (optional)
<MaxConsecutiveWorkingWeekends> optional nonNegativeInteger on (optional) The maximum number of consecutive weekends with shifts on.
weight (optional)
<MinConsecutiveWorkingWeekends> optional nonNegativeInteger on (optional) The minimum number of consecutive weekends with shifts on.
weight (optional)
<MaxConsecutiveFreeWeekends> optional nonNegativeInteger on (optional) The maximum number of consecutive weekends without shifts on.
weight (optional)
<MinConsecutiveFreeWeekends> optional nonNegativeInteger on (optional) The minimum number of consecutive weekends without shifts on.
weight (optional)
<MaxWorkingWeekendsInFourWeeks> optional nonNegativeInteger on (optional) The maximum number of weekends with shifts on in a four week period.
weight (optional)
<MaxShiftsPerWeek> optional nonNegativeInteger on (optional) The maximum number of shifts worked per week.
weight (optional)
<MinShiftsPerWeek> optional nonNegativeInteger on (optional) The minimum number of shifts worked per week.
weight (optional)
<WeekendDefinition> optional string None Valid values are: 'SaturdaySunday', 'FridaySaturdaySunday', 'FridaySaturdaySundayMonday' or 'SaturdaySundayMonday'. If this element is omitted then the default definition of Saturday and Sunday only is used.
<CompleteWeekends> optional boolean weight (optional) Shifts assigned on all days of the weekend or no shifts on the weekend (i.e. no split weekends).
<IdenticalShiftTypesDuringWeekend> optional boolean weight (optional) Shifts assigned over a weekend should all be the same type.
<NoNightShiftBeforeFreeWeekend> optional boolean weight (optional) Do not assign a night shift before a weekend if there are no shifts assigned on the weekend.
<TwoFreeDaysAfterNightShifts> optional boolean weight (optional) A minimum of two days off after a sequence of night shifts.
<AlternativeSkillCategory> optional boolean weight (optional) Avoid assigning shifts that require the use of a 'Secondary' skill (see Employee).
<MinConsecutiveShiftTypes> optional MinConsecutiveShiftTypes on (optional) The minimum number of consecutive shifts of a certain type or shifts from a group.
weight (optional)
<MaxConsecutiveShiftTypes> optional MaxConsecutiveShiftTypes on (optional) The maximum number of consecutive shifts of a certain type or shifts from a group.
weight (optional)
<MaxAssignmentsForDayOfWeek> optional MaxAssignmentsForDayOfWeek on (optional) The maximum number of shifts for each day of the week. For example, maximum 0 shifts on all Mondays or maximum 2 shifts on all Fridays etc.
weight (optional)
<ValidNumConsecutiveShiftTypes> optional ValidNumConsecutiveShiftTypes on (optional) Permitted numbers of consecutive shifts of a certain type. For example only 2, 3 or 4 consecutive night shifts is valid.
weight (optional)
<ValidNumConsecutiveShiftGroups> optional ValidNumConsecutiveShiftGroups on (optional) Same as above but for shift groups.
weight (optional)
<MaxShiftTypes> optional MaxShiftTypes on (optional) The maximum number of a certain shift type or shift group that can be assigned to the employee in this scheduling period.
weight (optional)
<MinShiftTypes> optional MinShiftTypes on (optional) The minimum number of a certain shift type or shift group that can be assigned to the employee in this scheduling period.
weight (optional)
<MaxShiftTypesPerWeek> optional MaxShiftTypesPerWeek on (optional) The maximum number of a certain shift type that can be assigned to the employee in a specific week in the scheduling period.
weight (optional)
<MinHoursWorkedBetweenDates> optional MinHoursWorkedBetweenDates on (optional) The minimum number of working hours between two dates.
weight (optional)
<MaxHoursWorkedBetweenDates> optional MaxHoursWorkedBetweenDates on (optional) The maximum number of working hours between two dates.
weight (optional)
<MaxHoursWorked> optional nonNegativeDecimal on (optional) The maximum number of hours work during the scheduling period.
weight (optional)
threshold (optional)
<MinHoursWorked> optional nonNegativeDecimal on (optional) The minimum number of hours work during the scheduling period.
weight (optional)
threshold (optional)
<StandardPerformance> optional nonNegativeDecimal None If holiday is taken during the scheduling period, then this value is taken as the average number of hours worked per day and the minimum and maximum number of hours worked is adjusted to account for the days off.
<MaxHoursPerWeek> optional nonNegativeDecimal on (optional) The maximum number of hours work each week. Week 1 is the first seven days, week 2 is days 8-14, week 3 is days 15-21 etc.
weight (optional)
<MaxHoursPerFortnight> optional nonNegativeDecimal on (optional) The maximum number of hours work each fortnight (two weeks).
weight (optional)
<ValidShiftTypeSuccessions> optional ValidShiftTypeSuccessions on (optional) Which shift types (if any) may be assigned on the day after a certain shift type is worked. For example, only a night shift or day off may follow a night shift.
weight (optional)
<MinShiftTypeRatios> optional MinShiftTypeRatios on (optional) The minimum ratio of shifts of a certain type or from a certain group. For example, of all the shifts worked, a minimum 50% of them should be 'Late' shifts.
weight (optional)
<MaxShiftTypeRatios> optional MaxShiftTypeRatios on (optional) The maximum ratio of shifts of a certain type or from a certain group. For example, of all the shifts worked, a maximum 20% of them should be 'Night' shifts.
weight (optional)
<Patterns> optional Patterns on (optional) Good or bad patterns of any length. That is, preferable or disliked sequences of shifts, shifts from a group and days off.
weight (optional)

 

Name Required Type Description
on optional boolean Specifies whether this constraint is used or not.
weight optional nonNegativeInteger The weight for this constraint.
threshold optional nonNegativeDecimal No violation occurs if the min or max hours worked is exceeded by a value less than this threshold.

Example

  <Contract ID="Trainee">
    <MaxNumAssignments Type="soft">15</MaxNumAssignments>
    <MinNumAssignments>8</MinNumAssignments>
    <MaxConsecutiveWorkingDays>4</MaxConsecutiveWorkingDays>
    <MinConsecutiveWorkingDays>2</MinConsecutiveWorkingDays>
    <MaxWorkingBankHolidays>2</MaxWorkingBankHolidays>
    <MaxConsecutiveFreeDays>4</MaxConsecutiveFreeDays>
    <MinConsecutiveFreeDays>2</MinConsecutiveFreeDays>
    <MaxConsecutiveWorkingWeekends>2</MaxConsecutiveWorkingWeekends>
    <MaxWorkingWeekendsInFourWeeks>2</MaxWorkingWeekendsInFourWeeks>
    <WeekendDefinition>FridaySaturdaySunday</WeekendDefinition>
    <CompleteWeekends>true</CompleteWeekends>
    <IdenticalShiftTypesDuringWeekend>false</IdenticalShiftTypesDuringWeekend>
    <NoNightShiftBeforeFreeWeekend>true</NoNightShiftBeforeFreeWeekend>
    <TwoFreeDaysAfterNightShifts>true</TwoFreeDaysAfterNightShifts>
    <AlternativeSkillCategory>true</AlternativeSkillCategory>
    <MaxAssignmentsForDayOfWeek>
      <MaxAssignments><Day>Tuesday</Day><Value>1</Value></MaxAssignments>
      <MaxAssignments><Day>Wednesday</Day><Value>1</Value></MaxAssignments>
      <MaxAssignments><Day>Thursday</Day><Value>1</Value></MaxAssignments>
    </MaxAssignmentsForDayOfWeek>
    <ValidNumConsecutiveShiftTypes>
      <NumConsecutiveShiftType><ShiftType>E</ShiftType><Value>1</Value></NumConsecutiveShiftType>
      <NumConsecutiveShiftType><ShiftType>E</ShiftType><Value>2</Value></NumConsecutiveShiftType>
      <NumConsecutiveShiftType><ShiftType>E</ShiftType><Value>3</Value></NumConsecutiveShiftType>
      <NumConsecutiveShiftType><ShiftType>E</ShiftType><Value>4</Value></NumConsecutiveShiftType>
      <NumConsecutiveShiftType><ShiftType>L</ShiftType><Value>1</Value></NumConsecutiveShiftType>
      <NumConsecutiveShiftType><ShiftType>L</ShiftType><Value>2</Value></NumConsecutiveShiftType>
      <NumConsecutiveShiftType><ShiftType>L</ShiftType><Value>3</Value></NumConsecutiveShiftType>
      <NumConsecutiveShiftType><ShiftType>L</ShiftType><Value>4</Value></NumConsecutiveShiftType>
    </ValidNumConsecutiveShiftTypes>
    <MaxShiftTypes>
      <MaxShiftType><ShiftType>N</ShiftType><Value>0</Value></MaxShiftType>
    </MaxShiftTypes>
    <MaxShiftTypesPerWeek>
      <MaxShiftTypePerWeek><ShiftType>E</ShiftType><Week>1</Week><Value>2</Value></MaxShiftTypePerWeek>
      <MaxShiftTypePerWeek><ShiftType>L</ShiftType><Week>4</Week><Value>2</Value></MaxShiftTypePerWeek>
    </MaxShiftTypesPerWeek>
    <MaxHoursWorked Unit="min">140.00</MaxHoursWorked>
    <MinHoursWorked Unit="min">100.00</MinHoursWorked>
    <ValidShiftTypeSuccessions>
      <Succession><ShiftTypeID1>E</ShiftTypeID1><ShiftTypeID2></ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1>E</ShiftTypeID1><ShiftTypeID2>E</ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1></ShiftTypeID1><ShiftTypeID2></ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1></ShiftTypeID1><ShiftTypeID2>E</ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1></ShiftTypeID1><ShiftTypeID2>L</ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1>L</ShiftTypeID1><ShiftTypeID2></ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1>L</ShiftTypeID1><ShiftTypeID2>L</ShiftTypeID2></Succession>
    </ValidShiftTypeSuccessions>
  </Contract>

<MaxAssignmentsForDayOfWeek>

Maximum number of shift assignments for days of the week. For example, maximum 0 shifts on all Mondays or maximum 2 shifts on all Fridays etc.

Parents : Contract

Attributes

Name Required Type Description
on optional boolean Specifies whether this constraint is to be used or not?
weight optional nonNegativeInteger The weight for this constraint.

Elements

MaxAssignmentsForDayOfWeek contains 0 or more MaxAssignments elements.

Name Required Type Description
<MaxAssignments> optional MaxAssignments The maximum number of shifts for a particular day of the week.

Example

    <MaxAssignmentsForDayOfWeek weight="100">
      <MaxAssignments>
        <Day>Tuesday</Day>
        <Value>0</Value>
      </MaxAssignments>
      <MaxAssignments>
        <Day>Wednesday</Day>
        <Value>0</Value>
      </MaxAssignments>
      <MaxAssignments>
        <Day>Thursday</Day>
        <Value>0</Value>
      </MaxAssignments>
    </MaxAssignmentsForDayOfWeek>

<MaxAssignments>

The maximum number of assignments for days of the week.

Parents : MaxAssignmentsForDayOfWeek

Attributes

None

Elements

MaxAssignments contains 2 elements in the following order:

Name Required Type Description
<Day> required string The day of the week. Valid values are: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'.
<Value> required nonNegativeInteger The maximum number of assignments on this day.

Example

    <MaxAssignmentsForDayOfWeek>
      <MaxAssignments>
        <Day>Friday</Day>
        <Value>1</Value>
      </MaxAssignments>
      <MaxAssignments>
        <Day>Monday</Day>
        <Value>1</Value>
      </MaxAssignments>
    </MaxAssignmentsForDayOfWeek>

<ValidNumConsecutiveShiftTypes>

Valid numbers of consecutive shifts of a certain type. For example only 2, 3 or 4 consecutive night shifts is valid.

Parents : Contract

Attributes

Name Required Type Description
on optional boolean Specifies whether this constraint is to be used or not?
weight optional nonNegativeInteger The weight for this constraint.

Elements

ValidNumConsecutiveShiftTypes contains 0 or more NumConsecutiveShiftType elements.

Name Required Type Description
<NumConsecutiveShiftType> optional NumConsecutiveShiftType A valid number of consecutive shifts of a certain type.

Example

    <ValidNumConsecutiveShiftTypes>
      <NumConsecutiveShiftType>
        <ShiftType>N</ShiftType>
        <Value>2</Value>
      </NumConsecutiveShiftType>
      <NumConsecutiveShiftType>
        <ShiftType>N</ShiftType>
        <Value>3</Value>
      </NumConsecutiveShiftType>
      <NumConsecutiveShiftType>
        <ShiftType>N</ShiftType>
        <Value>4</Value>
      </NumConsecutiveShiftType>
    </ValidNumConsecutiveShiftTypes>

<NumConsecutiveShiftType>

A valid number of consecutive shifts of a certain type.

Parents : ValidNumConsecutiveShiftTypes

Attributes

None

Elements

NumConsecutiveShiftType contains 2 elements in the following order:

Name Required Type Description
<ShiftType> required string A shift Type (specified in ShiftTypes).
<Value> required nonNegativeInteger A valid number of consecutive shifts of this type. Must be less than or equal to 12.

Example

    <ValidNumConsecutiveShiftTypes weight="10">
      <NumConsecutiveShiftType>
        <ShiftType>E</ShiftType>
        <Value>2</Value>
      </NumConsecutiveShiftType>
      <NumConsecutiveShiftType>
        <ShiftType>E</ShiftType>
        <Value>4</Value>
      </NumConsecutiveShiftType>
    </ValidNumConsecutiveShiftTypes>

<ValidNumConsecutiveShiftGroups>

Valid numbers of consecutive shifts from a certain group. For example only 2, 3 or 4 consecutive night shifts is valid.

Parents : Contract

Attributes

Name Required Type Description
on optional boolean Specifies whether this constraint is to be used or not?
weight optional nonNegativeInteger The weight for this constraint.

Elements

ValidNumConsecutiveShiftGroups contains 0 or more NumConsecutiveShiftGroup elements.

Name Required Type Description
<NumConsecutiveShiftGroup> optional NumConsecutiveShiftGroup A valid number of consecutive shifts from a certain group.

Example

    <ValidNumConsecutiveShiftGroups>
      <NumConsecutiveShiftGroup>
        <ShiftGroup>N</ShiftGroup>
        <Value>2</Value>
      </NumConsecutiveShiftGroup>
      <NumConsecutiveShiftGroup>
        <ShiftGroup>N</ShiftGroup>
        <Value>3</Value>
      </NumConsecutiveShiftGroup>
      <NumConsecutiveShiftGroup>
        <ShiftGroup>N</ShiftGroup>
        <Value>4</Value>
      </NumConsecutiveShiftGroup>
    </ValidNumConsecutiveShiftGroups>

<NumConsecutiveShiftGroup>

A valid number of consecutive shifts from a certain group.

Parents : ValidNumConsecutiveShiftGroups

Attributes

None

Elements

NumConsecutiveShiftGroup contains 2 elements in the following order:

Name Required Type Description
<ShiftGroup> required string A shift Group (specified in ShiftGroups).
<Value> required nonNegativeInteger A valid number of consecutive shifts from this group. Must be less than or equal to 12.

Example

    <ValidNumConsecutiveShiftGroups weight="10">
      <NumConsecutiveShiftGroup>
        <ShiftGroup>E</ShiftGroup>
        <Value>2</Value>
      </NumConsecutiveShiftGroup>
      <NumConsecutiveShiftGroup>
        <ShiftGroup>E</ShiftGroup>
        <Value>4</Value>
      </NumConsecutiveShiftGroup>
    </ValidNumConsecutiveShiftGroups>

<MaxConsecutiveShiftTypes>

A maximum number of a consecutive shifts of a specific type or from a specific group.

Parents : Contract

Attributes

Name Required Type Description
on optional boolean Specifies whether this constraint is to be used or not?
weight optional nonNegativeInteger The weight for this constraint.

Elements

MaxConsecutiveShiftTypes contains 0 or more MaxConsecutiveShiftType elements.

Name Required Type Description
<MaxConsecutiveShiftType> optional MaxConsecutiveShiftType A maximum consecutive number of a shift type or group of shift types.

Example

    <MaxConsecutiveShiftTypes>
      <MaxConsecutiveShiftType>
        <ShiftType>E</ShiftType>
        <Value>4</Value>
      </MaxConsecutiveShiftType>
      <MaxConsecutiveShiftType>
        <ShiftType>L</ShiftType>
        <Value>4</Value>
      </MaxConsecutiveShiftType>
    </MaxConsecutiveShiftTypes>

<MaxConsecutiveShiftType>

A maximum number of a consecutive shifts of a specific type or from a specific group.

Parents : MaxConsecutiveShiftTypes

Attributes

None

Elements

MaxConsecutiveShiftType contains a <ShiftType> or a <ShiftGroup> element followed by a <Value> element :

Name Required Type Description
<ShiftType> optional string A ShiftType ID (specified in ShiftTypes).
<ShiftGroup> optional string A ShiftGroup ID (specified in ShiftGroups).
<Value> required nonNegativeInteger The maximum number of this shift type.

Example

    <MaxConsecutiveShiftTypes>
      <MaxConsecutiveShiftType>
        <ShiftType>D</ShiftType>
        <Value>1</Value>
      </MaxConsecutiveShiftType>
      <MaxConsecutiveShiftType>
        <ShiftType>N</ShiftType>
        <Value>1</Value>
      </MaxConsecutiveShiftType>
    </MaxConsecutiveShiftTypes>

<MinConsecutiveShiftTypes>

A minimum number of a consecutive shifts of a specific type or from a specific group.

Parents : Contract

Attributes

Name Required Type Description
on optional boolean Specifies whether this constraint is to be used or not?
weight optional nonNegativeInteger The weight for this constraint.

Elements

MinConsecutiveShiftTypes contains 0 or more MinConsecutiveShiftType elements.

Name Required Type Description
<MinConsecutiveShiftType> optional MinConsecutiveShiftType A minimum consecutive number of a shift type or group of shift types.

Example

    <MinConsecutiveShiftTypes>
      <MinConsecutiveShiftType>
        <ShiftType>E</ShiftType>
        <Value>4</Value>
      </MinConsecutiveShiftType>
      <MinConsecutiveShiftType>
        <ShiftType>L</ShiftType>
        <Value>4</Value>
      </MinConsecutiveShiftType>
    </MinConsecutiveShiftTypes>

<MinConsecutiveShiftType>

A minimum number of a consecutive shifts of a specific type or from a specific group.

Parents : MinConsecutiveShiftTypes

Attributes

None

Elements

MinConsecutiveShiftType contains a <ShiftType> or a <ShiftGroup> element followed by a <Value> element :

Name Required Type Description
<ShiftType> optional string A ShiftType ID (specified in ShiftTypes).
<ShiftGroup> optional string A ShiftGroup ID (specified in ShiftGroups).
<Value> required nonNegativeInteger The maximum number of this shift type.

Example

    <MinConsecutiveShiftTypes>
      <MinConsecutiveShiftType>
        <ShiftType>D</ShiftType>
        <Value>1</Value>
      </MinConsecutiveShiftType>
      <MinConsecutiveShiftType>
        <ShiftType>N</ShiftType>
        <Value>1</Value>
      </MinConsecutiveShiftType>
    </MinConsecutiveShiftTypes>

<MaxShiftTypes>

The maximum number of a specific shift type or shift group that can be assigned to the employee in this planning period. For example, a maximum 0 early shifts.

Parents : Contract

Attributes

Name Required Type Description
on optional boolean Specifies whether this constraint is to be used or not?
weight optional nonNegativeInteger The weight for this constraint.

Elements

MaxShiftTypes contains 0 or more MaxShiftType elements.

Name Required Type Description
<MaxShiftType> optional MaxShiftType A maximum number of a shift type or shift group.

Example

    <MaxShiftTypes>
      <MaxShiftType>
        <ShiftType>E</ShiftType>
        <Value>0</Value>
      </MaxShiftType>
      <MaxShiftType>
        <ShiftType>L</ShiftType>
        <Value>0</Value>
      </MaxShiftType>
    </MaxShiftTypes>

<MaxShiftType>

A maximum number of a shift type or shift group.

Parents : MaxShiftTypes

Attributes

None

Elements

MaxShiftType contains a <ShiftType> or a <ShiftGroup> element followed by a <Value> element :

Name Required Type Description
<ShiftType> optional string A ShiftType ID (specified in ShiftTypes).
<ShiftGroup> optional string A ShiftGroup ID (specified in ShiftGroups).
<Value> required nonNegativeInteger The maximum number of this shift type or group.

Example

    <MaxShiftTypes>
      <MaxShiftType>
        <ShiftType>N</ShiftType>
        <Value>3</Value>
      </MaxShiftType>
    </MaxShiftTypes>

<MinShiftTypes>

The minimum number of a specific shift type or shift group that can be assigned to the employee in this planning period. For example, a minimum 2 early shifts.

Parents : Contract

Attributes

Name Required Type Description
on optional boolean Specifies whether this constraint is to be used or not?
weight optional nonNegativeInteger The weight for this constraint.

Elements

MinShiftTypes contains 0 or more MinShiftType elements.

Name Required Type Description
<MinShiftType> optional MinShiftType A minimum number of a shift type or shift group.

Example

    <MinShiftTypes>
      <MinShiftType>
        <ShiftType>E</ShiftType>
        <Value>2</Value>
      </MinShiftType>
      <MinShiftType>
        <ShiftType>L</ShiftType>
        <Value>2</Value>
      </MinShiftType>
    </MinShiftTypes>

<MinShiftType>

A minimum number of a shift type or shift group.

Parents : MinShiftTypes

Attributes

None

Elements

MinShiftType contains a <ShiftType> or a <ShiftGroup> element followed by a <Value> element :

Name Required Type Description
<ShiftType> optional string A ShiftType ID (specified in ShiftTypes).
<ShiftGroup> optional string A ShiftGroup ID (specified in ShiftGroups).
<Value> required nonNegativeInteger The minimum number of this shift type or group.

Example

    <MinShiftTypes>
      <MinShiftType>
        <ShiftGroup>N</ShiftGroup>
        <Value>3</Value>
      </MinShiftType>
    </MinShiftTypes>

<MinHoursWorkedBetweenDates>

The minimum number of working hours between two dates.

Parents : Contract

Attributes

Name Required Type Description
on optional boolean Specifies whether this constraint is to be used or not?
weight optional nonNegativeInteger The weight for this constraint.

Elements

MinHoursWorkedBetweenDates contains 0 or more MinHoursWorked elements.

Name Required Type Description
<MinHoursWorked> optional MinHoursWorked A minimum number of hours between two dates.

Example

    <MinHoursWorkedBetweenDates>
      <MinHoursWorked>
        <StartDate>2007-07-15</StartDate>
        <EndDate>2007-07-28</EndDate>
        <Value>40</Value>
      </MinHoursWorked>
      <MinHoursWorked>
        <StartDate>2007-07-29</StartDate>
        <EndDate>2007-08-11</EndDate>
        <Value>40</Value>
      </MinHoursWorked>
      <MinHoursWorked>
        <StartDate>2007-08-12</StartDate>
        <EndDate>2007-08-25</EndDate>
        <Value>40</Value>
      </MinHoursWorked>
    </MinHoursWorkedBetweenDates>

<MinHoursWorked>

A minimum number of working hours between two dates.

Parents : MinHoursWorkedBetweenDates

Attributes

None

Elements

MinHoursWorked contains 3 elements in the following order:

Name Required Type Description
<StartDate> required date The start date. Specified in the format : YYYY-MM-DD.
<EndDate> required date The end date. Specified in the format : YYYY-MM-DD.
<Value> required nonNegativeInteger The minimum number of working hours.

Example

    <MinHoursWorkedBetweenDates>
      <MinHoursWorked>
        <StartDate>2007-07-15</StartDate>
        <EndDate>2007-07-28</EndDate>
        <Value>40</Value>
      </MinHoursWorked>
      <MinHoursWorked>
        <StartDate>2007-07-29</StartDate>
        <EndDate>2007-08-11</EndDate>
        <Value>40</Value>
      </MinHoursWorked>
      <MinHoursWorked>
        <StartDate>2007-08-12</StartDate>
        <EndDate>2007-08-25</EndDate>
        <Value>40</Value>
      </MinHoursWorked>
    </MinHoursWorkedBetweenDates>

<MaxHoursWorkedBetweenDates>

The maximum number of working hours between two dates.

Parents : Contract

Attributes

Name Required Type Description
on optional boolean Specifies whether this constraint is to be used or not?
weight optional nonNegativeInteger The weight for this constraint.

Elements

MaxHoursWorkedBetweenDates contains 0 or more MaxHoursWorked elements.

Name Required Type Description
<MaxHoursWorked> optional MaxHoursWorked A maximum number of hours between two dates.

Example

    <MaxHoursWorkedBetweenDates>
      <MaxHoursWorked>
        <StartDate>2001-07-15</StartDate>
        <EndDate>2001-07-28</EndDate>
        <Value>72</Value>
      </MaxHoursWorked>
      <MaxHoursWorked>
        <StartDate>2001-08-12</StartDate>
        <EndDate>2001-08-25</EndDate>
        <Value>72</Value>
      </MaxHoursWorked>
    </MaxHoursWorkedBetweenDates>

<MaxHoursWorked>

A maximum number of working hours between two dates.

Parents : MaxHoursWorkedBetweenDates

Attributes

None

Elements

MaxHoursWorked contains 3 elements in the following order:

Name Required Type Description
<StartDate> required date The start date. Specified in the format : YYYY-MM-DD.
<EndDate> required date The end date. Specified in the format : YYYY-MM-DD.
<Value> required nonNegativeInteger The maximum number of working hours.

Example

    <MaxHoursWorkedBetweenDates>
      <MaxHoursWorked>
        <StartDate>2001-07-15</StartDate>
        <EndDate>2001-07-28</EndDate>
        <Value>72</Value>
      </MaxHoursWorked>
      <MaxHoursWorked>
        <StartDate>2001-08-12</StartDate>
        <EndDate>2001-08-25</EndDate>
        <Value>72</Value>
      </MaxHoursWorked>
    </MaxHoursWorkedBetweenDates>

<MaxShiftTypesPerWeek>

The maximum number of a shift type that can be assigned to the employee in a certain week in this planning period. For example, a maximum 1 early shifts in week 1.

Parents : Contract

Attributes

Name Required Type Description
on optional boolean Specifies whether this constraint is to be used or not?
weight optional nonNegativeInteger The weight for this constraint.

Elements

MaxShiftTypesPerWeek contains 0 or more MaxShiftTypePerWeek elements.

Name Required Type Description
<MaxShiftTypePerWeek> optional MaxShiftTypePerWeek A maximum number of a shift type in a particular week.

Example

  <MaxShiftTypesPerWeek>
    <MaxShiftTypePerWeek>
      <ShiftType>D2</ShiftType>
      <Week>1</Week>
      <Value>0</Value>
    </MaxShiftTypePerWeek>
    <MaxShiftTypePerWeek>
      <ShiftType>L</ShiftType>
      <Week>4</Week>
      <Value>2</Value>
    </MaxShiftTypePerWeek>
  </MaxShiftTypesPerWeek>

<MaxShiftTypePerWeek>

A maximum number of a shift type in a particular week.

Parents : MaxShiftsTypePerWeek

Attributes

None

Elements

MaxShiftTypePerWeek contains 3 elements in the following order:

Name Required Type Description
<ShiftType> required string A shift ID (specified in ShiftTypes).
<Week> required positiveInteger The week number in this scheduling period. Week 1 corresponds to the first seven days (i.e. days 1-7), Week 2 is days 8-14, week 3 is days 15-21 etc.
<Value> required nonNegativeInteger The maximum number of this shift type.

Example

  <MaxShiftTypesPerWeek>
    <MaxShiftTypePerWeek>
      <ShiftType>Night</ShiftType>
      <Week>1</Week>
      <Value>0</Value>
    </MaxShiftTypePerWeek>
    <MaxShiftTypePerWeek>
      <ShiftType>Night</ShiftType>
      <Week>3</Week>
      <Value>0</Value>
    </MaxShiftTypePerWeek>
  </MaxShiftTypesPerWeek>

<ValidShiftTypeSuccessions>

Valid sequences of shift types (or shifts and days off) over any two day period. Describes which shifts may be assigned on a day after a certain shift type is worked. If this constraint is used, it is necessary to specify all valid successions. Any succession not specified here is considered invalid.

Parents : Contract

Attributes

Name Required Type Description
on optional boolean Specifies whether this constraint is to be used or not?
weight optional nonNegativeInteger The weight for this constraint.

Elements

ValidShiftTypeSuccessions contains 0 or more Succession elements.

Name Required Type Description
<Succession> optional Succession A valid sequence of shifts over a two day period.

Example

    <ValidShiftTypeSuccessions>
      <Succession><ShiftTypeID1></ShiftTypeID1><ShiftTypeID2></ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1></ShiftTypeID1><ShiftTypeID2>E</ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1></ShiftTypeID1><ShiftTypeID2>D</ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1></ShiftTypeID1><ShiftTypeID2>L</ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1></ShiftTypeID1><ShiftTypeID2>N</ShiftTypeID2></Succession>

      <Succession><ShiftTypeID1>E</ShiftTypeID1><ShiftTypeID2></ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1>E</ShiftTypeID1><ShiftTypeID2>E</ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1>E</ShiftTypeID1><ShiftTypeID2>D</ShiftTypeID2></Succession>

      <Succession><ShiftTypeID1>D</ShiftTypeID1><ShiftTypeID2></ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1>D</ShiftTypeID1><ShiftTypeID2>D</ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1>D</ShiftTypeID1><ShiftTypeID2>L</ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1>D</ShiftTypeID1><ShiftTypeID2>N</ShiftTypeID2></Succession>

      <Succession><ShiftTypeID1>L</ShiftTypeID1><ShiftTypeID2></ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1>L</ShiftTypeID1><ShiftTypeID2>L</ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1>L</ShiftTypeID1><ShiftTypeID2>N</ShiftTypeID2></Succession>

      <Succession><ShiftTypeID1>N</ShiftTypeID1><ShiftTypeID2></ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1>N</ShiftTypeID1><ShiftTypeID2>N</ShiftTypeID2></Succession>
    </ValidShiftTypeSuccessions>

<Succession>

A valid sequence of shifts over a two day period.

Parents : ValidShiftTypeSuccessions

Attributes

None

Elements

Succession contains 2 elements in the following order:

Name Required Type Description
<ShiftTypeID1> required string A shift ID (specified in ShiftTypes) of the first shift in the sequence. An empty string (<ShiftTypeID1></ShiftTypeID1>) is used to represent a non working day (a day without a shift).
<ShiftTypeID2> required string A shift ID (specified in ShiftTypes) of the second shift in the sequence. An empty string (<ShiftTypeID2></ShiftTypeID2>) is used to represent a non working day (a day without a shift).

Example

    <ValidShiftTypeSuccessions>
      <Succession><ShiftTypeID1></ShiftTypeID1><ShiftTypeID2></ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1></ShiftTypeID1><ShiftTypeID2>E</ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1></ShiftTypeID1><ShiftTypeID2>D</ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1></ShiftTypeID1><ShiftTypeID2>L</ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1></ShiftTypeID1><ShiftTypeID2>N</ShiftTypeID2></Succession>

      <Succession><ShiftTypeID1>E</ShiftTypeID1><ShiftTypeID2></ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1>E</ShiftTypeID1><ShiftTypeID2>E</ShiftTypeID2></Succession>

      <Succession><ShiftTypeID1>D</ShiftTypeID1><ShiftTypeID2></ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1>D</ShiftTypeID1><ShiftTypeID2>D</ShiftTypeID2></Succession>

      <Succession><ShiftTypeID1>L</ShiftTypeID1><ShiftTypeID2></ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1>L</ShiftTypeID1><ShiftTypeID2>L</ShiftTypeID2></Succession>

      <Succession><ShiftTypeID1>N</ShiftTypeID1><ShiftTypeID2></ShiftTypeID2></Succession>
      <Succession><ShiftTypeID1>N</ShiftTypeID1><ShiftTypeID2>N</ShiftTypeID2></Succession>
    </ValidShiftTypeSuccessions>

<MinShiftTypeRatios>

The minimum ratio of shifts of a certain type or from a certain group. For example, of all the shifts worked, a minimum 50% of them should be 'Late' shifts.

Parents : Contract

Attributes

Name Required Type Description
on optional boolean Specifies whether this constraint is to be used or not?
weight optional nonNegativeInteger The weight for this constraint.

Elements

MinShiftTypeRatios contains 0 or more MinShiftTypeRatio elements.

Name Required Type Description
<MinShiftTypeRatio> optional MinShiftTypeRatio A minimum ratio of a shift type or shift group.

Example

    <MinShiftTypeRatios>
      <MinShiftTypeRatio>
        <ShiftType>D</ShiftType>
        <Ratio>50</Ratio>
      </MinShiftTypeRatio>
      <MinShiftTypeRatio>
        <ShiftType>E</ShiftType>
        <Ratio>50</Ratio>
      </MinShiftTypeRatio>
      <MinShiftTypeRatio>
        <ShiftType>N</ShiftType>
        <Ratio>0</Ratio>
      </MinShiftTypeRatio>
    </MinShiftTypeRatios>

<MinShiftTypeRatio>

A minimum ratio of a shift type or shift group.

Parents : MinShiftTypeRatios

Attributes

None

Elements

MinShiftTypeRatio contains a <ShiftType> or a <ShiftGroup> element followed by a <Ratio> element :

Name Required Type Description
<ShiftType> optional string A ShiftType ID (specified in ShiftTypes).
<ShiftGroup> optional string A ShiftGroup ID (specified in ShiftGroups).
<Ratio> required nonNegativeInteger (0-100) The minimum ratio of this shift type or group.

Example

    <MinShiftTypeRatios>
      <MinShiftTypeRatio>
        <ShiftType>D</ShiftType>
        <Ratio>50</Ratio>
      </MinShiftTypeRatio>
      <MinShiftTypeRatio>
        <ShiftType>E</ShiftType>
        <Ratio>50</Ratio>
      </MinShiftTypeRatio>
      <MinShiftTypeRatio>
        <ShiftType>N</ShiftType>
        <Ratio>0</Ratio>
      </MinShiftTypeRatio>
    </MinShiftTypeRatios>

<MaxShiftTypeRatios>

The maximum ratio of shifts of a certain type or from a certain group. For example, of all the shifts worked, a maximum 50% of them should be 'Late' shifts.

Parents : Contract

Attributes

Name Required Type Description
on optional boolean Specifies whether this constraint is to be used or not?
weight optional nonNegativeInteger The weight for this constraint.

Elements

MaxShiftTypeRatios contains 0 or more MaxShiftTypeRatio elements.

Name Required Type Description
<MaxShiftTypeRatio> optional MaxShiftTypeRatio A maximum ratio of a shift type or shift group.

Example

    <MaxShiftTypeRatios>
      <MaxShiftTypeRatio>
        <ShiftType>D</ShiftType>
        <Ratio>50</Ratio>
      </MaxShiftTypeRatio>
      <MaxShiftTypeRatio>
        <ShiftType>E</ShiftType>
        <Ratio>50</Ratio>
      </MaxShiftTypeRatio>
      <MaxShiftTypeRatio>
        <ShiftType>N</ShiftType>
        <Ratio>0</Ratio>
      </MaxShiftTypeRatio>
    </MaxShiftTypeRatios>

<MaxShiftTypeRatio>

A maximum ratio of a shift type or shift group.

Parents : MaxShiftTypeRatios

Attributes

None

Elements

MaxShiftTypeRatio contains a <ShiftType> or a <ShiftGroup> element followed by a <Ratio> element :

Name Required Type Description
<ShiftType> optional string A ShiftType ID (specified in ShiftTypes).
<ShiftGroup> optional string A ShiftGroup ID (specified in ShiftGroups).
<Ratio> required nonNegativeInteger (0-100) The minimum ratio of this shift type or group.

Example

    <MaxShiftTypeRatios>
      <MaxShiftTypeRatio>
        <ShiftType>D</ShiftType>
        <Ratio>50</Ratio>
      </MaxShiftTypeRatio>
      <MaxShiftTypeRatio>
        <ShiftType>E</ShiftType>
        <Ratio>50</Ratio>
      </MaxShiftTypeRatio>
      <MaxShiftTypeRatio>
        <ShiftType>N</ShiftType>
        <Ratio>0</Ratio>
      </MaxShiftTypeRatio>
    </MaxShiftTypeRatios>

<Patterns>

Good or bad patterns of any length. That is, preferable or disliked sequences of shifts, shifts from a group and days off.

Parents : Contract

Attributes

Name Required Type Description
on optional boolean Specifies whether this constraint is to be used or not?
weight optional nonNegativeInteger The weight for this constraint.

Elements

Patterns contains 0 or more Pattern elements.

Name Required Type Description
<Pattern> optional Pattern A good or bad pattern of any length.

Example

     <Patterns>
       <!-- The following pattern specifies that
       a night shift followed by a day off followed by a night shift is not allowed. -->
       <Pattern>
        <Wanted>false</Wanted>
        <ShiftGroup>N</ShiftGroup>
        <Shift></Shift>
        <ShiftGroup>N</ShiftGroup>
       </Pattern>
      </Patterns>

<Pattern>

Parents : Patterns

Attributes

None

Elements

Pattern contains a <Wanted> element optionally followed by a <StartDay> or <StartDate> element followed by one or more <Shift> and <ShiftGroup> elements :

Name Required Type Description
<Wanted> required boolean If true this pattern should be provided in the schedule. If false this pattern should be avoided.
<StartDay> optional string The day of the week this pattern starts on. Valid values are 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'.
<StartDate> optional date The date this pattern starts on. Specified in the format : YYYY-MM-DD.
<Shift> optional string A ShiftType ID (specified in ShiftTypes) or an empty string to denote a day off.
* can be used for a day or or off, that is, match anything.
<ShiftGroup> optional string A ShiftGroup ID (specified in ShiftGroups).

Example

     <Patterns>
       <!-- The following pattern specifies that off-on-off-on-off is an undesirable pattern -->
       <Pattern>
        <Wanted>false</Wanted>
        <Shift></Shift>
        <ShiftGroup>All</ShiftGroup>
        <Shift></Shift>
        <ShiftGroup>All</ShiftGroup>
        <Shift></Shift>
       </Pattern>
      </Patterns>

<Employees>

Employees contains the definitions of all the employees available for scheduling.

Parents : SchedulingPeriod

Attributes

None

Elements

1 or more Employee elements.

Name Required Type Description
<Employee> Required Employee An employee.

Example

  <Employees>
    <Employee ID="E1">
      <ContractID>ContractA</ContractID>
      <Name>Theresa, M.</Name>
    </Employee>
    <Employee ID="E2">
      <ContractID>ContractB</ContractID>
      <Name>Dunant, H.</Name>
    </Employee>
    <Employee ID="E3">
      <ContractID>ContractB</ContractID>
      <Name>Fleming, A.</Name>
    </Employee>
  </Employees>

<Employee>

An employee requiring scheduling.

Parents : Employees

Attributes

Name Required Type Description
ID Required string A unique ID for this shift employee.
ShortDesc Optional string A short description of the skill.

Elements

Employee contains 5 child elements in any order:

Name Required Type Description
<ContractID> Required string The ID of the Contract which contains the work regulations and preferences for this employee.
<Name> optional string A label for the employee when displaying schedules (in a table for example). The ID is used if this element is omitted.
<EmploymentStartDate> optional date The employee is not available before this date. Specified in the format : YYYY-MM-DD.
<EmploymentEndDate> optional date The employee is not available after this date. Specified in the format : YYYY-MM-DD.
<Skills> optional Skills The skills, qualifications, experience, training etc. this employee has and which may be required to perform certain shifts or workstations.

Example

    <Employee ID="ExampleEmployee">
      <ContractID>C1</ContractID>
      <Name>Employee Name</Name>
      <EmploymentStartDate>2007-01-15</EmploymentStartDate>
      <EmploymentEndDate>2007-02-25</EmploymentEndDate>
      <Skills>
        <SkillID>1</SkillID>
        <SkillID>2</SkillID>
      </Skills>
    </Employee>

<Skills>

An employee's skills which may be required to perform certain shifts or workstations.

Parents : Employee

Attributes

Name Required Type Description
Type optional string Type must be "Primary" or "Secondary". A violation occurs if the skill is "Secondary", the AlternativeSkillCategory constraint is used and a shift is assigned to this employee which requires the use of this skill.

Elements

Skills contains 1 or more Skill elements.

Name Required Type Description
<SkillID> required string A skill ID. The skills required for each shift or workstation are specified in ShiftTypes or Workstations. The optional attribute Level represents the skill-level.

Example

    <Employee ID="ExampleEmployee">
      <ContractID>C1</ContractID>
      <Skills>
        <SkillID>1</SkillID>
        <SkillID>2</SkillID>
      </Skills>
    </Employee>

<Workstations>

Workstations contains the definitions of all the workstations, which has to be assigned to the employees e.g. cash desk, depot.

Parents : SchedulingPeriod

Attributes

None

Elements

0 or more Workstation element.

Name Required Type Description
<Workstation> Required Workstation A workstation.

Example

  <Workstations>
    <Workstation ID="1" ShortDesc="AP1">
      <Name>cash desk</Name>
      <SkillID Level="50">1</SkillID>
    </Workstation>
    <Workstation ID="2" ShortDesc="AP2">
      <Name>depot</Name>
      <SkillID Level="21">1</SkillID>
    </Workstation>
  </Workstations>

<Workstation>

Workstations to be assigned to the employees e.g. cash desk, depot.

Parents : Workstations

Attributes

Name Required Type Description
ID Required string A unique ID for this workstation.
ShortDesc Optional string A short description of the workstation.

Elements

Workstation contains 2 child elements in any order.

Name Required Type Description
<Name> Optional string The name of the workstation.
<SkillID> Optional string The skill ID. The skills, which are required for the workstation. The optional attribute Level represents the necessary skill-level. No ID means, that no skill is required an no Level means, that it is only necessary for an employee to be skilled to work on this workstation.

Example

  <Workstations>
    <Workstation ID="1" ShortDesc="AP1">
      <Name>cash desk</Name>
      <SkillID Level="50">1</SkillID>
    </Workstation>
    <Workstation ID="2" ShortDesc="AP2">
      <Name>depot</Name>
      <SkillID Level="21">1</SkillID>
    </Workstation>
  </Workstations>

<CoverRequirements>

The minimum, maximum and preferred numbers of employees working at certain times during the scheduling period.

Parents : SchedulingPeriod

Attributes

None

Elements

CoverRequirements contains 0 or more of the following elements in any order.

Name Required Type Description
<DayOfWeekCover> optional DayOfWeekCover The cover requirements on a specific day of the week. For example, the number of shifts needing assigning on a Monday.
<DateSpecificCover> optional DateSpecificCover The cover requirements on a specific date in the scheduling period. For example, the number of shifts needing assigning on Tuesday 6th of February.

Example






<DayOfWeekCover>

The minimum, maximum and preferred numbers of employees working at certain times on a specific week day.

Parents : CoverRequirements

Attributes

None

Elements

DayOfWeekCover contains 1 Day element followed by 1 or more Cover elements.

Name Required Type Description
<Day> Required string A day of the week. Valid values are 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'.
<Cover> Required Cover The min, max and/or preferred numbers of employees (optionally with certain skills) working at certain times.

Example

  <DayOfWeekCover>
    <Day>Friday</Day>
    <Cover><ShiftGroupID>N</ShiftGroupID><Min>4</Min></Cover>
    <Cover><SkillID>Skilled</SkillID><ShiftGroupID>N</ShiftGroupID><Min>1</Min></Cover>
    <Cover><SkillGroupID>SkilledOrSecondYear</SkillGroupID><ShiftID>Na</ShiftID><Min>1</Min></Cover>
    <Cover><SkillGroupID>SkilledOrSecondYear</SkillGroupID><ShiftID>Nb</ShiftID><Min>1</Min></Cover>
    <Cover><SkillGroupID>SkilledOrSecondYear</SkillGroupID><ShiftID>Nc</ShiftID><Min>1</Min></Cover>

    <Cover><ShiftGroupID>D</ShiftGroupID><Min>10</Min><Max>11</Max></Cover>
    <Cover><SkillID>Skilled</SkillID><ShiftGroupID>D</ShiftGroupID><Min>1</Min></Cover>
    <Cover><SkillGroupID>SkilledOrSecondYear</SkillGroupID><ShiftID>Da</ShiftID><Min>2</Min></Cover>
    <Cover><SkillGroupID>SkilledOrSecondYear</SkillGroupID><ShiftID>Db</ShiftID><Min>2</Min></Cover>
    <Cover><SkillGroupID>SkilledOrSecondYear</SkillGroupID><ShiftID>Dc</ShiftID><Min>2</Min></Cover>
    <Cover><ShiftID>Da</ShiftID><Min>3</Min><Max>4</Max></Cover>
    <Cover><ShiftID>Db</ShiftID><Min>3</Min><Max>4</Max></Cover>
    <Cover><ShiftID>Dc</ShiftID><Min>3</Min><Max>4</Max></Cover>
  </DayOfWeekCover>

<DateSpecificCover>

The minimum, maximum and preferred numbers of employees working at certain times on a specific date.

Parents : CoverRequirements

Attributes

None

Elements

DateSpecificCover contains 1 Date element followed by 1 or more Cover elements.

Name Required Type Description
<Date> Required date A date. Specified in the format : YYYY-MM-DD.
<Cover> Required Cover The min, max and/or preferred numbers of employees (optionally with certain skills) working at certain times.

Example

  <DateSpecificCover>
    <Date>1996-11-26</Date>
    <Cover><ShiftGroupID>D</ShiftGroupID><Min>12</Min><Max>16</Max></Cover>
    <Cover><ShiftID>Da</ShiftID><Min>4</Min><Max>6</Max></Cover>
    <Cover><ShiftID>Db</ShiftID><Min>4</Min><Max>6</Max></Cover>
    <Cover><ShiftID>Dc</ShiftID><Min>4</Min><Max>6</Max></Cover>
  </DateSpecificCover>

<Cover>

The min, max and/or preferred numbers of employees (optionally with certain skills) working at certain times.

Parents : DayOfWeekCover , DateSpecificCover

Attributes

None

Elements

Cover contains optionally a <Skill> or <SkillGroup> element followed by a <Period>, <Shift>, <ShiftGroup> or <Workstation> element followed by <Min>, <Max> and <Preferred> :

Name Required Type Description
<SkillID> optional string A Skill ID (specified in Skills).
<SkillGroupID> optional string A SkillGroup ID (specified in SkillGroup).
<PeriodID> optional string A Period ID (specified in Period).
<ShiftID> optional string A Shift ID (specified in Shift).
<ShiftGroupID> optional string A ShiftGroup ID (specified in ShiftGroup).
<WorkstationID> optional string A workstation ID (specified in Workstation).
<Min> optional NonNegativeInteger The minimum number of employees covering this period, shift type, shift group or workstation. Comma separated numbers for the maximum number of employees for the DDETP.
<Max> optional NonNegativeInteger The maximum number of employees covering this period, shift type, shift group or workstation. Comma separated numbers for the maximum number of employees for the DDETP.
<Preferred> optional NonNegativeInteger The preferred number of employees covering this period, shift type, shift group or workstation. Comma separated numbers for the preferred number of employees for the DDETP.

Example 1

  <DayOfWeekCover>
    <Day>Saturday</Day>
    <Cover>
      <SkillID>1</SkillID>
      <PeriodID>1</PeriodID>
      <Min>5</Min>
      <Max>22</Max>
      <Preferred>10</Preferred>
    </Cover>
    <Cover>
      <SkillID>1</SkillID>
      <PeriodID>2</PeriodID>
      <Min>5</Min>
      <Max>22</Max>
      <Preferred>10</Preferred>
    </Cover>
    <Cover>
      <SkillID>1</SkillID>
      <PeriodID>3</PeriodID>
      <Min>1</Min>
      <Max>6</Max>
      <Preferred>3</Preferred>
    </Cover>
    <Cover>
      <SkillID>1</SkillID>
      <PeriodID>4</PeriodID>
      <Min>2</Min>
      <Max>8</Max>
      <Preferred>5</Preferred>
    </Cover>
  </DayOfWeekCover>

Example 2

  <DateSpecificCover>
    <Date>2008-03-03</Date>
    <Cover>
      <WorkstationID>1</WorkstationID>
      <Preferred>2,2,2,2,1,1,1,1,1,1,4,4,2,2,2,2,3,3,3,3,3,3,3,3,1,1,1,1,1,1,1,1</Preferred>
    </Cover>
    <Cover>
      <WorkstationID>2</WorkstationID>
      <Preferred>5,1,1,1,2,2,2,2,3,3,1,1,1,1,1,1,2,2,2,2,2,2,2,2,0,0,0,0,2,2,2,2</Preferred>
    </Cover>
  </DateSpecificCover>

<MasterWeights>

Gloabl weights for all constraints of the same type unless a local weight is specified within a contract for a constraint. For example, if MasterWeights contains

<MaxNumAssignments>10</MaxNumAssignments>
then the maximum number of assignments constraint will have a weight of 10 for all employees unless their contract specifies a different weight.

Parents : SchedulingPeriod

Attributes

Name Required Type Description
ID Required string A unique ID for this shift type.

Elements

MasterWeights contains the following elements in any order. Most of the elements can be found in contract. Each element has an optional attribute Type="hard" or Type="soft". If the attribute Type is not specified, then a soft-constraint is supposed. For a hard-constraint no value is required. If the optional attribute Unit="sek/min/hour/day" is given, then the error points are for the duration of a violation.

Name Required Type Description
<NoSkill> optional nonNegativeInteger
<MinTimeBetweenShifts> optional nonNegativeInteger
<MaxNumAssignments> optional nonNegativeInteger
<MaxConsecutiveWorkingDays> optional nonNegativeInteger
<MinConsecutiveWorkingDays> optional nonNegativeInteger
<MaxWorkingBankHolidays> optional nonNegativeInteger
<MaxConsecutiveFreeDays> optional nonNegativeInteger
<MinConsecutiveFreeDays> optional nonNegativeInteger
<MaxConsecutiveWorkingWeekends> optional nonNegativeInteger
<MaxWorkingWeekendsInFourWeeks> optional nonNegativeInteger
<CompleteWeekends> optional nonNegativeInteger
<IdenticalShiftTypesDuringWeekend> optional nonNegativeInteger
<NoNightShiftBeforeFreeWeekend> optional nonNegativeInteger
<TwoFreeDaysAfterNightShifts> optional nonNegativeInteger
<MaxAssignmentsForDayOfWeek> optional nonNegativeInteger
<ValidNumConsecutiveShiftTypes> optional nonNegativeInteger
<ValidNumConsecutiveShiftGroups> optional nonNegativeInteger
<MaxShiftTypes> optional nonNegativeInteger
<MinShiftTypes> optional nonNegativeInteger
<MaxShiftTypeRatios> optional nonNegativeInteger
<MinShiftTypeRatios> optional nonNegativeInteger
<MaxShiftTypesPerWeek> optional nonNegativeInteger
<MaxHoursWorked> optional nonNegativeInteger
<MinHoursWorked> optional nonNegativeInteger
<MaxHoursPerWeek> optional nonNegativeInteger
<MaxHoursPerFortnight> optional nonNegativeInteger
<ValidShiftTypeSuccessions> optional nonNegativeInteger
<AlternativeSkillCategory> optional nonNegativeInteger
<Tutorship> optional nonNegativeInteger
<WorkSeparately> optional nonNegativeInteger
<Pattern> optional nonNegativeInteger
<MinWorkstationsPerWeek> optional nonNegativeInteger
<MaxWorkstationsPerWeek> optional nonNegativeInteger
<MinShiftsPerWeek> optional nonNegativeInteger
<MaxShiftsPerWeek> optional nonNegativeInteger
<MaxConsecutiveWorkingDaysQuadratic> optional nonNegativeInteger
<MinConsecutiveWorkingDaysQuadratic> optional nonNegativeInteger
<MinConsecutiveShiftTypes> optional nonNegativeInteger
<MaxConsecutiveShiftTypes> optional nonNegativeInteger
<MaxShiftsPerDay> optional nonNegativeInteger
<MinHoursWorkedBetweenDates> optional nonNegativeInteger
<MaxHoursWorkedBetweenDates> optional nonNegativeInteger
<MinConsecutiveWorkingWeekends> optional nonNegativeInteger
<MaxConsecutiveFreeWeekends> optional nonNegativeInteger
<MinConsecutiveFreeWeekends> optional nonNegativeInteger
<PrefOverStaffing> optional nonNegativeInteger
<PrefOverStaffingNoRequirements> optional nonNegativeInteger
<PrefUnderStaffing> optional nonNegativeInteger
<MaxOverStaffing> optional nonNegativeInteger
<MaxOverStaffingNoRequirements> optional nonNegativeInteger
<MinUnderStaffing> optional nonNegativeInteger

Example

  <MasterWeights>
    <MinTimeBetweenShifts Type="soft">5</MinTimeBetweenShifts>
    <MaxNumAssignments>10</MaxNumAssignments>
    <MaxConsecutiveWorkingDays>40</MaxConsecutiveWorkingDays>
    <MinConsecutiveWorkingDays>5</MinConsecutiveWorkingDays>
    <MaxWorkingBankHolidays>50</MaxWorkingBankHolidays>
    <MaxConsecutiveFreeDays>10</MaxConsecutiveFreeDays>
    <MinConsecutiveFreeDays>10</MinConsecutiveFreeDays>
    <MaxConsecutiveWorkingWeekends>20</MaxConsecutiveWorkingWeekends>
    <MaxWorkingWeekendsInFourWeeks>20</MaxWorkingWeekendsInFourWeeks>
    <CompleteWeekends>20</CompleteWeekends>
    <IdenticalShiftTypesDuringWeekend>20</IdenticalShiftTypesDuringWeekend>
    <NoNightShiftBeforeFreeWeekend>20</NoNightShiftBeforeFreeWeekend>
    <TwoFreeDaysAfterNightShifts>5</TwoFreeDaysAfterNightShifts>
    <MaxAssignmentsForDayOfWeek>10</MaxAssignmentsForDayOfWeek>
    <ValidNumConsecutiveShiftTypes>5</ValidNumConsecutiveShiftTypes>
    <MaxShiftTypes>10</MaxShiftTypes>
    <MaxShiftTypesPerWeek>5</MaxShiftTypesPerWeek>
    <MaxHoursWorked>10</MaxHoursWorked>
    <MinHoursWorked>5</MinHoursWorked>
    <MaxHoursPerWeek>0</MaxHoursPerWeek>
    <ValidShiftTypeSuccessions>5</ValidShiftTypeSuccessions>
    <AlternativeSkillCategory>10</AlternativeSkillCategory>
    <Tutorship>100</Tutorship>
    <WorkSeparately>80</WorkSeparately>
  </MasterWeights>

<DayOffRequests>

Employee requests for days off during the planning period.

Parents : SchedulingPeriod

Attributes

None

Elements

0 or more DayOff elements.

Name Required Type Description
<DayOff> Optional DayOff A day off request.

Example

  <DayOffRequests>
    <DayOff weight="1000">
      <EmployeeID>A</EmployeeID>
      <Date>2007-01-03</Date>
    </DayOff>
    <DayOff weight="1000">
      <EmployeeID>A</EmployeeID>
      <Date>2007-01-04</Date>
    </DayOff>
    <DayOff weight="10" holiday="false">
      <EmployeeID>B</EmployeeID>
      <Date>2007-01-20</Date>
    </DayOff>
  </DayOffRequests>

<DayOff>

A request for a day off.

Parents : DayOffRequests

Attributes

Name Required Type Description
weight Required nonNegativeInteger The weight for this request.
holiday Optional boolean Indicates whether this day off is to be counted as holiday or not. Some constraints need to know whether a day off is holiday. If this attribute is omitted then the request is assumed to be holiday.

Elements

DayOff contains 2 child elements in the following order:

Name Required Type Description
<EmployeeID> Required string The ID of the employee making this request (see Employee).
<Date> Required date The date requested off. Specified in the format : YYYY-MM-DD.

Example

  <DayOffRequests>
    <DayOff weight="1">
      <EmployeeID>A</EmployeeID>
      <Date>2007-02-05</Date>
    </DayOff>
    <DayOff weight="1">
      <EmployeeID>A</EmployeeID>
      <Date>2007-02-06</Date>
    </DayOff>
  </DayOffRequests>

<DayOnRequests>

Employee requests for dates they want to be working on.

Parents : SchedulingPeriod

Attributes

None

Elements

0 or more DayOn elements.

Name Required Type Description
<DayOn> Optional DayOn A day on request.

Example

  <DayOnRequests>
    <DayOn weight="1000">
      <EmployeeID>X</EmployeeID>
      <Date>2007-01-03</Date>
    </DayOn>
    <DayOn weight="1000">
      <EmployeeID>X</EmployeeID>
      <Date>2007-01-04</Date>
    </DayOn>
    <DayOn weight="10">
      <EmployeeID>Y</EmployeeID>
      <Date>2007-01-20</Date>
    </DayOn>
  </DayOnRequests>

<DayOn>

A request for a date to be working on.

Parents : DayOnRequests

Attributes

Name Required Type Description
weight Required nonNegativeInteger The weight for this request.

Elements

DayOn contains 2 child elements in the following order:

Name Required Type Description
<EmployeeID> Required string The ID of the employee making this request (see Employee).
<Date> Required date The date requested on. Specified in the format : YYYY-MM-DD.

Example

  <DayOnRequests>
    <DayOn weight="1000">
      <EmployeeID>X</EmployeeID>
      <Date>2007-01-03</Date>
    </DayOn>
    <DayOn weight="1000">
      <EmployeeID>X</EmployeeID>
      <Date>2007-01-04</Date>
    </DayOn>
    <DayOn weight="10">
      <EmployeeID>Y</EmployeeID>
      <Date>2007-01-20</Date>
    </DayOn>
  </DayOnRequests>

<ShiftOffRequests>

Employee requests for no shifts of a certain type on certain days in the planning period.

Parents : SchedulingPeriod

Attributes

None

Elements

0 or more ShiftOff elements.

Name Required Type Description
<ShiftOff> Optional ShiftOff A request to not work a certain shift on a certain date.

Example

  <ShiftOffRequests>
    <ShiftOff weight="5">
      <ShiftTypeID>Early</ShiftTypeID>
      <EmployeeID>ExampleEmployee</EmployeeID>
      <Date>2007-02-05</Date>
    </ShiftOff>
    <ShiftOff weight="5">
      <ShiftTypeID>Early</ShiftTypeID>
      <EmployeeID>ExampleEmployee</EmployeeID>
      <Date>2007-02-06</Date>
    </ShiftOff>
    <ShiftOff weight="5">
      <ShiftTypeID>Night</ShiftTypeID>
      <EmployeeID>ExampleEmployee</EmployeeID>
      <Date>2007-02-05</Date>
    </ShiftOff>
    <ShiftOff weight="5">
      <ShiftTypeID>Night</ShiftTypeID>
      <EmployeeID>ExampleEmployee</EmployeeID>
      <Date>2007-02-06</Date>
    </ShiftOff>
  </ShiftOffRequests>

<ShiftOff>

A request for a shift off.

Parents : ShiftOffRequests

Attributes

Name Required Type Description
weight Required nonNegativeInteger The weight for this request.

Elements

ShiftOff contains 3 child elements in the following order:

Name Required Type Description
<ShiftTypeID> Required string The ID of the shift (see Shift).
<EmployeeID> Required string The ID of the employee making this request (see Employee).
<Date> Required date The date the shift is requested off. Specified in the format : YYYY-MM-DD.

Example

  <ShiftOffRequests>
    <ShiftOff weight="5">
      <ShiftTypeID>Early</ShiftTypeID>
      <EmployeeID>ExampleEmployee</EmployeeID>
      <Date>2007-02-05</Date>
    </ShiftOff>
    <ShiftOff weight="5">
      <ShiftTypeID>Early</ShiftTypeID>
      <EmployeeID>ExampleEmployee</EmployeeID>
      <Date>2007-02-06</Date>
    </ShiftOff>
  </ShiftOffRequests>

<ShiftOnRequests>

Employee requests for shifts of a certain type on certain days in the planning period.

Parents : SchedulingPeriod

Attributes

None

Elements

0 or more ShiftOn elements.

Name Required Type Description
<ShiftOn> Optional ShiftOn A request to work a certain shift on a certain date.

Example

  <ShiftOnRequests>
    <ShiftOn weight="1">
      <ShiftGroupID>Early</ShiftGroupID>
      <EmployeeID>E1</EmployeeID>
      <Date>2007-02-05</Date>
    </ShiftOn>
    <ShiftOn weight="1">
      <ShiftGroupID>Late</ShiftGroupID>
      <EmployeeID>E2</EmployeeID>
      <Date>2007-02-06</Date>
    </ShiftOn>
    <ShiftOn weight="1">
      <ShiftTypeID>L</ShiftTypeID>
      <EmployeeID>E3</EmployeeID>
      <Date>2007-02-07</Date>
    </ShiftOn>
  </ShiftOnRequests>

<ShiftOn>

A request for a shift on.

Parents : ShiftOnRequests

Attributes

Name Required Type Description
weight Required nonNegativeInteger The weight for this request.

Elements

ShiftOn contains either a ShiftTypeID or ShiftGroupID followed by EmployeeID and Date.

Name Required Type Description
<ShiftTypeID> Optional string The ID of the shift (see Shift).
<ShiftGroupID> Optional string The ID of a shift group (see ShiftGroup).
<EmployeeID> Required string The ID of the employee making this request (see Employee).
<Date> Required date The date the shift is requested on. Specified in the format : YYYY-MM-DD.

Example

  <ShiftOnRequests>
    <ShiftOn weight="1">
      <ShiftGroupID>Early</ShiftGroupID>
      <EmployeeID>E1</EmployeeID>
      <Date>2007-02-05</Date>
    </ShiftOn>
    <ShiftOn weight="1">
      <ShiftGroupID>Late</ShiftGroupID>
      <EmployeeID>E2</EmployeeID>
      <Date>2007-02-06</Date>
    </ShiftOn>
    <ShiftOn weight="1">
      <ShiftTypeID>L</ShiftTypeID>
      <EmployeeID>E3</EmployeeID>
      <Date>2007-02-07</Date>
    </ShiftOn>
  </ShiftOnRequests>

<TimeOffRequests>

Employee requests for not to work at certain time on certain days in the planning period.

Parents : SchedulingPeriod

Attributes

None

Elements

0 or more ShiftOff elements.

Name Required Type Description
<TimeOff> Optional TimeOff A request to not work at certain time on a certain date.

<TimeOff>

A request for a time-interval off.

Parents : TimeOffRequests

Attributes

Name Required Type Description
weight Required nonNegativeInteger The weight for this request.

Elements

TimeOff contains 3 child elements in the following order:

Name Required Type Description
<Start> Required time The start. Specified in the format: HH:MM:SS.
<End> Required time The end. Specified in the format: HH:MM:SS.
<EmployeeID> Required string The ID of the employee making this request (see Employee).
<Date> Required date The date the time is requested off. Specified in the format: YYYY-MM-DD.

<TimeOnRequests>

Employee requests for times of a certain type on certain days in the planning period.

Parents : SchedulingPeriod

Attributes

None

Elements

0 or more TimeOn elements.

Name Required Type Description
<TimeOn> Optional TimeOn A request to work at certain time on a certain date.

<TimeOn>

A request for a time-interval on.

Parents : TimeOnRequests

Attributes

Name Required Type Description
weight Required nonNegativeInteger The weight for this request.

Elements

TimeOn contains the Start and End followed by EmployeeID and Date.

Name Required Type Description
<Start> Required time The start. Specified in the format: HH:MM:SS.
<End> Required time The end. Specified in the format: HH:MM:SS.
<EmployeeID> Required string The ID of the employee making this request (see Employee).
<Date> Required date The date the time is requested on. Specified in the format: YYYY-MM-DD.

Example

<DayOffRequestsBetweenDates>

Requests for a minimum and maximum number of days off between two dates.

Parents : SchedulingPeriod

Attributes

None

Elements

0 or more Request elements.

Name Required Type Description
<Request> Optional Request A request for a minimum and maximum number of days off between two dates.

Example

<DayOffRequestsBetweenDates>
  <Request weight="1000">
    <EmployeeID>12310</EmployeeID>
    <StartDate>2001-07-23</StartDate>
    <EndDate>2001-07-27</EndDate>
    <MinimumDaysOff>5</MinimumDaysOff>
    <MaximumDaysOff>5</MaximumDaysOff>
  </Request>
  <Request weight="1000">
    <EmployeeID>511104</EmployeeID>
    <StartDate>2001-07-29</StartDate>
    <EndDate>2001-08-11</EndDate>
    <MinimumDaysOff>10</MinimumDaysOff>
    <MaximumDaysOff>10</MaximumDaysOff>
  </Request>
</DayOffRequestsBetweenDates>

<Request>

A request for a minimum and maximum number of days off between two dates.

Parents : DayOffRequestsBetweenDates

Attributes

Name Required Type Description
weight Required nonNegativeInteger The weight for this request.
holiday Optional boolean Indicates whether these days off are to be counted as holiday or not. Some constraints need to know whether a day off is holiday. If this attribute is omitted then the request is assumed to be holiday.

Elements

Request contains 5 elements in the following order:

Name Required Type Description
<EmployeeID> Required string The ID of the employee making this request (see Employee).
<StartDate> Required date Specified in the format : YYYY-MM-DD.
<EndDate> Required date Specified in the format : YYYY-MM-DD.
<MinimumDaysOff> Required nonNegativeInteger The minimum number of days off required.
<MaximumDaysOff> Required nonNegativeInteger The maximum number of days off required.

Example

<DayOffRequestsBetweenDates>
  <Request weight="1000">
    <EmployeeID>12310</EmployeeID>
    <StartDate>2001-07-23</StartDate>
    <EndDate>2001-07-27</EndDate>
    <MinimumDaysOff>5</MinimumDaysOff>
    <MaximumDaysOff>5</MaximumDaysOff>
  </Request>
  <Request weight="1000">
    <EmployeeID>511104</EmployeeID>
    <StartDate>2001-07-29</StartDate>
    <EndDate>2001-08-11</EndDate>
    <MinimumDaysOff>10</MinimumDaysOff>
    <MaximumDaysOff>10</MaximumDaysOff>
  </Request>
</DayOffRequestsBetweenDates>

<Partnerships>

Employees who should or should not work together.

Parents : SchedulingPeriod

Attributes

None

Elements

0 or more Partnership elements.

Name Required Type Description
<Partnership> Optional Partnership Two employees who should or should not work together.

Example

  <Partnerships>
    <Partnership Type="Tutorship">
      <Employee1ID>Tutor</Employee1ID>
      <Employee2ID>Tutee</Employee2ID>
    </Partnership>
    <Partnership Type="Separation">
      <Employee1ID>Tom</Employee1ID>
      <Employee2ID>Jerry</Employee2ID>
    </Partnership>
  </Partnerships>

<Partnership>

Two employees who should or should not be working at the same time as each other.

Parents : Partnerships

Attributes

Name Required Type Description
Type Required string Value should be "Tutorship" or "Separation". If "Tutorship" then Employee1 is the tutor to Employee2. If "Separation" the employees should not work at the same time.

Elements

Partnership contains 2 elements in the following order:

Name Required Type Description
<Employee1ID> required string The ID of the first employee (see Employee).
<Employee2ID> required string The ID of the second employee (see Employee).

Example

  <Partnerships>
    <Partnership Type="Tutorship">
      <Employee1ID>Tutor</Employee1ID>
      <Employee2ID>Tutee</Employee2ID>
    </Partnership>
    <Partnership Type="Separation">
      <Employee1ID>Tom</Employee1ID>
      <Employee2ID>Jerry</Employee2ID>
    </Partnership>
  </Partnerships>

<SpecialDays>

SpecialDays in this scheduling period. Required for the maximum working bank holidays constraint and to define days with special rules (longer opening times, trade fair, ...).

Parents : SchedulingPeriod

Attributes

None

Elements

0 or more elements.

Name Required Type Description
<BankHolidays> Optional BankHoliday A date which is a bank holiday.
<SpecialDay> Optional SpecialDay A date which is a special day.

Example

  <BankHolidays>
    <BankHoliday ID="1JAN">
      <Name>New Year</Name>
      <Date>2007-01-01</Date>
    </BankHoliday>
    <BankHoliday ID="25DEC">
      <Name>Christmas Day</Name>
      <Date>2006-12-25</Date>
    </BankHoliday>
  </BankHolidays>

<BankHoliday>

A bank holiday.

Parents : SpecialDays

Attributes

Name Required Type Description
ID Required string An ID for this bank holiday.

Elements

Contains 2 elements in the following order:

Name Required Type Description
<Name> Required string The bank holiday name.
<Date> Required date The date of this bank holiday. Specified in the format : YYYY-MM-DD.

Example

  <BankHolidays>
    <BankHoliday ID="1JAN">
      <Name>New Year</Name>
      <Date>2007-01-01</Date>
    </BankHoliday>
    <BankHoliday ID="25DEC">
      <Name>Christmas Day</Name>
      <Date>2006-12-25</Date>
    </BankHoliday>
  </BankHolidays>

<SpecialDay>

A special day.

Parents : SpecialDays

Attributes

Name Required Type Description
ID Required string An ID for this special day.

Elements

Contains 2 elements in the following order:

Name Required Type Description
<Name> Required string The special day name.
<Date> Required date The date of this special day. Specified in the format : YYYY-MM-DD.

Example

  <SpecialDays>
    <BankHoliday ID="S1">
      <Name>Fair 1st day</Name>
      <Date>2008-05-07</Date>
    </BankHoliday>
    <SpecialDay ID="S2">
      <Name>Fair 2nd day</Name>
      <Date>2008-05-08</Date>
    </SpecialDay>
  </SpecialDays>

<SchedulingHistory>

SchedulingHistory contains any previous scheduling information that may be required by some of the constraints in this scheduling period. For example, the shifts worked on the days immediately preceding this schedule.

Parents : SchedulingPeriod

Attributes

None

Elements

Contains 0 or more EmployeeHistory elements.

Name Required Type Description
<EmployeeHistory> Optional EmployeeHistory The history for an individual employee.

Example

  <SchedulingHistory>
    <EmployeeHistory EmployeeID="O">
      <LastDayType>NonWorkingDay</LastDayType>
      <PreviousConsecutiveWorkingDays>0</PreviousConsecutiveWorkingDays>
      <PreviousConsecutiveWorkingDaysAndHoliday>0</PreviousConsecutiveWorkingDaysAndHoliday>
      <PreviousConsecutiveFreeDays>1</PreviousConsecutiveFreeDays>
      <PreviousConsecutiveWorkingWeekends>0</PreviousConsecutiveWorkingWeekends>
      <PreviousWorkingBankHolidays>0</PreviousWorkingBankHolidays>
      <WeekendWorkedThreeWeeksAgo>true</WeekendWorkedThreeWeeksAgo>
      <WeekendWorkedTwoWeeksAgo>false</WeekendWorkedTwoWeeksAgo>
      <WeekendWorkedOneWeekAgo>false</WeekendWorkedOneWeekAgo>
      <PreviousSaturdayWorked>false</PreviousSaturdayWorked>
      <PreviousSundayWorked>false</PreviousSundayWorked>
      <PreviousSaturdayRequestedHoliday>false</PreviousSaturdayRequestedHoliday>
      <PreviousSundayRequestedHoliday>false</PreviousSundayRequestedHoliday>
      <NightShiftThursday>true</NightShiftThursday>
      <NightShiftFriday>false</NightShiftFriday>
      <PreviousFridayWorked>false</PreviousFridayWorked>
      <PreviousNightShift>true</PreviousNightShift>
      <PreviousFreeDaysAfterNightShift>1</PreviousFreeDaysAfterNightShift>
      <PreviousConsecutiveHolidayDaysOff>0</PreviousConsecutiveHolidayDaysOff>
      <PreviousOvertime>0</PreviousOvertime>
    </EmployeeHistory>
  </SchedulingHistory>

<EmployeeHistory>

Previous schedule information for an employee. If the history is not provided it is assumed that the employee had an empty schedule before with no work and no requests.

Parents : SchedulingHistory

Attributes

Name Required Type Description
EmployeeID Required string The ID of this employee (see Employee).

Elements

EmployeeHistory containes the following elements in any order. The elements are only required for certain constraints. If the constraint is not used then the information is not needed.

Name Required Type Description
<LastDayType> optional string The type of day for the last day of the previous schedule. Value must be one of:
"WorkingDay" (a day with a shift on),
"NonWorkingDay" (a day without a shift and which was not requested as holiday),
or "HolidayNonWorkingDay" (a day without a shift and which was requested as holiday).
<LastDayShifts> optional LastDayShifts The shift(s) worked on the last day of the previous schedule.
<PreviousConsecutiveWorkingDays> optional nonNegativeInteger The number of consecutive working days up to and including the last day in the previous schedule.
<PreviousConsecutiveWorkingDaysAndHoliday> optional nonNegativeInteger The number of consecutive working days and days off which were holiday up to and including the last day in the previous schedule.
<PreviousConsecutiveFreeDays> optional nonNegativeInteger The number of consecutive days off (not holiday) up to and including the last day in the previous schedule.
<PreviousConsecutiveWorkingWeekends> optional nonNegativeInteger The number of consecutive working weekends up to and including the last day in the previous schedule.
<PreviousWorkingBankHolidays> optional nonNegativeInteger The number of bank holidays already worked this year.
<WeekendWorkedThreeWeeksAgo> optional boolean Was the employee working on the weekend three weeks before this scheduling period?
<WeekendWorkedTwoWeeksAgo> optional boolean Was the employee working on the weekend two weeks before this scheduling period?
<WeekendWorkedOneWeeksAgo> optional boolean Was the employee working on the weekend before this scheduling period?
<PreviousSaturdayWorked> optional boolean Was the employee working on the Saturday before this scheduling period? Only needs to be known if this planning period starts on a Sunday or Monday.
<PreviousSundayWorked> optional boolean Was the employee working on the Sunday before this scheduling period? Only needs to be known if this planning period starts on a Monday.
<PreviousSaturdayRequestedHoliday> optional boolean Was the Saturday before this scheduling period a requested holiday? Only needs to be known if this planning period starts on a Sunday or Monday.
<PreviousSundayRequestedHoliday> optional boolean Was the Sunday before this scheduling period a requested holiday? Only needs to be known if this planning period starts on a Monday.
<NightShiftThursday> optional boolean Did the employee have a night shift on the Thursday before this scheduling period? Only needs to be known if the scheduling period starts on a Friday, Saturday or Sunday.
<NightShiftFriday> optional boolean Did the employee have a night shift on the Friday before this scheduling period? Only needs to be known if the scheduling period starts on a Saturday or Sunday.
<PreviousFridayWorked> optional boolean Was the employee working on the Friday before this scheduling period? Only needs to be known if this planning period starts on a Saturday or Sunday.
<PreviousNightShift> optional boolean Was there a night shift followed by 0 or more days off before the beginning of this schedule?
<PreviousFreeDaysAfterNightShift> optional nonNegativeInteger If there was a night shift followed by 0 or more days rest before the beginning of this schedule, how many days rest have there been so far?
<PreviousConsecutiveHolidayDaysOff> optional nonNegativeInteger The number of consecutive holiday days off up to and including the last day of the previous schedule.
<PreviousOvertime> optional decimal The undertime (negative value) or overtime carried over from the previous scheduling period.
<PreviousConsecutiveShifts> optional PreviousConsecutiveShifts The number of consecutive assignments of different shift types up to and including on the last day of the previous schedule.

Example

    <EmployeeHistory EmployeeID="T">
      <LastDayType>WorkingDay</LastDayType>
      <LastDayShifts>
        <Shift>D1</Shift>
      </LastDayShifts>
      <PreviousConsecutiveWorkingDays>4</PreviousConsecutiveWorkingDays>
      <PreviousConsecutiveWorkingDaysAndHoliday>4</PreviousConsecutiveWorkingDaysAndHoliday>
      <PreviousConsecutiveFreeDays>0</PreviousConsecutiveFreeDays>
      <PreviousConsecutiveWorkingWeekends>0</PreviousConsecutiveWorkingWeekends>
      <PreviousWorkingBankHolidays>0</PreviousWorkingBankHolidays>
      <WeekendWorkedThreeWeeksAgo>false</WeekendWorkedThreeWeeksAgo>
      <WeekendWorkedTwoWeeksAgo>true</WeekendWorkedTwoWeeksAgo>
      <WeekendWorkedOneWeekAgo>false</WeekendWorkedOneWeekAgo>
      <PreviousSaturdayWorked>false</PreviousSaturdayWorked>
      <PreviousSundayWorked>false</PreviousSundayWorked>
      <PreviousSaturdayRequestedHoliday>false</PreviousSaturdayRequestedHoliday>
      <PreviousSundayRequestedHoliday>false</PreviousSundayRequestedHoliday>
      <NightShiftThursday>false</NightShiftThursday>
      <NightShiftFriday>false</NightShiftFriday>
      <PreviousFridayWorked>true</PreviousFridayWorked>
      <PreviousNightShift>false</PreviousNightShift>
      <PreviousFreeDaysAfterNightShift>0</PreviousFreeDaysAfterNightShift>
      <PreviousConsecutiveHolidayDaysOff>0</PreviousConsecutiveHolidayDaysOff>
      <PreviousConsecutiveShifts>
        <PreviousConsecutiveShift>
          <ShiftTypeID>D1</ShiftTypeID>
          <Count>1</Count>
        </PreviousConsecutiveShift>
      </PreviousConsecutiveShifts>
      <PreviousOvertime>0</PreviousOvertime>
    </EmployeeHistory>

<LastDayShifts>

The shift(s) worked on the last day of the previous schedule.

Parents : EmployeeHistory

Attributes

None

Elements

LastDayShifts contains 0 or more Shift elements.

Name Required Type Description
<Shift> optional string The ID of a shift type. Specified in Shift attribute 'ID'.

Example

  <LastDayShifts>
    <Shift>E</Shift>
  </LastDayShifts>

<PreviousConsecutiveShifts>

The number of consecutive assignments of different shift types up to and including on the last day of the previous schedule.

Parents : EmployeeHistory

Attributes

None

Elements

PreviousConsecutiveShifts contains 0 or more PreviousConsecutiveShift elements.

Name Required Type Description
<PreviousConsecutiveShift> optional PreviousConsecutiveShift The number of consecutive specific shifts worked up to and including on the last day of the previous schedule.

Example

    <PreviousConsecutiveShifts>
      <PreviousConsecutiveShift>
        <ShiftTypeID>D1</ShiftTypeID>
        <Count>1</Count>
      </PreviousConsecutiveShift>
    </PreviousConsecutiveShifts>

<PreviousConsecutiveShift>

The number of consecutive specific shifts worked up to and including on the last day of the previous schedule..

Parents : PreviousConsecutiveShifts

Attributes

None

Elements

PreviousConsecutiveShift contains 2 elements in the following order:

Name Required Type Description
<ShiftTypeID> required string The ID of a shift type (see Shift).
<Count> required nonNegativeInteger The number of consecutive assignments of this shift type.

Example

    <PreviousConsecutiveShifts>
      <PreviousConsecutiveShift>
        <ShiftTypeID>D1</ShiftTypeID>
        <Count>1</Count>
      </PreviousConsecutiveShift>
    </PreviousConsecutiveShifts>

<Assignments>

Assignements contains the definitions of all the assignments to the employees.

Parents : SchedulingPeriod

Attributes

None

Elements

0 or more Assignment elements.

Name Required Type Description
<Assignment> Optional Assignment An assignment.

Example

  <Assignments>
    <Assignment ID="1">
      <Date>2008-03-03</Date>
      <EmployeeID>1</EmployeeID>
      <ShiftID>1</ShiftID>
      <WorkstationID>3</WorkstationID>
    </Assignment>
    <Assignment ID="2">
      <Date>2008-03-032</EmployeeID>
      <ShiftID>1</ShiftID>
      <WorkstationID>1</WorkstationID>
    </Assignment>
  </Assignments>

<Assignment>

Assignments of workstations and shifts to employees.

Parents : Assignments

Attributes

Name Required Type Description
ID Required string A unique ID for this assignment.

Elements

Assignment contains 4 child elements in any order.

Name Required Type Description
<Date> Required date The date for this assignment. Specified in the format: YYYY-MM-DD. If 2 dates are given ID="2008-03-03 2008-03-05", then the following information are for 03.03.2008, 04.03.2008 and 05.03.2008.
<EmployeeID> Required string The employee ID. The employee, which has to be assigned.
<ShiftID> Required string The shift ID. The employee, which has to be assigned.
<WorkstationID> Required string The workstation ID. The employee, which has to be assigned.

Example

  <Assignments>
    <Assignment ID="1">
      <Date>2008-03-03</Date>
      <EmployeeID>1</EmployeeID>
      <ShiftID>1</ShiftID>
      <WorkstationID>3</WorkstationID>
    </Assignment>
    <Assignment ID="2">
      <Date>2008-03-032</EmployeeID>
      <ShiftID>1</ShiftID>
      <WorkstationID>1</WorkstationID>
    </Assignment>
  </Assignments>

boolean is one of the literals {true, false, 1, 0}.

nonNegativeDecimal is a decimal >= 0 e.g. 10, 10.12, 10000.111112 etc.