Reputation: 1
I need to create an agent that multiple Destination nodes to visit before it is then released.
These node identifiers are contained in a database table on multiple rows for a single assignment identifier.
The node will be named using the 'lane' column and the assignment needs to be grouped by the 'assignment' column. e.g. for assignment 001 the agent needs to visit, in order, nodes 701, 702, and 703.
My current flow is Source -> RackStore -> RackStore -> Sink. Where the agent is created, is stored in a holding rack, and is then picked up by a resource worker who takes it and stores it in its final destination rack.
However, I can only set this up with a single specific node destination that is selected in the GUI.
I can't work out how to have an agent that has multiple destination nodes on its creation. Is this possible?
EDIT FOR CLARITY (hopefully)
An agent (called assignment) is created and given a parameter of assignment id from the database.
Then it will be given a series of lanes (nodes) to visit based on that assignment id.
So from that table snippet above, an agent is created in Source and is given an assignment id of '001'. it then has a list of nodes to visit base on this id: 701, 702, and 703.
I can't see how to set these lanes in a list/collection and then code the agent to go through that list/collection and loop back to rackstore if it is not complete.
Upvotes: 0
Views: 462
Reputation: 12640
Everything is possible in AnyLogic ;-)
You can always switch the static GUI inputs to Java code by clicking the small "=" symbol next to your input, as below:
It is not quite clear what exactly you want to achieve but you might want to try sending your agents through the same RackStore
element until they have visited all their locations.
For that, you'd need to store all required locations inside the agent on startup and manually tick them off everytime the agent moves through the RackStore
element.
Possible but there is no "pre-build" way to do it. So you will need to check out example models, do all the tutorials and keep trying. Or get a support license and they will build and example model for you ;-)
Upvotes: 0