Distance to travel does not work in all cases

Distance to travel does not work in all cases

patrick_zweekhorst
Advocate Advocate
25 Views
4 Replies
Message 1 of 5

Distance to travel does not work in all cases

patrick_zweekhorst
Advocate
Advocate

[ FlexSim 20.1.3 ]

Hi,

It looks like the distance to travel function does not always work.
Attached is an example model that shows the problem.
If you run the script before time 10 or after time 52.11 you will see the following exception.

exception: Exception Caught in distancetotravel(treenode traveler, treenode destination)
exception: Exception Caught in ObjectFunction94__project_exec_commandlist_distancetotravel_node object: MAIN:/project/exec/commandlist/distancetotravel/node i: 
MAIN:/project/exec/commandlist/distancetotravel/node class: 
MAIN:/project/exec/commandlist/distancetotravel/node
exception: Exception caught in TreeNode::callMemberFunction() c++/dll execution. 
Throwing... MAIN:/project/exec/commandlist/distancetotravel/node c: 
MAIN:/project/exec/commandlist/distancetotravel/node i:
MAIN:/project/exec/commandlist/distancetotravel/node thisClass: 
MAIN:/project/exec/commandlist/distancetotravel/nodeexception: 
Exception caught in evaluation of MAIN:/project/exec/commandlist/distancetotravel/node

There is no exception between time 10 and 52.2 (the AGV is moving at that moment).
In the actual model the problem only seems to be before the first travel task of the AGV, but I get the same exception. Is there a workaround for this bug?

Thank you

distanceToTravel.fsm

Accepted solutions (1)
26 Views
4 Replies
Replies (4)
Message 2 of 5

anthony_johnsonT83CM
Autodesk
Autodesk
Accepted solution
This exception is caused because apparently you can't call distancetotravel() to a control point that has not yet been traveled to. It does a "lazy" routing table build, meaning it doesn't build the routing table for a destination until that destination is actually traveled to. So calling distancetotravel() throws an exception because it assumes the routing table is there but it's not.

The only way I can think of a workaround is to actually send someone there first. You could preempt right after starting. That's the only idea I have.

We'll try to get this fixed in the next bug fix release.

0 Likes
Message 3 of 5

patrick_zweekhorst
Advocate
Advocate

Hi @anthony.johnson,

Thank you for the reply. Your answer makes sense at the start of the model. One thing to note is that after time 52, when the AGV is back at its start location distancetotravel also throws an exception. The AGV did travel to cp2 before. I am not sure if you noted that, or if the routing table is working slightly different than what I have in mind.

Looking forward to the next bug fix.

0 Likes
Message 4 of 5

kshitij
Not applicable
is this fixed now (v 23) ?
0 Likes
Message 5 of 5

jason_lightfootVL7B4
Autodesk
Autodesk

Yes it should be fixed - are you seeing something that suggests it is not?

You can test this in under a minute ( model attached). Distance is zero before reset, ~8m after reset. distancetoTravelatReset.fsm

0 Likes