question

Fabio O4 avatar image
0 Likes"
Fabio O4 asked Fabio O4 commented

Limit item types in a queue

Hi, I have problems with my attached model, I would like the right queue managed by the yellow operator to contain only one item to be processed and one already processed at the same time. I'm using process flow for this logic but I'm probably doing something wrong. Can some one help me?

The project excede the dimension of the uploadable file so i linked in on dropbox

https://www.dropbox.com/s/n2u1z0u4ku04h3e/Spaggiari%202%20baie_1.fsm?dl=0

FlexSim 22.1.3
processflowqueuetokens
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·
@Fabio O4, if your working model is to large, then you can still provide a smaller sample.
0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Fabio O4 commented

This seems to be an altered version of the model in this previous question.

Note how in the model I attached there, the processors push the items onto a list, instead of the sending them through one of the port connections. This is what allows the tokens in the process flow to pull one item at a time.

In this version of the model Queue10 seems to take the place of the processors, sending the items back to the BAIA-queues. As such it should be set to push the items onto the list. The 'Port By Case' would then have to integrated into the pull logic in the process flow.

So each token needs to know which 'Cassetto' value it should pull. This could be determined by a label on the queue the token belongs to.

1659338232887.png

1659338301459.png

The same logic also applies to the IN and OUT queues. Whenever you want to limit the number of items in a queue the way I do in the other post, the inObjects must push the items onto a list, so that a token can pull them one by one, not send directly.

Two other things I noticed:

- The list in the Logica BAIA 1 flow is not linked to the global list.

- The 'Send Token To' field in the Wait for Event activity in Logica BAIA 1 is configured wrong. It looks like you typed in "Next Activity". The default text 'Next Activity' is just a placeholder value. By typing something in you set the return value of the code, which either expects the name or rank of a connection or a reference to an activity in the process flow. The text "Next Activity" is neither. To reset the field to its default, just delete the text.


1659338232887.png (11.3 KiB)
1659338301459.png (19.9 KiB)
· 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.

Fabio O4 avatar image Fabio O4 commented ·
Thank you Felix like last time you solved the problem quickly, sorry for make the same question as before but my process flow's knowlange is not so good, i keep trying but i still miss something. Thanks again.
1 Like 1 ·
Fabio O4 avatar image Fabio O4 commented ·
@Felix Möhlmann Sorry to bother your again, can you make an example of the process flow? im trying to change what i did but is still not working.
0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Fabio O4 commented ·

I don't know what exact logic you want to achieve so I can only try to give some hints based on what I understand.

1) Since the IN and OUT queues that are connected to the rack only go into one direction now, they don't need any custom logic. You already set them up to use the Pull Strategy, so the upper section of the process flow, that controlled the flow from the rack to the queues is not needed anymore.

1659346251600.png

2) As I understand it, the BAIA 1 and BAIA 2 queues (marked orange) are the ones the rule of one inbound and one outbound item at time apply to.

They have a batch setting of 2, which contradicts the rule that they should only ever contain one outbound item. (At the start of the model, if only one item can enter from the rack, they will never release it).

That contradiction aside, since they both receive non-processed items, as well as processed ones, they need two tokens, one for each type of item.

The flow that is currently in the model pulls processed items (lavoro == 11). You would essentially just need to copy this and adjust the query to pull non-processed items (lavoro < 11). As mentioned before, all inObjects of those queues (marked blue), have to be set to push their items to the item list in the 'Send to Port' option.

1659346600128.png

1659346677694.png

1 Like 1 ·
1659346251600.png (16.2 KiB)
1659346600128.png (17.0 KiB)
1659346677694.png (115.6 KiB)
Fabio O4 avatar image Fabio O4 Felix Möhlmann commented ·
Fixed thank you
0 Likes 0 ·