ScheduleSolver solution data

XML format for ScheduleSolver solutions

This document describes the data format used for ScheduleSolver solutions. After the rostering engine has solved the problem it returns the solution as XML. The XML schema is available here.

A solution XML file can also be opened using RosterViewer if a <ProblemFile> tag is added after the opening <Schedule> tag. The ProblemFile is the path to the problem instance XML that this solution was generated from. The path can be absolute or relative to the solution file. For example:

<?xml version="1.0" encoding="UTF-8"?>
<Schedule>

  <ProblemFile>..\..\ExampleProblem.xml</ProblemFile>
  
  <Employee ID="E1">...

</Schedule>

The root element (opening tag) of the XML is <Schedule>.

<Schedule>

The root element of the document.

Attributes

None

Elements

Schedule contains zero or more <Employee> elements.

Name Required Type Description
<Employee> Optional Employee Contains the shift assignments in the solution for an employee.

Example

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

  <ProblemFile>C:/TestData/ScheduleSolver/ExampleData.ros</ProblemFile>
  
  <Employee ID="A">
    <Shift ID="235" shiftID="1"/>
    <Shift ID="092" shiftID="1"/>
    <Shift ID="234" shiftID="2"/>
    <Shift ID="108" shiftID="3"/>
    <Shift ID="248" shiftID="4"/>
    <Shift ID="019" shiftID="4"/>
    <Shift ID="166" shiftID="5"/>
  </Employee>
  
  <Employee ID="B">
    <Shift ID="065" shiftID="6"/>
    <Shift ID="153" shiftID="7"/>
    <Shift ID="229" shiftID="7"/>
    <Shift ID="247" shiftID="7"/>
    <Shift ID="148" shiftID="8"/>
    <Shift ID="143" shiftID="9"/>
    <Shift ID="294" shiftID="9"/>
  </Employee>
	
</Schedule>

<Employee>

Contains the task assignments in the solution for an employee.

Parents : Schedule

Attributes

Name Required Type Description
ID Required string The ID of this employee (defined in the problem instance).

Elements

Employee contains zero or more <Shift> elements.

Name Required Type Description
<Shift> Optional Shift A task assignment.

Example

<Employee ID="A">
  <Shift ID="235" shiftID="1"/>
  <Shift ID="092" shiftID="1"/>
  <Shift ID="234" shiftID="2"/>
  <Shift ID="108" shiftID="3"/>
  <Shift ID="248" shiftID="4"/>
  <Shift ID="019" shiftID="4"/>
  <Shift ID="166" shiftID="4"/>
</Employee>

<Shift>

The shift elements list the tasks assigned to an employee. A shift element has an ID attribute and a shiftID attribute. The value of the ID attribute is a task ID corresponding to a task defined in the problem file. The shiftID value is used to indicate which shift this task is part of. Tasks with the same shiftID are part of the same shift. The shiftID is generated by the solver. However, if the shift is a FixedAssignment in the problem file with its own shiftID, then the shiftID from the problem file is used instead.

Parents : Employee

Attributes

Name Required Type Description Ver.
ID Required string A task ID. 1.0+
shiftID Optional string A shift ID indicating which shift this task is part of. 1.7+

Elements

None

Example

<Shift ID="ABC" shiftID="XYZ"/>