opentripmodel / otm5-change-requests

Tracking and reporting bugs and change requests of the OTM5 specification.
5 stars 1 forks source link

Add Fuel consumption to vehicle #48

Closed woutvandenheuvel closed 2 years ago

woutvandenheuvel commented 2 years ago

Type of request

. Add average fuel consumption to entity Vehicle in km/liter. Among others for purpose of CO2 calculation. Value is related to type of fuel. Diesel = km/liter, Electricity is Kw/hrs

Describe alternatives you've considered Did you try to solve it with the current specification? If so, how? Please be as clear and concise as possible.

Additional context Add any other context or screenshots about the feature request here.

thomaskolmans commented 2 years ago

My suggestion would be to leverage the ValueWithUnit in this case as the fuel space is moving quite fast right now and we might get units we can't yet even imagine. Further, big support for this.

bmeesters commented 2 years ago

Yes, I think this would be a good addition. Though it might be better to call it averageFuelConsumption, since actual fuel consumption depends on a lot of factors and is thus not static. I also agree to use the valueWithUnit here.

bmeesters commented 2 years ago

Discussed with @woutvandenheuvel and @mennolambooij and we want to add this. I'll post an example next week

ptv-jcl commented 2 years ago

Since vehicles already define a fuel type, making the averageFuelConsumption a valueWithUnit does seem redundant over just making it a value.

bmeesters commented 2 years ago

That is a fair point, though it would make it a bit inconsistent with other values that do have value-with-unit formats. Might be better to deprecate the fuel type as its own thing? Though that again requires parties to change their existing implementation. Unfortunately no silver bullet..

ptv-jcl commented 2 years ago

I would not deprecate fuel type at all. it is much easier to have a fuel type for comparing to constraints then having to extract them from the fuel consumption. Also this would force the usage of averageFuelConsumption for constraint checking and thus forcing a value which is not always needed or known.

bmeesters commented 2 years ago

Yes that's true, I suppose there is not really an alternative then. I guess the value-with-unit is not really a good fit here.

thomaskolmans commented 2 years ago

If I may enter this once more. The fuel type is indeed defined, but in my opinion the consumption rate can still be variable and changing and thus the unit should still be flexible. Like to hear your thoughts @ptv-jcl and @bmeesters

ptv-jcl commented 2 years ago

I'm not arguing against having a value for Fuel consumption. I agree that it is very useful to have this. I'm arguing against making it a value-with-unit. The already existing fuel type attribute already specifies the Unit type so IMO it is not useful to repeat this in a Fuel consumption attribute.

bmeesters commented 2 years ago

I had a discussion with BigMile as well (who actually are the ones that resulted in this change request being made. But we need to unit in some cases (e.g. if you have gasoline, you still to determine in what unit you are measuring (usually litres in this case of course). Since it would be more consist with the complete specification and there is little harm in adding it, I suppose it should go in as originally proposed, with a value and unit.

bmeesters commented 2 years ago

This is now part of OTM5.4