The goal is to make the shortest paths for the first salesman for first day of work, then the second salesman for the first day of work, then the third salesman for the first day of work, then move to the second day, and repeat.
- Days = User Parameter on # of days to iterate
- Sum_Total_Time= the work + travel time for the combine paths for that salesman for that day.
- Each salesman can work a maximum of 3 hours per day (total_time).
- I have calculated the work, travel, and combined time per path per salesman.
Set Work_Date = today
Set total_time = 0
Set Sum_Total_Time = 0
Set day = 0
If Day =< Days
Then
For Salesman in Salesmen:
Set WorkDate = WorkDate + Day
If Sum_Total_Time =< 3
From_Node = Salesman_Location
TestFilter = Days_Since_Visited > = Target_Days_Since_Visited
Spatial_Filter Topology Nodes inside Salesman Boundary
NearestNeighbor From_Node to Topo_Nodes
Shortest_Path
AttributeCreator (Path_ID, Work_Time, Travel_Time, Total_Time, Day, Work_Date)
Update Days_Since_Visited = 0
Update SalesmanLocation = last node in path not equal to From_Node
For Path in Paths
Sum_Total_Time = sum(Total_Time)
Else
Day = Day +1
I have the basic workbench working, i.e. I am reading the current location of all the salesmen, doing the nearestneighbor, and creating the shortestpath, but I need to figure out how to loop them and combine them.