Closed woutvandenheuvel closed 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.
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.
Discussed with @woutvandenheuvel and @mennolambooij and we want to add this. I'll post an example next week
Since vehicles already define a fuel type, making the averageFuelConsumption a valueWithUnit does seem redundant over just making it a value.
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..
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.
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.
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
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.
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.
This is now part of OTM5.4
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.