Originally posted by: SystemAdmin
[Lara said:]
Hi all,
I use OPL Java API for solving MILP problems. I use given .mod and .dat files, the java code generates the run configuration and solves the given problem. This part of the code works correctly.
The Java code is the following:
[font=Arial]IloOplFactory myFactory = new IloOplFactory();
IloCplex cplex = myFactory.createCplex();
IloOplRunConfiguration runConf = myFactory.createOplRunConfiguration(mod, data);
runConf.setCplex(cplex);
runConf.getOplModel().generate();
if (cplex.solve()) {... processing solution data...}[/font]
The code ends with the following lines:
[font=Arial]try{ runConf.end();}catch(Exception e){e.printStackTrace();}
try{ myFactory.end();}catch(Exception e){e.printStackTrace();}[/font]
In case of some (.mod, .dat) files I get the following exception during the running of the code:
[font=Arial]java.lang.RuntimeException: internal error (Please notify Ilog)
at ilog.opl.opl_wrapJNI.IloOplRunConfiguration_end(Native Method)
at ilog.opl.IloOplRunConfiguration.end(IloOplRunConfiguration.java:91)
at my.test.pack.My_first.<init>(My_first.java:80)[/font]
The problem is something with the end() method, but I don't have any idea what could it be! I'm not sure if I really need this method, or not! I know that it is for memory management, but I don't know the consequences of not using this method! Does anybody have an idea about this problem?
Thanks for your help,
Ildiko
#DecisionOptimization#OPLusingCPLEXOptimizer