Originally posted by: SystemAdmin
My opl interface in c++ got stuck when it's calling either opl.end() or env.end(), and I couldn't find anything wrong with my codes, just to give you an idea:
IloEnv env;
IloOplErrorHandler handler(env, cout);
IloOplModelSource modelSource(env, ModFile.c_str());
IloOplSettings settings(env, handler);
IloOplModelDefinition def(modelSource, settings);
IloCplex cplex(env);
status = 127;
try {
IloOplModel opl(env,settings,def,cplex);
RCFDataSource externDS(env);
IloOplDataSource dataSource(&externDS);
opl.addDataSource(dataSource);
...
opl.generate();
cplex.solve();
opl.end();
}
catch {...}
env.end();
}
I also tried to end all other objects; they are fine except these two.
I would appreciate any suggestions. Thanks in advance.
#DecisionOptimization#OPLusingCPLEXOptimizer