Adding slope directions to an ITN network dataset.

2264
14
05-08-2013 05:09 AM
Liam_
by
New Contributor II
Hi,

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.

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.

I have a moderate amount of experience with ArcMap and some programming experience but I could really use the help of an expert!

Thank you,

Liam.
Tags (2)
0 Kudos
14 Replies
MelindaMorang
Esri Regular Contributor
Hi Liam.  You've got yourself a challenging problem!

Since you have elevation data, you can use the Interpolate Shape tool (http://resources.arcgis.com/en/help/main/10.1/index.html#//00q90000006m000000) to add z-elevation to the roads feature class in your network.  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.  I'm not sure what advice to give you about how to construct your cost attribute.  Consider that each road segment may have some uphill and some downhill parts, some steep parts and some not-so-steep parts.  The average slope of the road feature might be zero even if it contains both a steep uphill part and a steep downhill part.

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.  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.  You might have to manually fix each one.
0 Kudos
Liam_
by
New Contributor II
Hi mmorang,

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:


[/HR]

Example in pseudo code: -

If RoadSpeed = 30 Then
BaseLitresPerMetre = 0.01

[INDENT]
If RoadHasRoundaBout = True Then
BaseLitresPerMetre = BaseLitresPerMetre * 1.2
End If

If RoadHasLightControlledJunction = True Then
BaseLitresPerMetre = BaseLitresPerMetre * 1.4
End If

If RoadHasTrafficCalming = True Then
BaseLitresPerMetre = BaseLitresPerMetre * 0.8
End If

If RoadGoingUphill = True Then
BaseLitresPerMetre = BaseLitresPerMetre * 1.8
End If

If RoadGoingDownHill = True Then
BaseLitresPerMetre = BaseLitresPerMetre * 0.2
End If

[/INDENT]

End If

[Repeated for different road speed limits]

Cost = RoadLength * BaseLitresPerMetre


[/HR]

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.
0 Kudos
MelindaMorang
Esri Regular Contributor
Hi Liam.

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.
See http://resources.arcgis.com/en/help/main/10.1/index.html#/Understanding_network_attributes/004700000....

These cost attributes are calculated using evaluators.  You have many options (including code) for constructing an evaluator.
See http://resources.arcgis.com/en/help/main/10.1/index.html#//00470000000n000000 for more information.

For each attribute in your network, you can give it a different evaluator for the from-to direction and the to-from direction.  In other words, the cost of the same network element can be different if it's being traversed in different directions.  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.
0 Kudos
RobertBorchert
Frequent Contributor III
You could also incorporate some good old Physics here.

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.  You can factor friction and resistance out as it would be the same up or down.

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.  You will then have potential energy at the top to figure in as an energy savings going down the hill.

Hmm you do have variables on engine size, hp etc.

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.
0 Kudos
Liam_
by
New Contributor II
Hi,

Thank you for your replies, both have been a great help!

Re: mmorang
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.

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.

Re: rborchert
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.

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.

Screen Capture of what I described: -



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: -



Does anyone have any ideas of how I could implement that into the routing mechanism within Arc please?

Thanks again,

Liam.
0 Kudos
MelindaMorang
Esri Regular Contributor
Hi Liam.  Unfortunately, the Network Analyst solvers don't have a way of assigning an added cost based on the previous edge traversed.  When the solver calculates the cost on an edge or junction, it doesn't know what the previous edge or junction was.  So you won't be able to do this automatically.

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.

Can you describe more fully what you are trying to do?  What's the goal of this part of your project?  Maybe we can find a better way to do it so we can avoid this problem.
0 Kudos
Liam_
by
New Contributor II
Hi,

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.

Therefore, where there is a change in road type for example motorway -> 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.

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).

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.

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.

Thanks again,

Liam.
0 Kudos
MelindaMorang
Esri Regular Contributor
Actually, I think you can use Global Turns for this.  Global Turns allow you to specify a different delay for turns between roads of different classes.
http://resources.arcgis.com/en/help/main/10.1/index.html#//004700000030000000
0 Kudos
Liam_
by
New Contributor II
Hi,

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?

It would be ideal if I could assign say a 30 second delay at certain junctions and then change them to:-

[LitersOfFuelNeededForRoad] = [LitersOfFuelNeededForRoad] * ( ( [TurnDelaySeconds] / 100 ) + 1 )

For example: -

[100] = [100] * ( ( [30] / 100 ) + 1)
[100] = [100] * ( 0.3 ) + 1
[100] = [100] * 1.3
[100] = [130]

Thanks,

Liam.
0 Kudos