question

Kadircan T avatar image
0 Likes"
Kadircan T asked Kadircan T commented

Detecting how long a Label has lived

Hello,

In the attached model, I assign the "ChuteStatus" label to the chutes at every stage of the process flow and these statuses are constantly changing. I want to see the status of the chutes and how long they stay (seperately), how can I do this?

ex:

1672915227540.png

LabelTimes.fsm

FlexSim 22.2.2
state statisticsassign label
1672915227540.png (167.6 KiB)
labeltimes.fsm (92.1 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.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Kadircan T commented

If you want to stay with using labels, then you can use a categorical tracked variable label. This is the same structure that is used to implement the object states. As such it can be set to store the history of values and total time spent at each of them.

The attached model shows an example. Each of the queues possesses such a label. A Process Flow randomly changes the value and updates a global table with the current totals each time this happens.

CategoricalTrackedVariable_Label.fsm

If you want to plot this data graphically in FlexSim, it might be easier to create a second state profile for the chute objects. How this looks can be seen in the tree of the multiprocessor.

1672917608820.png

You can then set the state in this extra profile in Custom Code activities.

1672917661233.png

This has the benefit that it will work with the default state graphs which you can add to a dashboard.

CustomStateProfile.fsm


· 5
5 |100000

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