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