Good day! I faced the challenge of writing the function for allocation of the agents into SelectOutputOut blocks. Considering various scenarios of using if...else statements in function I understand that all possibilities must be covered (as suggested here). However, the problem is that I don't want the agent to leave the function before it gets the appropriate SelectOutputOut block. This situation may occur if there are not enough resources in any Service blocks (Network1, Network2 or Network3). In this case, it is necessary to wait for any Service block will have enough resources for servicing the agent. For this purpose, I tried to use the while loop, but it doesn't help. The questions are:
- How to write the if-else statements to force the agent waits for enough resources in any Service block
- Does the Select function monitor the parameters which are outside it? In other words: Does it know about the states of Service blocks during its execution?
Thank you.




