question

Miguel Pereira avatar image
0 Likes"
Miguel Pereira asked Miguel Pereira commented

Number of objects loaded

Hi everyone,

Is there a way to know how many items i already loaded from a Queue?

I want to do something like, if you already loaded/unloaded 60 at this place you can for the next one.


Thanks, Miguel Pereira.

FlexSim 21.0.5
processflowloadunload
5 |100000

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

José Antonio MD avatar image
0 Likes"
José Antonio MD answered Miguel Pereira commented

Hello @Miguel Pereira ,

You can evaluate this for example, using a label with the origin of the item and every time you load check how many items you have with this label using a loop with the resource's subnodes.

But really, I don't think you need it to achieve your objective, here you have an example using a counter and a limit (contMax) per subflow.

21.0. Example ContMax.fsm


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

Miguel Pereira avatar image Miguel Pereira commented ·
Didn't thought a counter would work but it did. Thank's, now i have a different doubt but i'll create a new question.
0 Likes 0 ·
Tomasz MG avatar image
1 Like"
Tomasz MG answered Miguel Pereira commented

Hi

You can try to check the output value of the object

1626424101593.png

and in decide block write this

if(Model.find("Queue1").as(Object).stats.output.value ==60){
return something;
}else{
return something2;
}


Good luck


1626424101593.png (64.7 KiB)
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·
But this statistic returns the total output since model run start.
1 Like 1 ·
Miguel Pereira avatar image Miguel Pereira Joerg Vogel commented ·
Then it wouldn't work but thanks @Tomasz MG.
0 Likes 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Miguel Pereira commented

Attached model is checking in Break To function of Output pane, if a label value allows to load from same load station. I set this label in On Unload trigger. If this label returns a 0 value, then the function evaluates the second condition to load from a different nearest load station. On Unload I reset a label to check if it is still the same load station.

Labels of Operator


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

Miguel Pereira avatar image Miguel Pereira commented ·
Both ways worked but i wen't with @José Antonio MD idea because i prefer by the process flow. Anyway, thank you @Joerg Vogel.
0 Likes 0 ·