The ArcGIS Solutions website will no longer be available after September 1, 2025. See the latest documentation.

Iterating backhaul

Due to the iterative nature of the backhaul process, it is suggested to automate the route modifying parameters. This can be done in ModelBuilder or as a standalone Python script.

Backhaul model
Sample model with iterator
A sample ModelBuilder diagram with an iterator on daisy chain. As the iterator increments by one, the backhaul process will run with a different daisy chain value.
Backhaul script

Backhauling the remote assets with different daisy chain values.

                import arcpy

# Import toolbox and check out NA extension
arcpy.env.workspace = "C:/Solutions/BackhaulOptimizationA4TC/MapsAndGDBs"
arcpy.ImportToolbox("Tools/Backhaul.pyt", "backhaul")
arcpy.CheckOutExtension("Network")

for i in range(1, 11):
   arcpy.backhaul.BackhaulAssets("Assets.gdb/RemoteAssets",
                                 "Assets.gdb/FixedAssets", 
                                 "Assets.gdb/NearTable"
                                 "D:/streetmap/ClosestFacility.lyr",
                                 arcpy.env.workspace,
                                 daisy_chain=i)

arcpy.CheckInExtension("Network")
            
Top