I need to solve a set of instances of a given optimization problem. I have several data (DAT) files and I need a loop so that I can (1) load each dat file, (2) build the model, and solve it.
I am attaching a MOS file (with a simple loop) and 2 DAT files as an example.
A counter t goes from 1 to 2 to solve each instance. If t starts at 1, the first model is solved correctly and the second is not. If I start with t=2 the second modle is solved correctly.
It's like when Mosel builds the second model it "remembers" the previous model. I have done so many things and still it doesn't work. Any clue would be highly appreciated.