public class Environment
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList |
agentinfos
The hashtable containing all agent infos.
|
static java.lang.String |
CARRY_AGENT
The carry agent type.
|
protected Homebase |
homebase
The agents homebase.
|
protected static Environment |
instance
The enviroment insstance.
|
static java.lang.String |
PRODUCTION_AGENT
The production agent type.
|
static java.lang.String |
SENTRY_AGENT
The sentry agent type.
|
protected java.util.ArrayList |
targets
The target locations.
|
Modifier and Type | Method and Description |
---|---|
static void |
clearInstance()
Clear the singleton instance.
|
static Environment |
createInstance(jadex.bridge.service.types.clock.IClockService clock)
Create a new instance.
|
AgentInfo[] |
getAgentInfos()
Get all agent infos.
|
Homebase |
getHomebase()
Get the homebase.
|
static Environment |
getInstance()
Get the environment.
|
Target |
getTarget(Location loc)
Get a target for a location.
|
Target |
getTarget(java.lang.String id)
Get the target for the target-id.
|
Target[] |
getTargets()
The the info for an agent.
|
Target[] |
getTargetsNear(Location loc,
double tolerance)
Get all targets near a position.
|
void |
setAgentInfo(AgentInfo agentinfo)
The the info for an agent.
|
public static final java.lang.String CARRY_AGENT
public static final java.lang.String PRODUCTION_AGENT
public static final java.lang.String SENTRY_AGENT
protected java.util.ArrayList agentinfos
protected java.util.ArrayList targets
protected static Environment instance
protected Homebase homebase
public static Environment getInstance()
public static Environment createInstance(jadex.bridge.service.types.clock.IClockService clock)
public static void clearInstance()
public Target[] getTargets()
public Target[] getTargetsNear(Location loc, double tolerance)
public Homebase getHomebase()
public void setAgentInfo(AgentInfo agentinfo)
public AgentInfo[] getAgentInfos()
public Target getTarget(Location loc)
public Target getTarget(java.lang.String id)