Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  oplrun and Java-Calls

    Posted 08/22/13 08:39 AM

    Originally posted by: trebron


    Hi,

    I get the following error using oplrun

    <> oplrun -p 0-Current Test

    <<< setup
    ....
    *** FATAL[SCRIPT_034] at 48:0 0-Current/XXX_java_data.mod: External Java calls are not allowed in custom C++ applications.
    ### OPL exception: Processing failed.

     

    In the docu to [SCRIPT_034] I read

    "You can use external call Java in the OPL IDE, in oplrun, and in custom OPL or ODM applications launched from Java."

    Thus, external Java calls should work with oplrun. Right?

    What might be the origin of the error message?

    Best regards

       Norbert


     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: oplrun and Java-Calls

    Posted 08/24/13 12:51 PM

    Hi,

     

    do you have this issue on windows or linux ?

     

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: oplrun and Java-Calls

    Posted 08/24/13 01:07 PM

    PS:

     

    in CPLEX_Studio125\opl\examples\opl_interfaces\java\externaldataread, can you try

    oplrun  callexternaldataread.mod

    ?

    If it works this will show you how to do.

    Regards

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: oplrun and Java-Calls

    Posted 08/26/13 03:40 AM

    Originally posted by: trebron


    I'll give it a try ...

     

    Regards

       Norbert


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: oplrun and Java-Calls

    Posted 08/26/13 03:40 AM

    Originally posted by: trebron


    Hi Alex,

     

    sorry for keeping this information secret.

    It is

    x86_64 GNU/Linux Ubuntu 10.04.4

    and

    <> oplrun -version
    Version IBM ILOG CPLEX Optimization Studio 12.4

     

    Regards

       Norbert


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: oplrun and Java-Calls

    Posted 08/26/13 05:59 AM

    Hi,

     

    have you read the comment about that is in the documentation ?

     

    Deploying OPL models with external Java function calls on Linux

    When deploying OPL models that make external Java function on Linux platforms, the following information might be useful:

    1. The environment variable JAVA_HOME need to be defined. OPL will load a JVM from JAVA_HOME for the external Java function calls. When the models are solved by a Java Application, the JVM for the Java application and the JVM for the external Java functions calls must be the same version.

    2. A JVM might have multiple modes, such as client, server, etc. When the models are solved by a Java Application, the JVM for the Java application and the JVM for the external Java functions calls must also be in the same mode. The default mode of JVM OPL chooses to load for external Java function calls will be printed to standard output when a model with external Java function calls is solved by oplrun (OPL 5.x) or oplrunjava (OPL 6.x).

    3. If you want to use a different mode of JVM other than the default mode, you will need to use the environment variable ODMS_JVM_LIBRARY_OVERRIDE to override the default selection. The value of ODMS_JVM_LIBRARY_OVERRIDE should be the relative path of libjvm.so from the JRE root path. For example, defining ODMS_JVM_LIBRARY_OVERRIDE as /lib/i386/server/libjvm.so will cause OPL to load a 32-bit server JVM.

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 7.  Re: oplrun and Java-Calls

    Posted 08/26/13 08:04 AM

    Originally posted by: trebron


    Hi Alex,

    that might indeed be a Java-Version problem, as the jar was developped on another machine.

    I will check that.

    Regards

       Norbert


    #DecisionOptimization
    #OPLusingCPLEXOptimizer