alehak
alehak

Reputation: 47

How to place nested agent on map in Main agent

I am trying to build Anylogic agent model with Countries, Cities and Airports. I've created Countries population in Main agent, Cities population in every Country agent, Airports population in every City agent. Airport agents have coordinated and should be placed on GIS map, located in the Main agent.

However, they are not displaying now, and the only population that I can place on the Main GIS map is Countries.

How can I place Airports nested agents on Main GIS map, without creating new population of airports directly in Main?

Upvotes: 1

Views: 218

Answers (1)

Benjamin
Benjamin

Reputation: 12795

Probably easiest if you have all populations on Main. Then, connect them not via embedding (as you do now) but via "Agent links". This way, all are easily displayed on the GIS map.

You can link them such that each country has a "myCities" list and each City has a "myAirports" list. At the model start, each city/airport "registers" into its correct country/city using the agent-link code connectTo(...)

Upvotes: 0

Related Questions