Hi, I want to run a model with a sequence of dat. The model is as follows, here we have two dat files to solve. But it report errors, My main block maybe incorrect, can anyone point out how to achieve my purpose. The mod and the dat files are attached.

using CP;

int n = ... ; //ship number

int m = ... ; //berth number

int p[i in 1..n] = ...; //

int a[i in 1..n] = ... ; //arrival time of ship i.

int d[i in 1..n] = ... ; //

int w[i in 1..n] = ...; //

int T =...; // max(i in 1..n)a[i] + sum(i in 1..n)p[i]; //

int depth[k in 1..m][t in 1..T] =...; //

int draft[i in 1..n] = ...; //

dvar interval tasks[i in 1..n] in 0..T size p[i]; //

minimize max(i in 1..n)endOf(tasks[i]); //

subject to {

};

main{

thisOplModel.generate();

var masterDef = thisOplModel.modelDefinition;

var masterCP = new IloCP();

for (var i=1; i<=2; i++)

{

var masterOpl = new IloOplModel(masterDef,masterCP);

var dataName = 9+"_"+i+".dat";

var masterDataSource = new IloOplDataSource(dataName);

masterOpl.addDataSource(masterDataSource);

masterOpl.generate();

masterCP.startNewSearch();

while(masterCP.next())

{

writeln("obj = ", masterCP.getObjValue(), " | time = ", masterCP.info.SolveTime);

}

masterCP.endSearch();

masterOpl.end();

};

}