1
A
回答
5
我假設由JADE桂你的意思是JADE RMA
由於RMA本身就是一個代理,顯示RMA GUI是簡單地創建和啓動RMA劑的問題。
如果您是通過代碼(即不通過命令行或GUI)執行此操作,則必須對要啓動的容器引用容器控制器,而您只會對其調用createAgent()方法。
import jade.wrapper.AgentController;
import jade.wrapper.ContainerController;
...
ContainerController myContainer;
// .. load a container into the above variable ..
try {
AgentController rma = myContainer.createNewAgent("rma", "jade.tools.rma.rma", null);
rma.start();
} catch(StaleProxyException e) {
e.printStackTrace();
}
您可以從代碼開始在主容器這樣
import jade.core.Runtime;
import jade.core.Profile;
import jade.core.ProfileImpl;
...
Runtime myRuntime = Runtime.instance();
// prepare the settings for the platform that we're going to start
Profile myProfile = new ProfileImpl();
// create the main container
myContainer = myRuntime.createMainContainer(myProfile);
或者你也可以正常啓動劑容器,並連接到外部容器,這樣
import jade.core.Runtime;
import jade.core.Profile;
import jade.core.ProfileImpl;
...
Runtime myRuntime = Runtime.instance();
// prepare the settings for the platform that we're going to connect to
Profile myProfile = new ProfileImpl();
myProfile.setParameter(Profile.MAIN_HOST, "myhost");
myProfile.setParameter(Profile.MAIN_PORT, "1099");
// create the agent container
myContainer = myRuntime.createAgentContainer(myProfile);
參考:發展帶JADE的多代理系統,Fabio Luigi Bellifemine,Giovanni Caire,Dominic Greenwood。
相關問題
- 1. 如何從一個gui到另一個gui的java gui轉換
- 2. 如何從一個GUI類傳遞到另一個GUI類?
- 3. Python 3 GUI在按鈕單擊時打開另一個GUI - 不啓動
- 4. 如何啓動Linux TortoiseHg GUI
- 5. 啓動GUI
- 6. 在Eclipse的另一個屏幕上啓動wxPython GUI
- 7. 如何在Swing GUI中啓動JTable?
- 8. 啓動PostgreSQL的GUI
- 9. 如何在cygwin中啓動一個Windows GUI程序?
- 10. 如何自動啓動python/pyside GUI
- 11. 如何從GUI啓動Jzy3d圖形?
- 12. 如何從linux啓動java GUI測試
- 13. 如何從QThread啓動GUI窗口?
- 14. 如何動態地建立一個gui
- 15. 它如何啓動一個GUI應用程序?
- 16. 如何啓動一個Java MVC應用程序與Swing GUI的
- 17. 在C#中如何根據另一個線程中的類來顯示來自另一個GUI的GUI?
- 18. 如何在啓動時啓動gui應用程序ubuntu
- 19. 如何添加一個gui?
- 20. Java如何關閉程序並從GUI移動到另一個
- 21. 如何在gui中創建一個子gui(?)?
- 22. 從另一個GUI文件打開GUI文件PyQT5
- 23. Tkinter Gui鏈接按鈕到.py文件打開另一個Gui
- 24. 支持從另一個線程創建GUI的GUI庫
- 25. 如何在第二個屏幕上用GUI啓動jar文件
- 26. 如何在GUI
- 27. 如何將值從一個類傳遞到另一個類GUI
- 28. 單擊另一個搖擺gui中的另一個按鈕後打開另一個搖擺鬼gui
- 29. GUI +線程,GUI退出線程停留 - >如何在GUI再次啓動時檢測線程?
- 30. 如何在java中創建一個gui?
可能重複[如何使用JADE運行多個GUI?](http://stackoverflow.com/questions/17644517/how-to-run-multiple-guis-with-jade) –