In designing a routing tool, I'm attempting to minimize the amount of surface streets (non-motorways) needed to reach the closest facilities. The only options available in Network Analyst are snap to closest feature or snap to first feature (within some tolerance radius) when using the AddLocations tool.
As you can see from the image below, the code will snap the input location via part 1 every time (either by closest or by first). The favorable direction is to snap via path 2 to avoid that southern loop.
I believe I can minimize this issue by running multiple solves on the results of a Generate Near table for the 5 closest features then checking the cost for the cheapest route. It does leave the issue of a single continuous road feature that might loop back like that.
Does anyone have any ideas of how to route using part 2?
(Note: The Network dataset shown below is from OpenStreetMap and prohibits travel on motorways and motorway links. All the remaining roadways are to be treated equally in this scenario.)