question

Noah Z avatar image
0 Likes"
Noah Z asked tannerp commented

Dynamic resource quantities during sim run

corrected-version-example-problem-resource-update.fsm

I'm attempting to have a resource within a process flow model have a varying amount of available resources within various time segments in a single day during a simulation run. I've created a global table that has the numerical value of the amount of resources that that I want from hour to hour (essentially increasing staffing levels during the busiest hours of the day). I have a token looping back through custom code every hour, on the hour but I'm stuck trying to figure out the correct reference I should be updating within the code snippet.

What is the best way to do this? I have attached a dummy model related to this question.

FlexSim 18.0.1
process flowresource
· 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.

Andrea B9 avatar image Andrea B9 commented ·

Can you share an example with resources that vary during the time

0 Likes 0 ·
tannerp avatar image tannerp Andrea B9 commented ·

@Andrea B9,

This question is pretty old, and your comment will likely not be seen by very many users. We recommend that you post a new question. You can reference this post in your own. Please review the Answers Best Practices for more information. Thanks!

0 Likes 0 ·

1 Answer

·
Matt Long avatar image
2 Likes"
Matt Long answered Matt Long commented

You should define the resource quantity in the Count field of the Resource. The count could reference a global table value, a label or Process Flow Variable. When you want the Resource count to change, change the value of whatever you're referencing. The Count field will be evaluated each time a resource is acquired or released.

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

Noah Z avatar image Noah Z commented ·

Perfect thanks. For some reason I had assumed the resource checked the Count field at the beginning of the sim run only.

0 Likes 0 ·
Matt Long avatar image Matt Long Noah Z commented ·

You can refer to the User Manual under the Resource help page to learn more about how the asset works.

"When in numeric mode, the Count property can dynamically change during the simulation. It will be reevaluated every time a token attempts to acquire a resource and whenever a resource is released."

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.