0

我已经有一个在 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)对吗?

4

1 回答 1

0

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

java -jar jacamo-XXX.jar

您可以在 JaCaMo “hello world”教程中找到更多详细信息,其中提供了用于配置 eclipse 插件或 shell 命令环境的链接。

关于您的 .jcm 文件,文件名(在“:”之后)必须包含 .asl:

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

最好的,

乔米

于 2017-10-08T22:22:57.327 回答