Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update on User Preferences #221

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
183 changes: 183 additions & 0 deletions OJP/OJP_Trips.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<xs:group ref="TripMobilityFilterGroup"/>
<xs:group ref="TripPolicyGroup"/>
<xs:group ref="TripContentFilterGroup"/>
<xs:element name="UserPreferences" type="UserPreferencesStructure" minOccurs="0" maxOccurs="1"/>
<xs:element name="FareParam" type="FareParamStructure" minOccurs="0"/>
<xs:element name="Extension" type="xs:anyType" minOccurs="0"/>
</xs:sequence>
Expand Down Expand Up @@ -147,6 +148,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="IncludeSecondBestOptions" type="xs:boolean" default="false" minOccurs="0">
<xs:annotation>
<xs:documentation>Whether second best options should be presented as well. Mainly important for dominated journeys or in the case of ContinuousLegs the second best route.</xs:documentation>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second best is a vague term. If you want pluriformity in the search results, I would rather go for something specific like IncludeAlternativeOptions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Malte: How far dominated?
Markus: Not only time. Price etc., but playing with strategy.
Stefan: So give me two is not good.
Malte: Even one that is worse in everything. Current algorithm throw out options. Truly dominated options, not throwing it out, would be a problem.
Alexandre (Cityways): I worked on a PhD thesis. Distance defined, the results are interesting. Matchin user expectence. (chapter 5, https://tel.archives-ouvertes.fr/tel-01848737 ). A random display of trips that maximize diversity.
Malte: Not losing to much quality is important.
Matthias: More diversity is the idea
Malte: Clearer annotation needed.
==> Annotation needs be better.
==> IncludeAlternativeOptions will be renamed.

</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 Down Expand Up @@ -208,6 +214,17 @@
<xs:documentation>Trip response structure.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Score">
<xs:annotation>
<xs:documentation>The score from User Preferences or the algorithm.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:float">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="TripResponseContext" type="ResponseContextStructure" minOccurs="0">
<xs:annotation>
<xs:documentation>Context to hold trip response objects that occur frequently.</xs:documentation>
Expand Down Expand Up @@ -878,6 +895,172 @@
<xs:element name="TripFare" type="TripFareResultStructure" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="UserPreferencesStructure">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I miss a safety related parameter here. OpenTripPlanner for example has bicycle safety.

Copy link
Contributor Author

@ue71603 ue71603 Oct 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stefan: safe vs fast. safety was more of not getting robbed below.
Markus: Extrasafe is not really only about that.
Stefan: What do you meand for safe? In OTP it is traffic safety.
Markus: I meant accidents and crime.
Stefan: I suggest to split it into
Safety:

  • traffic safety. TrafficSafe
  • feeling safe WellLitAndFrequented xx

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<xs:annotation>
<xs:documentation>A collection of user preferences to allow the algorithm to narrow-down multimodal trip combinations to those that may be suitable for the user.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="LowPrice" default="average" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>User's preference that the trip has a low price.</xs:documentation>
Copy link

@markus-meier-sbb markus-meier-sbb Oct 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[This extra text could be added to give more hints about the meaning and how it should be implemented]
If important, the trip planner should prioritize options (modes, lines, operators) known for low price, such as bus or coach.
If unimportant, also consider options which are usually more epensive, such as taxi or ridehailing, and also for longer distances.
E.g., take a taxi to the central station instead of a PT ride with transfers.

</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="important"/>
<xs:enumeration value="average"/>
<xs:enumeration value="unimportant"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Speed" default="average" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>User's preference about the speed/short duration of the trip.</xs:documentation>
</xs:annotation>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[This extra text could be added to give more hints about the meaning and how it should be implemented]
If important, duration should be the top criterion and only the fastest connections should be considered.
If unimportant, duration should have little or no influence on the trip planning.

<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="important"/>
<xs:enumeration value="average"/>
<xs:enumeration value="unimportant"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Comfort" default="average" minOccurs="0" maxOccurs="1">
<xs:annotation>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[This extra text could be added to give more hints about the meaning and how it should be implemented]
If premium, prioritize few and short changes, and modes known for convenience, especially taxi.
Avoid self-powered modes and urban transit.
If basic, allow for more transfers and allow all modes.

<xs:documentation>User's preference about the comfort/convenience of the trip, including few changes, short transfers and convenient vehicle types. Reflect USER PREFERENCE from Transmodel</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="premium"/>
<xs:enumeration value="average"/>
<xs:enumeration value="basic"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Sportiness" default="average" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>User's endurance and fitness for sportive, self-powered trip legs (walk, cycle, etc.).</xs:documentation>
</xs:annotation>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[This extra text could be added to give more hints about the meaning and how it should be implemented]
If high, allow for 200 % longer legs with self-powered modes and assume 50 % faster speed on those modes.
If low, restrict to 50 % shorter walking legs, assume 50 % lower walking speed and exclude
other self-powered/micromobility modes.

<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="high"/>
<xs:enumeration value="average"/>
<xs:enumeration value="low"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="EnvironmentalSafety" default="average" minOccurs="0" maxOccurs="1">
<xs:annotation>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[This extra text could be added to give more hints about the meaning and how it should be implemented]
If high, 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.
If low, basically ignore (same as average).
(Probably better to turn it into a true/false option)

<xs:documentation>User's preference about climate/environmental-friendliness of the trip (option 'low' might have no effect).</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be define common types for enumeration to avoid multiple definition of the same values (here high/average/low, but this happens several times)

<xs:enumeration value="high"/>
<xs:enumeration value="average"/>
<xs:enumeration value="low"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="WeatherProtection" type="xs:boolean" default="false" minOccurs="0" maxOccurs="1">
<xs:annotation>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[This extra text could be added to give more hints about the meaning and how it should be implemented]
If true, micromobility should be excluded and walks for the first/last leg avoided,
e.g. use a bus or taxi even for a short distance.

<xs:documentation>User's preference not be exposed to eventual weather hazards, thus, to avoid walks and micromobility.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ExtraSafe" type="xs:boolean" default="false" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>User's preference for an extra high level of safety.</xs:documentation>
</xs:annotation>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[This extra text could be added to give more hints about the meaning and how it should be implemented]
If true, 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:element>
<xs:element name="ExtraReliable" type="xs:boolean" default="false" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>User's preference for an extra high reliability (low probabilty of delays, cancellations, etc.).</xs:documentation>
</xs:annotation>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[This extra text could be added to give more hints about the meaning and how it should be implemented]
If true, 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:element>
<xs:element name="ExtraAccessible" type="xs:boolean" default="false" minOccurs="0" maxOccurs="1">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May need to be specialised depending on the disabilities (visual, hearing, wheelchair, pushchair or heavy luggages...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stefan: I don't think we need to have it more than the other accessibility description.
Markus: More emphasis.
Malte: All bases are already covered (like NoStairs).
Stefan: Probably another OptimisationMethod "Accessible"
Markus: Not changing too much, extra time for changes
Malte: One request with multiple optimisation methods. This makes things more vague and will add more problems on this. We should try to minimize there.
Markus: I think next step would be to write the chapter. It should be more hints as the trip planner knowing more.

<xs:annotation>
<xs:documentation>User's preference for perfect accessibility (lifts, ramps, no stairs, etc.), including extra transfer time, short transfer distances, etc.. May be superseeded by EPIAP updates. TODO</xs:documentation>
</xs:annotation>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[This extra text could be added to give more hints about the meaning and how it should be implemented]
If true, few and short transfers are preferred, stations/hubs with insufficient accessibility avoided.
(Based on the assumption that these same measures help in most cases,
regardless of the details of the actual impairment.
E.g. a station well equiped for wheelchairs will typically also be well equiped for visually impaired.)

</xs:element>
<xs:element name="Scenic" type="xs:boolean" default="false" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>User's preference for scenic, touristic impressions on some parts of the trip.</xs:documentation>
</xs:annotation>
</xs:element>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[This extra text could be added to give more hints about the meaning and how it should be implemented]
If true, certain lines or routes known for their scenicness may be prioritized.

<xs:element name="Peaceful" type="xs:boolean" default="false" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>User's preference for peacful transport (quiet travel compartements or low occupation).</xs:documentation>
</xs:annotation>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[This extra text could be added to give more hints about the meaning and how it should be implemented]
If true, modes/lines offering extra privacy should be preferred.

</xs:element>
<xs:element name="TripReason" type="TripReasonEnumeration" minOccurs="0" maxOccurs="1">
Aurige marked this conversation as resolved.
Show resolved Hide resolved
<xs:annotation>
<xs:documentation>A classification of a passenger's reason for undertaking a TRIP PATTERN (TRIP REASON from Transmodel).</xs:documentation>
</xs:annotation>
</xs:element>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This classification may have overlaps with the ones above. Needs to be discussed whether this is useful in combination with the above preferences, or as an alternative, or even a complete, sufficient replacement of the above criterions?

<xs:element name="WalkingProfile" default="normal" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Users walking profile (especially for hiking)</xs:documentation>
</xs:annotation>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be somewhat exotic or rarely used preference. Is it useful in the context of the other user preferences? Are these colour codes standardized in Europe? Most countries will have none of these.

<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="normal">
<xs:annotation>
<xs:documentation>e.g. yellow hiking signs</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="medium">
<xs:annotation>
<xs:documentation>e.g. white-red-white hiking signs</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="difficult">
<xs:annotation>
<xs:documentation>E.g. white-blue-white hiking signs</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CyclingProfile" default="normalfast" minOccurs="0" maxOccurs="1">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why having a "normal" prefix, and not just Fast/Green/Comfortable ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will adapt

<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="normalfast">
<xs:annotation>
<xs:documentation>fastest normal cycle route</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="normalgreen">
<xs:annotation>
<xs:documentation>greenest normal cycle route</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="normalcomfortable">
<xs:annotation>
<xs:documentation>family friendly and leisurely route</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="TripReasonEnumeration">
<xs:annotation>
<xs:documentation>Possible TRIP REASON.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="workCommute"/>
<xs:enumeration value="schoolPickupDropoff"/>
<xs:enumeration value="shopping"/>
<xs:enumeration value="leisure"/>
<xs:enumeration value="hike"/>
<xs:enumeration value="business"/>
<xs:enumeration value="delivery"/>
<xs:enumeration value="appointment"/>
<xs:enumeration value="other"/>
</xs:restriction>
</xs:simpleType>
<xs:group name="MultiPointWaitTimeGroup">
<xs:annotation>
<xs:documentation>Group for wait times at origin/destination.</xs:documentation>
Expand Down