Historical Traffic Data Attributes

402
1
01-10-2013 10:36 PM
Highlighted
New Contributor
I am trying to make a road network that uses the location allocation within network analyst.
This network needs to use historical traffic data to determine travel time but optimise on transport cost.

To do this I have a number of attributes, including:
TrafficTime - the travel time based on historical traffic data
FallbackTime - the travel time based on the road speed limit
TimeCost - the time component of transport cost

Time cost is a script evaluator with an hourly rate (~$50) as a parameter (HourlyCost)
I have written the evaluator as:
TimeCost = Edge.AttributeValueByName("TrafficTime")*ParameterValueByName("HouryCost")

I know that the TrafficTime and FallbackTime evaluators are working correctly.
When I run this I get a TrafficTime of 3.3 hours and a FallbackTime of 1.1 hours.

The problem is with the TimeCost evaluator. No matter how I write it, the FallbackTime is always used, not the TrafficTime.
e.g. I always get $55 (1.1*50) instead of $165 (3.3 * 50)

Can someone please tell me what I have done wrong? Why is the FallbackTime always being used? Is there a way around this?
Thanks
Tags (2)
Reply
0 Kudos
1 Reply
Highlighted
Esri Contributor
There isn�??t a way to use a script evaluator to get cost attribute values at a certain time, unfortunately. However, the results of your analysis won�??t change by scaling travel times by a constant value. So could you solve you problem without scaling? For instance, if you don't want people to spend more than $10 on travel costs getting to your facilities, you could convert that to a travel time and put the value as the impedance cutoff, then solve.

If that doesn't work for you, there are two other options: write a custom evaluator or use a scaled-cost polygon barrier. The recommended way is writing a custom evaluator, which is capable of getting what you want, but this may take some time to set up if you�??re not familiar with how to do it.

The other option is to create a scaled cost polygon barrier that covers your network, set the Attr_TravelTime field to your wage value, then solve using TravelTime as the impedance. This would work on a small network but it would take a long time to load and solve on a larger network.

Thanks,
Robert
Reply
0 Kudos