Wait for Event Based on Partition Content?

Wait for Event Based on Partition Content?

rajankur6494
Collaborator Collaborator
340 Views
9 Replies
Message 1 of 10

Wait for Event Based on Partition Content?

rajankur6494
Collaborator
Collaborator

[ FlexSim 21.1.5 ]

Hi Team,

I am working in object process flow to have separate buffer for both the objects. I want to check individual buffer for object and exchange the pallet.

I am using partition id to achieve it. But it is not working fine.

1661499223700.png

Can you help me to resolve this issue?

Thank you!

0 Likes
Accepted solutions (1)
341 Views
9 Replies
Replies (9)
Message 2 of 10

moehlmann_fe
Advocate
Advocate
Accepted solution

Not really sure why this isn't working. I also tried it with a global list in a general process flow and it still didn't work. Might be a bug.

As a workaround you can listen to the general "OnContentChange" event and then check if the partition content has reached the target value in a Decide activity. Make sure that the connections coming from the Decide activity have the correct ranks.

1661507207144.png

0 Likes
Message 3 of 10

rajankur6494
Collaborator
Collaborator

Hi @Felix Möhlmann,

In my model, run sub flow will release 1 token once all token will be pulled. While check for wait for event if condition is not matching, token will be sent to sink and there is not other token available for exchange process.

I think we have to have event triggered source to make it happen.

Thank you!

0 Likes
Message 4 of 10

moehlmann_fe
Advocate
Advocate
Is there a reason why the token has to sent to a sink if the condition is not fulfilled? Couldn't it just wait until it is?
0 Likes
Message 5 of 10

rajankur6494
Collaborator
Collaborator

Ok @Felix Möhlmann. Got it!

Here, I have created partition based on object and availability to make sure that finished item is not pulled for processing.

I don't know why things are not working as per condition. Ideally, it it should trigger exchange process once partition content is reached 5. But it is going to wait for event.

1661758573087.png

1661758772003.png


Thank you!

0 Likes
Message 6 of 10

moehlmann_fe
Advocate
Advocate

The command "getstat" is missing a 0 parameter between "STAT_CURRENT" and the partition array.

1661759988496.png

This is not added when using the sampling tool because it is not necessary in a general process flow. However in an instanced flow that parameter tells the command that it should look at the global instance of the list activity.

0 Likes
Message 7 of 10

rajankur6494
Collaborator
Collaborator

Thank you! @Felix Möhlmann. It is working now.

Also, I want to exchange this pallet with fresh pallet. To achieve the same, I am pulling all the finished content from list based on partition. But it is not pulling the partition content.

Can you check here if I am making some mistake while pulling finished content?

1661767941573.png

Thank you!

0 Likes
Message 8 of 10

moehlmann_fe
Advocate
Advocate

The partition in the request and require fields is wrong (only the instance instead of an array). The "Request Number" is available as a parameter in the "Require Number" field. You can save having to run the getstat() command twice this way.

1661768519944.png

0 Likes
Message 9 of 10

rajankur6494
Collaborator
Collaborator
Thank you so much! @Felix Möhlmann

Also, I tried with just providing partitioncontent as integer if it is known. It is working.

0 Likes
Message 10 of 10

MBJEBZSRG
Advocate
Advocate

I just happend to be in a similar pickle as @Ankur A3 and I found another solution. With a wait for event you can listen for On Partition Content Change and set it to Decrease or Increase to specific values or just 0. However listen for event on partition only works if you use a Global list and only if you go to the General tab of that list and check "Track Number Fields Total".

I realize that is answer is close to a year too late, but I find it to be a bit neater than the proposed workarounds.WaitForListEmpty.fsm

0 Likes