While using the Network Analyst Closest Facility task in a python script, my solve operation is failing on incidents that have been located on disconnected network segments. I have tried to use:
arcpy.Solve_na(cf_layer, terminate_on_solve_error=False, ignore_invalids=True)
but then the routes feature is never populated with any data at all, even for incidents that do have a solution.
When I run this same operation in ArcMap, solve executes properly with the addition of a warning window displaying the incidents solve was not able to find a solution for.
This brings me to my question:
1. Is there a way in python for solve to complete on all other features that do have a valid solution so I can continue with my analysis? If not, am I able to access the Network Analyst warning window within python so I can filter out incidents I know will fail?
Thanks in advance,
Solved! Go to Solution.
then you should have had errors or warnings indicating what was wrong... check the help options in more detail ie.