Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Questions about using ILOG OPL

    Posted 08/13/09 04:39 PM

    Originally posted by: SystemAdmin


    [Grace18 said:]

    1. I have .mod and .dat file. I try to use OPL engine in a Java application to get an initial schedule. OPLsolver class provides an interface to the OPL engine. when I ran the MyJNIsample provides by ILOG OPL studio and shows how to use the JNI encapsulation of the OPL C++ Component library and the OPLsolver class. I add opljni.jar (path is C:\ILOG\OPLSt371\classes) into Java library (Jre) when I run the sample eclipse, it was said “no opljni in java.library.path” . You can see the details in attachment file. It seems the opljni.jar doesn’t work. I add the other .jar files such as .jar file of antler or .jar files of commons-math in Java class library by the way, they do work.

    2. How can I write the solution I got in ILOG OPL Studio to a file?

    onSolution {

    ofile f("D:\Documents and Settings\xguo\ANTLRWorkspace\schule0.sch");
    f << "/* Initial schedule /"<<endl;<br />//I don't know how to write the code here. because I don't know where the solution displayed in output window was stored in.
    f << "/
    End of the initial schedule!*/"<<endl;<br />
    f.close(); 
    }

    Could someone give me some advice about these question.
    #ConstraintProgramming-General
    #DecisionOptimization


  • 2.  Re: Questions about using ILOG OPL

    Posted 11/30/09 04:41 AM

    Originally posted by: Didier Vidal


    The issue is that java can't load the opljni.dll that is required by opljni.jar (that makes the connection between java and the dll).
    You need to give the directory where the dll to java, with the java.library.path JVM argument.

    Didier.
    #ConstraintProgramming-General
    #DecisionOptimization