question

Gabriel Morgante avatar image
2 Likes"
Gabriel Morgante asked Gabriel Morgante commented

How to reevaluate a pull condition when pulling from a global list

Hello guys,

I'm trying to use a Condition on a pull strategy "From list" and it's not working as I thought it should.

Explanation:

Processor1 have two labels "Capacidade" and "Carga" (Cap and load respectively), so the condition is that it should pull itens from a Global List if Load < Cap, as it follows:

All the itens arriving at the processor increase the "load" a certain amount until it reaches the condition and then it stops pulling.

The problem starts when the itens exit the processor, as every exit subtract a certain amount from the "load" label, the condition changes and the processor was suposed to pull more itens but it doesn't.

I think it should work if there's a way to force the processor to reevaluate the condition when after every exit but I'm struggling to find a way to do it.

The model attached is a simple replication of the real model, but the original model have many processors that's why i'm using the Item List, because It would be very troublesome to use connections to decide the flow of the itens on the model.

I hope someone can help me, thanks!

l3-1.fsm

FlexSim 19.0.0
pull strategyglobal listpull itempull from list based on conditionpush to list pull from list
1.png (8.0 KiB)
l3-1.fsm (26.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

·
Matt Long avatar image
2 Likes"
Matt Long answered Gabriel Morgante commented

In your OnExit trigger of Processor1 you can add a Code Snippet and call receiveitem(current); This will cause the processor to try and pull the next flowitem, firing the pull requirement.


receiveitem.png (6.0 KiB)
· 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.

Gabriel Morgante avatar image Gabriel Morgante commented ·

Hey Matt! Thank you for your answer!

What you said works for the processor to call one next item but it doesn't apply the "pull strategy" that was supposed to pull itens until "load" becomes equal or greater than "cap". Any idea how to trigger the pull strategy?

Maybe there's something to do with the list? Is there a way to reevaluate all the entries awaiting on the list?

Thanks!

0 Likes 0 ·
Matt Long avatar image Matt Long Gabriel Morgante commented ·

Just add an additional receiveitem(current); call to the OnEntry trigger of the processor. If the processor is at capacity it'll return false in the pull strategy.

1 Like 1 ·
Gabriel Morgante avatar image Gabriel Morgante Matt Long commented ·

It worked! Thanks Matt! =D

0 Likes 0 ·
Braydn T avatar image Braydn T Gabriel Morgante commented ·

Could you put that command in a for loop or while loop? while (carga < capacidad){

receiveitem(current);

}

0 Likes 0 ·
Gabriel Morgante avatar image Gabriel Morgante Braydn T commented ·

Thanks @Braydn T but Matt's answer worked perfectly now! =)

0 Likes 0 ·

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.