本文整理汇总了Java中eis.exceptions.NoEnvironmentException类的典型用法代码示例。如果您正苦于以下问题:Java NoEnvironmentException类的具体用法?Java NoEnvironmentException怎么用?Java NoEnvironmentException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NoEnvironmentException类属于eis.exceptions包,在下文中一共展示了NoEnvironmentException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getAllPerceptsFromEntity
import eis.exceptions.NoEnvironmentException; //导入依赖的package包/类
@Override
protected LinkedList<Percept> getAllPerceptsFromEntity(String ent) throws PerceiveException, NoEnvironmentException {
LinkedList<Percept> eisPer = new LinkedList<Percept>();
List<Literal> lper = jasonEnv.getPercepts(ent);
if (lper == null) { // no changes in the perception for ent
lper = previousPerception.get(ent);
} else {
lper = previousPerception.put(ent, lper);
}
if (lper != null)
for (Literal jasonPer: lper)
eisPer.add( Translator.literalToPercept( jasonPer ));
//System.out.println("perceptions for "+ent+" are "+eisPer);
return eisPer;
}
开发者ID:jason-lang,项目名称:apps,代码行数:18,代码来源:JasonAdapter.java
示例2: getAllPerceptsFromEntity
import eis.exceptions.NoEnvironmentException; //导入依赖的package包/类
@Override
protected LinkedList<Percept> getAllPerceptsFromEntity(String entity)
throws PerceiveException, NoEnvironmentException {
Entity e = entityNamesToObjects.get(entity);
if ( e.isConnected() == false ) {
throw new PerceiveException("no valid connection");
}
LinkedList<Percept> percepts = e.getAllPercepts();
return percepts;
}
开发者ID:jason-lang,项目名称:apps,代码行数:15,代码来源:EnvironmentInterface.java
示例3: receiving
import eis.exceptions.NoEnvironmentException; //导入依赖的package包/类
@INTERNAL_OPERATION
void receiving() throws JasonException {
lastStep = -1;
Collection<Percept> previousPercepts = new ArrayList<Percept>();
while (receiving) {
await_time(100);
for (String agent: agentIds.keySet()) {
try {
Collection<Percept> percepts = ei.getAllPercepts(agent).get(agentToEntity.get(agent));
populateTeamArtifact(percepts);
//logger.info("***"+percepts);
if (percepts.isEmpty())
break;
int currentStep = getCurrentStep(percepts);
if (lastStep != currentStep) { // only updates if it is a new step
lastStep = currentStep;
filterLocations(agent, percepts);
//logger.info("Agent "+agent);
updatePerception(agent, previousPercepts, percepts);
previousPercepts = percepts;
}
} catch (PerceiveException | NoEnvironmentException e) {
e.printStackTrace();
}
}
}
}
开发者ID:smart-pucrs,项目名称:mapc2016-pucrs,代码行数:29,代码来源:EISArtifact.java
示例4: startupEnvironment
import eis.exceptions.NoEnvironmentException; //导入依赖的package包/类
/**
* Start the client and connect to the server.
*
* @param initParams
* - The parameters to be given to the environment
* {@link RemoteEnvironment#init(Map)}.
* @return The created {@link RemoteEnvironment}.
*/
public static synchronized RemoteEnvironment startupEnvironment(Map<String, Parameter> initParams) {
RemoteEnvironment environment = new RemoteEnvironment();
environment.attachEnvironmentListener(new BW4TEnvironmentListener(environment));
try {
LOGGER.info("Initializing environment...");
environment.init(initParams);
} catch (ManagementException | NoEnvironmentException e) {
LOGGER.error("The Launcher encountered an error while trying to initialize the environment.");
throw new LauncherException(e);
}
return environment;
}
开发者ID:eishub,项目名称:BW4T,代码行数:21,代码来源:Launcher.java
示例5: environmentSuddenDeath
import eis.exceptions.NoEnvironmentException; //导入依赖的package包/类
/**
* We detected that environment suddenly died. Notify our listeners and
* return {@link NoEnvironmentException} reporting the problem.
*
* @param e
* is the exception from which we detected the death.
* @return {@link NoEnvironmentException}
*/
public NoEnvironmentException environmentSuddenDeath(Exception e) {
client = null;
LOGGER.error("The BW4T Server disconnected unexpectedly. Client set to null:" + client);
handleStateChange(EnvironmentState.KILLED);
if (e instanceof NoEnvironmentException) {
return (NoEnvironmentException) e;
}
return new NoEnvironmentException("Unable to access environment.", e);
}
开发者ID:eishub,项目名称:BW4T,代码行数:18,代码来源:RemoteEnvironment.java
示例6: getAllPerceptsFromEntity
import eis.exceptions.NoEnvironmentException; //导入依赖的package包/类
@Override
protected final LinkedList<Percept> getAllPerceptsFromEntity(String name)
throws PerceiveException, NoEnvironmentException {
PerceptHandler handler = perceptHandlers.get(name);
if (handler == null) {
throw new PerceiveException("Entity with name " + name + " has no handler");
}
return handler.getAllPercepts();
}
开发者ID:eishub,项目名称:eis,代码行数:13,代码来源:AbstractEnvironment.java
示例7: manageEnvironment
import eis.exceptions.NoEnvironmentException; //导入依赖的package包/类
@Override
public void manageEnvironment(EnvironmentCommand command)
throws ManagementException, NoEnvironmentException {
try {
server.manageEnvironment(command);
} catch (RemoteException e) {
System.out.println(e);
throw new NoEnvironmentException("Failed");
}
}
开发者ID:eishub,项目名称:eis,代码行数:13,代码来源:EIClientDefaultImpl.java
示例8: performAction
import eis.exceptions.NoEnvironmentException; //导入依赖的package包/类
@Override
public LinkedList<Percept> performAction(String agent, Action action,
String... entities) throws ActException, NoEnvironmentException {
try {
return server.performAction(agent, action, entities);
} catch (RemoteException e) {
e.printStackTrace();
return null;
}
}
开发者ID:eishub,项目名称:eis,代码行数:13,代码来源:EIClientDefaultImpl.java
示例9: manageEnvironment
import eis.exceptions.NoEnvironmentException; //导入依赖的package包/类
public abstract void manageEnvironment(EnvironmentCommand command)
throws ManagementException,NoEnvironmentException;
开发者ID:FracturedPlane,项目名称:EnvironmentInterface,代码行数:3,代码来源:UnrealEI.java
示例10: getAllPercepts
import eis.exceptions.NoEnvironmentException; //导入依赖的package包/类
public LinkedList<Percept> getAllPercepts(Agent agent, Entity... entities)
throws PerceiveException, NoEnvironmentException
{
// TODO Auto-generated method stub
return null;
}
开发者ID:FracturedPlane,项目名称:EnvironmentInterface,代码行数:7,代码来源:UnrealEI.java
示例11: getAllPerceptsFromEntity
import eis.exceptions.NoEnvironmentException; //导入依赖的package包/类
@Override
protected LinkedList<Percept> getAllPerceptsFromEntity(String entity)
throws PerceiveException, NoEnvironmentException {
// TODO Auto-generated method stub
return null;
}
开发者ID:eishub,项目名称:eis,代码行数:7,代码来源:GeneratorInterface.java
示例12: performAction
import eis.exceptions.NoEnvironmentException; //导入依赖的package包/类
LinkedList<Percept> performAction(String agent, Action action,
String... entities) throws ActException, NoEnvironmentException,RemoteException;
开发者ID:eishub,项目名称:eis,代码行数:3,代码来源:EIServerRemote.java
示例13: getAllPercepts
import eis.exceptions.NoEnvironmentException; //导入依赖的package包/类
LinkedList<Percept> getAllPercepts(String agent, String... entities)
throws PerceiveException, NoEnvironmentException,RemoteException;
开发者ID:eishub,项目名称:eis,代码行数:3,代码来源:EIServerRemote.java
示例14: manageEnvironment
import eis.exceptions.NoEnvironmentException; //导入依赖的package包/类
void manageEnvironment(EnvironmentCommand command)
throws ManagementException, NoEnvironmentException,RemoteException;
开发者ID:eishub,项目名称:eis,代码行数:3,代码来源:EIServerRemote.java
示例15: getAllPercepts
import eis.exceptions.NoEnvironmentException; //导入依赖的package包/类
@Override
public LinkedList<Percept> getAllPercepts(String agent, String... entities)
throws PerceiveException, NoEnvironmentException {
// TODO perform via RMI
return null;
}
开发者ID:eishub,项目名称:eis,代码行数:7,代码来源:EIClientDefaultImpl.java
注:本文中的eis.exceptions.NoEnvironmentException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论