Time managment between agents

View: New views
2 Messages — Rating Filter:   Alert me  

Time managment between agents

by sahar7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear friend,
I have a seller and a coordinator agent( or buyer). after starting my agents
            BookSellerAgent.start();
            CoordinatorAgent.start();
I need my coordinator agent to find available sellers throught a serach on DFservice. But my coordinator agent does not find any seller on DF because Seller agent will be registered later in a few milliseconds ! How can I manage this time issue between my agents? 
(By the way, some times seller is registered at the time so coordinator can find it on DF and program executes rightly!)
 
Thank you so  much!
 
Regards,
Sahar.


_______________________________________________
jade-develop mailing list
jade-develop@...
https://avalon.cselt.it/mailman/listinfo/jade-develop
UNSUBSCRIBE INSTRUCTIONS AT
http://jade.tilab.com/community-mailinglist.htm

RE: Time managment between agents

by Caire Giovanni-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hi,

 

The simplest way to solve your problem is to use the searchUntilFound() method of the DFService class (instead of search()).

A more sophisticated and general approach would be not to simply search the DF, but to subscribe to it. In this way whenever a seller agent registers with the DF the coordinator is notified. To subscribe to the DF you can use the SubscriptionInitiator protocol and the createSubscriptionMessage() method of the DFService class to create the message to subscribe. Look at the DFService javadoc for details.

 

Bye,

 

Giovanni

 

 

 


From: jade-develop-bounces@... [mailto:jade-develop-bounces@...] On Behalf Of sa sa
Sent: venerdì 6 novembre 2009 2.13
To: jade-develop@...
Subject: [jade-develop] Time managment between agents

 

Dear friend,

I have a seller and a coordinator agent( or buyer). after starting my agents

            BookSellerAgent.start();
            CoordinatorAgent.start();

I need my coordinator agent to find available sellers throught a serach on DFservice. But my coordinator agent does not find any seller on DF because Seller agent will be registered later in a few milliseconds ! How can I manage this time issue between my agents? 

(By the way, some times seller is registered at the time so coordinator can find it on DF and program executes rightly!)

 

Thank you so  much!

 

Regards,

Sahar.

 


_______________________________________________
jade-develop mailing list
jade-develop@...
https://avalon.cselt.it/mailman/listinfo/jade-develop
UNSUBSCRIBE INSTRUCTIONS AT
http://jade.tilab.com/community-mailinglist.htm