question

Eric R4 avatar image
0 Likes"
Eric R4 asked Eric R4 commented

3 Processors in Parallel, only 1 can operate at a time, How?

I am trying to simulate the feeding of 3 filter presses. The model is working very nicely except for 1 issue I cannot figure out how to solve. I have 3 processors in parallel ("Group A Fill 1", "Group A Fill 2", and "Group A Fill 3"). Can you help me develop a constraint on those 3 processors so that only 1 of them can run at a time? I've attached my model.

Thanks,

Eric

dl-3-filter-1-pump-model-v5.fsm

FlexSim 19.1.1
processors
· 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.

Eric R4 avatar image Eric R4 commented ·

@Joseph Gillespie

Thank you!

Regards,

Eric

0 Likes 0 ·

1 Answer

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

@Eric R4

Here's an updated version of your model in which only one of the 3 processors can run at a time: filterpumpmodelanswer.fsm

It works because of a small Process Flow block for each processor, like so:

For the processor "Fill 1", a token is created every time an item arrives in Fill 1 Queue. These tokens then wait to acquire a resource I created called "Processors". All of the items in each queue must wait its turn to acquire the "Processors" resource in order to continue. After acquiring "Processors", the item moves to the processor to be processed. When the item finishes being processed, it releases the "Processors" resource so that another item can acquire it.


capture.png (8.1 KiB)
· 12
5 |100000

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

Eric R4 avatar image Eric R4 commented ·

Joseph, thanks for looking at this. I am very weak on Process Flow and just reviewing your edits has helped a lot. Your added logic does do as you stated. However, it has created a new problem. The issue with your added logic is that it forces 1 of the 3 Processors to always run (a processor is always running, even when there are times it shouldn't be). For my 3 processors, my "maximum content" was set at 1. But the Process Flow is forcing the processor to accept thousands of items. How is this possible? How is the Process Flow bypassing the maximum content of my Processor(s)? Is this a bug? How could I adapt this so that the Process Flow doesn't force all of those items on each Processor (when the Processor is not ready to output)?

Thanks for your help!

Regards,

Eric

0 Likes 0 ·
Joseph Gillespie avatar image Joseph Gillespie Eric R4 commented ·

@Eric R4

The reason why Process Flow was able to bypass the maximum content you set for the processors is because the maximum content setting is part of the 3D logic. Process Flow will usually override the 3D logic when they are used together.

Now, the reason why the processors were filling up was because I set the processors to accept another item as soon as the last one finished processing. This would work fine as long as the processors are able to immediately send off their current item once they finish processing it. However, this is not the case when your model becomes backed up.

The problem can be fixed by setting the processors to only accept the next item "On Exit", which is when the last item has left a processor. I've done that here in this model: filterpumpmodelanswer2.fsm

Note however that after a certain point your model will stop because one of the processors gets backed up and then none of the items can be processed.

I also recommend learning Process Flow since it is extremely helpful for customizing models and is not too hard to use once you are familiar with it. Here are some online tutorials you could look at:

FLEXSIM BASICS TUTORIAL

PROCESS FLOW TUTORIAL 1

0 Likes 0 ·
Eric R4 avatar image Eric R4 commented ·

@Joseph Gillespie

Thank you again for your help. Those tutorials are helpful. I spent some time on them today. Unfortunately, I think this direction is not helping me. I've messed around with this for a while and I think I am regressing. Can we start over? I've re-attached the model. It is the same as the original (I removed the Process Flow), EXCEPT, I am trying to force only 1 Processor running at a time by adding 1 Operator. The Operator must carry the items to the Processors. I made this Operator lightning fast and able to carry thousands of items at a time (so essentially he is Superman), just to facilitate my logic. I thought that by having 1 Operator that I could limit which Processor was running. It is kind of cheating in a sense, no? Unfortunately, he jumps from Queue to Queue sometime. Is there any way to make him stick with 1 Queue, until it is emptied, before moving on to the next Queue?

I like to zoom out and run the model and watch those white, red, and blue queue stacks. My goal is to make this model operate with only 1 stack decreasing at a time (when it is simultaneous, it is skewing my results). I've played around with different Operator configurations and settings with no luck. Example, at about 18 minutes into the model run, you can visibly see the white and blue stack decreasing at the same time.

Thanks again for your help! I've learned a lot about Flexsim in the last 48 hrs.

Regards,

Eric

dl-3-filter-1-pump-model-v5a.fsm

0 Likes 0 ·
Joseph Gillespie avatar image Joseph Gillespie Eric R4 commented ·

@Eric R4

I don't think that using the superman operator is a good idea since it isn't very realistic, and what you are asking for with having the operator stick with one queue would require Process Flow. If you are going to use Process Flow anyway, why not go with the solution I provided earlier? What difficulties were you having with it?

0 Likes 0 ·
Eric R4 avatar image Eric R4 commented ·

@Joseph Gillespie

Thanks! When I try to use your version 2, I am having issues I cannot resolve. I've been playing with it a little bit more this morning. I can't even get the model to run more than 12 minutes. My 1st batch of Group A Fill 1 (white items) is supposed to be 10,500 lb. Getting these batch amounts right is critical for the model to be realistic. Without the Process Flow, this batching logic works every time. With your Process Flow logic, for some reason Group A Fill 1 Processor (white) stops 500 lbs too soon. Specifically, on the Process Flow, the Processor1 releases the Resource with 500 tokens still remaining. Any idea why it is doing this?

Also, another question (just for learning purposes). Does the Processors Resource have a default priority? For example, will it go from Processor1 to Processor2 to Processor3 sequentially, every time? Or could it jump around and go from Processor1 to Processor3 to Processor2, on occasion?

Thanks for your help!

Regards,

Eric

0 Likes 0 ·
Joseph Gillespie avatar image Joseph Gillespie Eric R4 commented ·

@Eric R4

The reason for the problem with your batching efforts was that you were using the queues to batch the items, but the Process Flow overrode that by instructing the model to send the items as soon as the processors were acquired.

I assume from your last question that you would like the Processors to go in order (Processor1 to Processor2 to Processor3). Using the solution I gave above (having all of the processors serve as one resource) wouldn't work, because that operates on a first-come, first-serve basis.

Here's an adaptation of your model that has each batch sent one at a time, in order, using "Wait For Event" activities and by opening and closing ports in process flow. I think it should work the way you want it to: filterpumpmodelanswer3.fsm

Note that again, it is freezing up because of backlogs elsewhere in the model.

Let me know if you have any questions on how it works.

0 Likes 0 ·
Eric R4 avatar image Eric R4 commented ·

@Joseph Gillespie

Thanks. Actually, I need these processors to operate on a 1st come, 1st serve basis (not sequentially). Therefore, I think filterpumpmodelanswer2 is my best bet. With #2, no matter what I do the first batch will not empty. Processor 1 (Process Flow) will not process more than 10,000 units (goal is 10,500) and always leave 500. This is true whether I use "batch" or not in the queue, or whether I increase the batch values.

Regards,

Eric

0 Likes 0 ·
Joseph Gillespie avatar image Joseph Gillespie Eric R4 commented ·

@Eric R4

Here's a model in which I combined elements from 2 and 3. It still uses the acquire activity to acquire the processors on a first-come, first-serve basis (though if you leave the model as is it will always follow the same order), and it also uses the same logic as filterpumpmodelanswer3. I also disconnected it from the rest of your model so that you will be able to see that it is working on its own.

filterpumpmodelanswer4.fsm

0 Likes 0 ·
Eric R4 avatar image Eric R4 commented ·

@Joseph Gillespie

Thanks! This logic looks awesome. However, it still doesn't run. When I open up your model it will not run (no errors). The time will not progress beyond 0.00. The Queue's fill up with items but then it stops. I attached a screenshot, Fill1 is still "waiting for batch complete", the processor on Fill 1 is not running. It is as if the "Open Fill 1 Input" logic is not working. Are you sure this is running on your machine? Can you check again. Is there some obvious reason why it wouldn't run on mine?

Regards,

Eric

screenshot-of-josephs-model.gif

0 Likes 0 ·
Joseph Gillespie avatar image Joseph Gillespie Eric R4 commented ·

@Eric R4

Sorry about that, the problem was an issue with the timing of the "Close All Fill Input Ports" activity. I changed the sources in the "Fill" Process Flow boxes to trigger at time 0.01 instead of 0, so that shouldn't be a problem anymore.

filterpumpmodelanswer4fixed.fsm

0 Likes 0 ·
Show more comments