opentripmodel / otm5-change-requests

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

Add Action 'refuel' #62

Closed BerjanWaanders closed 1 year ago

BerjanWaanders commented 2 years ago

Type of request

Is your feature request related to a problem? Regulators more and more require city center deliveries to be executed with electric vehicles. The extend to which retailers adopt electric vehicles is therefore growing rapidly. These vehicles require charging and although this might often take place during the night, recharging between multiple trips a vehicle executes during a day or even recharging during a single trip are no exceptions.

OTM currently does not offer the possibility to indicate a vehicle is recharging other than using e.g. the Action 'wait'. Next to this, indicating consumed fuel for electric vehicles is not supported.

Describe the solution you'd like

1) Create a new generic Action called 'refuel' for recharging and refuelling vehicles.

{
    "id": "e2b597bd-feb5-4951-a070-e143eae22a29",
    "startTime": "2022-12-12T14:00:00Z",
    "endTime": "2022-12-12T14:30:00Z",
    "fuel": "battery",
    "amount": {
        "value": 30,
        "unit": "kw"
    },
    "actionType": "refuel"
    // Keeping it simple for now, adding more fields tbd
}

This Action can be used on e.g. Action 'stop' at which the Location and Vehicle are referenced.

2) For the object 'amount' (present in e.g. Event -> 'eventType' -> 'fuelConsumedEvent' - and in point 1), explicitly refer to 'kw' (kilowatt) for field 'unit' as an available option.

This enables the correct tracking of 'kw' consumed during a trip for electric vehicles.

Describe alternatives you've considered

As mentioned above, using the Action 'wait' is a workaround for registering refuelling time. Other options, mainly misusing Events, have been considered but deemed not appropriatie.

bmeesters commented 1 year ago

Hello @BerjanWaanders, thanks for your contribution and sorry for taking a while to answer. Currently we are working hard on integrating 'road-works' in OTM5 and that has taken up our time mostly. I think a refuel action is a must for OTM5 since it is one of the main actions that happen on trips and cannot be modeled any other way now.

@woutvandenheuvel what do you think?

woutvandenheuvel commented 1 year ago

@bmeesters The development related to electrifaction will have more impact on OTM 5.0 E.g. More charging stations (locations) will come available which will have an impact on trips and planning. Is a charging station occupied or available. I suggest we add the basics needed such as fuel type 'battery' We are already working on this. See CR Make fuel an enum instead of a free form string #51. @BerjanWaanders any suggestions for the correct definitions? battery is not a fuel but another method of propulsion. In case of batteries recharge would be more applicable than refuel.

bmeesters commented 1 year ago

Though I agree that recharge would be more appropriate than refuel, I don't think you want to add different actions and model them as the same type of action. We can look at other words though, maybe restock, or refillPropulsion?

BerjanWaanders commented 1 year ago

Hi both, I am of the opinion that 'refuel' is broad enough to cover all actions and agree with Bas that we should not differentiate between different refuelling types in the Actions. 'restock' and 'refillPropulsion' are in my opinion not correct terms and feel a bit forced. fuelType 'electricity' would work for us as well instead of 'battery'. That would adhere nicely to the enumeration in CR51.

bmeesters commented 1 year ago

This is now part of OTM5.5