Is it possible to modify agent's variable by tracing it's position whether it's inside or outside a certain node?
I have a string variable position
inside pedestrian which I want to define depending if agent is outside, inside green or red node (ex. "Green"
, "Red"
or "None"
.).
I digged up the following code that works fine where it comes to tracing if agents are inside a given node or not, but I don't know how to use it so it actually modifies a variable inside an agent.
nodeGreen.getPeds(),p->node.contains(p.getX(),p.getY())
my simple model with green and red node
new agent - "pedestrian" with string variable
Many thanks for help, Peter