TOMP-WG / TOMP-API

Transport Operator to Mobility-as-a-Service Provider-API development for Mobility as a Service
Apache License 2.0
96 stars 41 forks source link

Extend Asset Schema in TOMP-API.yml to allow multiple homeStationIds #531

Closed zerwuff closed 6 months ago

zerwuff commented 7 months ago

Is your feature request related to a problem? Please describe.

Our bikes can be assigned to multiple homeStations, the current asset scheme only allows one homeStationId

Urgency

minor, bikes with multiple home station ids cannot be presented correctly within the api

Additional context

when users look for bikes, we inform then with homeStations where the bikes belong to, i.e. can be returned. cargo pedelecs belong to a fixed set of home stations where they can be locked and where they should stay in order to simplify or operations.

Describe the solution you'd like

extend TOMP-API.yml : homeStationIds: as an array with known home station ids

Describe alternatives you've considered

putting only one home Station in the model, which is confusing for the customer

Possible Implementation:

    homeStationIds:
      type: array
      description: List of known home station Ids.
matt-wirtz commented 7 months ago

Thx for pointing that out. The homeStationId is part of the asset object in the current version. This will probably change in the next major release. From there on almost all operator endpoints will be deprecated and the information regarding available assets can be provided as customProperties using any common specification, e.g. GBFS, NeTEx, ... This makes TOMP more flexible to interact with the before mentioned common specifications used for service information. So with regard to the homeStationId it would make most sense to bring this issue up in the GBFS project. Once it has been adapted in GBFS it could be used here as well.

edwinvandenbelt commented 7 months ago

Indeed, this is a matter of alignment. In the current version of GBFS the homeStationId is a singular. (https://github.com/MobilityData/gbfs/blob/master/gbfs.md#vehicle_statusjson). Btw, isn't your interpretation 'home station' a station where you have to return your bike? In that case, you should have a look at the "conditionReturnArea". You can specify in the leg conditions, and you can add a conditionReturnArea per station, including it's number and coordinate.

edwinvandenbelt commented 7 months ago

This issue is labelled onHold. We have to discuss this in the 'availability workgroup' (together with MobilityData).

matt-wirtz commented 7 months ago

Good point to use "conditionReturnArea" instead of homeStationId. The condition provides the option to have several return areas or coordinates specified but one can only specify a single stationId. So for the above case with the cargo bikes only returnable at a specific set of stations the coordinates of all the possible return stations could be provided. To me it looks like that Independent of the alignment with MobilityData there should be multiple stationIds in the "conditionReturnArea" possible.

zerwuff commented 6 months ago

This solution is fine with me, thanks for pointing out. the issue can be closed.