/** * Get the configuration. * @return The configuration. */ public String getConfiguration() { return access.getConfiguration(); }
/** * Get the configuration name. * @return The configuration name. */ public String getConfigurationName() { return agent.getConfiguration(); }
/** * Get the configuration name. * @return The configuration name. */ public String getConfigurationName() { return getComponent().getConfiguration(); }
@AgentBody public void body() { // this.mybean = bean; if("1".equals(agent.getConfiguration())) { agent.getComponentFeature(IBDIAgentFeature.class).adoptPlan("wait"); } else if ("2".equals(agent.getConfiguration())) { agent.getComponentFeature(IBDIAgentFeature.class).adoptPlan("notify"); } }
@AgentBody public void body() { // this.mybean = bean; if("1".equals(agent.getConfiguration())) { agent.getComponentFeature(IBDIAgentFeature.class).adoptPlan("wait"); } else if ("2".equals(agent.getConfiguration())) { agent.getComponentFeature(IBDIAgentFeature.class).adoptPlan("notify"); } }
/** * */ @AgentBody public void body() { if("default".equals(agent.getConfiguration())) { agent.getComponentFeature(IBDIAgentFeature.class).adoptPlan(new AmbulancePlan()); } }
/** * */ @AgentBody public void body() { if("default".equals(agent.getConfiguration())) { agent.getComponentFeature(IBDIAgentFeature.class).adoptPlan(new FireBrigadePlan()); } }
/** * Setup the gui and start playing. */ @AgentBody//(keepalive=false) public void body(IInternalAccess agent) { strategy = agent.getConfiguration(); createGui(agent); try { System.out.println("Now puzzling:"); final long start = System.currentTimeMillis(); agent.getComponentFeature(IBDIAgentFeature.class).dispatchTopLevelGoal(new MoveGoal()).get(); long end = System.currentTimeMillis(); System.out.println("Needed: "+(end-start)+" millis."); } catch(Exception e) { System.out.println("No solution found :-("); } }
if("gui".equals(agent.getConfiguration())) else if("benchmark(runs=10/goals=10)".equals(agent.getConfiguration())) else if("benchmark(runs=10/goals=50)".equals(agent.getConfiguration())) else if("benchmark(runs=10/goals=500)".equals(agent.getConfiguration()))
strategy = agent.getConfiguration(); System.out.println("strategy is: "+strategy); createGui(agent);
/** * Initialize the feature. */ public IFuture<Void> init() { final Future<Void> ret = new Future<Void>(); if(component.getConfiguration()!=null) { ConfigurationInfo conf = component.getModel().getConfiguration(component.getConfiguration()); final ComponentInstanceInfo[] components = conf.getComponentInstances(); createComponents(components).addResultListener(createResultListener( new ExceptionDelegationResultListener<List<IComponentIdentifier>, Void>(ret) { public void customResultAvailable(List<IComponentIdentifier> cids) { ret.setResult(null); } })); } else { ret.setResult(null); } return ret; }
final boolean wgui = agent.getConfiguration().equals("with gui");
ConfigurationInfo ci = component.getConfiguration()!=null ? component.getModel().getConfiguration(component.getConfiguration()) : null; if(ci!=null)
if(agent.getConfiguration().equals("created"))
/** * Init unset results from default values. */ protected void initDefaultResults() { // Init the results with initial or default values. ConfigurationInfo ci = component.getConfiguration()!=null ? component.getModel().getConfiguration(component.getConfiguration()) : null; if(ci!=null) { UnparsedExpression[] upes = ci.getResults(); for(int i=0; i<upes.length; i++) { results.put(upes[i].getName(), SJavaParser.getParsedValue(upes[i], component.getModel().getAllImports(), component.getFetcher(), component.getClassLoader())); } } IArgument[] res = component.getModel().getResults(); for(int i=0; i<res.length; i++) { // Prevents unset results being added to be able to check whether a user has // set an argument explicitly to null or if it just is null (e.g. for field injections) if(!results.containsKey(res[i].getName()) && res[i].getDefaultValue().getValue()!=null) { results.put(res[i].getName(), SJavaParser.getParsedValue(res[i].getDefaultValue(), component.getModel().getAllImports(), component.getFetcher(), component.getClassLoader())); } } }
this.spaces = new LinkedHashMap<String, IExtensionInstance>(); ApplicationConfigurationInfo config = (ApplicationConfigurationInfo)component.getModel().getConfiguration(component.getConfiguration()); IExtensionInfo[] infos = config.getExtensions(); final IResultListener<Void> lis = new CounterResultListener<Void>(infos.length, new DelegationResultListener<Void>(ret));
ConfigurationInfo ci = getComponent().getConfiguration()!=null ? getComponent().getModel().getConfiguration(getComponent().getConfiguration()) : getComponent().getModel().getConfigurations().length>0 ? getComponent().getModel().getConfigurations()[0] : null;
ConfigurationInfo ci = getComponent().getConfiguration()!=null ? getComponent().getModel().getConfiguration(getComponent().getConfiguration()) : getComponent().getModel().getConfigurations().length>0 ? getComponent().getModel().getConfigurations()[0] : null;
String config = getComponent().getConfiguration();
public void customResultAvailable(Void result) String confname = component.getConfiguration(); if(confname!=null)