【问题标题】:Using Non JADE program for creating an agent on an already running jade platform and then migrating that agent to another platform使用非 JADE 程序在已经运行的翡翠平台上创建代理,然后将该代理迁移到另一个平台
【发布时间】:2015-03-03 12:24:56
【问题描述】:

这是我的代码,其中管理器类(非玉程序)在已经运行的 JADE 平台上成功创建了一个代理,但不会将该创建的代理迁移到另一个平台。

Manager.java

public class Manager 
{

 public static void main(String args[])

{

 Runtime myRuntime = Runtime.instance();
 myRuntime.setCloseVM(true);

 Profile myProfile = new ProfileImpl();
 myProfile.setParameter(Profile.MAIN_HOST, "192.168.2.9");
 myProfile.setParameter(Profile.MAIN_PORT, "1099");

 ContainerController myContainer =  myRuntime.createAgentContainer(myProfile);
 try
 {
  myContainer.createNewAgent("agent_007", agent_hun_main.class.getName(), null);
 } catch (StaleProxyException e) {
 e.printStackTrace();
 }
 try 
 {
  myContainer.getAgent("agent_007").start();
 } catch (StaleProxyException e) {
  e.printStackTrace();
 } catch (ControllerException e) {
  e.printStackTrace();
 }

 }
 }

agent.java

 public class agent extends Agent
 {
 public void setup()
 {
 System.out.println("hie i am an agent");
 System.out.println(this);
 AID remoteAMS = new AID("ams@localhost:12341/JADE", AID.ISGUID);
 remoteAMS.addAddresses("http://192.168.2.9:7778/acc");
 PlatformID destination = new PlatformID(remoteAMS);
 this.doMove(destination);

 }

 }

这是我在执行项目时遇到的错误:-

2015 年 3 月 3 日下午 5:25:21jade.core.mobility.AgentMobilityService$CommandSourceSink handleInformMoved

严重:目标 localhost:1099/JADE 不存在或不支持移动性

请帮忙解决这个问题。 提前致谢!

【问题讨论】:

  • 你好 stackoverflow !我想这是一个活跃的社区还是相反?

标签: java agent agents-jade


【解决方案1】:

Jade 不支持平台之间的移动性。 根据JADE Programmer’s Guide

使用 JADE,应用程序开发人员可以构建移动代理,这些代理是 能够跨多个网络主机迁移或复制自己。在 此版本的 JADE,仅支持平台内移动性,即 是一个 JADE 移动代理,可以在不同的代理容器之间导航 但仅限于单一的 JADE 平台

【讨论】:

  • 嘿,我已经知道了这么多,所以有一个 IPMS,请再次阅读我的问题。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-11-30
  • 2014-05-10
  • 2018-05-15
  • 1970-01-01
  • 2010-10-05
  • 1970-01-01
相关资源
最近更新 更多