<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="solution">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="route" maxOccurs="unbounded">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="node" maxOccurs="unbounded" minOccurs="2">
                <xs:complexType>
                  <xs:sequence>
                    <xs:any minOccurs="0" processContents="skip" maxOccurs="unbounded">
                      <!--You can add any element inside node. This allow you to define specific attributes of your solution.
For instance, if your file reports the solution to a VRP with 
split delivery you can add to the <node> element a <quantity>X</quantity>
indicating that the route services X units of the node's demand.-->
                    </xs:any>
                  </xs:sequence>
                  <xs:attribute name="id" use="required" type="xs:int"/>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="id" type="xs:int" use="required">
              <!--Routes must have unique identifiers-->
            </xs:attribute>
            <xs:anyAttribute processContents="skip">
              <!--You can add any attribute to the <route> element. For instance, if your
file reports the solution to a VRP with limited fleet you can add an attribute
vehicle_id='X' to <route> indicating that the route is serviced by vehicle X.-->
            </xs:anyAttribute>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="instance" use="required" type="xs:string"/>
      <xs:attribute name="method" use="optional" type="xs:string"/>
    </xs:complexType>
    <xs:unique name="route_key">
            <xs:selector xpath="route"/>
            <xs:field xpath="@id"/>
          </xs:unique>
  </xs:element>
</xs:schema>