Grid Environment
A guide to Grid environments in SCOP Framework.
Environment is a first-class abstraction in the modeling and engineering of complex computational systems, such as pervasive, adaptive, and multi-agent systems [Weyns]. It is usually modeled through the resource abstraction, as a non-goal-driven entity producing events and/or reactively waiting for requests to perform its function. Environment is essential in coordination since it works as a mediator for agent interaction through which agents can communicate and coordinate indirectly. It is active; featuring autonomous dynamics, and affecting agent coordination. It has a structure; requiring a notion of locality, and allowing agents of any sort to move through a topology.
To this end, Environment is modeled as an agent. Environment is mainly in charge of
In this generic implementation, there is no limitation about the number of agents and/or artifacts that can be allocated to an address (e.g., in a Grid environment several agents may be at the same position). Similarly, there is also no limitation about the number of addresses an agent can allocate (e.g., in a Bitcoin environment an agent may have several wallet addresses).
To create a generic environment, do simply the following inside the setup() method of a Mage agent.
public class MyMage extends Mage {
@Override
protected void setup() {
// create an environment named "MyEnvironment"
Environment environment = create(new Environment("MyEnvironment"));
...
}
...
}
To create agents for the environment, nothing special needs to be done.
Agents can be created one by one:
Agent agent = create(new Agent() {
//... agent setup code ...
});
or in a loop, usually for a desired amount of agent count:
for (int i = 0; i < numOfAgents; i++) {
Agent agent = create(new Agent() {
//... agent setup code ...
});
}
After an agent is created, it can be added to the environment using the add method of the GroupManager role:
environment.as(Groupanager.class).add(agent).execute();
Upon being added to the grid environment, the GroupManager role assigns the Communicator role to the agents so that they can communicate with other agents in the same environment.
A guide to Grid environments in SCOP Framework.
A guide to Grid environments in SCOP Framework.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.