|
POST
|
Hello Sarah, I'm not quite sure what you are asking. Are your routes overlapping (crisscrossing each other) and you are asking for how to make it so they don't overlap? Can you give a little more detail about what you are doing and what issue you are running into. Thanks, Heather
... View more
05-16-2017
01:41 PM
|
0
|
4
|
2934
|
|
POST
|
Hi Adnan, The VRP REST API runs off of the ArcGIS Online VRP service which is where the 200 max order count that you are seeing is imposed. The 1000 max order count that was being referenced above is for using the ArcMap tool with a local network dataset or through the equivalent GP tool (not the ready to use service). The GP tool can be published to create your own VRP service but would require an ArcGIS server with network analyst instead of just using service credits. More information can be found Overview of the Network Analyst geoprocessing service examples—Documentation | ArcGIS Enterprise
... View more
05-04-2017
03:39 PM
|
0
|
0
|
2239
|
|
POST
|
Hi David, If you are wanting to create a VRP layer by looking into the attribute table for the depot your best bet is probably to do it through python. There is some example code on both the solve VRP and make VRP help pages. Here is the link for them:Solve Vehicle Routing Problem—Help | ArcGIS Desktop Make Vehicle Routing Problem Layer—Help | ArcGIS for Desktop Since it sounds like you have a layer partly set up with the depots you could use some code like this to look at the depots and determine the number of routes that are to be created. # open the layer File layerFile = arcpy.mapping.Layer(layer) subLayerNames = dict((lyr.datasetName, lyr) for lyr in arcpy.mapping.ListLayers(layerFile)[1:]) depotsLayerName = subLayerNames["Depots"] # determine how many routes should be created depotCursor = arcpy.SearchCursor(depotsLayerName) for row in depotCursor: numberOfRoutes = row.getValue("?????") # add the name of whatever attribute indicates the number of routes depotName = row.getValue("Name") From there you could create a temporary text file that gets a line for each route you want to create and then add the routes using the route field mappings and add locations scripts like shown in the above links.
... View more
03-23-2017
02:33 PM
|
0
|
0
|
1019
|
|
POST
|
Hi Asaf, Very interesting problem! This isn't one I have tried to solve before but here is an idea for you. It might take some trial and error to get the timing and truck distribution to work well for you so definitely experiment a little. If the depot starts sorting the papers at 1:30 and then continues until it is done at 3:30 you could try putting several depots at the exact same location with different starting times and split the capacities up among the depots based on the loading rate. So for example if you had one depot start at 1:30, one at 2:00, one at 2:30 and so on you could then divide the number of newspapers by the number of depots you create. The trucks would then need to be divided out among the different depots also but it sounds like you have a lot of flexibility in your trucks. Maybe think about how many of each truck type could be filled in that half hour (or whatever time frame you use) and divide the trucks so that for each depot they have the max number of each type of truck if only that one type was decided to be filled during that time. Let me know how you end up solving the problem or if you need any other ideas. Thanks, Heather
... View more
02-23-2017
09:24 AM
|
0
|
1
|
1489
|
|
POST
|
The VRP Solver is a heuristic meaning that it follows a set of steps to produce an answer. It, therefore, can be sensitive to the initial set up of the problem when starting the solver. In your case that seems to be the case and is why when you changed the number of routes that are available the solution is different. For trying to minimize the number of routes used, the best way to do this is to add a high value to the FixedCost. This will indicate to the solver that it should try not to open an additional route because that is more costly then taking an existing route and extending the travel time and distance. You might need to experiment with the FixedCost value to determine what is large enough to get the desired results for number of routes. You mention that you are doing urban waste pickup, I usually associate this with a high density of order locations (several on the same street right next to each other). Is that true for you?
... View more
02-15-2017
04:52 PM
|
1
|
1
|
1023
|
|
POST
|
Hello, This is a periodic routing type problem that can be solved using the Vehicle Routeing Problem solver. Although the VRP solver isn't directly set up for periodic routing the process can be implemented with some work. Here is a link to a similar question on the periodic routing. Take a look at this answer and see if it helps you understand how to model your case. If you have more questions let me know. https://community.esri.com/thread/181601-creating-a-weekly-work-schedule Heather
... View more
11-28-2016
09:18 AM
|
1
|
0
|
935
|
|
POST
|
Hi David, How are you trying to solve this VRP Problem? Using a VRP layer in ArcMap and inputting directly into the network analyst window? Using a script with tables as the input? Model Builder? Can you look at your results and see how much was loaded onto the truck when it picked up trash at 30 sites (If in the VRP layer depot visits should get you this value easily)? Is it under the capacity of the vehicle, 8000 kg? From your description of the problem it sounds like the most number of stops a route should have is 16. This would assume that each stop had the lowest value for pick up of 500 kg. The solver is set up to stop when the vehicle is full if that happens before the max number of stops is reached, so I'd recommend examining the pickup quantities and the capacity to make sure they are what you are actually intending and the first step is to determine what the solver sees as a the amount picked up for the route. Thanks, Heather
... View more
09-28-2016
09:20 AM
|
0
|
0
|
2903
|
|
POST
|
Hi Artur, For the routes that are designated for the last day along with changing the max total time try adding in a OvertimeStartTime that corresponds with the time your day usually ends and make the OvertimeCost double or triple your CostPerUnitTime. This will give a higher penalty for running late on the last day which will make the solver favor not using overtime but will still allow it when necessary. If you are wanting to front load those first three days a bit more then you could increase the CostPerUnitTime a little for the routes on that last day along with the overtime change. Heather Moe
... View more
09-21-2016
07:30 AM
|
0
|
3
|
2447
|
|
POST
|
Hi Artur, Thanks for the information. I'll split my comments into two sections. The first a little about how to set it up outside of model builder and the second a way to separate the problem to help you with the original question of how to work around the model builder issue. I don't have a good reason for model builder to crash with 45 renewal locations for 20 vehicles, it should be able to handle this and so I'll look into it and see if I can reproduce it here. For running outside of model builder, you can create a VRP layer in ArcMap. To do this drag your network data set into the map and then from the network analyst tool bar you can click on the network analyst drop down and select New Vehicle Routing Problem. This will create the VRP layer for you. If the network analyst window doesn't open up for you their is a little button on the tool bar to open it. From here you right click on the different feature classes that you add though the model builder in that list is something called "Load Locations." This opens up a dialog for you to interact with and you can point to the same table that you use for model builder here. Once you have all of the different fields inputs (I'm guessing Orders, Depots, Routes, and Route Renewals) then you can hit the solve button on the network analyst toolbar. Let me know if once things are set up if it still will not handle all 45 renewal locations. Here is a link to the VRP ArcMap tutorial: Exercise 7: Servicing a set of orders with a fleet of vehicles—Help | ArcGIS for Desktop It doesn't have route renewals but it could help you get started. Now on to a Model Builder work around idea... You mention in the original question that you manually assign 7 or 8 renewal locations to the routes but that it doesn't produce good results. Instead of randomly assigning them I would suggestion looking at the renewal locations and trying to assign them in groups. So if you divided your service area up into a 3 x 3 grid and assigned the renewal locations that are within each block to a vehicle. You could then create some areas that overlap between "blocks" and assign those renewal locations to vehicles. If an area has a dense set of order locations assign more vehicles to renewal locations that match the block of town. The VRP solver should do a pretty good job of clustering the orders assigned to a vehicle so that it is in the same rough geographic region so if you cluster the renewal locations to vehicles it should then assign those vehicles to the right grouping of orders to not have a long drive to a renewal. A second thought is that if you are able to load 700 records within model builder that would come out to 35 renewal locations per vehicle (assuming 20 routes). You could then partition the service area again similarly leaving off a few in the periphery and different ones for different vehicles and have more freedom of choice for the solver on renewal locations for each route. Hope that helps some and let me know if you have more questions. Heather
... View more
09-08-2016
03:27 PM
|
0
|
5
|
2447
|
|
POST
|
Interesting problem... I have a few questions for you. What are you doing for the starting depot of the routes? Are they starting at each drivers home location? Or some central spot to pick up the trucks? Have you gotten the problem to work outside of Model Builder? Heather
... View more
08-24-2016
10:44 AM
|
0
|
7
|
2447
|
|
POST
|
Hello, You are right in that the VRP Solver does not currently directly do periodic routing as you describe it of specifying twice a week. There are two options for this. 1. You can solve this problem on a daily bases where you have all of the orders available every day and then change the revenue values to match your needs for that day. So on day one you could use a revenue of 50,000 for the customers that need to be visited twice a week and 30,000 for customers only needing to be visited once a week. After the day's routes are created. The revenue is adjusted to reflect which customers were visited so if a once a week customer was visited the revenue goes to zero and will stay there for the rest of the week. A twice a week customer would go to zero for the next day since they can't be consecutive and then up to 40,000 the following day. This method would take post and pre processing of the orders daily but that could be automated. The revenues might also need to be tweaked to give values that are big enough to make a difference in the model based on other costs. This method will tend to favor the twice a week customers at the beginning of the week because of the higher revenue value. 2. The other option is to model the whole week at once and use specialties to indicate what days the customers can be visited. The customers that are twice a week customers would also have to have two orders, one for each day they are to be visited. One of them would have a specialty of say Mon/Tue and the other a specialty of Thr/Fri. The customers only needing to be visited once a week would not be given a specialty since they can be visited any day of the week. The routes are then duplicated for each day of the week and the week day included in the route name for easy recognition. For routes the specialties indicate which orders they can accommodate so both the Monday routes and the Tuesday Routes would have the specialty Mon/Tue. This method doesn't give the complete flexibility of the twice a week but just not consecutive days requirement but does allow for a lot of flexibility in the solver still and allows for the whole week to be solved at once. The break up of days for the twice a week customers could be specified differently then the example above or changed up for just some of the orders. Hope this helps and let me know if you have more questions. Heather
... View more
08-19-2016
04:04 PM
|
2
|
1
|
1487
|
|
POST
|
One of the assumptions that is made in the VRP Solvers is that a customer's demand can be completely accommodated by a single vehicle. So to be able to send more than one vehicle to a single customer you will need to break up that customer's order into two or more depending on how big the demand is. Say you have a customer quantity of 1000 but your trucks can only carry 800. Make two orders at the same location with one having a quantity of 800 and the other with 200.
... View more
08-11-2016
08:51 AM
|
1
|
0
|
978
|
|
POST
|
This looks like it should work. The only potential issues I can see is if within the same python script you are wanting to adjust several layers like this then it might only give you the list of layers for the first one in which case you would need to use the GetNAClassNames with a dictionary approach. This also assumes that you are working with ArcGIS in English since you have "orders" hardcoded. Neither of these are likely issues for you and so making the code more complicated to handle situations you won't ever be in just isn't necessary. So go with what you have and if you have further questions or run into a situation where it isn't working then right back.
... View more
07-14-2016
08:50 AM
|
1
|
0
|
3700
|
|
POST
|
Hello There are two main options right now for marking something as required. The first one you seem to know about but for completeness I'll explain incase someone else is having the same question. Solve the problem in two steps, the first time mark all of the required stops with an assignment rule of "Override" and all of the optional ones as "Exclude." This will put all of the required routes onto a route if it is at all possible and just ignore the additional ones. For the second step mark all of the required orders with an assignment rule of either "Preserve Route and Relative Sequence" or "Preserve Route" and mark all of the optional orders with an assignment rule of "Override." This tells the solver that the required stops have to stay on the route they are currently on either allowing for re-sequencing or not depending on which assignment rule you choose and then adds in as many optional orders as possible. They can be inserted into the routes that already have required orders. Depending on the location of the required orders this can sometimes give routes that crisscross because of the solver keeping the orders on specific routes. The benefit of this method though is it makes sure all of the required stops are routed The other option is to use the revenue field for the orders. This is a harder story to line out with specifics because it really depends on the other costs that are in your problem. But in general give the required orders a really large revenue and the optional ones a revenue of zero. Run it and see how it does. If it still isn't getting all of the required stops try increasing the revenue and rerunning. This method does a better job with the routing optimization portion as it doesn't lock orders on a sub-optimal route but it does not guarantee that required orders are routed (usually with the right revenues it does pretty well through). The reported costs for the routes are also now artificially changed because of the fake revenue values. Hope this helps, Heather
... View more
07-12-2016
08:07 AM
|
1
|
3
|
3700
|
|
POST
|
Alex, The solver doesn't directly support absolute sequence but there are a few options and work-a-rounds. If you have orders that have to be exactly first on a route you can give them an assignment rule of anchor first. If those orders have to also be on a specific route I would recommend creating artificial specialties for those orders and their corresponding routes so that the only route that would fit the specialty requirement is the one that is desired. If you have say a sequence of three orders that have to be visited first second and third on a specific route then I would follow the steps as above with the third stop being the one that is anchored first and stops one and two are excluded from the solve. Once the solver then has a solution for the routes starting with the end of your required order you can then go back and add in the orders that came before the first one in the route. If you need to worry about time windows you can figure out the start time of the route ahead of time using a route layer for the ones that you already have sequenced at the beginning. If at the end you then need to create a map of those routes with directions you have two options. You can add back in the orders that were excluded and assign them route and sequence values adjusting the sequence values for the orders that come later in that route. Give all the orders an assignment rule of preserve route and sequence and resolve. This will update the routes to show you everything and allow for directions. The other option if there is just a few routes that had added orders to the beginning then you could take those individually into a route layer and solve them preserving the sequence. What is your business case that is requiring stops at the beginning of a route to be in a specific sequence?
... View more
07-06-2016
08:39 AM
|
0
|
0
|
2045
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-31-2023 10:55 AM | |
| 1 | 02-23-2023 07:40 AM | |
| 1 | 04-29-2022 09:39 AM | |
| 1 | 03-02-2022 08:50 AM | |
| 1 | 11-04-2021 11:11 AM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|