I want to pass the destination node in which my agent is going to/is at as a string.
I have an agent (car) that has multiple parameters one of them being location. I have a resourcePool with multiple home locations in which the car can park (move to home of seized unit). I am trying to collect the node in which the car is parked at and pass it as a string to this location parameter as such when it exits the moveTo block:
if(moveTo.destinationNode(agent) == nodeA) {
agent.location = "A";
} else {
agent.location = "NULL";
}
However, when a car is parked on nodeA. I expect the value of location to be A, but the parameter comes up as NULL which it should not be. Any recommendation would be of great value. Thanks!
nodeA
? AString
? – GBlodgett.equals()
– GBlodgett