Hi,

Is it possible to set a limit on the length of a route?

I have built a model using closest facility, which taking into account slope, availablity of cycle/bus lanes etc...as costs determines the optimal route for a journey by bicycle. However, I would like to set a parameter which states journeys must be within 20% of the shortest path.

Anyone have any ideas as to how this could be done?

Regards

John

Is it possible to set a limit on the length of a route?

I have built a model using closest facility, which taking into account slope, availablity of cycle/bus lanes etc...as costs determines the optimal route for a journey by bicycle. However, I would like to set a parameter which states journeys must be within 20% of the shortest path.

Anyone have any ideas as to how this could be done?

Regards

John

Hello, John!

I just had a long discussion with one of the algorithm developers about your forum post, and he told me that the problem you are proposing is an NP-hard problem, which pretty much means that you can't guarantee an optimal answer will be found in a reasonable amount of time. The problem type is called a "Resource constrained shortest path problem".

Correct me if I'm wrong, but the ultimate goal is, "Give me a bicycle path that doesn't take me too far out of the way." The constraint of 20% is an arbitrary one, set to avoid the �??too far�?� part of the problem description. If that is the case, then there is a pretty good option that I can think of. That is to use enhanced restrictions, which are a feature in 10.1. See the Restrictions entry in the help doc.

With this restriction type, you can set certain network elements as Prefer or Avoid. This will skew your route to do things like preferring streets based on slope values or availability of bicycle lanes. What it won�??t do is guarantee that you will take a route within x% of the optimal shortest path.