jade integration

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

jade integration

BOURDIL Pierre-Alain

Following http://jason.sourceforge.net/mini-tutorial/jason-jade/ , with jedit and jade.lib from jade distribution.

 

Once I run the system, and sniff john agent with jade sniffer, I observe a very fast growing sequence of  message with the following form :

INFORM : From other to john

QUERY-Ref : from john to other.

 

By the way, this take 100% of my CPU.  This seems weird as john is a seller  and I expect him to wait, doing nothing, for a buyer to send a CFP

 

The Jason/jade seller's behavior is completely different than the same  example ran using jade only.  In the latter , things seems ok (exchange are sparses , as expected).

 

Behavior in pure JADE :

 

 

 

Behavior in JASON/JADE

 

 

 

 

Is this normal, or did I miss something ?

 

 

 

Pierre-Alain BOURDIL

Ingénieur R&D

 

05.61.00.79.79

[hidden email]

 


SYSTÈMES NUMÉRIQUES

 

417 L’Occitane
CS 77679

31676 LABEGE Cedex

 

scalian.com

 

 

 

 

 

 

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Reply | Threaded
Open this post in threaded view
|

JADE integration

BOURDIL Pierre-Alain

I investigated the problem I had, relative to a 100% cpu consumption when executing the example from http://www.emse.fr/~boissier/enseignement/maop11/doc/jason-api/mini-tutorial/jason-jade/index.html

To sum up, the seller agent (ie:JadeAgArch)  never sleep.

 

I understood that :

 

1)      In class JasonTSReasonner (method action), a jade Cyclic behavior, and in async mode (the default), the agent try to sleep 1sec after each reasonning cycle . This is implemented through a call to jade.core.Behaviour.block.

2)      Nevertheless, it asks for percept to environnementAID at each perceive phase of a reasoning cycle : QUERY_REF acl message with content getPercept

3)      EnvironmentAID  answer (an INFORM ACL message), thus waking up the agent . The documentation of Jade’s block clearly state that block is in fact non blocking. (http://jade.tilab.com/doc/api/jade/core/behaviours/Behaviour.html#block())

4)      Hence, the agent never sleep and consume 100% CPU.

 

 

Am I right ?

If yes, Is there a way  to  change that behavior   ? If not , how can I avoid these , maybe by allowing to put some wait from the asl sources ?

 

 

+

 

Pierre-Alain BOURDIL

Ingénieur R&D

 

05.61.00.79.79

[hidden email]

 


SYSTÈMES NUMÉRIQUES

 

417 L’Occitane
CS 77679

31676 LABEGE Cedex

 

scalian.com

 

 

 

 

 

 

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Reply | Threaded
Open this post in threaded view
|

Re: JADE integration

Jomi Hubner
Hi Bourdil, you are right in your analysis of the problem. I am working on a solution for that — that is in the java level, not .asl.

I hope to come back soon with a solution.

Best,

Jomi

ps.: Indeed, the block() is executed after the answer from the environment is received… So I do not know why the agent is being waked … I guess previous versions of JADE worked differently (the versions we used to develop the JADE infrastructure)…. Again, I need to investigate it further.




> On 26 de abr de 2017, at 11:10, BOURDIL Pierre-Alain <[hidden email]> wrote:
>
> I investigated the problem I had, relative to a 100% cpu consumption when executing the example from http://www.emse.fr/~boissier/enseignement/maop11/doc/jason-api/mini-tutorial/jason-jade/index.html
> To sum up, the seller agent (ie:JadeAgArch)  never sleep.
>  
> I understood that :
>  
> 1)      In class JasonTSReasonner (method action), a jade Cyclic behavior, and in async mode (the default), the agent try to sleep 1sec after each reasonning cycle . This is implemented through a call to jade.core.Behaviour.block.
> 2)      Nevertheless, it asks for percept to environnementAID at each perceive phase of a reasoning cycle : QUERY_REF acl message with content getPercept
> 3)      EnvironmentAID  answer (an INFORM ACL message), thus waking up the agent . The documentation of Jade’s block clearly state that block is in fact non blocking. (http://jade.tilab.com/doc/api/jade/core/behaviours/Behaviour.html#block())
> 4)      Hence, the agent never sleep and consume 100% CPU.
>  
>  
> Am I right ?
> If yes, Is there a way  to  change that behavior   ? If not , how can I avoid these , maybe by allowing to put some wait from the asl sources ?
>  
>  
> +
>  
> Pierre-Alain BOURDIL
> Ingénieur R&D
>  
> 05.61.00.79.79
> [hidden email]
>  
> <image002.png>
>
> SYSTÈMES NUMÉRIQUES
>  
> 417 L’Occitane
> CS 77679
> 31676 LABEGE Cedex
>  
> scalian.com
>
> <image004.png>
> <image006.png>
> <image008.png>
> <image010.png>
>  
>  
>  
>  
>  
> <image012.png>
>  
>  
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
> 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
http://jomi.das.ufsc.br


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users