openTdataCH / ojp-nova

Interface between OJP and NOVA to return an OJPFareDelivery
1 stars 0 forks source link

Demand responsive produces an error #35

Closed ue71603 closed 1 year ago

ue71603 commented 1 year ago

The attached request contains a single demand responsive route (works only on Saturdays after 15:00). However, the server has a problem.

Also: NOVA can't price it currently. So the problem might be there. We should handle it. Also the ScheduledStopPoints are arbitrarily defined (they don't exist in the NOVA system for the time being.

I guess that TimedLegs with demandAndResponseBus perhaps should be excluded and a warning should be sent that only a PartialPrice was calculated.

Same goes, when sharing is in it and a service could not calculate the whole fare.

Could we indicate somehow, which legs were excluded? input_demand_responsive_saturday_after_1500.zip

And I guess I need to add a new FareError FAREPARTIALLYCALCULATED or so. What do you think?

skinkie commented 1 year ago

I think for a distributed service this makes sense, but for the end user... not very much so.

ue71603 commented 1 year ago

I think the end user might want to know, that this is only a partial price...

skinkie commented 1 year ago

Maybe we should not return a partial price?

ue71603 commented 1 year ago

It might be that this is the norm. E.g. server 1 prices public transport server 2 prices demand responsive traffic. Also possible, that the two prices don't add up during booking.

ue71603 commented 1 year ago

And we should allow for distributed pricing. Should we add a SequenceRange here as well?

ue71603 commented 1 year ago

Will create a PR for OJP to deal with partial pricing.

ue71603 commented 1 year ago

Currently we only create an OTHERERROR in the code. Can we discuss how to do it in more detail today in the meeting?

ue71603 commented 1 year ago

@skinkie can you add a suitable OJPFare error to the current code. Or is the current version all we can do with OJP 1.0? If so, could you add a suitable OtherError with a text indicating the problem?