Reputation: 57
I am trying to do modeling using Anylogic pedestrian library where an agent (A) will communicate with another agent (B) only if the other agent is within certain vision angles and arc radius of A. The conventional way of communication is to define certain distance based communication where the distance defined forms a sphere around the agent. But I want to model that the agent will not be able to communicate with other agents who are not within his vision angle (like a conical projection & certain distance). For example, the agent should not be able to communicate with others who are behind him. How I can do this?
Also, I am trying to model individual agents behavior (those abovementioned pedestrian agents) through agents statechart. Unfortunately, agent states aren't changing based on communication in my model. Is it due to using pedestrian library? Can we model pedestrian agents behaviour by statechart? It would be a great help if someone can answer those questions.
Upvotes: 1
Views: 212
Reputation: 9421
you can use just a polygonal node or area and use it like this:
if you want to evaluate if a pedestrian or agent is in the field of vision, you need to get x and y for that agent and do:
if(fieldOfVision.contains(x,y))
//communicate with that dude
Upvotes: 1