[Coin-ipopt] a java interface derives from C++ version of IPOPT

tongkewei tongkewei at 126.com
Sun Nov 11 12:04:48 EST 2007

Dear IPOPT users
    I would like to share my java interface originate form c++ version of IPOPT . My codes were changed from  Rafael de Pelegrini Soares's original code. 
    Rafael de Pelegrini Soares's codes are originally derived form C version of IPOPT,which has limited functions. I derived my codes from C++ version of IPOPT, which is much more powerful than C or Fortran version.
    I also fix a bug in Rafael de Pelegrini Soares's code on function setProblemScaling, In his original code thefunction setProblemScaling has no use.
    I added some useful functions in JIpopt, such as get_scaling_parameters or get_number_of_nonlinear_variables or get_list_of_nonlinear_variables. You can add any more functions as you like. Follow my structure it is very easy now.
   On my platform Windows XP,I use Visual Studio.net 2005, JDK 1.6.0, I test HS071 and LukVlE1 LukVlI1 with size 20000. I test three jni dll. one is from Rafael de Pelegrini Soares, he said he use mumps, I call it jipopt_c_mumps, one is generate using Rafael de Pelegrini Soares 's c version jipopt with ma27,I call it jipopt_c_ma27 , and my own c++ version jni, I call it jipopt_c++. Running times below:
problem C++_use_ma27  jipopt_c_mumps   jipopt_c_ma27   jipopt_c++  
HS071   0.015/0.000   0.015/0.016       0.015/0.016    0.015/0.016
LukVlE1 0.375/0.172   2.171/0.579       0.438/0.687    0.452/0.611
LukVlI1 2.310/0.549   10.251/1.968      2.260/2.388    2.265/2.095
    As you can see, the C++ version of JIpopt is the same with C version of JIpopt, By the way, the results are same. The MUMPS version is much slower than MA27. Original C++ version is faster than jni version, but their computational afford are in the same order.
    When I test  jipopt_c version's setScalingParameter, I use HS071 and it's obj_scaling=-1, it get the minimum obj not the maximum, which is 17.014..., but I test C++ version and jipopt_c++ version of HS071 get_scaling_parameter with obj_scaling=-1, I get the maximum obj_val, which is 134.7338.... So I can say, Rafael de Pelegrini Soares's codes have errors in setScalingParameter. Be aware of that!
    If you have problem or you need me to add another functions, please contact me.
    My codes are attached with this e-mail, Can Andreas give me a place to share them. Thank you!
Tong Kewei
Ph.D. Candidate
School of Astronautics
Beihang University

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/ipopt/attachments/20071112/d634517f/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JavaInterface.rar
Type: application/octet-stream
Size: 19107 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/ipopt/attachments/20071112/d634517f/attachment.obj 

More information about the Coin-ipopt mailing list