question

Leo L6 avatar image
0 Likes"
Leo L6 asked Felix Möhlmann commented

Conditional decide on resource available

How do I create a conditional decide based on whether a resource can be allocated? So I know you can use this: getstat(getactivity(processFlow, "Resource"), "ResourceAvailable", STAT_CURRENT, current) to get current number of resources available but I want to take it one step further and say "check if resource available WHERE Type ==1" for example.

How can I do this?

Thanks in advance

FlexSim 22.0.16
resourceconditional decidewhere query
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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann commented

The easiest I can think of right now would be to just try to acquire that resource with a maximum wait time and send the token to a different connector when the wait time elapses.

If you don't actually want to acquire the resource at that point you can release it immediately after.

Alternatively you could query the internal table (if the resource represents actual objects in the model and is not just Numeric). Or you go with a list instead of a resource to begin with. Which would allow you to use the first method of just trying to pull a value but leave it on the list, even if successful.

1683267354675.png


1683267354675.png (7.9 KiB)
· 5
5 |100000

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