[Lemon-user] Using cplex with lemon: Any example code available?
Kovács Péter
kpeter at inf.elte.hu
Mon May 18 19:50:19 CEST 2009
Hi,
> I started to look at the lemon library together with the cplex mip
> solver for my research work. It involves solving constrained
> multi-commodity flow problems over graphs. The sparse tutorial
> information doesn't help me getting started with cplex calls and with
> the documentation reference I couldn't get a simple example started.
I attached two simple examples, I hope they help you getting started.
Both of them can be used with an arbitrary LP solver, that is supported
by LEMON. Using CPLEX you should pass "-lcplex -lm -lpthread" flags
(besides -lemon) to the compiler.
The different LP solver classes (CplexLp, GlpkLp etc.) are the
descendants of LpSolver, as well as the MIP solvers are the descendandts
of MipSolver. Both of them are inherited from LpBase, which contains the
common features of them. So you should check these three classes in the
library documentation.
http://lemon.cs.elte.hu/pub/doc/1.1/a00171.html
http://lemon.cs.elte.hu/pub/doc/1.1/a00173.html
http://lemon.cs.elte.hu/pub/doc/1.1/a00186.html
Demo codes are really missing, but I think having these examples you can
use the above pages well.
> Does anyone of you have an example of using lemon together with cplex
> (lp or mip solver)? Without it one is basically forced to not use the
> library due to lack of documentation although using it might be very
> worthwhile.
>
> Thanks for any help,
>
> Martin Fuchsberger
>
Regards,
Peter
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: lp_demo_1.cpp
URL: <http://lemon.cs.elte.hu/pipermail/lemon-user/attachments/20090518/f83b546f/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: lp_demo_2.cpp
URL: <http://lemon.cs.elte.hu/pipermail/lemon-user/attachments/20090518/f83b546f/attachment-0001.ksh>
More information about the Lemon-user
mailing list