Originally posted by: bkececi
Hi to all,
I'm using the "oplrun" on ubuntu server 14.04.1. LTS operating system. I have a mod file which includes a main block that i give it below. The problem is i cannot set the cplex parameters on that Linux machine. When i tried the same on a Windows machine then it works well.
Here is the code....
I run this main block by this command line command:
endustri@UbuntuCplexServer64:~$ sudo LD_LIBRARY_PATH=/usr/ilog/opl/bin/x86-64_linux ./oplrun /.../SolveMIP.mod
Thanx for your help.
main
{
var problempath = new Array(24);
var problemname = new Array(26);
//i...
problempath[0] = "/.../TypeX/";
problempath[1] = "/.../TypeX/20/";
problempath[2] = "/.../TypeX/25/";
problempath[3] = "/.../TypeX/30/";
problempath[4] = "/.../TypeX/35/";
problempath[5] = "/.../TypeX/40/";
problempath[6] = "/.../TypeY/";
problempath[7] = "/.../TypeY/20/";
problempath[8] = "/.../TypeY/25/";
problempath[9] = "/.../TypeY/30/";
problempath[10] = "/.../TypeY/35/";
problempath[11] = "/.../TypeY/40/";
problempath[12] = "/.../TypeG/";
problempath[13] = "/.../TypeG/20/";
problempath[14] = "/.../TypeG/25/";
problempath[15] = "/.../TypeG/30/";
problempath[16] = "/.../TypeG/35/";
problempath[17] = "/.../TypeG/40/";
problempath[18] = "/.../TypeGy/";
problempath[19] = "/.../TypeGy/20/";
problempath[20] = "/.../TypeGy/25/";
problempath[21] = "/.../TypeGy/30/";
problempath[22] = "/.../TypeGy/35/";
problempath[23] = "/.../TypeGy/40/";
//j...
problemname[0] = "T_13";
problemname[1] = "T_14";
problemname[2] = "T_15";
problemname[3] = "T_16";
problemname[4] = "T_17";
problemname[5] = "T_18";
problemname[6] = "T_19";
problemname[7] = "T_20";
problemname[8] = "LS_C101A";
problemname[9] = "LS_C101B";
problemname[10] = "LS_C101C";
problemname[11] = "LS_C201A";
problemname[12] = "LS_C201B";
problemname[13] = "LS_C201C";
problemname[14] = "LS_R101A";
problemname[15] = "LS_R101B";
problemname[16] = "LS_R101C";
problemname[17] = "LS_R201A";
problemname[18] = "LS_R201B";
problemname[19] = "LS_R201C";
problemname[20] = "LS_RC101A";
problemname[21] = "LS_RC101B";
problemname[22] = "LS_RC101C";
problemname[23] = "LS_RC201A";
problemname[24] = "LS_RC201B";
problemname[25] = "LS_RC201C";
for (var i = 0; i <= 23; i++)
{
var ofile = new IloOplOutputFile(problempath[i] + "Results.txt");
for (var j = 0; j <= 25; j++)
{
var src = new IloOplModelSource("model_fb3_i_fc.mod");
var def = new IloOplModelDefinition(src);
var cplex = new IloCplex;
var opl = new IloOplModel(def,cplex);
opl.settings.mainEndEnabled = true;
var data = new IloOplDataSource(problempath[i] + problemname[j] + ".dat");
opl.addDataSource(data);
opl.generate();
cplex.workdir = "/.../";
cplex.workmem = 512;
cplex.tilim = 7200;
cplex.nodefileind = 3;
cplex.solve();
ofile.writeln(cplex.getCplexStatus() , " " , cplex.getSolvedTime() , " " , cplex.getObjValue() , " " , cplex.getBestObjValue());
data.end();
opl.end();
cplex.clearModel();
cplex.end();
def.end();
src.end();
}
ofile.close();
}
}
#DecisionOptimization#OPLusingCPLEXOptimizer