question

JoseVM avatar image
1 Like"
JoseVM asked Matthew Gillespie commented

Wait for Event error

Hello everyone,

I have a problem using a "Wait for Event" activity. What I would like to achieve is a model where Transporter1 only loads the batch when "Cola_Oc1" OR "Cola_Oc2" are empty. To do that, I set a Wait For Event activity with two waiting conditions (see Picture). However, some errors appear when I add the second waiting condition, whereas the model runs ok if only one of the conditions are set.

Does anyone knows why this is happening? Could the problem be that an extra token is created after the Wait for Event activity (because both queues are empty)?

Thanks a lot in advance.

question-task-separator-pallet.fsm

FlexSim 19.0.7
wait for eventtwo activities
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeff Nordgren avatar image Jeff Nordgren commented ·

@José VM

When I run your model in version 19.0.9, I don't get any of the errors that you are referring to. Maybe upgrade to version 19.0.9 and see if your problem goes away.

Thanks.

0 Likes 0 ·
JoseVM avatar image JoseVM Jeff Nordgren commented ·

Hello Jeff,

First of all, thanks for answering. I checked what you said and it is true that the message is not showed anymore. However, the simulation does not respond to what I wanted to achieve with the Wait for event activity (to make the transporter to move the batches from the combiner to the separators only when one of the queue is empty). The token get stucked in "Acquire" activity. Do you know what could be happening there?

Thanks a lot in advance,

0 Likes 0 ·

1 Answer

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered Matthew Gillespie commented

I don't know what's causing the error you're seeing, it looks like a bug to me. However, you can accomplish the same thing by putting Cola_Oc1 and Cola_Oc2 in group and then listening to the OnChangeContent event for that group.

Now, there's still a modelling issue here once you get that working. You're waiting for the queues to be empty, but as soon as a queue empties it will let tokens through to the next acquire activity until something new enters the queue. So during the whole time that the transporter is moving the items new items from the combiner think the queue is empty and try to acquire the transporter. One way to fix this would be to have the items acquire the transporter before checking the queue's content.

separatorpallets.fsm


· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

JoseVM avatar image JoseVM commented ·

Hello Matthew, thanks for your time.

I see your point but I have two questions about it:

1) Putting both queues in a group and listening to OnChangeContent event for that group, means that the token will be fired just when the content of the whole group reachs 0, or am I wrong? And what I would like to achive is that the token is fired when one or another is 0 (not only both).

2) When I run the model I see the same bug that at the beggining. Token is stucked in Travel activity. I attach photo.

Thanks a lot in advance

0 Likes 0 ·
error-2.png (312.5 KiB)
Matthew Gillespie avatar image Matthew Gillespie ♦♦ JoseVM commented ·

No, listening to the event on the group lets the token move on when any of the objects fire that event. So it's doing exactly what you want.

I don't see any errors when I run the model I attached. Did you make changes to the model?

0 Likes 0 ·
Brandon Peterson avatar image Brandon Peterson ♦ commented ·

The error is being caused due to the token being released twice from the "Wait For Event" activity. I was able to eliminate the error by having a decide before the "Wait For Event" activity that would skip it if wither Cola_Oc1 or Cola_Oc2 were empty.

I don't believe that this will entirely solve the problem though. The way the process flow is set up two batches will make it to Cola_Oc2 because the third token enters the flow before the batch has a chance to reach Cola_Oc2. A delay in the completion of finished batches from Combiner1 would help but the longer the transfer time of the batches from Combiner1 to one of the Separators the longer the delay in the finished batches would need to be.

0 Likes 0 ·