question

Kade G avatar image
0 Likes"
Kade G asked Kade G edited

Closing and Opening a processor input depending on a queue's size

Hello,

I've modified an example posted in another forum that has a similar purpose. The only difference is that I am using a processor in place of a transporter

https://answers.flexsim.com/questions/43479/refill-a-rack-or-queue-depending-its-level.html

Just to be clear, I want to close the input of the processor when the inventory increases to a certain value, and open that same input when inventory drops below a certain value, but my changes to the triggers don't seem to work. Do you have any idea as to how I can fix my issue?

closeinputports-example_1.fsm

FlexSim 20.1.2
flexsim 20.1.2triggersopening and closing inputs
5 |100000

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

1 Answer

Benjamin W2 avatar image
0 Likes"
Benjamin W2 answered Kade G edited

Your "On Exit" trigger is currently opening "Processor1"'s input port every time an item exits the queue. I think if you change this trigger's logic, you will be able to control the inventory as you would like.





inventory.gif (516.0 KiB)
1590533042896.png (52.4 KiB)
· 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.

Benjamin W2 avatar image Benjamin W2 commented ·

Here is the attached model:

closeinputports-example-1.fsm

0 Likes 0 ·
Kade G avatar image Kade G commented ·

Close Input of Process.fsm


The example you provided does almost exactly what I want it to do. How could I close the input of the processor preceding the queue with that same trigger in the queue? Here is a model where I use some custom code to try and close the input of the processsor when the queue's inventory is above a certain value. I try to open that same input, but my code doesn't seem to have any effect.

0 Likes 0 ·
Braydn T avatar image Braydn T Kade G commented ·

@Kade G

https://docs.flexsim.com/en/20.1/Reference/CodingInFlexSim/BasicModelingFunctions/

You can find all you need about ports here under Object Control.

0 Likes 0 ·