<?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="additional-files" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="alternative-files" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="flow-files" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="weight-files" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="lane-weight-files" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="weight-attribute" type="strOptionType" minOccurs="0"/>
            <xsd:element name="phemlight-path" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="trip-files" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="route-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="output-file" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="vtype-output" type="fileOptionType" minOccurs="0"/>
            <xsd:element name="exit-times" type="boolOptionType" minOccurs="0"/>
        </xsd:all>
    </xsd:complexType>

    <xsd:complexType name="processingType">
        <xsd:all>
            <xsd:element name="ignore-errors" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="unsorted-input" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="route-steps" type="timeOptionType" minOccurs="0"/>
            <xsd:element name="randomize-flows" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="max-alternatives" type="intOptionType" minOccurs="0"/>
            <xsd:element name="remove-loops" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="repair" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="repair.from" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="repair.to" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="weights.interpolate" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="with-taz" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="routing-algorithm" type="strOptionType" minOccurs="0"/>
            <xsd:element name="weight-period" type="timeOptionType" minOccurs="0"/>
            <xsd:element name="bulk-routing" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="routing-threads" type="intOptionType" minOccurs="0"/>
            <xsd:element name="weights.expand" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="gawron.beta" type="floatOptionType" minOccurs="0"/>
            <xsd:element name="gawron.a" type="floatOptionType" minOccurs="0"/>
            <xsd:element name="keep-all-routes" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="skip-new-routes" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="logit" type="boolOptionType" minOccurs="0"/>
            <xsd:element name="route-choice-method" type="strOptionType" minOccurs="0"/>
            <xsd:element name="logit.beta" type="floatOptionType" minOccurs="0"/>
            <xsd:element name="logit.gamma" type="floatOptionType" minOccurs="0"/>
            <xsd:element name="logit.theta" 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="defaults-override" type="boolOptionType" 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="stats-period" type="intOptionType" 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>
