The advisor must store additional information: so, when you create an advisor you can also store additional information, for example, the view x[i] or just the index i. For that, you have to create a subclass of Advisor that stores this information.
This is in fact explained in MPG, please check again. In 26.2 in MPG it is the class ViewAdvisor that stores the additional information. Best Christian -- Christian Schulte, Professor of Computer Science, KTH, www.ict.kth.se/~cschulte/ From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf Of Duong Khanh Chuong Sent: Wednesday, March 05, 2014 5:06 PM To: users@gecode.org Subject: [gecode-users] question about the advisors in GeCode Hi all, I have a naive question regarding to the advisor in Gecode: In the example of SameDom (26.2 in MPG.pdf), how can I know exactly the variable x[i] that is changed? for example, how can I get the value i of variable x[i] which corresponds to advisor a appeared in the function advise()? virtual ExecStatus advise(Space&, Advisor& a, const Delta&) { } Thanks very much for your advices. Best regards, K.Chuong
_______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users