In a pedwait entity, I want each element that enters to have my own specified coordinates. I use the method: ped.setXY(100,100)
, but it has no effect. What should I do?
First you need to read the Java doc when using a new function.
The setXY
function states "Sets the coordinates of the agent location. Should only be used to initialize the agent location. Assumes the agent is not moving."
The other options that I would have suggested if you were using normal agents would be to use jumpto()
or moveTo()
but if you try these in a pedestrian model you will get an UnsupportedOperationException
error.
Pedestrians are special kind of agents so you can use all the normal agent functions on them.
The correct way to do this is to use the waiting location inside the Wait block