Dear Javed,
Let me try to answer your questions. See below in between your questions.
Maarten.
> On Jul 6, 2015, at 4:20 PM, Javed Ahmed <
javed.ahm...@gmail.com> wrote:
>
>
> Hi Friends,
>
> 1) I am working on one simple model using brahms, and this model has communication activities, as per now my agents are able to communicate with each other, but I have one query, when i refer to Dr Maarten thesis, I see BLUE ARROWS representing communication between agents i.e page 141,157, so I just wonder how to generate these blue arrows in order to show communication among agents for better representation.
In the Composer (the Brahms development environment), there is a tool called the AgentViewer (the same tool is part of the Brahms Eclipse plugin). For the AgentViewer to work, you need to install MySQL on your computer and have it running. The AgentViewer can display the execution of agent’s activities, workframes, thoughtframes and its beliefs over time. It can also display the inter-agent communication, as well as agent-object communication. The AgentViewer works based on the “history file” of a Brahms model run. After you have run a simulation (or real-time execution), you can load in the history file of the run in the AgentViewer. If MySQL is correctly installed and configured (something you have to do yourself), the AgentViewer parses the history file and creates a MySQL database of the run, storing every event that happened during the run. The AgentViewer can now display the information inside the MySQL database, including the communication between agents and objects (which are shown as blue arrows).
To get more information about the AgentViewer goto
https://www.ejenta.com/documentation#collapseAgentViewer
More importantly, you should read the Full Tutorial document. You can find the PDF version of this document at
https://www.ejenta.com/documentation#tutorialfull
Go to section "3.3.4 BRAHMS AGENT VIEWER” on page 36. This will give you an introduction on how to use the AgentViewer in the Composer.
>
> 2) could anyone please provide me example of communication among agents who belong to same group, currently my agents belong to different groups i.e Student and Staff , and they are talking fine, but when i create more than one agent of same group i.e. Staff , brahms gives me an error and I can't make those agents, belong to same group, communicate.
Without the source code of your group, it is difficult to say what is going wrong. However, here is a small example of a Group with a workframe that communicates to other agents that are instances of the same group.
Just copy the source code below to a model file called IntraGroupCommunicators.b, compile it and run it.
group IntraGroupCommunicators memberof BaseGroup {
attributes:
public symbol myName;
activities:
primitive_activity Initialize() {
max_duration: 1;
} //Initialize
// see
https://www.ejenta.com/documentation#communicate
communicate IntroduceMyself(IntraGroupCommunicators toAgent) {
max_duration: 5;
with: toAgent;
about: send(current.myName);
} //IntroduceMyself
workframes:
workframe wf_KnowWhoIsInMyGroup {
priority: 1; //make sure this workframe fires first
detectables: //see
https://www.ejenta.com/documentation#detectable
detectable dt_MemberOfMyGroup {
detect ((<IntraGroupCommunicators> isMemberOf IntraGroupCommunicators));
}//dt_MemberOfMyGroup
do {
Initialize();
}//do
} //wf_KnowWhoIsInMyGroup
//see
https://www.ejenta.com/documentation#workframe
workframe wf_IntroducMyselfToOthersInMyGroup {
variables:
collectall(IntraGroupCommunicators) allAgentsinMyGroup;
when ((allAgentsinMyGroup isMemberOf IntraGroupCommunicators) and
(current != allAgentsinMyGroup) and //you don’t introduce yourself to yourself
known(current.myName)) //I do know my own name
do {
IntroduceMyself(allAgentsinMyGroup);
} //do
} //wf_IntroducMyselfToOthersInMyGroup
} //InterGroupCommunicators
agent Agent1 memberof IntraGroupCommunicators {
initial_beliefs:
(current.myName = Agent1);
} //Agent1
agent Agent2 memberof IntraGroupCommunicators {
initial_beliefs:
(current.myName = Agent2);
} //Agent2
agent Agent3 memberof IntraGroupCommunicators {
initial_beliefs:
(current.myName = Agent3);
} //Agent3
>
>
> your help will be highly appreciated.
>
>
> Thanks,
> -Javed
>
> --
> You received this message because you are subscribed to the Google Groups "Brahms Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
brahms-forum...@googlegroups.com.
> To post to this group, send email to
brahms...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/brahms-forum.
> For more options, visit
https://groups.google.com/d/optout.