question

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

"Clear Out Object's Content" on Queue is making model run very slow?

@Joseph Gillespie

Concerning my attached model, you helped me setup the Process Flow. I added 3 Sink's off of each Processor to keep the model working (so the Processor's don't back up from the downstream batch process). Each Sink, on entry, sends a message back to the Queue which triggers the queue to "clear out object's content". I am doing this to make the model realistic (I don't want to accrue time when the items are being sent to the sink, because there is no sink in reality).

The good news is that the model is working and it is exactly what I wanted this simulation to do! The bad news is that since I added these new triggers (between the 3 sinks and the 3 queue's), the model run speed is very, very, slow (too slow to be used). Why is this so slow? And how could I speed this up? I know it is the recent triggers that slows it down because if you remove the "send messages" from the sinks, you can observe that the model run time speeds up dramatically. The model really starts slowing down around 40 min run time.

Thanks for any assistance you can provide. As an FYI, my computer at least meets the minimum requirements recommended by Flexsim (I can give you details if you desire).

Regards,

Eric

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

FlexSim 19.1.1
queiu trigger
· 4
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

My apologies, I may be stretching my capabilities for 1 of my first models. Maybe I'll try that, switch to a different fill whenever my items move to the sink.

As I originally stated, this model is actually working perfectly, it is just a run-time issue. Maybe I should just rebuild the model and choose different units. I am using "lb" and "min". I will keep the "min", but maybe I could replace the "lb" with something else. "Ton" is a a little too extreme because it is 3 orders of magnitude larger than a "lb". Maybe an intermediate unit would work. I could even make up a unit like 10*lb or 100*lb (and convert outside of the model). I could choose "gal" for example and pretend 1 gal = 10*lb or 100*lb. Your original comment was, to paraphrase, the model can't handle 10,499 items being cleared out hundreds of times per second. If instead of 10,499 it was 1,049.9 or even 104.99, would you expect this to improve the model speed substantially?

I will try this first, later this morning. If it doesn't work, then I will try what you suggest below. If you have any thoughts on this, please let me know?

Thanks?

Regards,

Eric

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

@Eric R4

First off, changing the model units won't change how many items are required to fill the queues and clear out the queues. The only way to change that is to change how many items the queues hold, but I'm pretty sure you don't want to change your batch sizes.

Here's a model with a new Process Flow that I made that does what you have been asking for, though it doesn't use 3D for batching anymore, it just sends items to the processor until either the batch limit has been reached or one of the items gets sent to the sink: filterpumpmodelalternatebatching.fsm

You'll notice that this model starts to really slow down at about 70 minutes, at which point it is constantly switching between Fills since all of them are backed up. If this is too slow for you, I think that you will either have to figure out how to solve the backlog in the rest of your model that is causing it to go so slow or set it up so that the "Group A Fill" processors wait a few seconds before switching to the next one when they are too full. Constantly switching between processors to try to find one that isn't backed up will only make your model slow and not do much to increase the throughput of your model.

Another option could be to remove the sinks and allow processors to freeze with one item on them. That way, if the item leaves the processor, you'll know that that processor is available and you can switch back to that one. If all of the processors are backed up, nothing will happen and your model won't go slow.

Other options include adding queues (though you said you can't) or just letting the processors wait for their ports to open up.

Again, when you have the time, make sure to go over the Process Flow tutorials since that will help you to better understand what is and isn't possible in Process Flow.

I hope this helps!

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

@Joseph Gillespie

Thanks for the response. FYI, the model you added is very interesting. FYI, it doesn't work. Whenever I run it time will not progress and it throws errors. I am curious to see this run though, for learning purposes.

In terms of my specific model, I think I got it. I ended up doing what I said. I ended up changing the batch sizes and processing rates by 2 orders of magnitude (divide by 100). So essentially, instead of using the units=pound, I am using hectopound (if there is such a thing), where 1 hectopound = 100 pounds, or 1 hlb = 100 lb. By doing this, my model runs 10,000 min in about 15 seconds. The model is now running about 80,000 times faster!!!!!! I would have never imagined a 2 orders of magnitude change in my # of items resulting in a 4 or 5 orders of magnitude processing speed! I've attached it below. It is the exact same model as the original attachment, except I changed the batch sizes and processor rates. The only downside to this is that I have to remember to multiply all my results by 100 to convert back into lbs. I think I am good and can move on with this model, thank you for all of your help.

Regards,

Eric

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

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

@Eric R4

I'm glad you got that figured out! Here's a fixed version of the last model I sent you, again the problem was with the timing of the sources at the beginning. Hopefully it should work for you now. 21569-filterpumpmodelalternatebatching.fsm

0 Likes 0 ·

1 Answer

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

@Eric R4

The problem with the model after 40 minutes is that it gets so backed up, the items are getting sent to the sinks every time. When that happens, every time an item is processed, all of the items in the queue (up to 10499) are being cleared out and immediately replaced. That is a lot of items to eliminate and re-create, and at the speeds you have the model running, this process is happening hundreds of times per second.

I would recommend adding queues after your processors like in this model: filterpumpmodelwithqueues.fsm

That way, you keep the items that have already been processed and they do not get in the way of new items being processed.


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

Eric R4 avatar image Eric R4 commented ·

@Joseph Gillespie

Thanks for the response. I understand what you are saying. Adding these queue's would help a lot. The problem though, is that they add a wide-spot buffer that makes the model unrepresentative of the real process that I am trying to simulate. Model cycle times (of the filters) are a lot faster than reality.

I have another approach, I just don't know how to do it. I've reattached the original model (except I removed the Sink messages to the queue's to "clear out object's contents". This model is able to run at a great runtime all the way up to 10,080 min (1 week), which was my goal (it does not get bogged down).

In this model, my 3 processors have 4 outlet ports, each. Is there a way to specify the "process time" for each outlet port? Specifically, I would like to speed up the "process time" when going to the sink.

Thanks again!

Regards,

Eric

dl-3-filter-1-pump-model-v10-removed-clear-out-que.fsm

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

@Eric R4

Processors decide which output port to send items to when they are done processing and not before, so your solution would not be possible.

Sorry if I'm not giving you good solutions to this, I'm still trying to understand exactly what you are trying to do here. Maybe you could set it up so that when an item enters a sink the model switches to a different fill? Though even with that solution it may slow down the model because it inevitably everything will get backed up and it will get stuck switching fills repeatedly as all three fills will be blocked.

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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