Select to view content in your preferred language

Filter in Last Mile Delivery / Vehicle Routing Problem

248
3
06-23-2025 08:01 AM
GeoFUNKE
Emerging Contributor

Hi,

I have a question on how the filters for for VRP and Last Mile Delivery Solver.

Everytime I use that filter, the tool still calcualtes the "lines" for all my orders although they are filtered to only a few. With complexity rising exponentially that leads to far too much line calculations. Is there a common mistake that I might have in my settings, or is there a bug?

 

Does anybody use the filter in a productive workflow?

 

Best

David

0 Kudos
3 Replies
RachelApplebaum
Esri Contributor
Hi David,
 
No mistake made. The filtering on the Network Analyst ribbons does apply definition queries to the relevant sublayers. However, Solve is one of the few geoprocessing tools that does not care about definition queries; it's always going to solve on the full set of inputs, even if you have definition queries applied to limit which features are displayed in the map and shown in the attribute tables.
 
If you want to solve against a subset of your input points, you can apply the filters, then duplicate the network analysis layer. To do this, either run the Copy Network Analysis Layer geoprocessing tool, or right click the Network Analysis layer in the Table of Contents and select "Duplicate" (this runs Copy Network Analysis Layer in the background). Duplicating the Network Analysis layer will respect the definition queries, so you'll be able to quickly solve that layer.
 
I also want to mention that your confusion is very understandable (geoprocessing tools mostly do respect definition queries), so we'll update the documentation to make it clear for this scenario.
 
Regards,
Rachel
0 Kudos
HeatherMoe
Esri Contributor

Hi David,

I had another thought on how you could solve against a subset of the problem, using our Assignment Model.

For VRP the Orders table has a field called Assignment Rule. One of the coded value domains there is "Exclude" which can be used to remove the order from the solve without removing it from the layer. This can be used one of two ways if it was already assigned to a route. If the whole route and all of the orders are excluded then all you need to do is set Exclude for all of the orders and similarly Exclude for the AssignmentRule field on the corresponding Route. If only a few of the assigned orders are being excluded then the RouteName and Sequence fields would also need to be cleared to <Null> otherwise it will return an error message.

For Last Mile Delivery the Orders field also has a field called AssignmentRule but the coded value domain is slightly different. In this case you would set it to "Unassign." In this case it does not matter if the route has a RouteName assignment or not, we will not solve.

0 Kudos
GeoFUNKE
Emerging Contributor

Hi Heather,
thanks you so much!
I'll try out both options. I'd assume that the second option would be especially interesting from a performance perspective.

0 Kudos