-
Notifications
You must be signed in to change notification settings - Fork 11
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
Enhance TripPolicy for more Private Lines, filter for PassengerCategory, Access Modes #349
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for slowing down the approval...
The use cases are: • Alice wants to go to the mountain top restaurant and uses a snowboard. As the mountain top restaurant during winter is accessible by a dragLift, this should show in the trip result, because Alice sent (foot ski) in the new AccessModeList parameter. |
I added IncludePrivateLines to the StopEvent-Request as well. |
f40bffa
to
a734061
Compare
c2d5b55
to
dd9540b
Compare
</PlaceRef> | ||
</Destination> | ||
<Params> | ||
<PassengerCategory>Senior</PassengerCategory> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my understanding there should be the IncludeRestrictedLines
flag in order to obtain the example response that includes a restricted service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trurlurl If the PassengerCategory is set, there is no need for the IncludeRestrictedLines. It shows up. I will add an additional example showing it and a "private service".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha - to make this more clear, see the proposition on line 147.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
<siri:ErrorCondition> | ||
<OJPError> | ||
<TripProblemType>TRIP_RESTRICTEDRESULTSDROPPED</TripProblemType> | ||
</OJPError> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what cases should that error condition appear? If, e.g., we have "Senior" among the passenger categories, but IncludeRestrictedLines
was not set to true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think most people will not implement this. I think this can be used, when the service knows it dropped things because they are restricted. In this case the Publicar was droopped, because: (a) no Senior (b) no IncludeRestrictedLines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I improved the example some more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the PubliCar shouldn't be dropped, since ,,, "If multiple PassengerCategories are provided, then Services are shown when they are available for at least one PassengerCategory."
And in that case the error condition wouldn't appear and should be shown in another example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now only dog, even when this doesn't make completly sense.
OJP/OJP_Trips.xsd
Outdated
<xs:documentation>Whether alternative 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://theses.hal.science/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="IncludeRestrictedLines" type="xs:boolean" minOccurs="0" default="false"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might IncludeAllRestrictedLines
be a better name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
OJP/OJP_JourneySupport.xsd
Outdated
@@ -143,6 +143,16 @@ | |||
<xs:documentation>Via points of the service that may help identify the vehicle to the public (In Transmodel modeled as TRIP REQUEST PLACE.TRIP VIA PLACE.GoVia; it will also most probably be detailed as a VIA and associated DESTINATION DISPLAY in the ROUTE description).</xs:documentation> | |||
</xs:annotation> | |||
</xs:element> | |||
<xs:element name="Restricted" type="xs:boolean" minOccurs="0"> | |||
<xs:annotation> | |||
<xs:documentation>This flag is set if the service can only be used in a restricted way. For example, a specific ACCESS MODE is required (e.g. dragLift) or the LINE is only made available to certain passenger groups (e.g. school buses, hotel shuttles), as defined in PrivateMode. Restricted trumps PassengerCategory, for example. If Restricted is set to true, all services are displayed.</xs:documentation> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the last two sentences at the right place here? Or were they intended for IncludeRestrictedLines
? That would match my comment on line 147.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct. changed
</PlaceRef> | ||
</Destination> | ||
<Params> | ||
<PassengerCategory>Senior</PassengerCategory> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha - to make this more clear, see the proposition on line 147.
<siri:ErrorCondition> | ||
<OJPError> | ||
<TripProblemType>TRIP_RESTRICTEDRESULTSDROPPED</TripProblemType> | ||
</OJPError> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
Co-authored-by: trurlurl <[email protected]>
OJP/OJP_JourneySupport.xsd
Outdated
@@ -143,6 +143,16 @@ | |||
<xs:documentation>Via points of the service that may help identify the vehicle to the public (In Transmodel modeled as TRIP REQUEST PLACE.TRIP VIA PLACE.GoVia; it will also most probably be detailed as a VIA and associated DESTINATION DISPLAY in the ROUTE description).</xs:documentation> | |||
</xs:annotation> | |||
</xs:element> | |||
<xs:element name="Restricted" type="xs:boolean" minOccurs="0"> | |||
<xs:annotation> | |||
<xs:documentation>This flag is set if the service can only be used in a restricted way. For example, a specific ACCESS MODE is required (e.g. dragLift) or the LINE is only made available to certain passenger groups (e.g. school buses, hotel shuttles), as defined in PrivateMode. Restricted trumps PassengerCategory, for example. If Restricted is set to true, all services are displayed.</xs:documentation> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct. changed
<xs:documentation>There might exist lines that have special restrictions and are not generally available to the public. E.g. school buses, company shuttles. dragLifts need to have an ACCESS MODE ski. Lines with ACCESS MODE bicycle will be included as well. If this flag is set, then existing restricted lines are considered by the router. The results are marked as restricted in the ServiceGroup. The restriction can be seen from: ACCESS MODE or PrivateMode. The usage could also be detailed with Attribute elements.</xs:documentation> | ||
</xs:annotation> | ||
</xs:element> | ||
<xs:element name="PassengerCategory" type="PassengerCategoryEnumeration" minOccurs="0" maxOccurs="unbounded"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is ok now
</PlaceRef> | ||
</Destination> | ||
<Params> | ||
<PassengerCategory>Senior</PassengerCategory> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
<siri:ErrorCondition> | ||
<OJPError> | ||
<TripProblemType>TRIP_RESTRICTEDRESULTSDROPPED</TripProblemType> | ||
</OJPError> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I improved the example some more.
OJP/OJP_Trips.xsd
Outdated
<xs:documentation>Whether alternative 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://theses.hal.science/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="IncludeRestrictedLines" type="xs:boolean" minOccurs="0" default="false"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
… ExtendTripPoliciy
<siri:ErrorCondition> | ||
<OJPError> | ||
<TripProblemType>TRIP_RESTRICTEDRESULTSDROPPED</TripProblemType> | ||
</OJPError> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the PubliCar shouldn't be dropped, since ,,, "If multiple PassengerCategories are provided, then Services are shown when they are available for at least one PassengerCategory."
And in that case the error condition wouldn't appear and should be shown in another example.
@skinkie If you could approve it also, we could merge. |
They came out of the same meeting and discussion (on sharing and necessary extensions). I know they are difficult to understand. But breaking them apart would not make it better. |
Because we are at the end of the discussion.
With this PR it is possible to allow a trip planner to include specialised private LINE (e.g. car pooling, school busses, company shuttles) into the trip planning.
It also allows to define necessary ACCESS MODE (e.g. that you are in a car, which restricts search to road, ferry, carTransportRail or that you can access a dragLift, because you have skis with you.
The third part makes sure, that selected by the PassengerCategory some additional things might get "unlocked". E.g. in Delemont seniors have a different service offered to them by the demand responsive service: https://www.postauto.ch/de/fahrplan-und-netz/publicar/delemont