opentripmodel / otm5-change-requests

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

Pallets and Pallettype #19

Closed jellevanleeuwen closed 3 years ago

jellevanleeuwen commented 3 years ago

Type of request

Is your feature request related to a problem? If so, please describe the problem. For example: with the current specification I cannot model create transport orders with goods that have a packaging material, but are also stacked on pallets, i would also like to notate which kind of pallets i have in the transport order, for example, five euro pallets

Describe the solution you'd like I would like to notate the amount and kind of pallets i have to ship the goods on.

Describe alternatives you've considered Currently, i am using external attributes to provide this information, but i think we are not the only organization that is requesting this.

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

bmeesters commented 3 years ago

Hello Jelle, thanks for your contribution. Could you give an example of how your OTM currently looks like. In principle the amount of pallets should already be possible in native OTM. As is the packing material (note that there are two different kind of good types). If you give an example we can see how to translate it to native OTM.

Kind of pallets are currently not supported. So that would be a new addition indeed.

jellevanleeuwen commented 3 years ago

For example i have the following: A good that is fries with a packaging material CA in this case this means cartonnes and which are loaded on pallets in this case 5 Euro pallets.

"goods": [ { "associationType": "inline/reference", "uuid": "3f8913ee-c69f-bc4f-1417-edd9ae2fff3d", "entityType": "goods", "description": "A free text description of the relationship to the associated entity.", "entity": { "id": "7ad518dc-1bc3-4225-a521-8c78e5773af6", "name": "093.086", "externalAttributes":[ { "id": "12345678", "information": "Pallet", "property1": "EURO", "property2": "5" }, ], "creationDate": "27-04-2021 13:13:13", "description": "Fries 9x9mm 4x2500g Metro Chef EP", "remark": "093.086", "barCode": "CSE370", "quantity": 1.00, "weight": { "unit": "KG", "value": 23.45 }, "grossweight": { "unit": "KG", "value": 23.45 }, "equipmentType": "trailer", "productType": "Fruit", "packagingMaterial": "CA" }

bmeesters commented 3 years ago

Thanks, I will look into the specification again and show you how you can take care of part one of your request (transport orders with goods that have a packaging material, but are also stacked on pallets). Since that should be possible without any changes. Will get back to you somewhere tomorrow or the day after.

The kind of pallets is a bit tricky. Since you can have multiple equipment types (such as trailers, pallets, boxes) and a field palletType would not make sense on most of those. That said, we see the need and want to provide a proper solution. I'll discuss this with some parties and see whether they have some ideas.

bmeesters commented 3 years ago

@jellevanleeuwen I took your example and modified it to show how you can have packaging material that are stacked on pallets. I had to move around a few attributes of which I don't know where it belongs to, but I hope the the structure will be clear:

{
    "goods": [{
        "associationType": "inline",
        "entityType": "goods",
        "description": "A free text description of the relationship to the associated entity.",
        "entity": {
            "id": "7ad518dc-1bc3-4225-a521-8c78e5773af6",
            "type": "transportEquipment",
            "name": "093.086",
            "externalAttributes": [{
                "id": "12345678",
                "information": "Pallet",
                "property1": "EURO",
                "property2": "5"
            }, ],
            "creationDate": "27-04-2021 13:13:13",
            "description": "Fries 9x9mm 4x2500g Metro Chef EP",
            "remark": "093.086",
            "barCode": "CSE370",
            "quantity": 1.00,
            "weight": {
                "unit": "KG",
                "value": 23.45
            },
            "grossweight": {
                "unit": "KG",
                "value": 23.45
            },
            "equipmentType": "pallet",
            "containedGoods": [{
                "associationType": "inline",
                "entity": {
                    "id": "7ad518dc-1bc3-4225-a521-8c78e5773af6",
                    "creationDate": "27-04-2021 13:13:13",
                    "barCode": "CSE370",
                    "quantity": 1.00,
                    "productType": "Fruit",
                    "packagingMaterial": "CA"
                }
            }],
            "packagingMaterial": "CA"
        }
    }]
}

To give an explanation of what is happening:

Goods can be divided into two types: items and transportEquipment. The former is meant for actual products such as fruit (as by your example). The latter is meant for means of transporting those goods, such as pallets, boxes, but also larger entities such as trailers. You can thus make a pallet (transportEquipment) that certain dimensions that contain other goods such as the goods.

Unfortunately you cannot provide what type of pallets you have yet. But as said, I'll discuss it and get back to you on whether and how we want to add that to OTM.

Hopefully this will make it a bit more clear, and if you have any further questions let me know.

bmeesters commented 3 years ago

As said before we can already have goods with package material and an amount on some pallet (which also have some amount). We also want to add the pallet type.

rverberne commented 3 years ago

We have the same issue. While equipmentType it is a enum, we use it as a free text field for now.

bmeesters commented 3 years ago

The tricky thing with this issue is that you cannot really give two 'lists', since equipmentType can be a trailer and a pallet for example. So the most simple solution would be to keep equipmentType as is (an enum) and add a new equipmentSubtype (or something similar) that is a free text. Then you could do something like this:

{
  "entityType": "goods",
  "goodsType": "transportEquipment",
  "equipmentType": "pallet",
  "equipmentSubType": "EURO 5" <-- free text, but we want to provide the options per equipment type
}

Would something like this work for you @rverberne? We currently have planned to add this to OTM5.2 (coming September). Though I am not sure about the naming.

rverberne commented 3 years ago

Yes that would work. I agree that the name should be applicable to all equipmentTypes. so equipmentSubType makes sense.

bmeesters commented 3 years ago

Great, thanks for the quick response!

rverberne commented 3 years ago

I would like to know if it will be equipmentSubType or transportEquipmentSubType (like in the changelog at the moment). (My personal preference goes to equipmentSubType.)

bmeesters commented 3 years ago

I agree that equipmentSubType is better. I should have been more clear in my previous response I'll see if there is any other feedback and otherwise will release OTM5.2 this week.

bmeesters commented 3 years ago

This is now part of OTM5.2