2017-10-06 70 views
2

我已经有它在杰森运行良好,现在我想用JaCaMo运行杰森项目。我在eclipse中都有插件(Jason和JaCaMo)。我想要做的是以简单的方式在JaCaMo中编译这个当前的Jason项目以进一步改进。无法运行JaCaMo项目:如何正确配置它?

我mas2j文件,运行情况良好:

MAS tp_cnp { 

    infrastructure: Centralised 

    agents: 
     i initiator [beliefs="expectedResponses(2)"] #2; 
     p participant #2; 
     r rejector #1; 
     c controller [beliefs="expectedDones(2)"] #1; 

    aslSourcePath: 
     "src/asl"; 

} 

我创建了JCM:

mas tp_cnp { 

    agent i : initiator { 
     beliefs: message("expectedResponses(2)"), 
     instances: 2 
    } 
    agent p : participant { 
     instances: 2 
    } 
    agent r : rejector 
    agent c : controller { 
     beliefs: message("expectedDones(2)"), 
    } 

    asl-path: src/asl 
} 

当我tryed运行此JaCaMo项目系统恢复本:

BUILD SUCCESSFUL 
Total time: 2 seconds 
Launching tp_cnp 
reading from file /home/cleber/Projetos/tp_cnp/tp_cnp.jcm ... 
JaCaMo is not configured, creating a default configuration. 
Wrong configuration for jacamo, current is null 
jacamo not found 
Wrong configuration for jason, current is null 
jason not found 
Wrong configuration for jade, current is null 
jade not found 
Wrong configuration for jason, current is null 
jason not found 
file /home/cleber/Projetos/tp_cnp/tp_cnp.jcm parsed successfully! 

Ant is not properly configured! Current value is /libs 
Problem defining the command to run the MAS! 

如何配置JaCaMo正常吗?这是“翻译”(mas2j到jcm)吗?

回答

2

您可以通过运行jacamo-XXX.jar应用程序(其中XXX是版本)配置JaCaMo。您可以在jar文件双击或运行

java -jar jacamo-XXX.jar 

您在JaCaMo "hello world" tutorial,其中设有配置Eclipse插件或shell命令环境的链接了解详情。

关于你.jcm文件,文件名(在 “:”)必须包括.asl:

... 
agent i : initiator.asl { 
    beliefs: message("expectedResponses(2)"), 
    instances: 2 
} 

最佳,

Jomi

+0

这是正确的,运行后我JaCaMo- XXX.jar我可以设置Java主正确!除了“.asl”我不得不改变信仰为‘信念:expectedResponses(2)’和‘信念:expectedDones(2)’,换句话说,我已经删除‘消息()’。谢谢! –