question

jessica S2 avatar image
0 Likes"
jessica S2 asked Joseph Gillespie commented

How to create a time SQL table of a part in the process?

333.fsm

I need to create a table that tells me what is the life of the piece of the model. I already send it to a list and I know that I must modify the AGE, but from here I don't know how to configure it

FlexSim 19.1.1
sql query
333.fsm (1.2 MiB)
· 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.

Joseph Gillespie avatar image Joseph Gillespie commented ·

@jessica S2

Could you explain what you mean by "what is the life of the piece of the model"? If you are going to use this table to produce a chart, you will probably need to make a statistics collector:

0 Likes 0 ·
capture.png (28.5 KiB)
Joseph Gillespie avatar image Joseph Gillespie commented ·

@jessica S2

Do you still need help with this?

0 Likes 0 ·

1 Answer

·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

You don’t need a list to get the age of an item. There is a function that returns the time the item had entered the model

getcreationtime( obj item)

The age is the difference of current runtime time() and the creation time.

There might only one problem, if you use recycled items. The statistical attributes don’t seem to be reset when the items are entering the model again. Please test this before, you use recycled items in your model.

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.