# Can I run a Closest Facility analysis with anisotropic round trips?

Question asked by mnotarian on Jul 21, 2020
Latest reply on Jul 22, 2020 by jsandhu-esristaff

In ArcMap 10.7, I'm working on a network analysis of an urban archaeological site where I'm running a closest facility analysis on some 2000 structures to specific features within the city. I've segmented the road layer and calculated travel times for each segment based on Tobler's Hiking Function, which I then enter as the time cost to calculate the quickest routes from each house to the closest feature (in terms of time). The problem I've run into is how to calculate these as round trips. I can't simply double the total time of each route because the time values are anisotropic based on slope and Tobler (i.e. the From-To times for each segment are different from the To-From times). I've tried running the analysis backwards (from Facility to Incident, instead of Incident to Facility), but this often results in different matches and routes, again because of anisotropy. I've also tried summing the From-To and To-From time values for the segments and using those as a kind of "round trip" cost, but this again results in different Incident-Facility matches from the original Incident-Facility analysis using the anisotropic times.

I've found the "Copy Traversed Source Features" tool that will export a table with all of the segment time values. In theory this could be used to identify all the segments in each route, whether each segment used TF or FT times, and then sum the inverse of these time fields, but the process of recalculating the accumulated inverse time values is daunting, to say the least. I have to join the segment IDs from each route to the original network layer, then somehow note if each segment's time value was TF or FT (via separate fields with 0 or 1 values) and replace it with its inverse. Even worse, sometimes segments are joined in the middle (not at a junction) and the time values have to be proportionally shortened.

I feel like there must be a way to write a script or something to automate this, rather than attempt to do it manually, but I have no idea how to do that.