With the help of fixed assignments, it is possible to define existing unalterable assignments between territories and locations prior to location assignment. This allows you, for example, to create a visual representation of long-term customer relationships to show sales representatives. Fixed assignments can, on occasion, have a major impact on the planning response. It may even become impossible to find a valid response. In such cases, changing the tolerance threshold can help to resolve the problem.
Fixed assignment of a location to a territory center, which cannot be altered during the planning process.
Take into account given fixed assignments between sales representatives or territories and particular customers
Calculate your new location assignments while taking fixed assignments into consideration
Check if the following prerequisites are fulfilled before you start with the use case.
PTV xTerritory server has been installed
High-performance routing network for calculating routes, if applicable.
Creating unmodifiable assignments of locations to territory centres enables you, for example, to depict real customer relationships during the planning process. Taking fixed assignments into consideration, the territories to be planned are created according to the same criteria as in the previous use case territory planning. However, fixed assignments can lead to clear inequalities between territories and can even mean that no valid solution can be found. In such cases, it is advisable to alter the permitted tolerance threshold for different activity totals (PlanningProfile.imbalanceTolerance
).
The use of fixed assignments is only appropriate for connecting a location to a particular territory center. If you wish to group several locations together, you can create customer groups (see use case grouping locations).
Aside from the digital map of the area in which the locations are sited, a license is required for the distributeLocations
method and for the desired number of territories and locations.
If high-performance routing networks are to be used, a license must also be obtained for these. Furthermore, the path to the Routing Network folder must be placed accordingly in conf/xterritory.properties
.
To carry out a location assignment with fixed assignments, the following are required:
Locations
Some fixed assignments of locations to territory centres
Territories (territory centres)
parametrisation for the calculation of stretches of route
Each location to be planned will be represented by an id
and a coordinate
.
Furthermore, an activity
must be provided for each location, since the aim of location assignment is to create territories which are as balanced as possible. For simple activity measures, the class AbsoluteActivity
is used, the value
of which contains a double value that is then simply totalled for each territory during the location assignment process.
A fixed assignment of a location to a territory and/or to its territory center is entered using the attributes fixedToTerritory
and territoryId
.
Example: "location1" needs an unmodifiable assignment to the area "territory1":
"locations": [ { "id": "location1", "coordinate": { "point": { "x": 6.166279, "y": 49.629301 } }, "activity": { "$type": "AbsoluteActivity", "value": 3.0 }, "territoryId": "territory1", "fixedToTerritory": true } ]
Since the location coordinates are in geodecimal format here, the coordinate format must also be specified in the request, in the CallerContext
.
During location assignment, the territory centres must have been entered previously in the request, and will not be altered by the planning algorithm. A territory center is modelled as a territory
, in the sense that every territory is represented by a reference point, in this case the territory center.
"territories": [ { "id": "territory1", "referencePoint": { "point": { "x": 6.424008, "y": 49.704545 } } } ]
PTV xTerritory server offers several ways to calculate stretches of route:
ApproximateByDirectDistance
)NewDistanceMatrixByRoad
)ExistingDistanceMatrixByRoad
and ApproximateByReferenceMatrix
)The respective option will be chosen according to the DistanceCalculationOptions
subclass that is instantiated.
Example for ApproximateByDirectDistance:
"distanceCalculationOptions": { "$type": "ApproximateByDirectDistance" }
{ "locations": [ { "id": "location1", "coordinate": { "point": { "x": 6.166279, "y": 49.629301 } }, "activity": { "$type": "AbsoluteActivity", "value": 2.0 }, "territoryId": "territory1", "fixedToTerritory": true }, { "id": "location2", "coordinate": { "point": { "x": 6.105082, "y": 49.640585 } }, "activity": { "$type": "AbsoluteActivity", "value": 1.0 } }, { "id": "location3", "coordinate": { "point": { "x": 6.059420, "y": 49.585083 } }, "activity": { "$type": "AbsoluteActivity", "value": 1.0 } } ], "territories": [ { "id": "territory1", "referencePoint": { "point": { "x": 6.424008, "y": 49.704545 } } }, { "id": "territory2", "referencePoint": { "point": { "x": 6.096699, "y": 49.845314 } } } ], "distanceCalculationOptions": { "$type": "ApproximateByDirectDistance" }, "callerContext": { "properties": [ { "key": "CoordFormat", "value": "OG_GEODECIMAL" } ] } }
The planned territories are listed under territories
in the PTV xTerritory server's response and contain, among other things, an id
and a referencePoint
(territory center), along with the id
s of locations which are assigned to them.
"territories": [ { "id": "territory1", "referencePoint": { "$type": "Point", "point": { "$type": "PlainPoint", "x": 6.4239681248, "y": 49.704533724 } }, "summary": { "totalActivity": 2, "numberOfLocations": 1 }, "locationIds": [ "location1" ] } ]
Copyright © 2024 PTV Logistics GmbH All rights reserved. | Imprint