I need to run network analysis routing (to calculate distance) on pairs of points with barriers. I have 3 feature classes:
Origins
Destinations
Barriers
All 3 of which share a common unique ID field called [RouteName], (which has a data type of Long.)
The barriers represent culvert failures on a road network. I would like to calculate how much travel distance is added to get from the origin (on one side of the failure barrier) to the destination (on the other side of the failure barrier).
I have set up the routing problem and it solves the route for each set of points using all barriers along the network. I am trying to find a way to for the routing to look at each Origin, Destination, and Barrier set (sharing a common [RouteName] attribute) individually to calculate the route, while ignoring all other Origins, Destinations & Barriers on the road network For each routing solution, I only want to use one origin, one destination and one barrier.
I have a model set up that successfully routes for one [RouteName] set using the "Select Layer By Attribute" tool in Model Builder. I have attached photos of my current model and my test result for using the expression "[RouteName]=21" in the select Layer by attribute tool for my Origins, Destinations and Barriers.
What I would like to do is be able to set the model to run through each "set" of [RouteName] (Origin, Destination, & Barrier all sharing the same value) and output/append that successful routing to a new feature class with the set's [RouteName} as an attribute. I'm assuming I have to use the For Iterator but I'm not quite sure how to use the inline variable to do so.