question

Patrick Zweekhorst avatar image
1 Like"
Patrick Zweekhorst asked Jason Lightfoot commented

Distance to travel does not work in all cases

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

FlexSim 20.1.3
agvflexsim 20.1.3distancetotravel
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
anthony.johnson avatar image
0 Likes"
anthony.johnson answered Jason Lightfoot commented
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.

· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Patrick Zweekhorst avatar image Patrick Zweekhorst commented ·

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 0 ·
kk avatar image kk commented ·
is this fixed now (v 23) ?
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ kk commented ·

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 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.