Change global table values depending on an average value

Change global table values depending on an average value

stefano_l
Not applicable
100 Views
3 Replies
Message 1 of 4

Change global table values depending on an average value

stefano_l
Not applicable

[ FlexSim 19.0.3 ]

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.

Accepted solutions (1)
101 Views
3 Replies
Replies (3)
Message 2 of 4

tanner_p
Not applicable
Accepted solution

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.

23479-update-table-capacity.png

mean-model-updated.fsm

Message 3 of 4

stefano_l
Not applicable

Thanks @tanner.p but actually, I was looking for a way to store the capacity values of the items Exiting the warehouse and then average these values. The result of the average allows to decide whether to modify the global table or not.

0 Likes
Message 4 of 4

tanner_p
Not applicable

That makes sense. I'm not sure how frequently you'll be evaluating the average capacity, but you should be able to do the same thing. The only difference would be that instead of updating values in a Global Table immediately, you can write the capacity values to Global Variables or perhaps another table and then average those based on a trigger whenever you're ready to evaluate.