Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding containedGoods array to Vehicle entity #91

Open
1 of 2 tasks
Hans-Simacan opened this issue Sep 3, 2024 · 1 comment
Open
1 of 2 tasks

Adding containedGoods array to Vehicle entity #91

Hans-Simacan opened this issue Sep 3, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Hans-Simacan
Copy link

Type of request

  • I'd like to add something to the OTM 5 spec
  • I'd like to change something in the OTM 5 spec

Is your feature request related to a problem?
In the current model you can't specify the starting "configuration" of a Vehicle, or in other words did the vehicle already have loaded items or attached trailers at the start. You can have a trailer attached or detached through an action, but you can't specify whether the vehicle starts on a trip already with an attached trailer. So basically there is always an action needed which is related to a certain moment in time.

Secondly the OTM model also doesn't allow you to describe the configuration of the vehicle (after multiple attach/detach/load/unload actions) at any moment in time.

Sample:
You have a vehicle, you attach two transportEquipment and load 4 loadcarriers. Next you unload 2 loadcarriers and detach one transportEquipment. How can you describe in the OTM model the current setup / configuration of the Vehicle.

Describe the solution you'd like
We would like to add the property containedGoods to the vehicle, which can describe the configuration / load of the vehicle. This would be an array of the Goods entity.

Example:

{
   "vehicle":{
      "associationType":"inline",
      "entity":{
         "vehicleType":"TREKKER",
         "licensePlate":"ACHTERES_test_license",
         "fuel":"diesel",
         "containedGoods":[
            {
               "associationType":"inline",
               "entity":{
                  "id":"a29905bb-9af8-4118-896a-71b1eaf07cc0",
                  "type":"transportEquipment",
                  "description":"A trailer",
                  "width":{
                     "value":2.46,
                     "unit":"m"
                  },
                  "height":{
                     "value":2.7,
                     "unit":"m"
                  },
                  "length":{
                     "value":13.62,
                     "unit":"m"
                  },
                  "licensePlate":"123-ABC"
               }
            },
            {
               "associationType":"inline",
               "entity":{
                  "id":"anotherValidId",
                  "type":"transportEquipment" or "items"
               }
            },
            ...
         ]
      }
   }
}

In this way you consider the Vehicle also a transportEquipment being able to contain goods, where goods can be either transportEquipment or items, just like it is within the transportEquipment itself.

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.
Alternatives considered are:

  • adding only transportEquipment as is done inside the actions.
    Pro: it is clear much more clear a trailer or other transportEquipment is expected in this array.
    Cons: you have to add another array for items, which are both in the end Goods. Goods are already an official entity and transportEquipment is a subset.

This also enables the model to describe the items in a vehicle at any point of time.

  • adding a Vehicles (or secondary or additional) array to the Vehicle entity. To contain have our initial wish trailers predefined.
    Pro: A trailer has more properties which are similar to a vehicle (like sensors).
    Cons: The entire OTM5 model now models trailers as transportEquipment. This could be a breaking change.

  • Making the Vehicle property an array of vehicle entities.
    Pro: -
    Cons: We can consider that there is only one primary vehicle. The vehicle operated by the (main) driver. Also changing an existing object into an array would be a breaking change.

Additional context
Adding the initial configuration using containedGoods:

  • keeps the proposed solution as close to the current OTM5 model, where trailers are described in the Goods entity with type transportEquipment
  • choosing the property name containedGoods keeps the definition inline with the way it is described in the transportEquipment itself.
  • this solution enables to model a Vehicle (truck) with a trailer, containing multiple loadcarriers, with boxes of items. But also for instance a pusher boat with multiple barges.
@Hans-Simacan Hans-Simacan added the enhancement New feature or request label Sep 3, 2024
@Hans-Simacan
Copy link
Author

We have been reconsidering this request. We found an other alternative:

  • Using the Actions on a Vehicle, where the action is registered without any timestamp to indicate a initial setup of the vehicle (at the beginning of a trip for instance).
    A challenge in this case is when multiple actions without timestamp are registered on the vehicle (eg. multiple attach / detach actions) to determine the proper order of them. Or to now whether the start- and ending time have been forgotten. The pre trip configuration of a vehicle can only be done with actions on the Vehicle. If the action without timestamp are added to a trip or stop, then the timestamps of the trip / stop are considered the times of the actions.

So, this solution can work but requires some unambiguous agreements between the parties using the solution. Or a very clear instruction within the OTM5 specification.

We will use it in a carrier-enrichment call with the agreement that if two or more consecutive calls are received we only treat the last one as the valid one. (Meaning the later ones will override the information of the prior ones)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant