AnyLogic 6 Discussion

Hi I posted before about my border patrol problem. I decided I cant use pedestrian library. I need some help. I like what goes on in Flock of Boids problem, but it seems pretty complicated. Whats the best way to have an agent of type1 move towards an agent of type2? ie, policeman move towards enemy? Also, to make it more complicated, in the future i will have multiple policemen.. how do i select just *one* to go towards an enemy (I dont want all of them chasing the same guy). And specficically pick that one? Also, last question.. I was looking at the "Square" pedestrian model at http://www.xjtek.com/anylogic/demo_models/88/ Any clue on how the cars are moving, switching lanes, and turning? Also, peds move towards street corner, wait, and then cross street. Is this done with Ped library? If not, i would LOVE to know how... Thanks Ryan
Hi Ryan, I think it is better to use agent-based approach. There is a rich set of instruments to make agents move, stop and interact with each other. At any moment of time from any agent you can read the current position of some agent and make it to move towards it using "moveTo()" method. The behavior of the agent is defined using statecharts and built-in events like "On arrival" and "On message receive". As for the "Square" model, it was developed in AnyLogic 5 using special not public Transport Library. This library is based on agent-based approach. I hope it will help you.