I have an Inter-modal layer with the following attributes (see attached file). The blue highlighted selected segments are the rail segments and the rest are highway elements. The railways have a priority I assigned as 1 and the highways as 2.
I am creating a route from one location to another for transportation of freight using the inter-modal system. I want it to use a railway whenever possible and highway whenever a railway is not an option while minimizing the travel distance. Ideally, Rail-Highway-Rail transportation is what I want to see. When I run the analysis without hierarchy as a parameter in the evaluator while leaving length as default value (shape_length), this is the output I get for a sample route (Point a to point b in the attached file ) HighwayRail-Highway-Rail-Highway. (This is not good as I will need to load and unload shipments too many times).
Moreover, if you zoom in, the route takes railway (red) and then goes to highway (dark blue) and then railway (red) when it should have continued on rail (highlighted in light blue as selected by attribute in the attached file). And when I run the analysis, if I set the hierarchy as a default parameter in the evaluator while leaving length as a constant (0), this is the output I get for a sample route (Point a to point b - see attached file) Highway-RailHighway. This is something that I want to see (Highway-RailHighway), but with optimal distance. The output length is too long here. There is a faster route while using railway, but the analysis is not recognizing it.
How can I then do an analysis so that I can have an optimum (minimal) route generated while maintaining hierarchy to get an output (Highway-Rail-Highway) without changing modes too frequently ? Given that it is freight transport, this is not a viable approach.
Could you kindly please advise me oh how I may be able to solve this problem?
Thank you very much in advance.
The concept of hierarchy is for solving very long paths quickly. It is not designed for inter-modal travel. The shortest path solver will minimize cost. So it may be that the roads are "cheaper" to travel on and that is why it switches to road. Or it can be that the connectivity on the rail network is not good. What if you place a barrier on the dark blue road, will it take the light blur rail segment? Also, I would not use shape length to solve. You have a speed attribute, so at a minimum, you can add a travel-time field and calculate it to minutes based on the length and speed.
Ultimately, if you are building a network for inter-modal routing then you should think about what causes the shipments to take rail? It is the "cost". You cannot use length to minimize the path and expect sensible results. You should add a cost attribute to your line feature classes. Set up a dollar cost on the lines. It should be cheaper for the rail lines. Then you need to set up a cost to account for the loading/unloading on to the rail lines. These can be junction costs where you transition from road to rail and back or you could have another set of lines to connect the two modes. You can take a look at the Paris network in the NA tutorial datasets. It is set up with two modes and connectivity groups to separate the road and metro and lines/junctions to connect the two groups. Take a look at how the pedestrian cost is defined for combining the two groups. Besides the cost attribute, you can still have a projected length and/or travel time on the lines as additional cost attributes. Then you can solve on cost and accumulate and report length. I would not add hierarchy to this network. If it is there, I would turn it off.