我已经有一个jason项目在Jason运行良好,现在我正在尝试使用JaCaMo运行。我在eclipse中有两个插件(Jason和JaCaMo)。我想要做的是以简单的方式在JaCaMo中编译当前的Jason项目以进行进一步的改进。
我的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
}
当我尝试运行这个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)吗?
答案 0 :(得分:3)
您可以通过运行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