question

Craig DIckson avatar image
0 Likes"
Craig DIckson asked Sam Stubbs commented

Resource capacity not updating as expected?

resource-capacity.jpgIn a process flow model, I have a resource. In the Count field I have an integer global variable. The variable default is 1, but the value is set higher immediately when the model starts (eg, 300). However getstat(<resource>,"ResourceAvailable",STAT_CURRENT ) continues to return 1, even after putting a few Delay(0) activities, until the time changes. In fact, when I graphed it on a dashboard, it stayed at one for a full 150 seconds (which is when it was called again.This is causing problems in some other calculations I am doing.

Is this a bug, and if not is there a way I can force it to update so my other calculations work correctly?

FlexSim 16.2.2
process flowresources
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

Sam Stubbs avatar image
0 Likes"
Sam Stubbs answered Sam Stubbs commented

The resource quantity does not update dynamically during the runtime of a model as far as I understand. As an alternative, I would try using a list, have the number of items pushed to a list. If you're just using a numeric resource you could easily set this up by having Scheduled source in your process flow, with the number of tokens created equal to your Global Variable. Then just have the next activity be a Push to List, and push that number onto the list.

Then instead of Acquire and Release activities, just have Pull and Push to list activities instead.

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