|
POST
|
Page, Thanks for providing more information about your workflow. You can use the VRP solver to determine the costs for both sets of routes (existing and optimized). Each order in the VRP layer has an Assignment Rule property which has the default value of Override. This means the solver will determine which route and at what sequence this order will be placed. However You can change this assignment rule to "Preserver Route and Relative sequence". This will ensure that the VRP solver will not change the sequence and the routes of your orders as long as the sequence does not violate some fundamental constraint. For your case, to get the total cost for existing and optimized routes, Create a VRP layer. Load your depot and create the necessary routes. Make sure to set the Start Depot and End Depot property for each of your routes. Now load all the orders using your sequence field as Sort Field and If all orders belong to a single route, make sure to specify the RouteName property for orders. Since your routes start at a depot, your first order will have a sequence of 2 and so on. If your existing sequence field does not account for this shift in order sequence by 1, Open the attribute table for orders, right-click the Sequence field and use the expression [Sequence] + 1. Next you should set the Assignment rule for your Orders to "Preserve Route and Relative Sequence". This can be done by calculating the Assignment Rule field to value 1. Now if you solve the VRP layer should get the total cost with the specified sequence. To get the optimized routes, make a new copy of the exiting VRP layer (you can Copy/Paste the layer in ArcMap) and just change the AssignmentRule on your orders to Override (value = 3) and solve. Let me know if this works. Deelesh
... View more
08-24-2010
08:27 AM
|
0
|
0
|
1597
|
|
POST
|
Manish, To run VBA code, you don't have to register any dlls with ArcGIS applications. To run this sample, Open ArcMap or ArcCatalog From the Tools Menu, select Macros and then select Visual Basic Editor In the visual basic editor, expand the Project node (on the right) and double-click the "This Document" object within ArcMap Objects folder. Copy/Paste entire VBA code from the sample into the editor window. Make the necessary changes in the "Settings" section within the code. Close the visual Basic Editor From the Tools menu, select Macros and Macros again. In the Macros dialog, You will see CreateTurnFeatureClassFromMultiEdgeTurnTable selected. Click Run to run the VBA code. The code will create a new turn feature class based on the input turn table. Deelesh
... View more
08-23-2010
05:39 PM
|
0
|
0
|
1961
|
|
POST
|
How do you get the Network Analyst to use the sequence you specify in a Vehicle Routing Problem layer? I can get the routes to show up in the Route Analysis layer, but I can't get them to start and finish at a single depot like I can in the VRP. I am curious why you need to load the sequence from the VRP layer into a route layer? In your VRP layer properties, on the Analysis tab, if you specify the output shape type to True Shape or True Shape with Measures, the VRP solver will produce the route shapes that follow the underlying streets. This result is identical to what you will get if you load all the orders and depots from the VRP layer to a Route layer and solve. I need to use a specified route sequence from a regularly relocated depot and need to know which tool to use short of hard-coding the depot's location into the Stops sublayer within the Route Analysis layer. I am not clear what you wish to achieve here. I apologize, but if you can provide me with some more details, I may be able to provide you with a correct answer. Deelesh
... View more
08-23-2010
05:18 PM
|
0
|
0
|
1597
|
|
POST
|
Here are the steps to add the average Z value for each street as an attribute. You will have to unzip the MeanZ.zip file to get the MeanZ.cal field calculator expression file. Add a new field called "AverageZ" of type Double to your line shapefile Right-Click the field and select "Calculate Values" In the Field Calculator dialog, Click the Load button and browse to the MeanZ.cal expression file. This will load the VBA script that does the calculations to determine average Z. Click OK to run the script. The script is getting the Z values from each vertex that make up a line and then calculating the average z value. The script's VBA code Dim meanZ as Double
Dim totalZ as Double
Dim pointCount as Double
Dim pLine as IPointCollection
Dim pPoint as IPoint
Dim i as Integer
Set pLine = [Shape]
pointCount = pLine.PointCount
For i = 0 to pointCount -1
set pPoint = pLine.Point(i)
totalZ = totalZ + pPoint.Z
Next
meanZ = totalZ / pointCount
For others that might come across this thread, Field Calculator at ArcGIS 10 no longer supports the ability to run VBA scripts. So this same workflow can be achieved by writing a python script or by using the Add Z information geoprocessing tool available with 3D Analyst Extension. Deelesh
... View more
08-20-2010
09:28 AM
|
0
|
0
|
920
|
|
POST
|
ArcGIS 10 does not include any geoprocessing tool to create the network dataset. So this workflow can not be automated in Model Builder or python scripts. Deelesh
... View more
08-19-2010
08:44 PM
|
0
|
0
|
1591
|
|
POST
|
Page, I could not get the Routes shape from the Network to output Are you trying to output the individual streets that make up a route? Or you just want to export the entire route to a different feature class? If you trying to export the the routes to a different feature class, see the attached model. This runs fine on my machine. Can you post a screenshot of your model? Deelesh
... View more
08-19-2010
05:44 PM
|
0
|
0
|
1597
|
|
POST
|
Turn Table to Turn Feature Class tool is meant to convert ArcView 3.x or ArcInfo Workstation Turn table. So the tool expects the input to be in that format. To convert turn data from vendors such as TeleAtlas, try this VBA sample. You will have to change the names in the "Settings" section in the code.I was able to successfully run this sample on my test data with ArcGIS 10 and It also works in 9.3/9.3.1 As VBA will not be supported with ArcGIS after 10.0 release, we will make this sample available as a python script tool in near future. Hope this helps Deelesh
... View more
08-19-2010
05:29 PM
|
1
|
2
|
1961
|
|
POST
|
In order to add the appropriate z value as impedance, you will have to first transfer the Z value from the shape field to a regular field (most likely of type double) in your streets shapefile. Then in your network dataset, you can create a network cost attribute based on this field. There are multiple ways to transfer the Z value from shape field to an attribute. Before suggesting them, I would want to know What ArcGIS version you are using? Do you also have a license for 3D Analyst Extension? Does your lines have the same Z value for all vertices that make up a line? If not, then do you want to store mean Z, or max Z or min Z for each line? Deelesh
... View more
08-18-2010
04:28 PM
|
0
|
0
|
921
|
|
POST
|
1. I have a sheet that documents the order that stations are currently visited by the collectors. How do I assign a specific sequence to a route? The sequence is stored as a field in the point file. When you load your stations as stops in route analysis layer, make sure that you use the Sort Field as the field containing the sequence from your point file. This will ensure that the stations are loaded in the sequence that you have specified from your field. You should also make sure that the route analysis layer is NOT set to reorder stops. 2. How can I use modelbuilder to automatically output statistics (like overall travel times per route) to a table? In Model builder once you solve the route layer using the Solve Tool, make sure to use the Select Data tool to get the Routes sub-layer from the route analysis layer. The output of select data tool is a feature layer so it can be used with any other geoprocessing tools that take feature layers as input such as Summary Statistics tool that you may want to use. Hope this helps Deelesh
... View more
08-17-2010
09:02 AM
|
0
|
0
|
1597
|
|
POST
|
Will I need Network Analyst Extension to build a route finder to get this to work? The Find Route dialog in ArcReader can work with a online routing service or a network dataset that can be accessed locally or from a shared network drive. If you don't have a network dataset (or a route finder as you called it) for your study area, then you will need the network analyst extension to build a network dataset. Once you have a network dataset, in the Find Route dialog, specify this network dataset in the Options tab for the Routing service parameter. Then you can use the Find Route dialog without requiring a Network Analyst Extension or an internet connection. The Streetmap DVD within the ESRI Data and Maps DVD set comes with a free pre-built network dataset for US and Canada. This network dataset can be used with Find Route dialog in ArcReader without requiring a network analyst extension. Note that this is free data and it is derived from the Tele Atlas 2005 dataset. so it may not reflect recent updates to the streets. Hope this helps Deelesh
... View more
07-21-2010
08:48 AM
|
0
|
0
|
378
|
|
POST
|
Juan, Disregard my earlier post. I realized that you don't really have to use a cost attribute to store slope values and I also got the expression for restriction attribute reversed (true expression evaluates to Restricted and not traversable as I had initially thought :))... Here are the updated steps... Your requirement can be modeled by using a descriptor network attribute to store the directional slope values for streets and using a parameterized restriction attribute. In a network dataset each edge can have two values for descriptor attribute, one in the digitized direction (or From To) and another against the digitized direction (or To From). So to create the necessary restriction attribute use these steps 1. Create two fields called FromToSlope and ToFromSlope in your streets shapefile. 2. Calculate the necessary slope values for each feature. In your case since the slope is applicable in uphill direction you can assign a constant value of 0 for the downhill direction. It might help you adjust your streets such that they are all digitized in uphill to downhill direction or vice versa. That way you can easily calculate the slope values in FromToSlope and ToFromSlope. 3. Once the field calculation is done, add a new descriptor attribute called "Slope" in your network dataset. 4. Assign a field evaluator to Slope attribute and use the FromToSlope and to ToFromSlope for the evaluator value. 5. Next, create a Restriction attribute called "SlopeRestriction". 6. Create a parameter for this attribute called "MaxUpHillSlope". This is the parameter that you will provide based on vehicle type. 7. Use a function evaluator for SlopeRestriction attribute. 8. For the evaluator expression, set Slope >= MaxUpHillSlope 9. Build your network dataset. 10. Now when you perform the service area analysis, make sure you use the SlopeRestriction attribute and you should also specify the MaxUpHillSlope parameter value based on the vehicle for which you are calculating the service area. Hope this helps Deelesh
... View more
07-11-2010
12:10 PM
|
0
|
0
|
1403
|
|
POST
|
Nils, Once the script completes(with the error) I can use ArcCatalog to delete the gdb with no problem. The fact that you can delete the file gdb using ArcCatalog on script completion suggests that the locks are still present when you try to delete the file gdb in script. Apart from cursors there are certain operations that can also create locks. One such case that I had come across was when using the "make feature layer" tool. If the tool is used to create a feature layer from a file gdb feature class, it creates a lock on the file gdb ( you can verify this by running the script that calls make feature layer in a debugger and look at the files that make up the file gdb. There will be few *.lock files present. Note that they will go away once the script completes). If this is the case, you should first call the Delete tool on the feature layer created using the make feature layer tool and then you should call delete tool to delete the file gdb. Hope this helps Deelesh
... View more
07-08-2010
09:38 PM
|
1
|
1
|
2242
|
|
POST
|
Juan, Your requirement can be modeled by using a network cost attribute to store the directional slope values for streets and using a parameterized restriction attribute. In a network dataset each edge can have two cost values, one in the digitized direction (or From To) and another against the digitized direction (or To From). So to create the necessary restriction attribute use these steps Create two fields called FromToSlope and ToFromSlope in your streets shapefile. Calculate the necessary slope values for each feature. In your case since the slope is applicable in uphill direction you can assign a constant value of 0 for the downhill direction. It might help you adjust your streets such that they are all digitized in uphill to downhill direction or vice versa. That way you can easily calculate the slope values in FromToSlope and ToFromSlope. Once the field calculation is done, add a new cost attribute called "Slope" in your network dataset. Assign a field evaluator to Slope attribute and use the FromToSlope and to ToFromSlope for the evaluator value. Next, create a Restriction attribute called "SlopeRestriction". Create a parameter for this attribute called "MaxUpHillSlope". This is the parameter that you will provide based on vehicle type. Use a function evaluator for SlopeRestriction attribute. For the evaluator expression, set Slope <= MaxUpHillSlope Build your network dataset. Now when you perform the service area analysis, make sure you use the SlopeRestriction attribute and you should also specify the MaxUpHillSlope parameter value based on the vehicle for which you are calculating the service area. Hope this helps Deelesh
... View more
07-08-2010
09:06 PM
|
0
|
0
|
1403
|
|
POST
|
Clancy, In addition to the tools described in the white paper that Ray mentioned, you can try these free tools. They can be useful in some applications related to school bust routing. Determine Optimum Allocation Tool: This tool will help you to allocate students to schools considering school capacity. While the Closest Facility solver in network analyst assigns students to the closest schools, it does not consider school capacity. This tool does consider school capacity and can be used for redistricting applications Partitioning Tools: These set of tools can be used in locating bus stops. For example, if you have student locations with total number of students at each location, then the tools can be used to create groups such that particular capacity is not exceeded. This is useful to figure out the number of bus stops needed for a certain number of students. Hope this helps Deelesh Mandloi
... View more
07-08-2010
08:08 PM
|
0
|
0
|
651
|
|
POST
|
Tom, If you don't want to expose the output parameters to the end users of your model, then you should make them as derived parameters. Derived parameters don't show up in the tool dialog when the model is run as a model tool and are also added to the TOC after the model is run. However in model builder, it is not easy to convert an output parameter into a derived parameter. For example in your model, you are using the Copy tool which by definition has an output parameter. So in Model Builder if you make this as a Model Parameter, it becomes an output. In order to make this as derived output, you need to use a python script tool where by you have more control over what you can expose as a parameter and what are the properties of that parameter (such as derived, default values). Hope this helps Deelesh
... View more
07-01-2010
10:01 AM
|
0
|
0
|
2840
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-08-2010 09:38 PM | |
| 1 | 05-16-2019 02:16 PM | |
| 1 | 12-13-2018 11:54 AM | |
| 1 | 12-18-2018 02:58 PM | |
| 1 | 08-12-2019 10:49 AM |
| Online Status |
Offline
|
| Date Last Visited |
02-27-2023
07:05 AM
|