Hello,

For a given individual, I'm looking to create the least cost route that would take in 1 of each kind of facility in my dataset.

Let's assume I have 10 facilities of 5 types, with 2 facilities in each type. I would like to return a distance in which one of each of those 5 types of facilities is visited, in any order, finishing either: 1) back at the origin point, which is distinct from the facilities, 2) at a different destination point, that is again distinct from the facilities, or 3) At the final point of the facilities to be visited.

One of each of the types of facilities must be visited, so there would be 5 total visits, and in this case, 5 facilities would not be visited as visiting them does not fall on the shortest path.

Is this possible?

It strikes me that this is like a travelling salesman problem: rather than visit each city in a set of regions, the salesman must visit just 1 city per region in a set of regions containing many cities.

Thanks in advance,

Dan

For a given individual, I'm looking to create the least cost route that would take in 1 of each kind of facility in my dataset.

Let's assume I have 10 facilities of 5 types, with 2 facilities in each type. I would like to return a distance in which one of each of those 5 types of facilities is visited, in any order, finishing either: 1) back at the origin point, which is distinct from the facilities, 2) at a different destination point, that is again distinct from the facilities, or 3) At the final point of the facilities to be visited.

One of each of the types of facilities must be visited, so there would be 5 total visits, and in this case, 5 facilities would not be visited as visiting them does not fall on the shortest path.

Is this possible?

It strikes me that this is like a travelling salesman problem: rather than visit each city in a set of regions, the salesman must visit just 1 city per region in a set of regions containing many cities.

Thanks in advance,

Dan

It sounds like you are working in the right direction towards using VRP to solve this problem, as the workaround does indeed require the usage of capacities and pick ups as binary constraints. The basic workflow is outlined below:

- Create a new VRP layer.

- Open the layer properties by right-clicking the layer in the table of contents and selecting 'Properties'.

- Go to the 'Analysis Settings' tab and set the 'Capacity Count' value to k (assuming you wish to represent k different facility types or categories). For all examples in the remaining discussion, I will assume k = 3.

- Add one or more locations as 'Depots' representing your starting and ending locations. If you require to start and end at the same location or don't care where the route ends, just add one depot.

- Add a new 'Route' item.

- Specify the route's starting and ending locations by setting the "StartDepotName" and "EndDepotName" fields based on the 'Depots' you added above. If you leave the end depot unspecified, it will end the route at the last visited facility/order.

- Assign your route a vector of binary capacities based on the number of facility types (k) that you wish to support. For example, assuming k = 3, give the "Capacities" field a value of "1 1 1". Each value represents a distinct dimension of constraint, representing a distinct facility type. Assuming the i-th facility type is represented by the i-th capacity value, this suggests that we cannot pick up more than one facility location for each of the three facility types.

- Add all of the appropriate facility locations as 'Orders', assigning each order a "PickupQuantities" field value as follows. If the facility belongs to the i-th facility type, then give it a pickup value of one in the i-th position, but zero in all other positions. For example, assuming k = 3 facility types, if the location is of type 1, then assign it the field value "1 0 0"; if it is type 2, assign it the field value "0 1 0"; etc.

- Solve the analysis

That should pretty much do it. Please let me know if this works for your scenario(s) or if you run into any problems.