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

<xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

    <xsd:include schemaLocation="baseTypes.xsd"/>
    <xsd:element name="configuration" type="configurationType"/>

    <xsd:complexType name="configurationType">
        <xsd:all>
            <xsd:element name="input" type="inputType" minOccurs="0"/>
            <xsd:element name="output" type="outputType" minOccurs="0"/>
            <xsd:element name="processing" type="processingType" minOccurs="0"/>
            <xsd:element name="defaults" type="defaultsType" minOccurs="0"/>
            <xsd:element name="time" type="timeType" minOccurs="0"/>
            <xsd:element name="report" type="reportType" minOccurs="0"/>
            <xsd:element name="random_number" type="random_numberType" minOccurs="0"/>
        </xsd:all>
    </xsd:complexType>

    <xsd:complexType name="inputType">
        <xsd:all>
            <xsd:element name="net-file" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="detector-files" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="measure-files" type="fileOptionType" minOccurs="0"/>
        </xsd:all>
    </xsd:complexType>

    <xsd:complexType name="outputType">
        <xsd:all>
            <xsd:element name="output-prefix" type="strOptionType" minOccurs="0"/>
            <xsd:element name="routes-output" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="routes-for-all" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="detector-output" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="detectors-poi-output" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="emitters-output" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="vtype" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="vtype-output" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="emitters-poi-output" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="variable-speed-sign-output" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="end-reroute-output" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="validation-output" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="validation-output.add-sources" type="boolOptionType" minOccurs="0"/>
        </xsd:all>
    </xsd:complexType>

    <xsd:complexType name="processingType">
        <xsd:all>
            <xsd:element name="guess-empty-flows" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="highway-mode" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="ignore-invalid-detectors" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="revalidate-detectors" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="revalidate-routes" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="keep-unfinished-routes" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="keep-longer-routes" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="max-search-depth" type="intOptionType" minOccurs="0"/>
            <xsd:element name="emissions-only" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="disallowed-edges" type="strOptionType" minOccurs="0"/>
            <xsd:element name="keep-turnarounds" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="min-route-length" type="floatOptionType" minOccurs="0"/>
            <xsd:element name="time-factor" type="timeOptionType" minOccurs="0"/>
            <xsd:element name="time-offset" type="timeOptionType" minOccurs="0"/>
            <xsd:element name="time-step" type="timeOptionType" minOccurs="0"/>
            <xsd:element name="calibrator-output" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="include-unused-routes" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="revalidate-flows" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="remove-empty-detectors" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="strict-sources" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="respect-concurrent-inflows" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="scale" type="floatOptionType" minOccurs="0"/>
        </xsd:all>
    </xsd:complexType>

    <xsd:complexType name="defaultsType">
        <xsd:all>
            <xsd:element name="departlane" type="strOptionType" minOccurs="0"/>
            <xsd:element name="departpos" type="strOptionType" minOccurs="0"/>
            <xsd:element name="departspeed" type="strOptionType" minOccurs="0"/>
            <xsd:element name="arrivallane" type="strOptionType" minOccurs="0"/>
            <xsd:element name="arrivalpos" type="strOptionType" minOccurs="0"/>
            <xsd:element name="arrivalspeed" type="strOptionType" minOccurs="0"/>
            <xsd:element name="speeddev" type="floatOptionType" minOccurs="0"/>
        </xsd:all>
    </xsd:complexType>

    <xsd:complexType name="timeType">
        <xsd:all>
            <xsd:element name="begin" type="timeOptionType" minOccurs="0"/>
            <xsd:element name="end" type="timeOptionType" minOccurs="0"/>
        </xsd:all>
    </xsd:complexType>

    <xsd:complexType name="reportType">
        <xsd:all>
            <xsd:element name="verbose" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="print-options" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="help" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="version" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="xml-validation" type="strOptionType" minOccurs="0"/>
            <xsd:element name="xml-validation.net" type="strOptionType" minOccurs="0"/>
            <xsd:element name="no-warnings" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="log" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="message-log" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="error-log" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="report-empty-detectors" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="print-absolute-flows" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="no-step-log" type="boolOptionType" minOccurs="0"/>
        </xsd:all>
    </xsd:complexType>

    <xsd:complexType name="random_numberType">
        <xsd:all>
            <xsd:element name="random" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="seed" type="intOptionType" minOccurs="0"/>
        </xsd:all>
    </xsd:complexType>

</xsd:schema>
