Hi,
I’d like to warm start a model. I first read a CSV file as follows.
tuple xTuple { string _from; string _to; int decision; } {xTuple} initX={}; execute{ var f = new IloOplInputFile("X.csv"); while (!f.eof){ var str=f.readline(); var ar = str.split(","); if (ar.length==4) { initX.add(ar[0], ar[1], Opl.intValue(ar[2])); } } f.close(); }
Then, I make sure that the (i,j) pairs are ordered in the same way I defined in mod file. {realX} vectorX = { | in TupleX, in initX};
Now, I need to pass each (dec) as a solution value to another mod file. If I was solving a model to get the initial results, I was doing the following;
var vectors = new IloOplCplexVectors(); vectors.attach(m1Opl.X, masterOpl.X.solutionValue);
How can I replace X.solutionValue by (dec) defined in vectorX?