« Return to Thread: askOne and multiple agents
I thank you :) (and sorry my english...)I have used this version...But I have tried the .asl:[code]// Agent sample in project TaskAlloc/* Initial beliefs and rules *//* Initial goals */!generateA.//!sendIt./* Plans */+!generateA:.my_name(M)<-+a(M);.wait(100);!sendIt.+!sendIt:.all_names(AGENTS)<-.send(AGENTS, askOne, a(_), LIST);.print("List is: ", LIST);+list(LIST);.[/code]And I only receive the first answer of receivers :/I looked the code and i think the problem is in TansitionSystem.java@238 line:[code] if (send.getTerm(0).isList()) { // send to many receivers [/code]the term in position 0 (when I run the asl code) is of VarTerm class and does not a "List" term.If I use the .send internal action in this way:".send([a,b], askOne, a(_), LIST);" it work because I use a explicit list. :(Well, is there one way to I use the .send with VarTerm? I need it because in my problem I do a pre-proccess in the AGENTS list to select a sublist to send the askOne message.best regards....Marcos Côrtes2011/9/8 Jomi Hubner <jomifred@...>Hello Marcos,
the latest version of Jason (1.3.5), just released, supports synchronous ask with several receivers. All the answers are collected into a list. For instance, in
.send([b,c],askOne,vl(_),L)
L will unify with
[vl(1)[source(b)],vl(2)[source(c)]]
HTH,
Jomi
> ------------------------------------------------------------------------------
On 08/09/2011, at 16:39, Marcos Côrtes wrote:
> Hello... I need a help...
>
> I have tried build a ContractNet example with jason..
>
> But, I need make a "send message" for multiples receivers and receive ALL their answers.
>
> Example:
>
> .send([a, b, c], askOne, ask(), ANSWERS);
> //wait the all answers in ANSWERS.
> for(.member(A, ANSWERS))
> {
> //manipulate a unique answer A in ANWERS
> }
>
>
> I try use the .send internal action with "askOne", but it only wait the first answer for return to the intention/plan.
>
>
> There is other way to make it? (I do now my agent send and receive the askOne answer for each agent receiver with multiples ".send". But it is very slow!).
>
>
> Thanks.
>
> --
> Ass: Marcos Côrtes
> Mestrando Computação - UFF
> Doing More with Less: The Next Generation Virtual Desktop
> What are the key obstacles that have prevented many mid-market businesses
> from deploying virtual desktops? How do next-generation virtual desktops
> provide companies an easier-to-deploy, easier-to-manage and more affordable
> virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/_______________________________________________
> Jason-users mailing list
> Jason-users@...
> 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://www.das.ufsc.br/~jomi
--
Ass: Marcos Côrtes
Mestrando Computação - UFF
« Return to Thread: askOne and multiple agents
| Free embeddable forum powered by Nabble | Forum Help |