question

Borja Lorenzo avatar image
0 Likes"
Borja Lorenzo asked Borja Lorenzo commented

Statistic collector from List's Event

Hello,

I need help defining a statistics collector. Attached is a simplification. I want to obtain the column value as the "Task" label, which is defined with an expression in a list. How can I do this?

This logic belongs to a larger context... but in summary, what I intend to measure is the time from when the FIRTS element of this list is pulled and when the LAST element pulled from this list is delivered in another output event from another part of the model.

Thanks in advance for your help.

Best regards

Simplificación Statistic Collector from List.fsm

FlexSim 24.1.1
statistic collectorpullfromlistglobal listsunique row values
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

Nil Ns avatar image
0 Likes"
Nil Ns answered Borja Lorenzo commented

Hello Borja,


I don't understand why you need to create that collector, but you have some mistakes.


First, at the moment the token enters the pull activity, the value is not on the list yet. It is necessary to wait for a breath to ensure the value is on the list.


Reading the expression of a list is only possible by doing a pull. With that code, you can pull the token, set the label on the BasicFR, and return it.

List("Lista_Trabajos").pull([data.token.as(Token).parent],"SELECT Tarea",1,0,Model.find("BasicFR1"),0,LIST_DO_NOT_REMOVE);

return Model.find("BasicFR1").Tarea;


Thanks!

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

Borja Lorenzo avatar image Borja Lorenzo commented ·

Hello

Thank you very much for your response, Nil.
I am attaching a new, more realistic model of what I want. I have not applied your suggestion because I wanted to confirm if the data I want, makes sense to extract from a statistic collector.
The data I need is to be able to calculate the time that elapses from the first pull of the job list "Lista de trabajos" until the last element exits through DP1. My intention was to list all the entries made to the list in a collector and use the task label I created in the list itself as an ID...To be able to see the times assigned to each task for both entry and exit. Then I would only need to make a calculation externally or try to do it in FlexSim, of the difference between the time of the first pull and the time of the last exit. it doesn't work for me.

The first error you explained, I think I understood. I cannot try to read a piece of data from the list with the pull because that data is no longer in the list when the pull is created.

What I don't quite understand is this part:
"Reading the expression of a list is only possible by doing a pull".

Is it not possible to read the "Tarea" label from the list? Accessing the columns or somehow the information of the "Tarea" label from the list.

I understand that an instance is created in the collector for each record I make in the list. In the "data" entity, doesn't it drag the information assigned to each record?

Is the syntax you used the one I highlighted in yellow?

1736508224690.png

If I understood correctly, I am trying to fill the column value of the data instance of the collector with data that is neither in the element (token) I insert nor in the one I extract from the list, nor is it in any label of any item or FR. It is only in the list.

Is that why this information could only be extracted with a pull?

Is the argument I circled in red the variant object you are pulling from? In your response model, the FR has a "Tarea" label created. Running the model step by step, this FR label does not change value.
Is there any way to perform this extraction without using an FR?

Thank you in advance for your comments and clarifications. This part is very unfamiliar to me, and there is surely an easier way to get what I need.


Simplificación Statistic Collector from List 250110.fsm

0 Likes 0 ·