Originally posted by: SystemAdmin
[afleischer said:]
If all you want to do is generate this .dat, what you can do is write a new .mod with a main in which you generate your model wih the original .mod and the Access database .dat and then on your model you call the method printExternalData
Your new .mod will look like
main {
var source = new IloOplModelSource("basicmodel.mod");
var cplex = new IloCplex();
var def = new IloOplModelDefinition(source);
var opl = new IloOplModel(def,cplex);
var data = new IloOplDataSource("basicmodel.dat");
opl.addDataSource(data);
opl.generate();
var f=new IloOplOutputFile("export.dat");
f.writeln(opl.printExternalData());
f.close();
}
Alex
#DecisionOptimization#OPLusingCPLEXOptimizer