Hello Shahin,<div><br></div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>I&#39;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">&lt;<a href="mailto:shahin.gelareh@gmail.com">shahin.gelareh@gmail.com</a>&gt;</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">&lt;<a href="mailto:metslib-request@list.coin-or.org" target="_blank">metslib-request@list.coin-or.org</a>&gt;</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 &#39;help&#39; 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 &quot;Re: Contents of metslib digest...&quot;<br>
<br>
<br>
Today&#39;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 &lt;<a href="mailto:mirko.maischberger@gmail.com" target="_blank">mirko.maischberger@gmail.com</a>&gt;<br>
Subject: Re: [metslib] Problem with random_shuffle<br>
To: Discussion list for METSlib Metaheuristics Framework<br>
        &lt;<a href="mailto:metslib@list.coin-or.org" target="_blank">metslib@list.coin-or.org</a>&gt;<br>
Message-ID:<br>
        &lt;<a href="mailto:AANLkTikTMPMp6othiovGWrVAcxYpbmWfJn73czOsKRWN@mail.gmail.com" target="_blank">AANLkTikTMPMp6othiovGWrVAcxYpbmWfJn73czOsKRWN@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<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&lt;typename random_generator&gt;<br>
  void random_shuffle(permutation_problem&amp; p, random_generator&amp; rng)<br>
  {<br>
#if defined (METSLIB_HAVE_UNORDERED_MAP) &amp;&amp; !defined<br>
(METSLIB_TR1_MIXED_NAMESPACE)<br>
    std::uniform_int&lt;size_t&gt; unigen;<br>
    std::variate_generator&lt;random_generator&amp;,<br>
      std::uniform_int&lt;size_t&gt; &gt;gen(rng, unigen);<br>
#else<br>
    std::tr1::uniform_int&lt;size_t&gt; unigen;<br>
    std::tr1::variate_generator&lt;random_generator&amp;,<br>
      std::tr1::uniform_int&lt;size_t&gt; &gt;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 &lt;<br>
<a href="mailto:mirko.maischberger@gmail.com" target="_blank">mirko.maischberger@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hello,<br>
&gt;<br>
&gt; Thank you for debugging and for having tracked the error down.<br>
&gt;<br>
&gt; I&#39;m aware of some compatibility issues/bugs in the tr1/random libraries. I<br>
&gt; will look into the problem in the next few days and I hope to release a fix<br>
&gt; real soon.<br>
&gt;<br>
&gt; Mirko<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Nov 9, 2010 at 1:01 AM, Shahin Gelareh &lt;<a href="mailto:shahin.gelareh@gmail.com" target="_blank">shahin.gelareh@gmail.com</a>&gt;wrote:<br>
&gt;<br>
&gt;&gt; Hi everybody,<br>
&gt;&gt;<br>
&gt;&gt; It seems like there have been a lot of changes from 4.3 to 5. Thanks for<br>
&gt;&gt; the efforts.<br>
&gt;&gt; The code I had in 4.3 does not work anymore with 5, it is of course<br>
&gt;&gt; migratable but now the main concern is regarding the suffleing algorithm of<br>
&gt;&gt; STL.<br>
&gt;&gt; The results in windows and using MSVC (MSVS2010)compiler is not what one<br>
&gt;&gt; expects. This is for example the case for qap example.<br>
&gt;&gt; I personally cannot run it. It reports exception and exits.<br>
&gt;&gt;<br>
&gt;&gt; One only needs to trace the code until:<br>
&gt;&gt;  template&lt;typename random_generator&gt;<br>
&gt;&gt;   void random_shuffle(permutation_problem&amp; p, random_generator&amp; rng)<br>
&gt;&gt;   {<br>
&gt;&gt; #if defined (METSLIB_HAVE_UNORDERED_MAP) &amp;&amp; !defined<br>
&gt;&gt; (METSLIB_TR1_MIXED_NAMESPACE)<br>
&gt;&gt;     std::uniform_int&lt;&gt; unigen(0, p.pi_m.size());<br>
&gt;&gt;     std::variate_generator&lt;random_generator,<br>
&gt;&gt;       std::uniform_int&lt;&gt; &gt;gen(rng, unigen);<br>
&gt;&gt; #else<br>
&gt;&gt;     std::tr1::uniform_int&lt;&gt; unigen(0, p.pi_m.size());<br>
&gt;&gt;     std::tr1::variate_generator&lt;random_generator,<br>
&gt;&gt;       std::tr1::uniform_int&lt;&gt; &gt;gen(rng, unigen);<br>
&gt;&gt; #endif<br>
&gt;&gt;     std::random_shuffle(p.pi_m.begin(), p.pi_m.end(), gen);<br>
&gt;&gt;     p.update_cost();<br>
&gt;&gt;   }<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; The output of this &quot;std::random_shuffle(p.pi_m.begin(), p.pi_m.end(),<br>
&gt;&gt; gen);&quot; is the original permutation where some of the cells are swapped BUT<br>
&gt;&gt; there are some strange numbers among the numbers. large positive values<br>
&gt;&gt; specifically. I searched a lot with no success about how to overcome.<br>
&gt;&gt;<br>
&gt;&gt; I was wondering if anyone has any idea?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; metslib mailing list<br>
&gt;&gt; <a href="mailto:metslib@list.coin-or.org" target="_blank">metslib@list.coin-or.org</a><br>
&gt;&gt; <a href="http://list.coin-or.org/mailman/listinfo/metslib" target="_blank">http://list.coin-or.org/mailman/listinfo/metslib</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Mirko Maischberger<br>
&gt; @ | <a href="mailto:mirko.maischberger@gmail.com" target="_blank">mirko.maischberger@gmail.com</a><br>
&gt;<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>