Special "end" group not enforced via relation

Hi,

We’ve found a request where we’re seeing some unexpected behaviour. From the documentation: New Feature: Groups it sounds like if we have a group called low and we specify the following relation:

		{
			"type": "in_direct_sequence",
			"groups": ["low", "end"]
		}

Then services in that group should be the last ones in the route. However in this request:

{
	"configuration": {
		"routing": {
			"calc_points": false,
			"consider_traffic": false,
			"fail_fast": true,
			"network_data_provider": "openstreetmap",
			"return_snapped_waypoints": true,
			"snap_preventions": [
				"motorway",
				"tunnel",
				"ferry"
			]
		}
	},
	"objectives": [
		{
			"type": "min",
			"value": "completion_time"
		}
	],
	"relations": [
		{
			"type": "in_direct_sequence",
			"groups": ["low", "end"]
		}
	],
	"services": [
		{
			"address": {
				"curbside": "right",
				"lat": 51.5410783,
				"location_id": "5H7y0zhwICDuysSOyAhC",
				"lon": -0.1463049,
				"name": "Camden Lock, London, Greater London",
				"street_hint": "Camden Lock"
			},
			"allowed_vehicles": [],
			"duration": 240,
			"group": "medium",
			"id": "5H7y0zhwICDuysSOyAhC",
			"name": "Camden Lock, London, Greater London",
			"priority": 2,
			"size": [
				1
			],
			"time_windows": []
		},
		{
			"address": {
				"curbside": "right",
				"lat": 51.5372307,
				"location_id": "625AMqJL2SUrecV4IRuZ",
				"lon": -0.1604996,
				"name": "5 Ormonde Terrace",
				"street_hint": "Ormonde Terrace"
			},
			"allowed_vehicles": [],
			"duration": 240,
			"group": "medium",
			"id": "625AMqJL2SUrecV4IRuZ",
			"name": "5 Ormonde Terrace",
			"priority": 2,
			"size": [
				1
			],
			"time_windows": []
		},
		{
			"address": {
				"curbside": "right",
				"lat": 51.5109103,
				"location_id": "h63LyUHw0LhL1C1P1xmx",
				"lon": -0.1856214,
				"name": "2-6 Inverness Terrace",
				"street_hint": "2-6 Inverness Terrace"
			},
			"allowed_vehicles": [],
			"duration": 240,
			"group": "medium",
			"id": "h63LyUHw0LhL1C1P1xmx",
			"name": "2-6 Inverness Terrace",
			"priority": 2,
			"size": [
				1
			],
			"time_windows": []
		},
		{
			"address": {
				"curbside": "right",
				"lat": 51.5519518,
				"location_id": "1EqrhOxy2sEPLEVrbMMN",
				"lon": -0.1990938,
				"name": "40 Hillfield Rd",
				"street_hint": "Hillfield Rd"
			},
			"allowed_vehicles": [],
			"duration": 240,
			"group": "low",
			"id": "1EqrhOxy2sEPLEVrbMMN",
			"name": "40 Hillfield Rd",
			"priority": 2,
			"size": [
				1
			],
			"time_windows": []
		},
		{
			"address": {
				"curbside": "right",
				"lat": 51.5200918,
				"location_id": "y6ORVZjhh4Hij2uMqf3W",
				"lon": -0.2196514,
				"name": "89 St Helens Gardens",
				"street_hint": "St Helens Gardens"
			},
			"allowed_vehicles": [],
			"duration": 240,
			"group": "medium",
			"id": "y6ORVZjhh4Hij2uMqf3W",
			"name": "89 St Helens Gardens",
			"priority": 2,
			"size": [
				1
			],
			"time_windows": []
		}
	],
	"shipments": [],
	"vehicle_types": [
		{
			"capacity": [
				2147483647
			],
			"profile": "car_delivery",
			"service_time_factor": 1,
			"speed_factor": 1,
			"type_id": "vhc_as4lajJon8e0UR9xR6TgawHayKP2"
		}
	],
	"vehicles": [
		{
			"earliest_start": 1711094400,
			"return_to_depot": true,
			"start_address": {
				"curbside": "right",
				"lat": 53.478071,
				"location_id": "Fpe6t6bS",
				"lon": -1.4189766
			},
			"type_id": "vhc_as4lajJon8e0UR9xR6TgawHayKP2",
			"vehicle_id": "as4lajJon8e0UR9xR6TgawHayKP2"
		}
	]
}

The last service in the route is actually one of the “medium” services (specifically y6ORVZjhh4Hij2uMqf3W), which seems to conflict with the relation. Is this a bug or is this expected behaviour from the special “end” group?

This is indeed not an expected behavior and a bug. We will fix it as soon as possible. Thank you for the example.

The error has now been fixed. Many thanks for the example and the error description.

Great, thank you for your help!