question

Martin K5 avatar image
0 Likes"
Martin K5 asked Martin K5 commented

How can I reset the totalTravelDistance on task executer?

Hi,

I would like to ask how can I reset the totalTravelDistance on task executer? I would like to cumpute the totalTravelDistance for each task individually that is fullfiled by the load and unloud action. When I tried to accomplish this the distance accumulates.


Thank you,


Martin

FlexSim 23.1.0
task executertasktotaltraveldistancecompute
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

Paula LG avatar image
2 Likes"
Paula LG answered Martin K5 commented

Hi,

I have tried this code and it seems to work:

Model.find("/TaskExecuter1>variables/totaltraveldist").as(TrackedVariable).reset();

I hope it helps!

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

Martin K5 avatar image Martin K5 commented ·
Yes, it works perfectly!


Thank you.

0 Likes 0 ·