Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  bluemix java cplex how to load "libcplex1262.so"?

    Posted 11/11/15 12:48 PM

    Originally posted by: StevenYAO


    Dear Experts:

    I have an java application running on Bluemix. I would like to use Cplex. After I put "libcplex1262.so" in my local eclipse project folder and pushed to Bluemix, I call

    System.load("cplex1262") in my java code

    however, bluemix run shows "No such file or directory error".

     

    So my questions are:

    1. Where should I put  "libcplex1262.so"? As "java.library.path" is different between local run (a subfolder of my project) and Bluemix run ("/home/vcap/app/.java/jre/lib/amd64/compressedrefs:/home/vcap/app/.java/jre/lib/amd64:/usr/lib"), is there any way we can put it in above bluemix path? or can we put it in other place?

    2. How should I call System.load("cplex1262") to make sure I can use Cplex?

     

    Any advice is appreciated.


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: bluemix java cplex how to load "libcplex1262.so"?

    Posted 11/12/15 01:00 AM

    I think you should ask this question to the BlueMix experts. The CPLEX shared library is not different from any another native library used by Java.

    It must be stored in a directory that is contained in the java.library.path or the JVM must be started with a java.library.path that includes the directory that stores the shared library. Maybe you just need to change something in BlueMix config to extend the java.library.path on BlueMix? Or can you set environment variable LD_LIBRARY_PATH on BlueMix? Then it should also work to put the CPLEX shared library into a directory that is listed in LD_LIBRARY_PATH.

    Does it help to deploy the CPLEX library to /home/vcap/app?

    Not that there should be no need to explicitly load the library. Instantiating the IloCplex class should do that automatically for you.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: bluemix java cplex how to load "libcplex1262.so"?

    Posted 11/12/15 01:43 AM

    Originally posted by: StevenYAO


    Thanks Daniel for your advice.

    I have asked a bluemix SME and managed to fix the problem.

    Basically, we find a place in bluemix that we can put "libcplex1262.so", we then call System.load(.../cplex1262) to load the library.


    #CPLEXOptimizers
    #DecisionOptimization