0

I already have a jason project which is running well in Jason and now I am trying to run using JaCaMo. I have both plugins (Jason and JaCaMo) in eclipse. What I am trying to do is in a simple way to compile this current Jason project in JaCaMo for further improvements.

My mas2j file which is running well:

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";

}

The jcm I've created:

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
}

When I've tryed to run this JaCaMo project the system returned this:

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!

How to configure JaCaMo properly? Is this "translation" (mas2j to jcm) right?

Cleber Jorge Amaral
  • 1,316
  • 13
  • 26

1 Answers1

0

you can configure JaCaMo by running jacamo-XXX.jar application (where XXX is the version). You can either double click on the jar file or run

java -jar jacamo-XXX.jar

You find more details in the JaCaMo "hello world" tutorial, where links for configuring the eclipse plugin or the shell command environment are provided.

Regarding your .jcm file, file names (after ":") must include the .asl:

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

Best,

Jomi

Jomi Hubner
  • 141
  • 2
  • 4
  • It is right, after run my JaCaMo-XXX.jar I could set java home properly! Besides ".asl" I had to change the beliefs as "beliefs: expectedResponses(2)" and "beliefs: expectedDones(2)", in other words, I've removed "message()". Thank you! – Cleber Jorge Amaral Oct 08 '17 at 23:14