Hi, The program does not crash on my machine (Athlon 64, gcc 4.2.4, gecode 2.2.0). What kind of machine and compiler do you use?
Apart form that, I see one bug and a potential bug in your code. First: the subscriptions are never canceled! This should be done somewhere in the clean-up code. Either it could be done in the advisor itself (as is done in the ViewAdvisor class [1]), or it could be done in the class by iterating over the advisors in the council [2]. A potential bug is that the advise function is ill-formed, in that both branches check the value of the MY-variable. Since you assign the MY-variable first, the problem never occurs, but if you change the order of the rel calls in the main function the advise function returns with garbage as return vale. Cheers, Mikael [1] http://www.gecode.org/gecode-doc-latest/classGecode_1_1ViewAdvisor.html [2] http://www.gecode.org/gecode-doc-latest/classGecode_1_1Advisors.html On Wed, Dec 3, 2008 at 1:07 PM, David Rijsman <[EMAIL PROTECTED]> wrote: > Attached you find a little sample in which I have written a peace of code in > which I am trying to subsume my advisors and it is crashing on de second > subsume invocation... Am I doing something wrong or missing something? > > thanks, > > David > > > This message contains information that may be privileged or confidential and > is the property of Quintiq. It is only intended for the person to whom it is > addressed. If you are not the intended recipient, you are not authorized to > read, print, retain, copy, disseminate, distribute or use this message or any > part thereof. If you have received this message in error, please notify the > sender immediately and delete all copies of this message. Please note that > e-mails are susceptible to change, therefore they are not binding. > > _______________________________________________ > Gecode users mailing list > [EMAIL PROTECTED] > https://www.gecode.org/mailman/listinfo/gecode-users > > -- Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/ _______________________________________________ Gecode users mailing list [EMAIL PROTECTED] https://www.gecode.org/mailman/listinfo/gecode-users
