Hello Shahin,<div><br></div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>I'll commit it to the stable/0.5 branch later today.</div><div><br></div><div>The reason it was missing is that I was waiting for you to test the new code (present only in the email body right now and on my computer) before committing.</div>
<div><br></div><div>Cheers,</div><div>Mirko<br><br><div class="gmail_quote">On Fri, Nov 12, 2010 at 7:50 PM, Shahin Gelareh <span dir="ltr"><<a href="mailto:shahin.gelareh@gmail.com">shahin.gelareh@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Mirko,<br><br>Could you please let me know where did you commit the modifications? trunk/release? <br>Every thing shows that the last commit/change to the webssite was at least 7 days ago with no. 131.<br>
I dont know where to get the fix. <br>
<br>regards,<br>Shahin<br><br><br><div class="gmail_quote">On Fri, Nov 12, 2010 at 6:00 PM, <span dir="ltr"><<a href="mailto:metslib-request@list.coin-or.org" target="_blank">metslib-request@list.coin-or.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">Send metslib mailing list submissions to<br>
<a href="mailto:metslib@list.coin-or.org" target="_blank">metslib@list.coin-or.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://list.coin-or.org/mailman/listinfo/metslib" target="_blank">http://list.coin-or.org/mailman/listinfo/metslib</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:metslib-request@list.coin-or.org" target="_blank">metslib-request@list.coin-or.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:metslib-owner@list.coin-or.org" target="_blank">metslib-owner@list.coin-or.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of metslib digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: Problem with random_shuffle (Mirko Maischberger)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 12 Nov 2010 17:33:27 +0100<br>
From: Mirko Maischberger <<a href="mailto:mirko.maischberger@gmail.com" target="_blank">mirko.maischberger@gmail.com</a>><br>
Subject: Re: [metslib] Problem with random_shuffle<br>
To: Discussion list for METSlib Metaheuristics Framework<br>
<<a href="mailto:metslib@list.coin-or.org" target="_blank">metslib@list.coin-or.org</a>><br>
Message-ID:<br>
<<a href="mailto:AANLkTikTMPMp6othiovGWrVAcxYpbmWfJn73czOsKRWN@mail.gmail.com" target="_blank">AANLkTikTMPMp6othiovGWrVAcxYpbmWfJn73czOsKRWN@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hello,<br>
can you please try if the following random_shuffle function fixes the<br>
problem you are experiencing?<br>
<br>
Please feel free to ask any question about migrating from 0.4 to 0.5 (or to<br>
fill the wiki page on migration, that is just a stub right now).<br>
<br>
<br>
Thank you and happy coding!<br>
Mirko<br>
<br>
template<typename random_generator><br>
void random_shuffle(permutation_problem& p, random_generator& rng)<br>
{<br>
#if defined (METSLIB_HAVE_UNORDERED_MAP) && !defined<br>
(METSLIB_TR1_MIXED_NAMESPACE)<br>
std::uniform_int<size_t> unigen;<br>
std::variate_generator<random_generator&,<br>
std::uniform_int<size_t> >gen(rng, unigen);<br>
#else<br>
std::tr1::uniform_int<size_t> unigen;<br>
std::tr1::variate_generator<random_generator&,<br>
std::tr1::uniform_int<size_t> >gen(rng, unigen);<br>
#endif<br>
std::random_shuffle(p.pi_m.begin(), p.pi_m.end(), gen);<br>
p.update_cost();<br>
}<br>
<br>
<br>
On Wed, Nov 10, 2010 at 3:35 AM, Mirko Maischberger <<br>
<a href="mailto:mirko.maischberger@gmail.com" target="_blank">mirko.maischberger@gmail.com</a>> wrote:<br>
<br>
> Hello,<br>
><br>
> Thank you for debugging and for having tracked the error down.<br>
><br>
> I'm aware of some compatibility issues/bugs in the tr1/random libraries. I<br>
> will look into the problem in the next few days and I hope to release a fix<br>
> real soon.<br>
><br>
> Mirko<br>
><br>
><br>
> On Tue, Nov 9, 2010 at 1:01 AM, Shahin Gelareh <<a href="mailto:shahin.gelareh@gmail.com" target="_blank">shahin.gelareh@gmail.com</a>>wrote:<br>
><br>
>> Hi everybody,<br>
>><br>
>> It seems like there have been a lot of changes from 4.3 to 5. Thanks for<br>
>> the efforts.<br>
>> The code I had in 4.3 does not work anymore with 5, it is of course<br>
>> migratable but now the main concern is regarding the suffleing algorithm of<br>
>> STL.<br>
>> The results in windows and using MSVC (MSVS2010)compiler is not what one<br>
>> expects. This is for example the case for qap example.<br>
>> I personally cannot run it. It reports exception and exits.<br>
>><br>
>> One only needs to trace the code until:<br>
>> template<typename random_generator><br>
>> void random_shuffle(permutation_problem& p, random_generator& rng)<br>
>> {<br>
>> #if defined (METSLIB_HAVE_UNORDERED_MAP) && !defined<br>
>> (METSLIB_TR1_MIXED_NAMESPACE)<br>
>> std::uniform_int<> unigen(0, p.pi_m.size());<br>
>> std::variate_generator<random_generator,<br>
>> std::uniform_int<> >gen(rng, unigen);<br>
>> #else<br>
>> std::tr1::uniform_int<> unigen(0, p.pi_m.size());<br>
>> std::tr1::variate_generator<random_generator,<br>
>> std::tr1::uniform_int<> >gen(rng, unigen);<br>
>> #endif<br>
>> std::random_shuffle(p.pi_m.begin(), p.pi_m.end(), gen);<br>
>> p.update_cost();<br>
>> }<br>
>><br>
>><br>
>> The output of this "std::random_shuffle(p.pi_m.begin(), p.pi_m.end(),<br>
>> gen);" is the original permutation where some of the cells are swapped BUT<br>
>> there are some strange numbers among the numbers. large positive values<br>
>> specifically. I searched a lot with no success about how to overcome.<br>
>><br>
>> I was wondering if anyone has any idea?<br>
>><br>
>><br>
>> _______________________________________________<br>
>> metslib mailing list<br>
>> <a href="mailto:metslib@list.coin-or.org" target="_blank">metslib@list.coin-or.org</a><br>
>> <a href="http://list.coin-or.org/mailman/listinfo/metslib" target="_blank">http://list.coin-or.org/mailman/listinfo/metslib</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> Mirko Maischberger<br>
> @ | <a href="mailto:mirko.maischberger@gmail.com" target="_blank">mirko.maischberger@gmail.com</a><br>
><br>
<br>
<br>
<br>
--<br>
Mirko Maischberger<br>
@ | <a href="mailto:mirko.maischberger@gmail.com" target="_blank">mirko.maischberger@gmail.com</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://list.coin-or.org/pipermail/metslib/attachments/20101112/1d78ab8b/attachment-0001.html" target="_blank">http://list.coin-or.org/pipermail/metslib/attachments/20101112/1d78ab8b/attachment-0001.html</a><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
metslib mailing list<br>
<a href="mailto:metslib@list.coin-or.org" target="_blank">metslib@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/metslib" target="_blank">http://list.coin-or.org/mailman/listinfo/metslib</a><br>
<br>
End of metslib Digest, Vol 3, Issue 3<br>
*************************************<br>
</blockquote></div><br>
<br>_______________________________________________<br>
metslib mailing list<br>
<a href="mailto:metslib@list.coin-or.org">metslib@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/metslib" target="_blank">http://list.coin-or.org/mailman/listinfo/metslib</a><br></blockquote></div><br><br clear="all"><br>-- <br>Mirko Maischberger <br>@ | <a href="mailto:mirko.maischberger@gmail.com">mirko.maischberger@gmail.com</a><br>
</div>