Search code examples
anylogic

How to add agent's presentation which is in another to the main?


Hi I have an agent called B in side my agent A. Agent A has been added to the main. I have a plot inside agent B and I want to show that in my main. So I am calling currentTurbine.plot.setLocation(plotNode); in on startup field in main but this will not add the plot onto my main. Any reason for this? And how can I achieve this?


Solution

  • Do it differently:

    1. In the plot properties, ensure to tick "show on upper level"
    2. select AgentB that is embedded in Agent A
    3. in the properties of AgentB presentation, click the "shhow presentation" button (if it is grayed out, that is fine)

    You will now see AgentB's presentation alongside AgentA's presentation on Main