Page 1 of 1

typical pre-packaging scenario

Posted: Tue Sep 23, 2025 2:01 pm
by Bernd Welter
Today a client asked me for a sample / solution for the following requirement:
  • Some of his orders belong together into a logical "group"
  • All orders of a group are supposed to be served by the same vehicle.
  • There's also a predefined sequence of these packed orders.
  • In his case it is possible to place further orders in between the given package orders
I want to use this post to show up some features and the results that can be helpful for this quite usual story...
Here's my demo setting.
  • Among further orders there are the pre-packaged orders 200, 202 and 203
Without further usage of constraints you can see that the 3 special orders are assigned to two different routes
pregroup-01.png
I will use the order's "task categories" to drill forward to the solution...
  • order 200 : "4711", "4711a"
  • order 202 : "4711","4711b"
  • order 203 : "4711", "4711c"
:!: Important lessons at this stage:
  • Defining categories doesn't change anything if you do not use constraints or rules to derive consequences!
  • The categories I used are on the level of the "delivery task" - often users assign the categories to the "order" itself, but in this case this wouldn't work.
Now the next three scenarios I'd like to describe are based on adding the task group handling
  • SAME_ROUTE enforces the tasks of category "4711" to be served opn the same route

    Code: Select all

      "constraints": {
        "tasks": {
          "groups": [
            {
              "taskCategory": "4711",
              "constraint": "SAME_ROUTE"
            }
          ]
        }
      }
    
    pregroup-02.SAME_ROUTE.png
  • If I use CONSECUTIVE instead of SAME_ROUTE then it is ensured that the prepackaged orders on the same route are not interrupted by tasks not belonging to that group. :!: This does NOT ensure that the pre-packaged orders are assigned to the same route!

    Code: Select all

      "constraints": {
        "tasks": {
          "groups": [
            {
              "taskCategory": "4711",
              "constraint": "CONSECUTIVE"
            }
          ]
        }
      }
    
    pregroup-02.CONSECUTIVE.png
  • To make sure that the pre-packaged orders are ON THE SAME ROUTE and without interruption you need to apply BOTH constraints!

    Code: Select all

    "constraints": {
        "tasks": {
          "groups": [
            {
              "taskCategory": "4711",
              "constraint": "CONSECUTIVE"
            },
            {
              "taskCategory": "4711",
              "constraint": "SAME_ROUTE"
            }
          ]
        }
      }
    
    pregroup-02.SAME_ROUTE+CONSECUTIVE.png
Now if you look closer to this last example there's still the "internal" task sequence" 4711b / 4711a / 4711c.
To make sure that the output sequence is 4711a / 4711b / 4711c I applied respected sequences on top:
  • Code: Select all

      "constraints": {
        "tasks": {
          "respectedSequences": [
            {
              "taskCategories": [
                "4711a",
                "4711b",
                "4711c"
              ]
            }
          ],
          "groups": [
            {
              "taskCategory": "4711",
              "constraint": "CONSECUTIVE"
            },
            {
              "taskCategory": "4711",
              "constraint": "SAME_ROUTE"
            }
          ]
        }
      }
    
    pregroup-03.SAME_ROUTE+CONSECUTIVE.RESPECTED_SEQUENCES.png
Best regards,
Bernd

PS: Feedback is welcome - as always!