question

James Riebau avatar image
0 Likes"
James Riebau asked James Riebau commented

Warmup Time and Total Distance

I have a warmup time set and all statistics seem to reset except for total travel. How do I get total traveled to reset as well?

1645632187411.png


1645632211769.png


FlexSim 22.0.0
warm up time
1645632187411.png (13.0 KiB)
1645632211769.png (7.6 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.

Regan Blackett avatar image
1 Like"
Regan Blackett answered James Riebau commented

It seems that the travel distance stat are exempt from resetstats() in 2022.

I did some exploring and it looks like the tacked variable that is being used to record the travel distance is not getting reset at the warmup time.

The Dashboard charts that display the total travel distance (both bar chart and table chart modes) are getting reset at the warmup time. The dashboards for travel by hour and per hour, get reset but it looks like they are grabbing the current value from the travel tracked variable as the initial value.

I'm not sure if these are bugs, maybe @Jordan Johnson or @Joshua S could weigh in.

I'm not sure if this is an approved way to get what you need for now, but instead of a warmup time, you could create a User Event at the time your warmup time would end, and use code like this:

TrackedVariable travelNode = Model.find("Operator1>variables/totaltraveldist");
travelNode.reset();
resetstats();

To force the travel distance node to be reset and then reset all other stats using the command.

If you have more than one task executer whose travel stats you need to reset, you would want to put them in a Group, and do the first two lines above for each member of the Group.

· 2
5 |100000

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

Joshua S avatar image Joshua S commented ·

@James Riebau

It looks like that is a bug, I've added it to our dev list. Even with @Regan Blackett's suggestion, if they are traveling when you use resetstats(), it will still take into account for the travel from where they started from to where they currently are when resetstats() was called.

0 Likes 0 ·
James Riebau avatar image James Riebau commented ·
Thanks guys. This works for me, for now.
0 Likes 0 ·
Omar Aguilera Rico avatar image
0 Likes"
Omar Aguilera Rico answered

Hello @James Riebau , the resetstats() command can help you. You can specify an event that is fulfilled when your warmup finishes, what this command does is: reset all object statistics without performing a full model reset.

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.