question

Rafael SM avatar image
0 Likes"
Rafael SM asked Ben Wilson commented

How do I know the distance a taskexecuter travels?

How can I know the distance a taskexecuter travels from one node to another node 
and if I can present it through a table or dashboard
FlexSim 20.1.1
flexsim 20.1.1...
· 1
5 |100000

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

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @rafael.sm, was mischa.spelt's or cai.c's answer helpful? If so, please click the red "Accept" button on one of their answers. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·
Mischa Spelt avatar image
0 Likes"
Mischa Spelt answered

If your task executer is already at the correct start node, you can request the distance to another object, network node, control point, etc. using the distancetotravel command:

Object te = model.find("TaskExecuter1");
Object destination = model.find("Object_NN_or_CP");
double distance = distancetotravel(te, destination);

If you are specifically using the AGV network, you don't even need to have a task executer to calculate the distance between two control points along the network; you can use cpdistance:

Object cp1 = model.find("ControlPoint281");
Object cp2 = model.find("ControlPoint94");
double distanceTo = cpdistance(cp1, cp2);
double distanceBack = cpdistance(cp2, cp1);
5 |100000

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

Cai C avatar image
0 Likes"
Cai C answered

check this out.

when the taskexecuter arrival some node,record the Total Travel to the table or some lable,then you can get the distance u need.


20200924083900.png (48.2 KiB)
5 |100000

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

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.