[Cbc] Java Wrapper

acw at ascent.com acw at ascent.com
Thu Oct 15 12:40:14 EDT 2009


We have succeeded in wrapping Cbc in a thin Java layer using JNI, but we 
had to roll our own.  I would be glad to share our experiences, if it 
comes to having to start from scratch.



From:
Kendall Bailey <krbailey at gmail.com>
To:
cbc at list.coin-or.org
Date:
10/13/2009 10:58 AM
Subject:
Re: [Cbc] Java Wrapper



I looked for one recently and wasn't impressed with what I found.  What I 
ended up writing is a very simple wrapping of some COIN and CLP classes 
with SWIG and using Python to build an LP model.  It wouldn't be hard to 
add CBC classes.  I'd still be interested in a Java binding.

I've compiled the SWIG interface file to Java once to make sure it would 
compile, but I haven't tested it at all.  With Python, I could use the 
array module to do allocation of primitive arrays and get a pointer to 
pass to COIN.  I'm not sure what I'd do in Java to manipulate the low 
level memory allocations.  I included some %array_functions() commands in 
the SWIG file, so that should generate something for Java to use.  I don't 
have any real Java/SWIG experience, but tried to avoid any Python-specific 
techniques. I'd be happy to share my simple coin_or.i file if it would 
serve as a starting point for Java.


Kendall


On Tue, Oct 13, 2009 at 9:08 AM, Georg Buss <buss at bwl.uni-mannheim.de> 
wrote:
Hi all,
 
I intend to access the cbc library from a java tool. My question is if you 
are aware of a java wrapper for Cbc. 

Thank you very much for your help.
 
Georg
 

_______________________________________________
Cbc mailing list
Cbc at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/cbc

_______________________________________________
Cbc mailing list
Cbc at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/cbc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/cbc/attachments/20091015/14c7926f/attachment.html 


More information about the Cbc mailing list