I have four agents in the main of an Anylogic's model, as seen in the photo, in each agent I have a state chart, and in one of the transitions I want to send a message to another agent (neighbor agent not parent), in the same class as they are both in the main, meaning that I want to send a message from a transition in the compressor agent to the transport agent saying "system failure" and then from the transport agent back to the compressor agent.
I tried the following trials:
Your question is ambiguous, some suggestions:
Send from 1 compressor agent to another (say from compressor agent #3 to #1):
main.compressor.get(1).myCompressorStateChart.fireEvent("myMessage")
Send from 1 compressor agent to a transport agent (say from compressor agent #3 to transport agent #1):
main.transport.get(1).myTransportStateChart.fireEvent("myMessage")
Send from 1 tranport agent to a compressor agent (say from tranport agent #1 to compressor agent #3):
main.compressor.get(3).myCompressorStateChart.fireEvent("myMessage")