Example of using communication facilities, using the communication model.
![Communication example](/images/examples/communication-example.gif)
This is an animation of the communication example.
Here you can see several agents randomly driving around. The color of each agent indicates the reliability of its communication device, where green is reliable and red is unreliable. The circle around each agent indicates its communication range. Consider agent A and B. If agent A is contained inside the circle of agent B, it can receive messages from agent B. Only if agent B is also contained inside the circle of agent A, can agent A reply.
Relevant classes
CommExample | Contains the main of the example. It configures the simulator models and visualization and adds several agents. |
ExampleCommunicatingAgent | An example implementation of a CommUser . It shows how broadcasting and direct messaging works. Take a look at the tick(..) method for details. |