<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Adding slope directions to an ITN network dataset. in ArcGIS Network Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48417#M465</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am currently attempting to test the feasibility of a navigation solution that can calculate the best route to a destination based on fuel economy variables. It is my intention to calculate an impedance value based on said variables. One of the variables I have selected is slope as a vehicle travelling uphill will use more fuel then one travelling downhill.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have downloaded and imported into ArcMap 10.1 the Ordnance Survey ITN. However, I cannot seem to work out a way of getting slope direction from a raster underneath the roads and storing it in such a way that can be used for an impedance calculation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a moderate amount of experience with ArcMap and some programming experience but I could really use the help of an expert! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Liam.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 May 2013 12:09:57 GMT</pubDate>
    <dc:creator>Liam_</dc:creator>
    <dc:date>2013-05-08T12:09:57Z</dc:date>
    <item>
      <title>Adding slope directions to an ITN network dataset.</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48417#M465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am currently attempting to test the feasibility of a navigation solution that can calculate the best route to a destination based on fuel economy variables. It is my intention to calculate an impedance value based on said variables. One of the variables I have selected is slope as a vehicle travelling uphill will use more fuel then one travelling downhill.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have downloaded and imported into ArcMap 10.1 the Ordnance Survey ITN. However, I cannot seem to work out a way of getting slope direction from a raster underneath the roads and storing it in such a way that can be used for an impedance calculation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a moderate amount of experience with ArcMap and some programming experience but I could really use the help of an expert! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Liam.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2013 12:09:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48417#M465</guid>
      <dc:creator>Liam_</dc:creator>
      <dc:date>2013-05-08T12:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Adding slope directions to an ITN network dataset.</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48418#M466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Liam.&amp;nbsp; You've got yourself a challenging problem!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since you have elevation data, you can use the Interpolate Shape tool (&lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00q90000006m000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//00q90000006m000000&lt;/A&gt;&lt;SPAN&gt;) to add z-elevation to the roads feature class in your network.&amp;nbsp; You could then calculate an average or maximum slope for each line feature and use this, as well as the 3D length, to calculate a new new cost attribute in your network dataset.&amp;nbsp; I'm not sure what advice to give you about how to construct your cost attribute.&amp;nbsp; Consider that each road segment may have some uphill and some downhill parts, some steep parts and some not-so-steep parts.&amp;nbsp; The average slope of the road feature might be zero even if it contains both a steep uphill part and a steep downhill part. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Additionally, please note that you will likely encounter problems anywhere in your road network where you have bridges or tunnels, since your elevation data probably only accounts for the elevation at ground level.&amp;nbsp; If your data already had Z-levels for handling bridges and tunnels, you might be able to find a way to fudge the connectivity to make these work.&amp;nbsp; You might have to manually fix each one.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 16:13:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48418#M466</guid>
      <dc:creator>MelindaMorang</dc:creator>
      <dc:date>2013-05-09T16:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Adding slope directions to an ITN network dataset.</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48419#M467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi mmorang,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for getting back to me, I will do as you suggested to extract the slope information I need. Here is my cost equation at present: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;HR /&gt;[/HR]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Example in pseudo code: -&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If RoadSpeed = 30 Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BaseLitresPerMetre = 0.01 &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If RoadHasRoundaBout = True Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BaseLitresPerMetre = BaseLitresPerMetre * 1.2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If RoadHasLightControlledJunction = True Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BaseLitresPerMetre = BaseLitresPerMetre * 1.4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If RoadHasTrafficCalming = True Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BaseLitresPerMetre = BaseLitresPerMetre * 0.8&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If RoadGoingUphill = True Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BaseLitresPerMetre = BaseLitresPerMetre * 1.8&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If RoadGoingDownHill = True Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BaseLitresPerMetre = BaseLitresPerMetre * 0.2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[Repeated for different road speed limits]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cost = RoadLength * BaseLitresPerMetre&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;HR /&gt;[/HR]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The trouble I have is getting the route planner to determine if the road is [RoadGoingDownHill = True] or [RoadGoingUpHill = True]. I'm also not sure of where in the Network Analyst Extension I can place the code above.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 11:22:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48419#M467</guid>
      <dc:creator>Liam_</dc:creator>
      <dc:date>2013-05-10T11:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Adding slope directions to an ITN network dataset.</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48420#M468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Liam.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When setting up your network dataset, you will need to set up some cost (impedance) attributes that determine how the network calculates the cost of each edge in the network when solving routes or other analyses.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;See &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Understanding_network_attributes/00470000000m000000/"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#/Understanding_network_attributes/00470000000m000000/&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These cost attributes are calculated using evaluators.&amp;nbsp; You have many options (including code) for constructing an evaluator.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;See &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00470000000n000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//00470000000n000000&lt;/A&gt;&lt;SPAN&gt; for more information.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For each attribute in your network, you can give it a different evaluator for the from-to direction and the to-from direction.&amp;nbsp; In other words, the cost of the same network element can be different if it's being traversed in different directions.&amp;nbsp; You will need to know the direction of digitization of your road to make sure you know which direction is which, but it should be easy enough for you to give each road a different cost if it's going uphill or downhill.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 14:33:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48420#M468</guid>
      <dc:creator>MelindaMorang</dc:creator>
      <dc:date>2013-05-10T14:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Adding slope directions to an ITN network dataset.</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48421#M469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You could also incorporate some good old Physics here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately I am a number of years out of college but there are basic formulas for calculating how much engergy it takes to go a certain height on an incline.&amp;nbsp; You can factor friction and resistance out as it would be the same up or down.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So if you have the slope your should be able to determine roughly how much energy is needed to get a given mass up a 3% slope to 100 feet.&amp;nbsp; You will then have potential energy at the top to figure in as an energy savings going down the hill.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hmm you do have variables on engine size, hp etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please keep you findings posted here this sounds interesting and when you do knock it out of the park you will have a great basis for a paper for the user conference.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 18:26:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48421#M469</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2013-05-10T18:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Adding slope directions to an ITN network dataset.</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48422#M470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your replies, both have been a great help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Re: mmorang&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;It worked exactly as you explained, the OS ITN network is shipped with fields called Node1 and Node2 - it turned out that the Node1 field is the 'From' node and Node2 is the 'To' node.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I then calculated the slopes for each 'FromTo' and 'ToFrom' situation and calculated and added the appropriate cost modifier to each slope scenario. So a 10% slope "= [TheFuelCostofTheRoad] * 1.20" - representing a 20% increase in fuel costs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Re: rborchert&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the idea using the laws of physics, as it has been many years since I studied physics I have calculated the extra costs of travelling up hills from literature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found in a paper that an average light duty vehicle travelling up a slope (x) consumed (y) L/Km. There was data from different slope percentages which allowed me to use a polynomial curve to model the cost increase profile. I was then able to use the said profile to estimate the added costs for an average light duty vehicle travelling up various slopes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Screen Capture of what I described: -&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;IMG src="https://lh4.googleusercontent.com/-vrCA4KRLDUU/UbCg66fUC2I/AAAAAAAAAnw/LtRjm9JOf_4/s800/Capture.JPG" /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I am trying to do now is implement a cost matrix according to which road I have come from to what type of road I would like to join: -&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;IMG src="https://lh5.googleusercontent.com/-hLzFLBDG_uA/UbCh7PAMqYI/AAAAAAAAAoA/KKIcT3SkUu8/s800/Capture.JPG" /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have any ideas of how I could implement that into the routing mechanism within Arc please?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Liam.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 13:52:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48422#M470</guid>
      <dc:creator>Liam_</dc:creator>
      <dc:date>2013-06-06T13:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Adding slope directions to an ITN network dataset.</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48423#M471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Liam.&amp;nbsp; Unfortunately, the Network Analyst solvers don't have a way of assigning an added cost based on the previous edge traversed.&amp;nbsp; When the solver calculates the cost on an edge or junction, it doesn't know what the previous edge or junction was.&amp;nbsp; So you won't be able to do this automatically.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could potentially use a turn feature class to add your costs, but you would have to set up the turns manually for each intersection where you want the added cost.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you describe more fully what you are trying to do?&amp;nbsp; What's the goal of this part of your project?&amp;nbsp; Maybe we can find a better way to do it so we can avoid this problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 14:43:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48423#M471</guid>
      <dc:creator>MelindaMorang</dc:creator>
      <dc:date>2013-06-06T14:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding slope directions to an ITN network dataset.</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48424#M472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again for your reply, I am trying to make a work around for the fact that I cannot find any traffic light data for the south east of England. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Therefore, where there is a change in road type for example motorway -&amp;gt; minor road; it could be assumed that there would be traffic lights or a similar restriction which would add to the overall cost of the route as it is traversed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I might have to do is just add to the cost of the roads where there is roundabouts and leave out traffic lights (and similar road features).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did have a look at the turn feature class tutorial earlier, but I discounted it as I have every road in the south east of England to model and to calculate the cost of each turn for over a million junctions would be just too greater task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If there was just a way to include some form of global variable that I could write to, then I could check the value in the field evaluator as each road is calculated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Liam.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 15:05:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48424#M472</guid>
      <dc:creator>Liam_</dc:creator>
      <dc:date>2013-06-06T15:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Adding slope directions to an ITN network dataset.</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48425#M473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Actually, I think you can use Global Turns for this.&amp;nbsp; Global Turns allow you to specify a different delay for turns between roads of different classes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//004700000030000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//004700000030000000&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 16:04:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48425#M473</guid>
      <dc:creator>MelindaMorang</dc:creator>
      <dc:date>2013-06-06T16:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Adding slope directions to an ITN network dataset.</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48426#M474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the tip. I've just taken a look at the documentation and although it will add time, my impedance cost values aren't time based. Would there be a way of converting the time added into a percentage increase?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It would be ideal if I could assign say a 30 second delay at certain junctions and then change them to:- &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[LitersOfFuelNeededForRoad] = [LitersOfFuelNeededForRoad] * ( ( [TurnDelaySeconds] / 100 ) + 1 )&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example: -&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[100] = [100] * ( ( [30] / 100 ) + 1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[100] = [100] * ( 0.3 ) + 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[100] = [100] * 1.3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[100] = [130]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Liam.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 17:29:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48426#M474</guid>
      <dc:creator>Liam_</dc:creator>
      <dc:date>2013-06-06T17:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Adding slope directions to an ITN network dataset.</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48427#M475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay, I think I've got it figured out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You want to create your own global turn script evaluator that will add a certain number of liters of fuel needed for each type of transition between road types (turn).&amp;nbsp; So, the fuel usage on the edges will stay the same as you have them now, but each transition between edges can add some value, based on the way you want to calculate it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First, when you create your network dataset, make sure you click the button that tells it you want to model global turns.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Next, set up the global turn evaluator, as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- In the network dataset properties window, go to the Attributes tab.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- For your fuel usage attribute, click Evaluators.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- After the evaluators window pops up, go to the Default Values tab.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- In the Type column next to Turn, click to get a drop-down menu where you can select "Script".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Click the Evaluator Properties button on the right (looks like a finger pointing at a piece of paper).&amp;nbsp; A dialog will appear where you can write a simple Python or VBScript that says how the solvers should calculate the fuel usage for turns in your network.&amp;nbsp; You should be able to use some if statements to give it a different value based on the road types of the fromEdge and toEdge.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 18:20:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48427#M475</guid>
      <dc:creator>MelindaMorang</dc:creator>
      <dc:date>2013-06-06T18:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Adding slope directions to an ITN network dataset.</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48428#M476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you again for all your help, here is the code I have used in the script evaluator: -&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;* SpeedCostTotalRoad is the total cost to transverse the road in litres and is calculated from literature values for average vehicles&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* Economy is the name of my route network's cost evaluator.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
dim result

If fromEdge.OID.Roadlinks.RoadDesc = "Minor Road" and toEdge.OID.Roadlinks.Nature = "Roundabout" then
result = "Economy" + ( fromEdge.OID.Roadlinks.SpeedCostTotalRoad * 0.20 )

ElseIf fromEdge.OID.Roadlinks.RoadDesc = "Local Street" and toEdge.OID.Roadlinks.Nature = "Roundabout" then
result = "Economy" + ( fromEdge.OID.Roadlinks.SpeedCostTotalRoad * 0.20 )


ElseIf fromEdge.OID.Roadlinks.RoadDesc = "B Road" and toEdge.OID.Roadlinks.Nature = "Roundabout" then
result = "Economy" + ( fromEdge.OID.Roadlinks.SpeedCostTotalRoad * 0.20 )


ElseIf fromEdge.OID.Roadlinks.RoadDesc = "A Road" and toEdge.OID.Roadlinks.Nature = "Roundabout" then
result = "Economy" + ( fromEdge.OID.Roadlinks.SpeedCostTotalRoad * 0.20 )


ElseIf fromEdge.OID.Roadlinks.RoadDesc = "Motorway" and toEdge.OID.Roadlinks.Nature = "Roundabout" then
result = "Economy" + ( fromEdge.OID.Roadlinks.SpeedCostTotalRoad * 0.20 )


ElseIf fromEdge.OID.Roadlinks.RoadDesc = "A Road" and toEdge.OID.Roadlinks.RoadDesc = "Minor Road" then
result = "Economy" + ( fromEdge.OID.Roadlinks.SpeedCostTotalRoad * 0.50 )


ElseIf fromEdge.OID.Roadlinks.RoadDesc = "A Road" and toEdge.OID.Roadlinks.RoadDesc = "Local Street" then
result = "Economy" + ( fromEdge.OID.Roadlinks.SpeedCostTotalRoad * 0.50 )


ElseIf fromEdge.OID.Roadlinks.RoadDesc = "A Road" and toEdge.OID.Roadlinks.RoadDesc = "B Road" then
result = "Economy" + ( fromEdge.OID.Roadlinks.SpeedCostTotalRoad * 0.50 )


ElseIf fromEdge.OID.Roadlinks.RoadDesc = "Motorway" and toEdge.OID.Roadlinks.RoadDesc = "Minor Road" then
result = "Economy" + ( fromEdge.OID.Roadlinks.SpeedCostTotalRoad * 0.50 )


ElseIf fromEdge.OID.Roadlinks.RoadDesc = "Motorway" and toEdge.OID.Roadlinks.RoadDesc = "Local Street" then
result = "Economy" + ( fromEdge.OID.Roadlinks.SpeedCostTotalRoad * 0.50 )


ElseIf fromEdge.OID.Roadlinks.RoadDesc = "Motorway" and toEdge.OID.Roadlinks.RoadDesc = "B Road" then
result = "Economy" + ( fromEdge.OID.Roadlinks.SpeedCostTotalRoad * 0.50 )


ElseIf fromEdge.OID.Roadlinks.RoadDesc = "Motorway" and toEdge.OID.Roadlinks.RoadDesc = "A Road" then
result = "Economy" + ( fromEdge.OID.Roadlinks.SpeedCostTotalRoad * 0.50 )
END IF
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have rebuilt the network, but it's not quite working as it should &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get the errors:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error: The evaluator failed to return a value. [Attribute: Economy, Default Turns, OID = -1, EID = -1]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error: Network element evaluator error. [Script Control Error -2147352319]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have looked online, but I cannot find any guides on the use of the fromEdge.OID. variable. Have I missed something out?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Liam.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:52:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48428#M476</guid>
      <dc:creator>Liam_</dc:creator>
      <dc:date>2021-12-10T21:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Adding slope directions to an ITN network dataset.</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48429#M477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Liam.&amp;nbsp; I'm afraid I was incorrect in my earlier post.&amp;nbsp; You can't actually use the default turn script evaluator effectively unless you have actual turn features drawn into your network.&amp;nbsp; If you are going to use this method, you will have to manually create all the turn features.&amp;nbsp; As you mentioned before, this would undoubtedly be quite laborious.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As for why your code isn't working, it's a syntax problem.&amp;nbsp; In your if statements, you would need to use something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fromEdge.AttributeValueByName( "RoadClass" )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, you won't be able to just call "Economy" by itself.&amp;nbsp; That value is meaningless unless associated with a particular edge element.&amp;nbsp; As I mentioned before, you can't update the cost of the edge element itself based on the next edge in the route because the route doesn't know what the next edge is going to be.&amp;nbsp; The reason I suggested the turns is that turns are the only cost-associated element that has information about the edge elements it's connected to.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, unfortunately, this doesn't leave you with a lot of good options.&amp;nbsp; If you know ArcObjects, you could build your own custom evaluator, but this is not an easy process.&amp;nbsp; And, again, you can't use a custom evaluator to determine the cost of an edge based on the next edge in the route because the solver itself does not know what the next edge is going to be.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm really sorry I don't have a better answer for you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 21:01:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48429#M477</guid>
      <dc:creator>MelindaMorang</dc:creator>
      <dc:date>2013-06-06T21:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: Adding slope directions to an ITN network dataset.</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48430#M478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ack, sorry, I did some more experiments, and I now see that, in fact, you CAN do what I was suggesting.&amp;nbsp; You don't have to have a turn feature class with every turn digitized in to use a custom script evaluator for global turns.&amp;nbsp; It WILL work the way I originally suggested.&amp;nbsp; I think if you just fix your syntax, you should be good to go.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the mean time, I'll see what I can do about us getting some better documentation for this subject.&amp;nbsp; If I work here and can't figure it out, we clearly didn't do a very good job.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jun 2013 19:12:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48430#M478</guid>
      <dc:creator>MelindaMorang</dc:creator>
      <dc:date>2013-06-07T19:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Adding slope directions to an ITN network dataset.</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48431#M479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you again for your reply. As my project deadline is approaching fast, I have had to abandon my junction cost matrix and instead I have just added a +20% cost to routes that transverse a roundabout. At this stage, the project outcome is just a measure of the feasibility of using economy routing in vehicle satellite navigation systems (although I could list many other applications!).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This would not have been an issue if there was freely available point data for the locations of traffic controlled signals for the United Kingdom. Having said that, should I have some time at the end of my project, I shall return to the problem and attempt to refine the analysis following your latest advice.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you again for all your help, I will post my solution here should I get it working for the benefits of others attempting similar tasks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Liam.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jun 2013 20:47:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-slope-directions-to-an-itn-network-dataset/m-p/48431#M479</guid>
      <dc:creator>Liam_</dc:creator>
      <dc:date>2013-06-07T20:47:25Z</dc:date>
    </item>
  </channel>
</rss>

