Hello,<div><br></div><div>Thank you for debugging and for having tracked the error down.</div><div><br></div><div>I&#39;m aware of some compatibility issues/bugs in the tr1/random libraries. I will look into the problem in the next few days and I hope to release a fix real soon.</div>
<div><br></div><div>Mirko</div><div><br></div><div><br><div class="gmail_quote">On Tue, Nov 9, 2010 at 1:01 AM, 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 everybody,<br><br>It seems like there have been a lot of changes from 4.3 to 5. Thanks for the efforts.<br>The code I had in 4.3 does not work anymore with 5, it is of course migratable but now the main concern is regarding the suffleing algorithm of STL.<br>

The results in windows and using MSVC (MSVS2010)compiler is not what one 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&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 (METSLIB_TR1_MIXED_NAMESPACE)<br>

    std::uniform_int&lt;&gt; unigen(0, p.pi_m.size());<br>    std::variate_generator&lt;random_generator, <br>      std::uniform_int&lt;&gt; &gt;gen(rng, unigen);<br>#else<br>    std::tr1::uniform_int&lt;&gt; unigen(0, p.pi_m.size());<br>

    std::tr1::variate_generator&lt;random_generator, <br>      std::tr1::uniform_int&lt;&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>The output of this &quot;std::random_shuffle(p.pi_m.begin(), p.pi_m.end(), gen);&quot; is the original permutation where some of the cells are swapped BUT there are some strange numbers among the numbers. large positive values 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">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>