question

felicity avatar image
0 Likes"
felicity asked felicity commented

two wait for event activities in the same processflow

Scenario 2.6-new-End of SB-test.fsmHi

I have a problem aligning my process flow with what I have in mind for the 3D model to do. I have two processors named MW1 and MW2. I also have two types of products. MW1 only processes product 20 but MW2 can process both products.

In my model items are stored in a storage before entering the processors, and I want to check (based on item type) if the corresponding MW is empty before acquiring any resources and moving items.

I used a wait for event activity to create one token per each item entering the storage, and then I determine the product type using a decide activity. From here I need to know if:
1- for item type 20, either processor is empty
2- for product 12, MW2 is empty
If so, the model acquires the operators, the crane and the processor and the items are transported to said destinations. if not, they must wait for the corresponding processors to finish processing. Now as each processor can work on one item at a time, I need to keep them acquired until processing is done, which means I need to use a second wait for event in the same process flow. This clearly does not work, because although I have a storage full of items waiting to enter the MWs, The MWs are idle half of their up time.

I want to know how I can:
1- decide if either one of processors is empty before sending item to them (without using acquire resource)
2- handle resources in this model so that the operators, the crane and the processors are acquired only when items can be transported. (This is important as I use my resources for many other activities)


FlexSim 22.2.0
process flowwait for eventacquire resource
· 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.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Hi @felicity, was one of Joerg Vogel's or Jason Lightfoot's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·
Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered felicity commented

I think you should be using lists where it's easy to see attributes, what is queued and what is free.

Instead of having a branch based on the type you should pull the resource that can do the job by use of a WHERE clause. You can do this in the context of acquiring resources but I see no benefit in doing so, whereas there are potential drawbacks - so just get in the habit of using a list.

Use one label for the pulled multiwire and then reference that label in a single wait for event (if it's still needed) rather than have two wait for events which reference difference label names for the multiwire.


· 7
5 |100000

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

felicity avatar image felicity commented ·

@Jason Lightfoot Thank you for your response. I have been working on some new approaches but none of them seem to work. I'm not sure I completely understand your solution. Is it possible for you to make the changes you suggested to my model?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ felicity commented ·
1 Like 1 ·
felicity avatar image felicity Jason Lightfoot ♦♦ commented ·

Thank you very much @Jason Lightfoot

This does what I require but it only runs correctly with the first flow item and the processors stop after the first time. Why is that?

0 Likes 0 ·
Show more comments
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel commented

There must be a mutual condition for all elevated events, like same involved item. Then you can use a batch activity to collect tokens matching the same attribute. Once collecting finishes you have all conditions fulfilled.

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

attached an example model

evaluate_multiple_stats_events.fsm


0 Likes 0 ·