<?xml version="1.0" encoding="UTF-8"?>
<SchedulingHorizon
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="SchedulingHorizon-1.0.xsd">
        
    <!--
    This is a template XML file for ShiftSolver. This file can also be opened 
    with RosterViewer.
    
    Note that the top level elements (StartDate, EndDate, Tasks, Employees etc)
    can be in any order and do not have to follow the order they are defined 
    here.
    -->                  
                  
    <!--=====================================================================-->
    <!--                       Planning Horizon                              -->
    <!--=====================================================================-->
    <!--
    The planning horizon is defined by a start date and an end date. The end 
    date is inclusive. Below we define a seven day planning horizon from 12th
    February to 18th February.
    -->
    <StartDate>2012-02-12</StartDate>
    <EndDate>2012-02-18</EndDate>
    
    
    <!--=====================================================================-->
    <!--                        IntervalLength                               -->
    <!--=====================================================================-->
    <!--
    The length in minutes of the time intervals that the scheduling horizon is 
    split into.
    -->
    <IntervalLength>15</IntervalLength>

    
    <!--=====================================================================-->
    <!--                        DayRanges (optional)                         -->
    <!--=====================================================================-->
    <!--
    DayRanges can be used to make the problem smaller by narrowing the time 
    period for each day that work can be assigned. By default days span from
    midnight to midnight.
    -->
    <DayRanges>

    </DayRanges>
    
    
    <!--=====================================================================-->
    <!--                             Tasks                                   -->
    <!--=====================================================================-->
    <!--
    The activities to be assigned within shifts.
    -->
    <Tasks>
        <Task ID="i">
            <Label>i</Label>
            <Color>orange</Color>
        </Task>
    </Tasks>
    
    
    <!--=====================================================================-->
    <!--                        TaskGroups (optional)                       -->
    <!--=====================================================================-->
    <!-- 
    Tasks can be placed in groups for some constraints. The groups are defined
    here.
    -->
    <TaskGroups>

    </TaskGroups>
    
    
    <!--=====================================================================-->
    <!--                           Employees                                 -->
    <!--=====================================================================-->
    <!-- 
    Here we define the employees to be scheduled in the planning horizon. The
    only required information for each employee is a unique ID.
    -->
    <Employees>
        <Employee ID="E1">
            <!-- 
            Since version 1.36 an employee can be assigned more than one 
            contract. If more than one contract is assigned to an employee then 
            all the constraints in each contract apply to the employee. 
            -->
            <ContractID>ContractA</ContractID>
        </Employee>
        <Employee ID="E2">
            <ContractID>ContractA</ContractID>
        </Employee>
    </Employees>
    
    
    <!--=====================================================================-->
    <!--                        SkillGroups (optional)                       -->
    <!--=====================================================================-->
    <!-- 
    Employee skills can be placed in groups for some constraints. The groups are
    defined here.
    -->
    <SkillGroups>
    
    </SkillGroups>
    
    
    <!--=====================================================================-->
    <!--                         ShiftTypes (optional)                       -->
    <!--=====================================================================-->
    <!--
    Shifts can be categorized into general types based on their start and finish
    times. The ShiftTypes can then be used in constraint such "as assign at most 
    three night shifts for each employee".
    -->
    <ShiftTypes>

    </ShiftTypes>

    
    <!--=====================================================================-->
    <!--                        ShiftGroups (optional)                       -->
    <!--=====================================================================-->
    <!-- 
    Shift Types can be placed in groups for some constraints. The groups are 
    defined here.
    -->
    <ShiftGroups>

    </ShiftGroups>
    
    
    <!--=====================================================================-->
    <!--                           Contracts                                 -->
    <!--=====================================================================-->
    <!--
    Contracts contain the constraints on each employee's work schedule. For
    example how many hours they should work, break rules, which shift types they
    can be assigned etc. 
    -->
    <Contracts>
        <Contract ID="ContractA">

            <ShiftLengths>
                <Min>
                    <Length>480</Length>
                    <Label>Shift must not be shorter than 8 hours</Label>
                    <Weight function="quadratic">100</Weight>
                </Min>
                <Max>
                    <Length>720</Length>
                    <Label>Shifts must not be longer than 12 hours</Label>
                    <Weight function="quadratic">100</Weight>
                </Max>
            </ShiftLengths>
        
        </Contract>
    </Contracts>

    
    <!--=====================================================================-->
    <!--                          Cover (optional)                           -->
    <!--=====================================================================-->
    <!--
    Here we define the numbers of staff required for each task for each time
    interval in the planning period. Skills/SkillGroups and TaskGroups can also 
    be used in the cover constraints.
    -->
    <CoverRequirements>
        <!-- 
        This is a shortcut for the cover constraints which requires version 1.39
        or later.
        -->
        <Cov start="2012-02-12T10:30:00" end="2012-02-12T12:30:00" task="i">
            <Min weight="1000">1</Min>
            <Max weight="1">1</Max>
        </Cov>        
    </CoverRequirements>
    
    
    <!--=====================================================================-->
    <!--                    FixedAssignments (optional)                      -->
    <!--=====================================================================-->
    <!--
    FixedAssignments can be used to pre-assign shifts to employees. Any 
    assignments made here will not be changed by the solver. 
    -->
    <FixedAssignments>
        <Employee ID="E1">
            <NoShift> <!-- E1 cannot be assigned any work on the 12th -->
                <Start>2012-02-12T00:00</Start>
                <End>2012-02-13T00:00</End>
            </NoShift>
            <Shift>
                <Day>1</Day>
                <Start>09:00:00</Start>
                <Task WorkLength="480">
                    <ID>i</ID>
                    <Length>480</Length>
                </Task>
            </Shift>
        </Employee>
    </FixedAssignments>

    
    <!--=====================================================================-->
    <!--                          Requests (optional)                        -->
    <!--=====================================================================-->
    <!--
    Dates employees prefer not to work.
    Dates employees prefer to work.
    Dates employees prefer not to work particular shifts.
    Dates employees prefer to work particular shifts.
    -->
    <Requests>

    </Requests>
    
</SchedulingHorizon>