How to manage the number of objects in my processor?

How to manage the number of objects in my processor?

remi_a2
Not applicable
198 Views
4 Replies
Message 1 of 5

How to manage the number of objects in my processor?

remi_a2
Not applicable

[ FlexSim 21.2.2 ]

Hello,

I have a problem. In the attached model, there are 2 processors which process objects in a certain order. The Process Flow allows, according to the different labels, either inject 2 objects at the same time and exit 2 or inject 3 and exit only 1.

To give you an example of my problem, we will take the label 4 of my model. In the pullorder label 4 will go 2 times to processor 1. But I want the first time that there are 2 that go in and 2 that go out and for the second time only 1 that goes in and one that goes out. (The previous stock having only 3 times the label 4).I would like to have a solution that I can apply in so many other cases because this is just one example that I have presented to you.

I don’t know if it’s clear don’t hesitate to tell me

Thanks in advance, Rémi

test-2 (8).fsm

0 Likes
Accepted solutions (1)
199 Views
4 Replies
Replies (4)
Message 2 of 5

pierre_gauly
Enthusiast
Enthusiast
Accepted solution

Hi,

You will find attached (Example.fsm) an example of what you are asking for.

I added a column in the Process Table which describe the number of cycles you need for a type of product:

1639664963611.png

In the ProcessFlow, I added 2 labels on the token. The label Cycle is the number of cycles which will be needed for the next product(s), and the label currentCyle will count the number of cycles already did:

1639664976140.png

Then, I just add a Decide activity to choose if I want a new cycle or if I send the items in Queue2 :

1639664986624.png

I destroyed the A connexion between the Processors and the Queue2, because it’s now controlled with ProcessFlow.

Pierre.

Message 3 of 5

remi_a2
Not applicable

Thank you for your answer but unfortunately and it's my fault I have trouble expressing myself during my question (however your answer will be useful to me for something else so thank you very much).

I will try to rephrase but in fact I wish that during the first pass there are 2 objects at once in the processor and in the 2nd pass only one object. How can I handle this? Hope the diagrams will help you understand.

exp3.png

exp4.png


0 Likes
Message 4 of 5

moehlmann_fe
Enthusiast
Enthusiast

Currently, the process flow always needs to pull the number of items specified in the "InNum" column. If you want this to be an upper limit, so to speak, you can change the "Require Number" in the pull activity to 1.

1639828913992.png

If this should only apply to certain types (some types always have to pull the specified number, possibily the 3->1 ones), you could create another column and split the "InNum" column into a minimum and a maximum. Then assign these to two labels and use them in the pull activity.

1639829199933.png

1639829187235.png

Lastly, to prevent any errors with the deletion of items, the token quantity that gets generated for the respective subflow should be changed to "Math.max(token.items.length - token.NextOutQuantity, 0)".

Since the number of items that exit the processor might now vary, the number of tokens for the assign labels subflow has to be variable as well. To achieve this, I would remove the empty entries from the "token.items" array after the corresponding items get deleted and use the length of the array as quantifier.

test-2-8_autosave.fsm

Message 5 of 5

remi_a2
Not applicable

Thank you very much, it works perfectly

0 Likes