question

stefano L avatar image
1 Like"
stefano L asked tannerp commented

Change global table values depending on an average value

Hi,

How can I store the Capacity label value of items leaving the warehouse to be able to calculate the average? Afterwards I need to see this average and, if it is too high (close to 90%) or too low (close to 60%), change all the values of the global table ValueTable setting them all to 100 or 50 respectively. The Capacity label of items in the warehouse are updated every 10 seconds through the custom code "Capacity Update" in the process flow.

Model attached here:

mean-model.fsm

Thanks.

FlexSim 19.0.0
FlexSim 19.0.3
global tablelabelswarehouseitemsaverage
mean-model.fsm (52.4 KiB)
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

tannerp avatar image
1 Like"
tannerp answered tannerp commented

Hi @stefano L,

I'm not sure if this is what you're looking for, but I added a couple lines of code in your Capacity Update activity that check if the capacity is below 60 or above 90. If so, they will set all the values in the table to 50 or 100.

mean-model-updated.fsm


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