[metslib] metslib Digest, Vol 3, Issue 3

Shahin Gelareh shahin.gelareh at gmail.com
Fri Nov 12 13:50:44 EST 2010


Hi Mirko,

Could you please let me know where did you commit the modifications?
trunk/release?
Every thing shows that the last commit/change to the webssite was at least 7
days ago with no. 131.
I dont know where to get the fix.

regards,
Shahin


On Fri, Nov 12, 2010 at 6:00 PM, <metslib-request at list.coin-or.org> wrote:

> Send metslib mailing list submissions to
>        metslib at list.coin-or.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://list.coin-or.org/mailman/listinfo/metslib
> or, via email, send a message with subject or body 'help' to
>        metslib-request at list.coin-or.org
>
> You can reach the person managing the list at
>        metslib-owner at list.coin-or.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of metslib digest..."
>
>
> Today's Topics:
>
>   1. Re: Problem with random_shuffle (Mirko Maischberger)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 12 Nov 2010 17:33:27 +0100
> From: Mirko Maischberger <mirko.maischberger at gmail.com>
> Subject: Re: [metslib] Problem with random_shuffle
> To: Discussion list for METSlib Metaheuristics Framework
>        <metslib at list.coin-or.org>
> Message-ID:
>        <AANLkTikTMPMp6othiovGWrVAcxYpbmWfJn73czOsKRWN at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hello,
> can you please try if the following random_shuffle function fixes the
> problem you are experiencing?
>
> Please feel free to ask any question about migrating from 0.4 to 0.5 (or to
> fill the wiki page on migration, that is just a stub right now).
>
>
> Thank you and happy coding!
> Mirko
>
>  template<typename random_generator>
>  void random_shuffle(permutation_problem& p, random_generator& rng)
>  {
> #if defined (METSLIB_HAVE_UNORDERED_MAP) && !defined
> (METSLIB_TR1_MIXED_NAMESPACE)
>    std::uniform_int<size_t> unigen;
>    std::variate_generator<random_generator&,
>      std::uniform_int<size_t> >gen(rng, unigen);
> #else
>    std::tr1::uniform_int<size_t> unigen;
>    std::tr1::variate_generator<random_generator&,
>      std::tr1::uniform_int<size_t> >gen(rng, unigen);
> #endif
>    std::random_shuffle(p.pi_m.begin(), p.pi_m.end(), gen);
>    p.update_cost();
>  }
>
>
> On Wed, Nov 10, 2010 at 3:35 AM, Mirko Maischberger <
> mirko.maischberger at gmail.com> wrote:
>
> > Hello,
> >
> > Thank you for debugging and for having tracked the error down.
> >
> > I'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.
> >
> > Mirko
> >
> >
> > On Tue, Nov 9, 2010 at 1:01 AM, Shahin Gelareh <shahin.gelareh at gmail.com
> >wrote:
> >
> >> Hi everybody,
> >>
> >> It seems like there have been a lot of changes from 4.3 to 5. Thanks for
> >> the efforts.
> >> 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.
> >> The results in windows and using MSVC (MSVS2010)compiler is not what one
> >> expects. This is for example the case for qap example.
> >> I personally cannot run it. It reports exception and exits.
> >>
> >> One only needs to trace the code until:
> >>  template<typename random_generator>
> >>   void random_shuffle(permutation_problem& p, random_generator& rng)
> >>   {
> >> #if defined (METSLIB_HAVE_UNORDERED_MAP) && !defined
> >> (METSLIB_TR1_MIXED_NAMESPACE)
> >>     std::uniform_int<> unigen(0, p.pi_m.size());
> >>     std::variate_generator<random_generator,
> >>       std::uniform_int<> >gen(rng, unigen);
> >> #else
> >>     std::tr1::uniform_int<> unigen(0, p.pi_m.size());
> >>     std::tr1::variate_generator<random_generator,
> >>       std::tr1::uniform_int<> >gen(rng, unigen);
> >> #endif
> >>     std::random_shuffle(p.pi_m.begin(), p.pi_m.end(), gen);
> >>     p.update_cost();
> >>   }
> >>
> >>
> >> The output of this "std::random_shuffle(p.pi_m.begin(), p.pi_m.end(),
> >> gen);" 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.
> >>
> >> I was wondering if anyone has any idea?
> >>
> >>
> >> _______________________________________________
> >> metslib mailing list
> >> metslib at list.coin-or.org
> >> http://list.coin-or.org/mailman/listinfo/metslib
> >>
> >
> >
> >
> > --
> > Mirko Maischberger
> > @ | mirko.maischberger at gmail.com
> >
>
>
>
> --
> Mirko Maischberger
> @ | mirko.maischberger at gmail.com
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://list.coin-or.org/pipermail/metslib/attachments/20101112/1d78ab8b/attachment-0001.html
>
> ------------------------------
>
> _______________________________________________
> metslib mailing list
> metslib at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/metslib
>
> End of metslib Digest, Vol 3, Issue 3
> *************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/metslib/attachments/20101112/367d5e6b/attachment.html 


More information about the metslib mailing list