Package eu.su.mas.dedale.env.jme
Class jmeEnvironment
java.lang.Object
eu.su.mas.dedale.env.jme.jmeEnvironment
- All Implemented Interfaces:
 IEnvironment
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidCreateEnvironment(GeneratorType g, String topologyConfigurationFilePath, String instanceConfiguration, boolean diamond, boolean gold, boolean well, Integer... topologyParameters) Create an environment.voidCreateEnvironment(String topologyConfigurationFilePath, String instanceConfiguration, boolean isGrid, Integer envSize, boolean diamond, boolean gold, boolean well) Deprecated.voiddeployEntity(String entityName, EntityCharacteristics e, Location locationId) Add an entity to the graphbooleandropOff(Location location, ElementType e, Integer quantity) This methods can only be called by specific types of agents.getCurrentPosition(String agentName) getName()booleanisReachable(String senderName, String receiverName, int communicationReach) moveTo(String entityName, EntityCharacteristics ec, Location targetedPosition) List<dataStructures.tuple.Couple<Location, List<dataStructures.tuple.Couple<Observation, String>>>> booleanopenLock(String entityName, Location location, ElementType e) intpick(String entityName, Location location, ElementType e, Integer maxQuantity) voidremoveEntity(String entityName, EntityCharacteristics e) booleanthrowGrenade(String agentName, Location locationId)  
- 
Constructor Details
- 
jmeEnvironment
public jmeEnvironment() 
 - 
 - 
Method Details
- 
CreateEnvironment
public void CreateEnvironment(GeneratorType g, String topologyConfigurationFilePath, String instanceConfiguration, boolean diamond, boolean gold, boolean well, Integer... topologyParameters) Description copied from interface:IEnvironmentCreate an environment.- Specified by:
 CreateEnvironmentin interfaceIEnvironment- Parameters:
 g- Type of environment (generated or manually designed)topologyConfigurationFilePath- FullPath to the file describing the topologyinstanceConfiguration- FullPath to the file describing the elements available on the mapdiamond- true if an automatically generated env should have diamond nodes on itgold- true if an automatically generated env should have gold nodes on itwell- true if an automatically generated env should have wells on ittopologyParameters- parameters used by the choosen generator. The number of parameters is generator dependent (size,...) All existing features are not available in randomly generated env : Treasure Locks,..
 - 
CreateEnvironment
public void CreateEnvironment(String topologyConfigurationFilePath, String instanceConfiguration, boolean isGrid, Integer envSize, boolean diamond, boolean gold, boolean well) Deprecated. - 
deployEntity
Description copied from interface:IEnvironmentAdd an entity to the graph- Specified by:
 deployEntityin interfaceIEnvironment- Parameters:
 entityName- the name of the entity to deploye- theEntityCharacteristicsof the entitylocationId- the (unique) Id of the position to deploy the agent, null if free
 - 
removeEntity
- Specified by:
 removeEntityin interfaceIEnvironment
 - 
getCurrentPosition
- Specified by:
 getCurrentPositionin interfaceIEnvironment- Parameters:
 agentName- Name of the agent to locate- Returns:
 - The entity current position, null if the entity is not in the environment
 
 - 
observe
public List<dataStructures.tuple.Couple<Location,List<dataStructures.tuple.Couple<Observation, observeString>>>> (Location currentPosition, String agentName) - Specified by:
 observein interfaceIEnvironment- Parameters:
 currentPosition- the position from which the agent observeagentName- the name of the agent- Returns:
 - The list of observed positions, and for each one the list of observations
 
 - 
moveTo
- Specified by:
 moveToin interfaceIEnvironment- Parameters:
 entityName- the name of the entityec- characteristics of the entitytargetedPosition- its expected destination- Returns:
 - 1 if true, 0 if refused, -1 if the consequence of the move is the agent dying
 
 - 
pick
- Specified by:
 pickin interfaceIEnvironment- Parameters:
 entityName- the name of the entitylocation- the position to pick the resourcee- ElementType to pickmaxQuantity- maximum number of e that the agent is able to pick- Returns:
 - the amount of resources that the agent was able to collect
 
 - 
isReachable
- Specified by:
 isReachablein interfaceIEnvironment- Parameters:
 senderName- the senderAgentreceiverName- The agent we are trying to contactcommunicationReach- the sender agent's com capability- Returns:
 - true if the receiver is within reach
 
 - 
dropOff
Description copied from interface:IEnvironmentThis methods can only be called by specific types of agents. For the others it will do nothing.- Specified by:
 dropOffin interfaceIEnvironment- Parameters:
 location- id of the node where to drop the elemente- the element the entity intends to dropquantity- the amount of value to drop on the current position- Returns:
 - true if the drop off was realised
 
 - 
throwGrenade
- Specified by:
 throwGrenadein interfaceIEnvironment- Parameters:
 agentName- The name of the agent that is shootinglocationId- the id of the room it aims at- Returns:
 - true if done, false otherwise
 
 - 
getName
- Specified by:
 getNamein interfaceIEnvironment- Returns:
 - The name of the environment
 
 - 
openLock
- Specified by:
 openLockin interfaceIEnvironment- Parameters:
 entityName- the name of the entitylocation- the position to pick the resourcee- Type of resource to unlock in the environment (Currently only gold or diamond )- Returns:
 - True is the lock is opened, false otherwise
 
 - 
closeLock
- Specified by:
 closeLockin interfaceIEnvironment- Parameters:
 l- the position to close the safe(s)- Returns:
 - True if there was at least one safe on the current position (they are now closed), false otherwise
 
 
 -