question

wang W2 avatar image
0 Likes"
wang W2 Suspended asked Joerg Vogel commented

pull from list

i want to simulate the scenario that in the itemlist some specific item has same type when these items reach the specific quanty such as four.i want pull them all out ,i use where quanty=4;but when one item pulled out,the quanty become 3,and the pull query isnot met,and the items should be pulled out no longer pulled out.

for example like pic below,there are four type2 items in the list,when one pulled out ,only three left,they willnot be pulled out again.

how can i solve this problem,could you give me some idea ?thanks

FlexSim 18.2.3
flexsim 18.2.3
无标题1.png (17.8 KiB)
无标题.png (6.3 KiB)
· 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.

Benjamin W2 avatar image Benjamin W2 commented ·

Hi @wang W2,

Can you attach your model? It will really help us solve your problem.

1 Like 1 ·

1 Answer

·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Joerg Vogel commented

This Pull from List Template window is available in Pull Strategy function of fixed resources object properties. The Input Pull mechanism pulls only one item by design. You cannot increase this there.

Perhaps if you build a code logic that moves all condition matching items by moveobject command in OnEntry trigger or process flow activity into the fixed resource, will be creating the desired effect.

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

so here is my solution: .

I want to mark all items on the list, when Pull From List meets my condition. Therefore I put a Push Argument field on the list. I can change the value, when I push items a second time to the list. I call this argument field mustPulled. When I have set the argument, the WHERE condition must pull those values, too.

I push the items a second time through an adjusted source code in Pull Strategy. The yellow marked code is the original.

First I collect all items from the list matching the same Type as the pulled item in an array. Then I push the array of items again onto the list, but this time with the 1st argument set to value 2.

As an example model:pull_all_items_by_type_by_amount_of_4.fsm

0 Likes 0 ·
wang W2 avatar image wang W2 Joerg Vogel commented ·

thankyou but I found that command receiveitem in the on creation trigger,I know that this command Tells the FixedResource station to open its inputs and receive a flowitem.

but i dont How it works in this model,I think without this command FixedResource also can recieve flowitems.

thank you very much

0 Likes 0 ·
tannerp avatar image tannerp wang W2 commented ·

@wang W2,

The receiveitem command is necessary because you are not using other logic, such as output ports or Process Flow to transfer the item into the Queue. Essentially, the queue is being treated as a BasicFR in this situation. At least, that is how I understand it. So I believe Jörg is on the right track. Here's the documentation on "receiveitem" that may be helpful.

0 Likes 0 ·
receiveitem.png (27.7 KiB)
Show more comments

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.