Originally posted by: pnuzyf
Hi, my friends!
I tried the following model and data files in OPL, but I got the following errors:
Data parsing error: syntax error, unexpected '=', expecting (identifier) or from or (identifier path).
Invalid escape sequence "\U".
What is the reason? How can I solve these errors?
//batch.model
string mymodel = ...;
{string} Files = ...;
main
{
for (var dataName in thisOplModel.Files)
{
var source = new IloOplModelSource(thisOplModel.mymodel);
var def = new IloOplModelDefinition(source);
var algo = new IloCplex();
var theModel = new IloOplModel(def,algo);
var data = new IloOplDataSource(dataName);
theModel.addDataSource(data);
theModel.generate();
if ( algo.solve() )
{
writeln(algo.getObjValue());
theModel.postProcess();
}
else
{
writeln("\tNo solution found!");
}
theModel.end();
algo.end();
def.end();
source.end();
}
}
//batch.data
string mymodel = "C:\Users\James\Desktop\test\test.mod"
{string} Files={"C:\Users\James\Desktop\test\uniformtest1.dat"
"C:\Users\James\Desktop\test\uniformtest2.dat"}
#DecisionOptimization#OPLusingCPLEXOptimizer