I've created a closest facility analysis model using Model Builder in ArcGIS Pro v2.9.4. I'm using StreetMap Premium 2021 as the network dataset. Inspecting the Network Analyst geoprocessing tools, I noticed that I have not seen Travel Mode (specifically Restrictions settings) in the geoprocessing tools (i.e. no U-turns, Avoid Toll Roads, Avoid Ferries). These are the same Travel Mode settings that can be defined in the layer properties for closest facility in the table of contents pane. Can Travel Mode be defined in Model Builder?
Solved! Go to Solution.
This tutorial might help: https://pro.arcgis.com/en/pro-app/latest/help/analysis/networks/create-a-model-for-route-analysis.ht...
It explains what it means to expose something as a model parameter, although it doesn't demonstrate the travel mode parameter specifically.
Here's the documentation explaining model parameters specifically: https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/model-parameters.h...
The Make Closest Facility Analysis Layer tool has a travel mode parameter, so you can choose one of the pre-defined travel modes on the network dataset. However, the individual settings within the travel mode (restrictions, u-turn policy, etc.) cannot be individually set. You can expose the travel mode parameter as a model parameter so the user can pick the travel mode from the model tool UI. There are ways to create a custom travel mode using Python or a JSON string. Or you can add travel modes to your Streetmap Premium dataset if there's a specific non-default configuration you want.
This tutorial might help: https://pro.arcgis.com/en/pro-app/latest/help/analysis/networks/create-a-model-for-route-analysis.ht...
It explains what it means to expose something as a model parameter, although it doesn't demonstrate the travel mode parameter specifically.
Here's the documentation explaining model parameters specifically: https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/model-parameters.h...