[Coin-discuss] VolLp now compile and works.

Laszlo Ladanyi ladanyi at us.ibm.com
Thu Sep 19 14:05:55 EDT 2002


Hi Daniele,

On Fri, 30 Aug 2002, Daniele Ficcadenti wrote:

> Hello,
> I found the solutions (I am not sure 100%) to the problems I exposed in my 
> last 2 messages.
> 
> The first problem was relative to the makefile of VolLp example and the 
> other one
> was relative to the vollp.cpp file.
> 
> ----------------
> In the Makefile:
> ----------------
> 
> Laszlo Ladanyi added the following code to revision 1.6:
> 
> -------------------- BEGIN CODE ---------------------------------------
> # See if zlib there (should we go for bzlib as well?)
> ZlibIncDir := PROBE
> ZlibLibDir := PROBE
> ZlibLibName := libz.so libz.a
> 
> ##########################################################
> # You should not need to edit below this line.
> ##########################################################
> --------------------- END CODE ----------------------------------------
> 
> The work is complete if you add, just at the bottom of the last 3 lines, 
> this one:
> 
> -------------------- BEGIN CODE ---------------------------------------
> include ${MakefileDir}/Makefile.detectZlib
> --------------------- END CODE ----------------------------------------
> 
> This line is necessary if you want to activate the probing of zlib libraries.
> 
> After this modification, vollp.cpp compiles, but doesn't works, as explained in
> my last post. So, you need to modify vollp.cpp file too.
> 

You are entirely right, I missed that.

About the change below. First of all, your fix does work. However, it does not
address the root of the problem. When the VolLp example was first written
there was no MPS reader in COIN, so that's why there is that ugly #if ...
#elif ... #endif structure in vollp.cpp. We had to instantiate an
OsiXxxSolverInterface that was capable of reading in an MPS file. Now we do
have an MPS reader, and so now the OsiVolSolverInterface is capable of reading
in an MPS file as well, that's why your fix does work. 

The real fix would be to completely do away with the various OsiXxxSolvers and
instead instantiate an OsiMpsReader object, read in the MPS file using that
object then feed the data to the Volume Algorithm. In fact, this is what
happens in the devel-1 branch of COIN (check it out with `cvs co -r devel-1
COIN`, or just download the tarball). There are other nice things in the
devel-1 branch, see my previous post about it. Please try to use it, since
the more people pound on it the faster it'll become the main branch. 

In the meantime I'll backport the fix to the main branch sometime later this
week.

> ----------------
> In the vollp.cpp:
> ----------------
> 
> At the beginning of the file, you need to add these lines to "include section":
> 
> -------------------- BEGIN CODE ---------------------------------------
> #elif defined(COIN_USE_VOL)
> #include "OsiVolSolverInterface.hpp"
> --------------------- END CODE ----------------------------------------
> 
> At the beginning of the main() method you need to add these lines, before the
> "#else" clause:
> 
> -------------------- BEGIN CODE ---------------------------------------
> #elif defined(COIN_USE_VOL)
>     si = new OsiVolSolverInterface;
> --------------------- END CODE ----------------------------------------
> 
> I don't know if the solutions I proposed are logically correct so I would 
> like to
> know what you think about them.
> 
> Ciao, Daniele.
> 
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at www-124.ibm.com
> http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-discuss
> 

Sorry for the long silence about this, but I was on vacation first then I was
busy with customer projects.

--Laci




More information about the Coin-discuss mailing list