Skip to content

Commit

Permalink
Necessary low level elements for User Preferences (#271)
Browse files Browse the repository at this point in the history
* Necessary low level elements for User Preferences

No UserPreference for the time being.
New optimisation methods, walking and cycling profile and includeAlternativeOptions
all for Trips
  • Loading branch information
ue71603 authored Jan 19, 2023
1 parent 079b6c7 commit cf663d0
Show file tree
Hide file tree
Showing 2 changed files with 306 additions and 36 deletions.
100 changes: 95 additions & 5 deletions OJP/OJP_Trips.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,14 @@
<xs:documentation>The maximum number of interchanges the user will accept per trip.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="OptimisationMethod" type="OptimisationMethodEnumeration" minOccurs="0">
<xs:annotation>
<xs:documentation>the types of algorithm that can be used for planning a journey (fastest, least walking, etc)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:choice>
<xs:element name="OptimisationMethod" type="OptimisationMethodEnumeration"/>
<xs:element name="OptimisationMethods" type="OptimisationMethodList" minOccurs="0">
<xs:annotation>
<xs:documentation>the types of algorithm that can be used for planning a journey (fastest, least walking, etc)</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
<xs:element name="ItModesToCover" type="IndividualModesEnumeration" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>For each mode in this list a separate monomodal trip shall be found - in addition to inter-modal solutions.</xs:documentation>
Expand Down Expand Up @@ -162,6 +165,11 @@
<xs:documentation>Whether the result should include intermediate stops (between the passenger's board and alight stops).</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IncludeAlternativeOptions" type="xs:boolean" default="false" minOccurs="0">
<xs:annotation>
<xs:documentation>Whether altnerative options should be presented as well. Mainly important for dominated journeys or in the case of ContinuousLegs the second best route. Should be optimised for the user expectance (see. e.g https://tel.archives-ouvertes.fr/tel-01848737). However, what the alternative options are may vary widely depending on the optimisation methods and filters.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="IncludeFare" type="xs:boolean" default="false" minOccurs="0">
<xs:annotation>
<xs:documentation>Whether the result should include fare information.</xs:documentation>
Expand All @@ -172,13 +180,69 @@
<xs:documentation>Whether the result should include operating day information - as encoded bit string and in natural language.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="HikingProfile" default="easy" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Users hiking profile. The main element to control general walking behaviour is WalkSpeed (together with accessibility constraints). Note: possible explanations in German can be found here: https://akademie.alpinewelten.com/bergwandern/klassifizierung-von-wanderwegen#:~:text=Die%20Kategorie%20Blau,Sturzes%20drastische%20Konsequenzen%20haben%20w%C3%BCrden</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="easy">
<xs:annotation>
<xs:documentation>Regular hiking/walking in valleys and plains and easy mountain trails e.g. yellow hiking signs in Switzerland or blue in Germany</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="medium">
<xs:annotation>
<xs:documentation>Medium difficulty mountain trails. E.g. white-red-white hiking signs in Switzerland or red in Germany.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="difficult">
<xs:annotation>
<xs:documentation>Difficult mountain trails. E.g. white-blue-white hiking signs in Switzerland or black in Germany.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CyclingProfile" default="fast" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Users cycling profile (especially for sportive activities).</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="fast">
<xs:annotation>
<xs:documentation>fastest cycle route</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="green">
<xs:annotation>
<xs:documentation>greenest cycle route</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="comfortable">
<xs:annotation>
<xs:documentation>family friendly and leisurely route</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="TripSummaryOnly" type="xs:boolean" default="false" minOccurs="0">
<xs:annotation>
<xs:documentation>If true, then the response will contain only summaries of the found trips. Default is false.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>
<xs:complexType name="OptimisationMethodList">
<xs:annotation>
<xs:documentation>List of OptimisationMethods. The order of precedence - if used at all - is high to low. In single criteria optimisers the optimisation methods may be used in parallel and not truely used to score the results.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="OptimisationMethod" type="OptimisationMethodEnumeration" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="OptimisationMethodEnumeration">
<xs:annotation>
<xs:documentation>the types of algorithm that can be used for planning a journey (fastest, least walking, etc). If multiple optimisation methods are needed, then several requests should be performed in parallel.</xs:documentation>
Expand All @@ -196,6 +260,32 @@
<xs:enumeration value="earliestArrival"/>
<xs:enumeration value="latestDeparture"/>
<xs:enumeration value="earliestArrivalAndLatestDeparture"/>
<xs:enumeration value="environmentalSafety">
<xs:annotation>
<xs:documentation>If set, favour "green" modes/lines such as bike sharing and (electric) trains, avoid or restrict modes/lines known for higher CO2 emissions such as (conventional) taxi, ridehailing or coach.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="extraSafe">
<xs:annotation>
<xs:documentation>High level of safety (refering to crime, hazards or prone to accidents). If used, certain modes, lines or zones/districts known for lower safety, i.e. higher risk of accidents and crime, may be avoided, others may be preferred. This may depend on the actual, local or time of day situation. E.g. bike or scooter may be considered unsafe in some cities/districts while safe in others.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="extraReliable">
<xs:annotation>
<xs:documentation>Low probability of delays, cancellations etc. If used, modes known for their (un)reliability may be avoided/preferred, and extra time added for transfers. This may depend on the actual, local or time of day situation,
based on punctuality statics, traffic jam statistics or rush hours. E.g. taxis in a given city might be known to be unreliable during at 8-10 and 16-19 hours, otherwise reliable.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="scenic">
<xs:annotation>
<xs:documentation>Scenic (or touristic) travel. Different by modes or by the surrounding.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="quietTravel">
<xs:annotation>
<xs:documentation>E.g. first class or quiet compartments preferred. Journeys that are with low occupancy.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="NotViaStructure">
Expand Down
Loading

0 comments on commit cf663d0

Please sign in to comment.