Reputation: 83
I have a selectoutputIn block and multiple selectOutputOut blocks that are connected to service blocks. The selectoutputIn block uses a function to determine which output for the agent. Is there an easy way to insert a list and determine the first available service block is to be selected. If I were to add more service blocks, how can I make it easy to do so?
Upvotes: 0
Views: 91
Reputation: 9421
If you have 1000 of these services, it's better to create 1000 agents that will have the following structure inside:
You need an exit block when you have a population to get back to main, the selectOuputIn won't work.
To select an available service block you can then do this in your selectOutputIn explicit choice (using agents)
findFirst(myAgents, a->a.service.delaySize()==0).selectOutputOut
Upvotes: 1