Originally posted by: TobiasV.
Hi,
I am doing a university project on an MIP optimiziation with IBM Ilog OPL. As the runtime is getting to an unacceptable level I want to speed up the solution process by suggesting a initial solution.
The model itself is working and solves the problem sufficiently just too time consuming for the real use.
I added an initial solution, defined as data in the following way: (I used the warmstart example of the user manual as orientation)
main{
thisOplModel.generate();
var def = thisOplModel.modelDefinition;
var data= new IloOplDataSource("Gesamt(mod).dat");
var ofile = new IloOplOutputFile("solution.txt");
// Setting initial solution
writeln("Setting initial solution");
var opl2 = new IloOplModel(def, cplex);
opl2.addDataSource(data);
opl2.generate();
var vectors = new IloOplCplexVectors();
vectors.attach(opl2.x,opl2.startx);
vectors.setVectors(cplex);
cplex.solve();
writeln(opl2.printSolution());
writeln(cplex.status);
ofile.writeln(opl2.printSolution());
opl2.end();
data.end();
cplex.end();
vectors.end();
0;
}
The problem that I have is that Cplex terminates with staying at the initial solution without improving it. This cannot be right as I could define a better solution with just looking at it. It seems that cplex just terminates after a fixed time or fixed number of iterations. I am struggling with this for about a week and hope that somebody can help me with that.
If I run the model without the main block with the same ops file I get an optimized solution that is more feasible. Not sure where the mistake is. Any help would be much appreciated.
Best regards,
Tobias
#DecisionOptimization#OPLusingCPLEXOptimizer