I'm modeling DES using material handling library that has multiple AGVs on guided path. There are a few rectangular nodes that covers some part of the path that AGV travel pass through. I have an event in the AGV that will trigger randomly. Once the event trigger, the action depends on which rectangular node the AGV is currently.
Question: Is there a Java function to get the name of the node that the AGV is currently in?
I have similar action to check the path that was set at 'On enter path' in transporterFleet box
if(path == path1) {
action 1}
if(path == path2) {
action 2}
if(path == path3) {
action 3}
else {
action 4}
but this time I need to get node name in 'action' within an event. Not sure what function there is.
You can do it the other way around:whenever an AGV enters a node, the node tells the AGV "store me":
Node
named myNode
into your AGV agent typeagent.myNode = self;
Now, your AGVs will always "know" about their current node. On exit, you could reset it to null
to avoid confusions