A Basic Agent
Posted by Patrick R. Jordan 10 months ago
- messageReceived
- simulationSetup
- simulationFinished
- sendMessage
method. The send / receive methods enable communication between the external agent and the server. The setup / finished methods provide notification of the start and end of a simulation. A skeletal implementation of a basic agent is provided in the following code block.
import se.sics.tasim.aw.Agent;
import se.sics.tasim.aw.Message;
public class BasicAgent extends Agent {
protected void messageReceived(Message message) {
// Handle messages
}
protected void simulationSetup() {
// Setup your agent
}
protected void simulationFinished() {
// Release your agent's resources
}
}