Route section numbers and positions in route are tools for the user to specify positions of stops at customer locations in the route.
Scenarios route sections
Which scenarios can be modeled by route section numbers?
- Some customers are promised to be visited early in the route, e.g.:
- Set routeSectionNumber of customer locations that have to be visited early to 1.
- Set routeSectionNumber of all other customer locations to 2.
- The planner wants deliveries at customer locations to be before pickups at customer locations, e.g.:
- Set routeSectionNumber of customer locations for delivery to 1.
- Set routeSectionNumber of customer locations for pickup to 2.
- You may have to duplicate a customer location if it is used both, for pickup and delivery.
- Some stops may be added to a given route. They may be added only at the end of a route, e.g.:
- Set routeSectionNumber of customer locations of a given route to 1.
- Set routeSectionNumber of customer locations that have to be added to 2.
Scenarios position in route
Which scenarios can be modeled by position in route?
- A certain extraordinary customer location must be the first customer in the route:
- Set positionInRoute of this customer location to FIRST_CUSTOMER_STOP*.
- A certain extraordinary customer location must be the last customer in the route:
- Set positionInRoute of this customer location to LAST_CUSTOMER_STOP**.
*FIRST_CUSTOMER_STOP: A stop at a customer location with this position type has to be the very first customer stop in its trip.
**LAST_CUSTOMER_STOP: A stop at a customer location with this position type has to be the very last customer stop in its trip.
Influence sequence of customer stops
How can the sequence of customer stops in the route be influenced?
- A stop at a customer location with a specific routeSectionNumber will always be after other stops with a specific lower routeSectionNumber in the route.
- A stop at a customer location with a specific routeSectionNumber will always be before other stops with a specific higher routeSectionNumber in the route.
- A stop at a customer location with a positionInRoute of type FIRST_CUSTOMER_STOP will always be the very first customer stop in the route.
- A stop at a customer location with a positionInRoute of type LAST_CUSTOMER_STOP will always be the very last customer stop in the route.
Notes: Route section numbers and position in route cannot be set both at the same stop of a customer location.
It is valid to set none of the two values. In this case, no particular restriction concerning its customer stop position is implied by this location.
Examples
The following examples show valid or invalid positions of customer stops in the route in different scenarios.
Example for valid positions of customer stops in the route
Valid positions of customer stops are:
- Customer locations with specified routeSectionNumber must have a non-decreasing route section number in the route.
- Customer locations with specified routeSectionNumber can be equal in the route, for example routeSectionNumber 1 ➞ routeSectionNumber 1 is permissible.
- Customer locations with specified routeSectionNumber do not have to be subsequent in the route, for example routeSectionNumber 1 ➞ routeSectionNumber 5 is permissible.
- A customer location with specified position in the route of type FIRST_CUSTOMER_STOP has to be the very first customer stop in the route. However, depot stop(s) can precede in the route.
Note: Customer locations without specified routeSectionNumber are not considered for the route section restriction.
Example for invalid route sections in the route
Invalid positions of customer stops are:
- A customer location has a lower specified routeSectionNumber than the customer location of a previous stop in the route, for example routeSectionNumber 5 ➞ routeSectionNumber 1 is not permitted.
Example for invalid first position of customer stop in the route
Invalid positions of customer stops are:
- A customer location with specified positionInRoute of type FIRST_CUSTOMER_STOP is not the very first customer stop in the route.
A customer location with positionInRoute of type FIRST_CUSTOMER_STOP must be the very first customer stop in the route. A customer stop before a customer stop with positionInRoute of type FIRST_CUSTOMER_STOP in the route is not allowed, no matter what attributes the previous stop has.
Notes: This also applies if neither a routeSectionNumber nor a positionInRoute is defined. This holds analogously for the type LAST_CUSTOMER_STOP.
Example for invalid last position of customer stop in the route
Invalid positions of customer stops are:
- A customer location with specified positionInRoute of type LAST_CUSTOMER_STOP is not the very last customer stop in the route.
A customer location with positionInRoute of type LAST_CUSTOMER_STOP must be the very last customer stop in the route. A customer stop after a customer stop with positionInRoute of type LAST_CUSTOMER_STOP in the route is not allowed, no matter which attributes the next stop has.
Notes: This also applies if the positionInRoute is also of type LAST_CUSTOMER_STOP. This holds analogously for the type FIRST_CUSTOMER_STOP.