Network analyst and multiproccessing

172
2
12-21-2018 10:47 AM
sotokan80_
New Contributor III

I am using ArcGis 10.4.1 for desktop and network Analyst extension. Is it possible to use multiprocessing when performing vehicle problem routing analysis? Every day i run a script where the VRP solver finds the best routes for a fleet of 300 motorbikes where each one has to visit up to 400 stops. If it is not feasible to use multiprocessing will upgrading my cpu and ram size reduce the processing time?  Currently i m using a pc equipped  with i3 processor and 16gb ram.

0 Kudos
2 Replies
JaySandhu
Esri Regular Contributor

VRP does not have any additional multi-processor support. The process is usually CPU bound, so having a faster computer CPU like an I7 and/or faster disk (Solid state drive) will help speed up the solve times. The fast disk is to hold the network dataset as well as the computer TEMP folders.

Jay Sandhu

sotokan80_
New Contributor III

The script that i am using has a method with the following arguments.

def ra(EndPoint, RoadRules, data, StationName, Store_shp, SortedStationStops_shp, StationDeliveries_shp, stationRoutes_Dic, BranchId)

This method is based on the given example in http://pro.arcgis.com/en/pro-app/tool-reference/network-analyst/make-route-analysis-layer.htm

A part of the code where I am trying to use multiprocessing follows;

if __name__ == '__main__':    # Set workspace environment to a folder    arcpy.env.workspace = path    fc_list=[]    fcs = arcpy.ListFeatureClasses()    for filename in fcs:       if filename.startswith('agivenName'):          fc_list.append(filename)      from multiprocessing import Pool     pool = Pool(4)     pool.map(partial(ra(EndPoint, RoadRules, routeDeliv, StationName, Store_shp, SortedStationStops_shp, StationDeliveries_shp, stationRoutes_Dic, branch_id), fc_list)     pool.close()       pool.join()

I cannot make it work. I've tried many ways i.e

    func = partial(ra,EndPoint, RoadRules, StationName, Store_shp, SortedStationStops_shp, StationDeliveries_shp, stationRoutes_Dic, branch_id)     pool.map(func, fc_list)

The script works perfectly when i dont use multiprocessing. When i use multiprocessing it doesnt execute the method.
I believe that it has to do with the fact that it has more than one arguments
 
0 Kudos