[Coin-discuss] C# interface to OSI (CLP)

Leo Lopes leo at sie.arizona.edu
Sun Mar 19 12:26:12 EST 2006


Personally, I'd rather not introduce an ifdef condition for a
platform-specific problem where the vendor already ackd the problem
and will ship a fix soon. Just leave the answer in the list and have
users fix it themselves. But it isn't my project...

Cheers,
Leo.

On 3/19/06, Jan-Willem Goossens <j.goossens at t75.nl> wrote:
> Appart from the fact that my VS2003 code would fail to work as-is, I'd say
> let's give it a try to see how your approach works.
> Can you change the code and send me a link to a tarball so I can test it? Or
> can you build with VS2003 yourself?
>
> The FAQ approach is a good think to do anyway.
>
> Jan-Willem
>
>
>
> ----- Original Message -----
> From: "Laszlo Ladanyi" <ladanyi at us.ibm.com>
> To: "Discussions about open source software for Operations Research"
> <coin-discuss at list.coin-or.org>
> Sent: Saturday, March 18, 2006 21:37
> Subject: Re: [Coin-discuss] C# interface to OSI (CLP)
>
>
> There aren't that many places to change, so it's not a big change. It can
> even
> be done with a 'typedef int BOOL_RETURN_TYPE;' fashion, so on other
> platforms/compilers we could stick to bool. When VC++6 was the dominant, we
> had a similar problem: it did not support templated member functions, while
> VC++7 did. So in most of COIN there are no templeted member functions. Also,
> while you may be able to apply a hotfix/service pack, others (esp. in
> industry) may not have that luxury. The bigger a company the more throughly
> they test each patch before allowing employees to apply them. So even if SP1
> is really released in April and if VS2005 is correct, many COIN users may be
> stuck with this bug for quite a bit longer.
>
> Of course, the easiest for us is just to phrase your post in a FAQ item, so
> if
> someone is in the same situation they'd find the answer easier :-).
>
> --Laci
>
> On Sat, 18 Mar 2006, Jan-Willem Goossens wrote:
>
> > Hi Laszlo,
> >
> > Well, I dont know. Changing the COIN sources (a lot) to work around a
> > known
> > MS bug doesnt feel right to me, even as a windows user.. According to
> >
> > http://support.microsoft.com/default.aspx?scid=kb;en-us;823071
> >
> > MS identified the problem, made a hotfix for VS2003, but hasnt gotten
> > around
> > to releasing an official service pack for VS2003. ("VS 2003 SP1 is
> > scheduled
> > for April 2006.  We have done much of the work for this release already,
> > and
> > are anxious to get it to you.")
> >
> > I also read that supposedly this has been fixed in VisualStudio 2005. I'll
> > try to get around to testing that on monday.
> >
> > Since I'm using CLP through OSI, and there are only about half a dozen OSI
> > functions that return a boolean, I didnt have to use the workaround a lot.
> >
> > On a different note: wouldnt it be nice to be able to Search through the
> > COIN mailing lists archives? It took me some time to find my own post
> > back..
> >
> > Regards,
> >
> > Jan-Willem
> >
> > ----- Original Message -----
> > From: "Laszlo Ladanyi" <ladanyi at us.ibm.com>
> > To: "Discussions about open source software for Operations Research"
> > <coin-discuss at list.coin-or.org>
> > Sent: Saturday, March 18, 2006 18:23
> > Subject: Re: [Coin-discuss] C# interface to OSI (CLP)
> >
> >
> > Hi Jan-Willem,
> >
> > Another option is never to return a bool, always return an int instead (0
> > for
> > false, 1 for true). Only the method definitions need to be changed, not
> > the
> > code, since int can be auto-converted to bool. The libraries probably
> > would
> > not suffer an enormous performance loss :-).
> >
> > Could you try to modify a virtual bool method to be an int and see whether
> > it
> > works? If so we can do the change everywhere. I guess Windows is an
> > important
> > enough platform to try to work around compiler quirks...
> >
> > --Laci
> >
> > On Sat, 18 Mar 2006, Jan-Willem Goossens wrote:
> >
> > > Hi,
> > >
> > > I'm using CLP (via Osi) in .NET, for example C#, as well.
> > > What I did was to make a .NET managed C++ DLL that interfaces between
> > > the
> > > classic C++ used in the COIN sources, and the managed .NET world.
> > > Once that's done, you can use this .NET DLL as a normal .NET Reference,
> > > for
> > > example in a C# of VN.NET solution.
> > >
> > > Just be aware of the "virtual bool bug"  that I posted on
> > > http://list.coin-or.org/pipermail/coin-discuss/2005-October/001677.html
> > >
> > >
> > > Good luck,
> > >
> > > Jan-Willem
> > >
> > >
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "Leo Lopes" <leo at sie.arizona.edu>
> > > To: "Discussions about open source software for Operations Research"
> > > <coin-discuss at list.coin-or.org>
> > > Sent: Friday, March 17, 2006 17:59
> > > Subject: Re: [Coin-discuss] C# interface to OSI (CLP)
> > >
> > >
> > > How hard is it to create a .net library from a Visual C++ project?
> > > That seems like the easiest way.
> > >
> > > On 3/17/06, allmail <allmail at michalkaut.net> wrote:
> > > > Hello,
> > > >
> > > > we want to use CLP in a project that is written in C#.
> > > > Is there some C# interface to OSI?
> > > > Or, if not, does anyone have any experiences/ideas with calling OSI
> > > > from
> > > > C#?
> > > >
> > > > Thanks a lot in advance.
> > > >
> > > > Regards,
> > > > Michal Kaut
> > > >
> > > > _______________________________________________
> > > > Coin-discuss mailing list
> > > > Coin-discuss at list.coin-or.org
> > > > http://list.coin-or.org/mailman/listinfo/coin-discuss
> > > >
> > >
> > >
> > > --
> > > ========================================================================
> > > Leonardo B. Lopes                                    leo at sie.arizona.edu
> > > Assistant Professor                                        (520)621-2342
> > > SIE - University of Arizona  http://www.sie.arizona.edu/faculty/leolopes
> > >
> > > _______________________________________________
> > > Coin-discuss mailing list
> > > Coin-discuss at list.coin-or.org
> > > http://list.coin-or.org/mailman/listinfo/coin-discuss
> > >
> > > _______________________________________________
> > > Coin-discuss mailing list
> > > Coin-discuss at list.coin-or.org
> > > http://list.coin-or.org/mailman/listinfo/coin-discuss
> > >
> >
> > _______________________________________________
> > Coin-discuss mailing list
> > Coin-discuss at list.coin-or.org
> > http://list.coin-or.org/mailman/listinfo/coin-discuss
> >
> > _______________________________________________
> > Coin-discuss mailing list
> > Coin-discuss at list.coin-or.org
> > http://list.coin-or.org/mailman/listinfo/coin-discuss
> >
>
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
>
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
>


--
========================================================================
Leonardo B. Lopes                                    leo at sie.arizona.edu
Assistant Professor                                        (520)621-2342
SIE - University of Arizona  http://www.sie.arizona.edu/faculty/leolopes




More information about the Coin-discuss mailing list