Cannot a agent answer a message with atom sentence?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot a agent answer a message with atom sentence?

Marcos Côrtes
Hello Jason developers...

I have a problem at this scenario:

The agent manager has the plan:
[code]
+!alloc_a(LIST_CLIENT, CANDIDATES, BEGIN, END):.list(LIST_CLIENT)
<-
for ( .range(I,BEGIN,END) ) 
{
//do something with clients
.send(LIST_CLIENT, askOne, updateReputation, LIST_ANSWER);
}
.
[/code]
and the agent b has the plan to change the askOne behavior:

[code]
@answerUpdateReputation[atomic]
+!kqml_received(MANAGER, askOne, updateReputation, MsgId):.my_name(MY_NAME) 
<-
!updateReputation;
.send(MANAGER, tell, updateReputationOK, MsgId);
.
[/code]

When I run the example it generate the exception:

[Literal] addSource is not implemented in the class Atom
java.lang.Exception
at jason.asSyntax.Literal.addSource(Literal.java:240)
at jason.asSemantics.TransitionSystem.applyProcMsg(TransitionSystem.java:256)
at jason.asSemantics.TransitionSystem.applySemanticRule(TransitionSystem.java:202)
at jason.asSemantics.TransitionSystem.reasoningCycle(TransitionSystem.java:1134)
at jason.infra.centralised.CentralisedAgArch.run(CentralisedAgArch.java:202)
at java.lang.Thread.run(Unknown Source)


And when I change the updateReputationOK to updateReputation(ok). This system works.

cannot I send a atom answer?

Thanks...
--
Ass: Marcos Côrtes
Mestrando Computação - UFF

------------------------------------------------------------------------------
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.  
But none more important than the need to reduce IT complexity
while improving strategic productivity.  Learn More!
http://www.accelacomm.com/jaw/sdnl/114/51507609/
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Reply | Threaded
Open this post in threaded view
|

Re: Cannot a agent answer a message with atom sentence?

Jomi Fred Hubner-4
Hello Marcos,

it is indeed a bug. It was fixed in the subversion (SVN) and will be available in the next release of Jason. 

Cheers,

Jomi

On 15/12/2011, at 17:10, Marcos Côrtes wrote:

Hello Jason developers...

I have a problem at this scenario:

The agent manager has the plan:
[code]
+!alloc_a(LIST_CLIENT, CANDIDATES, BEGIN, END):.list(LIST_CLIENT)
<-
for ( .range(I,BEGIN,END) ) 
{
//do something with clients
.send(LIST_CLIENT, askOne, updateReputation, LIST_ANSWER);
}
.
[/code]
and the agent b has the plan to change the askOne behavior:

[code]
@answerUpdateReputation[atomic]
+!kqml_received(MANAGER, askOne, updateReputation, MsgId):.my_name(MY_NAME) 
<-
!updateReputation;
.send(MANAGER, tell, updateReputationOK, MsgId);
.
[/code]

When I run the example it generate the exception:

[Literal] addSource is not implemented in the class Atom
java.lang.Exception
at jason.asSyntax.Literal.addSource(Literal.java:240)
at jason.asSemantics.TransitionSystem.applyProcMsg(TransitionSystem.java:256)
at jason.asSemantics.TransitionSystem.applySemanticRule(TransitionSystem.java:202)
at jason.asSemantics.TransitionSystem.reasoningCycle(TransitionSystem.java:1134)
at jason.infra.centralised.CentralisedAgArch.run(CentralisedAgArch.java:202)
at java.lang.Thread.run(Unknown Source)


And when I change the updateReputationOK to updateReputation(ok). This system works.

cannot I send a atom answer?

Thanks...
--
Ass: Marcos Côrtes
Mestrando Computação - UFF
------------------------------------------------------------------------------
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.  
But none more important than the need to reduce IT complexity
while improving strategic productivity.  Learn More!
http://www.accelacomm.com/jaw/sdnl/114/51507609/_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users

-- 
Jomi Fred Hubner
Federal University of Santa Catarina
Department of Automation and Systems Engineering
PO Box 476, Florianópolis, SC
88040-900 Brazil


------------------------------------------------------------------------------
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.  
But none more important than the need to reduce IT complexity
while improving strategic productivity.  Learn More!
http://www.accelacomm.com/jaw/sdnl/114/51507609/
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users