Hey All

I'm using ArcMap 10.2.2. I am working on a routing project, it requires me to produce a network that is based on vehicle statistics. One of the desired functionality that is required is for this route to be within x% of the fastest and/or shortest route between the same points. I have developed a model that will create routes based on the shortest, fastest and one based on the statistics with no distance/time restrictions.

What I want to be able to do is pass the Total_Length (from shortest) and/or the Total_Time (from quickest) plus x% into the network based on vehicle statistics as a restriction. How do i go about doing this in Model Builder? I have tried playing around with variables but have had any luck.

Any help is appreciated.

Cheers in advance

Hamish

Hello Hamish. So, you essentially want to constrain your route to fail (or something) if it exceeds cost + x% of the shortest route (in time or distance). Unfortunately, I don't think there's a way you can set up a restriction attribute to do this. Restriction attributes (and, in fact, all network attributes) have values specific to network edges. They don't know about the Route as a whole while you're solving it. When you click Solve, the network edges are searched to find the shortest path. Each time a new network edge is reached, the cost attribute's evaluator returns a value indicating the cost of traversing that edge. The restriction attribute kicks in just before that, to indicate whether traversal is prohibited across that edge or whether the result should be scaled by some factor. Neither the restrictions nor the cost attributes have any other information about the network edges already queried or traversed, though, so you couldn't create a restriction that kicks in after your total travel time for that Route has reached a certain value.

I think your best bet is to do some clever post-processing. You'll have to check the results of your third Route (the one based on the statistics) and compare the value with the values obtained in your previous length-based and time-based solves, and then mark the ones that are outside your acceptable range.

If you describe your end goal a bit more thoroughly, I'm happy to help you continue brainstorming.