Jade_Primer---first program--JADE OPTIONS

     在cmd窗口中键入java jade.Boot -gui x:Simple1,出现图形界面。

     Main-Container 包含Simple1 agent 和其他三个JADE创造的 agents:

     RMA: the Remote Management Agent,用来处理GUI界面

     ams: the Agent Management Service - 核心agent,跟踪系统中所有的 JADE programs 和 agents

     DF: the Directory Facility, a yellow page service,agents在这儿可以发布服务。

     在典型的Jade application中,不同的agent放在不同的container中,在几个计算机中运行;但只有一个核心agent(AMS)跟踪所有的地址。同样,也只有一个DF。运行DF和AMS的Jade program 叫做 Main-Container,必须要首先启动它。 Main-Container有local RMI registry,其他container都从这注册表中寻找自己的地址。如果一个secondary container和Main-Container在同一电脑上运行,它会自动连到AMS和DF上。如果在不同电脑上运行,我们就需要识别Main-Container的主机地址。……我们需要用到一下选项:

-container:标志是secondary container,需要用Main-Container的服务

-host :标志在哪里可以发现Main-Container。

     下面有个例子,在这个例子中,我们在同一个计算机上执行4个container。

1) a main container with no other agents

2) a container with a Simple1 agent called Fred

3) another secondary container with another Simple agent

4) finally a container for the RMA agent

下面这一节讲的东西我不是很明白。

Personally, I would find it more natural to have a "-main" option for the Main-Container and let the others be 'secondary' by default instead of having to use the option "-container", but it's not my choice. Assuming that applications above are running on a machine whose internet address is "phobos.iro.umontreal.ca" and that I want to start yet another Simple agent on "deimos.iro.umontreal.ca", the following whould do the trick.

	deimos% java jade.Boot -container -host phobos Susan:Simple1

If I were on a remote site, like "bert.cs.wichita.edu", I should use:

	bert% java jade.Boot -container -host phobos.iro.umontreal.ca Susan:Simple1

There are other options which can be used with Jade. These are detailed, not in a User's Guide or Programmer's Guide where you would expect them to be but in the Administrator's Guide. However, the easiest way to get the documentation is to use the "-help" option of Jade:

	% java jade.Boot -help

But you have to remember the exact keyword "-help" because misspelled options are just ignored. In conclusion, here are the most useful options for the beginner: -gui, -container, -host and -help.

转载于:https://www.cnblogs.com/TingHua/archive/2009/05/14/1456338.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值