This module provides some very basic agent framework written in Java. EISMASSim is integrated so that agents can communicate with the MASSim server out of the box.
Some very basic agents are included mainly for testing purposes.
- Add a new class for your agent somewhere in massim.javaagents.agents
- Make your class extend massim.javaagents.agents.Agent
- Add your class with a type name to the setEnvironment() method of massim.javaagents.Scheduler
- Create a JSON configuration file for your agents
A sample configuration might look like this
{
"agents" : {
"agentA1" : {"entity" : "connectionA1", "team" : "A", "class" : "BasicAgent"},
"agentA2" : {"entity" : "connectionA2", "team" : "A", "class" : "BasicAgent"},
"agentA3" : {"entity" : "connectionA3", "team" : "A", "class" : "BasicAgent"},
"agentA4" : {"entity" : "connectionA4", "team" : "A", "class" : "BasicAgent"},
"agentA5" : {"entity" : "connectionA5", "team" : "A", "class" : "BasicAgent"},
"agentA6" : {"entity" : "connectionA6", "team" : "A", "class" : "BasicAgent"}
}
}
The attributes of each agent are
- [key]: the agent's name
- entity: the EIS entity name as configured in eismassimconfig.json
- team: the agent's team name
- class: the agent's type as registered in the scheduler class