In AnyLogic, I have a custom agent called ‘Slab’. I’ve created an agent population using this agent, where an event
creates a ‘Slab’ agent every 3 minutes, labeled as S0, S1, S2, and so on. When these slabs stack, I can control the stacking order by setting the z-value so that the later generated agent, S2, appears on top of the earlier generated agent, S0. However, in the 2D view, S0 still appears on top. How can I make S2 display above S0 in the 2D view?
anylogic 2D and 3D view
-
I found this help link on the AnyLogic official website, but it doesn’t solve my issue, the function requires parameter of type
MarkupShape
, but my agent doesn’t extend from MarkupShape. -
I found that if I instantly generate all the required agents before showing the presentation, and adjust the order of agents within the population by using goToPopulation(), it works well. However, if I generate one every few minutes, I cannot achieve the desired effect. Nevertheless, the reality is that I need to generate one at intervals.my code
earor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.