Searching for a route with Freight Railways may fail

Searching for a route with Freight Railways may fail

ozawa_shinya
Advocate Advocate
64 Views
5 Replies
Message 1 of 6

Searching for a route with Freight Railways may fail

ozawa_shinya
Advocate
Advocate

[ FlexSim 23.0.11 ]

Hi,

Searching for a route with Freight Railways may fail as below.

1700033099219.png

The Freight Railway route search between two points on the left is working, but on the right I have the same settings, but it's not working.

Is there a way to check if the search failed? What else can you think of?

Thanks in advance.

0 Likes
Accepted solutions (1)
65 Views
5 Replies
Replies (5)
Message 2 of 6

jonah_kendellR47TC
Autodesk
Autodesk
Accepted solution

Currently the GIS Navigator does not notify the user if a route search failed, but I will submit this issue to the dev team. In the meantime, there is a way you can check if a route search was successful, though it is a bit tedious:

If the GIS Navigator successfully generates a route, it will create one or multiple subnodes in the webResponses variable (i.e. a new web Response node means a new route was successfully generated). You can check if the number of webResponses has changed with this script:

treenode UpdateCount = model().subnodes.assert("UpdateCount", 0);
int numUpdates = UpdateCount.value;
treenode webResponses = getvarnode(Model.find("GISNavigator"), "webResponses");
int responses = webResponses.subnodes.length;

if (numUpdates == responses){
return "Up To Date";
} else {
UpdateCount.value = responses;
return "UPDATED";
}


By alternating between selecting "Update" and "Run Script", you can check if your proposed map points yielded any successful routes. It will return "Up To Date" if there are no new web responses (i.e. no route was found) and will return "UPDATED" if there has been a new web response since the last time you ran the script.

1700678011230.png

I know this solution isn't very straightforward, but hopefully it helps you get closer to your goal. And again, I will submit this issue to the development team so hopefully we can make a cleaner solution in the future.

0 Likes
Message 3 of 6

ozawa_shinya
Advocate
Advocate

Thank you. Now I know how to check if the route search was successful. However, in certain regions (e.g. Japan), route searche fails no matter how many times I update it. In other regions (e.g. China) the route search is successful. Does this suggest that Japanese freight railways may not be registered on the routing server?

0 Likes
Message 4 of 6

philboboADSK
Autodesk
Autodesk

There seem to be Japanese freight railways registered on the routing server:

1701097587870.png

japan_freight.fsm

It seems several of those paths aren't connected directly to each other in the mapping data, and you need to use intermediate points to switch paths.



Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 5 of 6

philboboADSK
Autodesk
Autodesk

These routes seem to match up with the map at https://japanmap360.com/japan-train-map:

1701108891632.webp

Based on that website's information, these lines provide service for both passengers and freight.



Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 6 of 6

ozawa_shinya
Advocate
Advocate

Thank you for your information. Intermediate points work well.

0 Likes