-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathswot_agents.jcm
113 lines (84 loc) · 4.55 KB
/
swot_agents.jcm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/*
JaCaMo Project File
This file defines the initial state of the MAS (initial agents, environment, organisation, ....)
(see below the documentation about what can be defined in this file)
*/
mas swot_agents {
agent container_manager
agent calendar
/*
agent definition
<agent> ::= agent <name> [ : <source> ] { <parameter>* }
<parameter> ::= <id> : <value> ( (, | EOL) <value> ) *
e.g.
agent bob : participant.asl { // if source is omitted, bob.asl will be used
beliefs: p("this is a condition",15000) // initial beliefs
friend(alice)
goals: start, go(home) // initial goals
ag-class: tt.MyAgClass // if omitted, Jason Agent default class will be used
ag-arch: myp.myArch1
mypkg.MyCustomAgArch // CArtAgO arch is automatically included, if necessary, JADE arch is automatically included
ag-bb-class: my.Bb
verbose: 2 // 0 means only agent output, 1 means agent+jason output, 2 means agent+jason+debug output
myparameter: "this is an appl paramter" // user application parameter, used for instance by user custom architectures
node: n1 // the logical name of the place where the agent will run
instances: 5 // 5 bobs (called bob1, bob2, ... bob5) will be created.
// You can also list the names of the agents. Default value is 1.
join: w2 // join the workspace w2
focus: w1.a1 @ n1 // focus on artifact a1 in workspace w1 running on node n1
roles: r1 in g2, r2 in o1.g3 // adopt the role r1 in group g2 and role r2 in group g3 (in org o1)
}
agent alice // the source is alice.asl, one instance will be created at default node
*/
/*
environment definition
<environment> ::= <workspace>*
<workspace> ::= workspace <name> { <artifact>* <agents> <node> }
<artifact> ::= artifact <name> : <type> [ { focused-by: <agents> } ]
<agents> ::= agents : <name> ( (, | EOL) <name> )* | "*" // "*" means all agents
<node> ::= node : <name> EOL
e.g.
workspace w1 {
artifact c1: mylib.Counter(10) // creates an artifact named c1 as an instance of mylib.Counter initialised with (10)
artifact bll: mylist.BlackList()
node: n2 // this workspace will run on node n2
}
*/
/*
organisation entity definition
<organisations> ::= <org>*
<org> ::= organisation <name> [ : <source> ] { <parameter>* <agents> <node> <group>* <scheme>* }
<group> ::= group <name> : <type> [ { <parameter>* } ]
<scheme> ::= scheme <name> : <type> [ { <parameter>* } ]
e.g.
organisation o1 : os.xml { // os.xml is the file with the organisational specification, if omitted o1.xml is used
group g1: writepaper { // creates a group instance named g1 based on the group definition identified by writepaper (defined in the o1.xml file)
responsible-for: s1 // the group will be responsible for the scheme s1
owner: alice
debug // starts GUI for this group
group sg2 : t1 // groups sg2 will be a sub-group of g1
}
group g2 : writepaper // another group (without particular initialisation)
scheme s1 : wpscheme // instance of scheme identified by wpscheme (in o1.xml)
}
*/
// java class path
/* e.g.
class-path: lib
*/
// agent source path
asl-path: src/agt
src/agt/inc
/* platform configuration
e.g.
platform: jade()
cartago("infrastructure")
centralised(pool,4)
*/
// platform: centralised(pool, 251)
/* node configuration
e.g.
node n3 running @ x.com.fr
nodes not defined will be launched when this .jcm is run
*/
}