|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DefinitionEnvironment
The DefinitionEnvironment
is a wrapper for the actual gsim environment managing agents and objects. The wrapped object can be a local
or remote reference.
The DefinitionEnvironment
and its related interfaces (e.g. AgentIF, AgentClassIF
provides convenience method for the
gsim environment that eases its use as a programming model and hides some of the ugly things necessary to maintain a consistent state of the frame
and instance hierarchies in the background.
Note: Names are unique identifiers. When creating single objects or agents, it must be made sure that the name does not exist yet.
Field Summary | |
---|---|
static int |
RAND_ATT_AND_WEIGHT
Constant for creating random attributes and weights (weights are only for fuzzy matching utility) during instanciation using a normal distribution. |
static int |
RAND_ATT_AND_WEIGHT_UNIFORM
Constant for creating random attributes and weights (weights are only for fuzzy matching utility) during instanciation using a uniform distribution. |
static int |
RAND_ATT_ONLY
Constant for creating only random attributes during instanciation using a normal distribution. |
static int |
RAND_ATT_ONLY_UNIFORM
Constant for creating random attributes during instanciation using a uniform distribution. |
static int |
RAND_NONE
Constant specifying that no attributes should be varied during instanciation. |
static int |
RAND_WEIGHT_ONLY
Constant for creating random weights (only for fuzzy matching utility) during instanciation using a normal distribution. |
static int |
RAND_WEIGHT_ONLY_UNIFORM
Constant for creating random weights (only for fuzzy matching utility) during instanciation using a uniform distribution. |
Method Summary | |
---|---|
AgentClassIF |
createAgentClass(java.lang.String name,
java.lang.String parentName)
Creates an AgentClass. |
AgentClassIF |
createAgentClass(java.lang.String name,
java.lang.String parentName,
int order)
Creates an AgentClass and sets the execution order, i.e. |
ObjectClassIF |
createObjectClass(java.lang.String name,
java.lang.String parent)
Creates an ObjectClass. |
ObjectInstanceIF |
createObjectInstance(java.lang.String name,
ObjectClassIF parent)
Instanciates an object. |
void |
destroy()
Method required for memory management. |
gsim.def.InheritanceHierarchy[] |
exportAgentHierarchy()
Returns a tree with the agents (frames and instances) in the inheritance order. |
gsim.def.InheritanceHierarchy[] |
exportObjectHierarchy()
Returns a tree with the objects (frames and instances) in the inheritance order. |
AgentInstanceIF |
getAgent(java.lang.String name)
Returns an agent from the environment. |
AgentClassIF |
getAgentClass(java.lang.String name)
Return a particular agent class. |
AgentClassIF[] |
getAgentClasses(java.lang.String parent)
Return agent classes. |
java.lang.String[] |
getAgentNames(java.lang.String parent)
|
AgentInstanceIF[] |
getAgents(java.lang.String parent)
Returns a list of agent instances. |
AgentInstanceIF[] |
getAgents(java.lang.String parent,
int offset,
int count)
Returns a list of agent instances of a particular type. |
ObjectClassIF |
getObjectClass(java.lang.String name)
Return a particular object class. |
ObjectClassIF[] |
getObjectClasses(java.lang.String parent)
Return object classes. |
ObjectInstanceIF[] |
getObjects(java.lang.String parent)
|
AgentClassIF |
getTopAgentClass()
Return the generic root (the system object from which all agent classes must inherit their properties) |
ObjectClassIF |
getTopObjectClass()
Return the top level object class from which all objects must inherit. |
AgentInstanceIF |
instanciateAgent(AgentClassIF parent,
java.lang.String name)
Instanciate a single agent. |
AgentInstanceIF[] |
instanciateAgents(AgentClassIF parent,
java.lang.String prefix,
int method,
double standardVariation,
int count)
Creates a list of agents. |
void |
instanciateAgents2(AgentClassIF parent,
java.lang.String prefix,
int method,
double svar,
int count)
Creates a list of agents, but does not return them to the caller. |
void |
removeAgentInstances()
Clears the environment from agents. |
Field Detail |
---|
static final int RAND_ATT_AND_WEIGHT
static final int RAND_ATT_AND_WEIGHT_UNIFORM
static final int RAND_ATT_ONLY
static final int RAND_ATT_ONLY_UNIFORM
static final int RAND_NONE
static final int RAND_WEIGHT_ONLY
static final int RAND_WEIGHT_ONLY_UNIFORM
Method Detail |
---|
AgentClassIF createAgentClass(java.lang.String name, java.lang.String parentName) throws gsim.def.GSimDefException
name
- name of the agent typeparentName
- name of parent agent type (null if this is the top frame)
gsim.def.GSimDefException
AgentClassIF createAgentClass(java.lang.String name, java.lang.String parentName, int order) throws gsim.def.GSimDefException
name
- name of the agent typeparentName
- name of parent agent type (null if this is the top frame)order
- execution order position
gsim.def.GSimDefException
ObjectClassIF createObjectClass(java.lang.String name, java.lang.String parent) throws gsim.def.GSimDefException
name
- name of the object typeparent
- parent of the object type (nulli if partent is top frame)
gsim.def.GSimDefException
ObjectInstanceIF createObjectInstance(java.lang.String name, ObjectClassIF parent) throws gsim.def.GSimDefException
name
- name of the objectparent
- the frame from which the instance is created
gsim.def.GSimDefException
void destroy()
gsim.def.InheritanceHierarchy[] exportAgentHierarchy() throws gsim.def.GSimDefException
gsim.def.GSimDefException
gsim.def.InheritanceHierarchy[] exportObjectHierarchy() throws gsim.def.GSimDefException
gsim.def.GSimDefException
AgentInstanceIF getAgent(java.lang.String name) throws gsim.def.GSimDefException
name
- name of the agent
gsim.def.GSimDefException
AgentClassIF getAgentClass(java.lang.String name) throws gsim.def.GSimDefException
name
- name of the agent class
gsim.def.GSimDefException
AgentClassIF[] getAgentClasses(java.lang.String parent) throws gsim.def.GSimDefException
parent
- a parent frame
gsim.def.GSimDefException
java.lang.String[] getAgentNames(java.lang.String parent) throws gsim.def.GSimDefException
gsim.def.GSimDefException
AgentInstanceIF[] getAgents(java.lang.String parent) throws gsim.def.GSimDefException
getAgents(String parent, int offset, int count)
parent
- a parent frame (if null, all agents are returned)
gsim.def.GSimDefException
AgentInstanceIF[] getAgents(java.lang.String parent, int offset, int count) throws gsim.def.GSimDefException
parent
- a parent frame (if null, all agents are returned)offset
- offsetcount
- number of agents to retrieve
gsim.def.GSimDefException
ObjectClassIF getObjectClass(java.lang.String name) throws gsim.def.GSimDefException
name
- the name of the object class
gsim.def.GSimDefException
ObjectClassIF[] getObjectClasses(java.lang.String parent) throws gsim.def.GSimDefException
parent
- the parent class
gsim.def.GSimDefException
ObjectInstanceIF[] getObjects(java.lang.String parent) throws gsim.def.GSimDefException
parent
-
gsim.def.GSimDefException
AgentClassIF getTopAgentClass() throws gsim.def.GSimDefException
gsim.def.GSimDefException
ObjectClassIF getTopObjectClass() throws gsim.def.GSimDefException
gsim.def.GSimDefException
AgentInstanceIF instanciateAgent(AgentClassIF parent, java.lang.String name) throws gsim.def.GSimDefException
parent
- the frame from which the agent is createdname
- name of the agent (must be unique)
gsim.def.GSimDefException
AgentInstanceIF[] instanciateAgents(AgentClassIF parent, java.lang.String prefix, int method, double standardVariation, int count) throws gsim.def.GSimDefException
parent
- the frame from which the agent is createdprefix
- common name prefix, to which a running number will be appendedmethod
- method constant defining what to do with the attributes (e.g. vary randomly)standardVariation
- standard variation (only needed if method is based on normal distribution)count
- number of agents to instanciate
gsim.def.GSimDefException
void instanciateAgents2(AgentClassIF parent, java.lang.String prefix, int method, double svar, int count) throws gsim.def.GSimDefException
parent
- the frame from which the agent is createdprefix
- common name prefix, to which a running number will be appendedmethod
- method constant defining what to do with the attributes (e.g. vary randomly)svar
- standard variation (only needed if method is based on normal distribution)count
- number of agents to instanciate
gsim.def.GSimDefException
void removeAgentInstances()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |