I'm building a model to measure distances (miles) and accumulate drive time (minutes) between predetermined origin and destination points. I already have this workflow down manually, but want to turn it into a geoprocessing model since it's a routine task for work.
I'm using ArcGIS Pro 2.9 with the Network Analyst extension, and streetmap premium's Routing_ND for the network dataset.
At this time, the model is broken into 2 parts since the output of part 1 wasn't connecting to part 2 when they were 1 entire model.
Part 1 works:
Part 2 and its ability to successfully connect to Part 1 is where I'm looking for help.
Here is part 2 so far:
When I tried running the part 2 model as-is, it generated 1 route with 200 stops. I need 100 routes with 2 stops (correctly connecting the predetermined origins/destinations). When doing this manually, the Add Locations tool's field mappings are key to adding the origins and destinations correctly as Stops into the Route Analysis layer. They have a combo_ID in common that I need assigned to both the origin and destination RouteName in field mapping. Additionally, I use the combo_ID in the sort field to doubly make sure origins and destinations are being loaded in the same order. I also have a from_ID and to_ID I use as the 'Name' field mapping when adding locations for origins and destinations, to ensure both sets of stops have unique IDs as well.
In modelbuilder, I can apply those settings to the Add Locations tool, but when I turn Field Mappings into a parameter so it can be used as a geoprocessing model, the field mappings remain grayed out and cannot be specified. I imagine this is why I'm getting 1 route with 200 stops, I don't know how to parameterize the field mappings each time I add locations in modelbuilder. Any idea how to get that working?
Additionally, for part 2 there's no parameter to set impedance so I can specify Route measure distance in miles. I only see the Accumulate window. Where would impedance be?
I'm ok keeping this workflow as 2 separate models for the time being, but I'd also ideally want to successfully connect them as one model, but the origin and destination points generated in part 1 wouldn't turn into parameters either. Any suggestions on how to connect part 1 and part 2 into 1 geoprocessing model?
Thank you!