Originally posted by: SystemAdmin
[Can_T_OM said:]
Hi Rub,
I have already used warm start technique in different situations where output script transfers the solution into a text file. All you have to do is to write a simple statement in a Cplex1.solve() loop where Cplex1 is the problem that you want to solve.
The statement is:
Cplex.solve()
{
opl1.postProcess();
}
More precisely,
writeln("the second optimization phase is starting with an initial solution of opl0 of problem0");
var Source1 = new IloOplModelSource("problem1.mod");
var Def1 = new IloOplModelDefinition(Source1);
var Cplex1 = new IloCplex();
var opl1 = new IloOplModel(Def1, Cplex1);
var Data1 = new IloOplDataSource("problem1.dat");
opl1.addDataSource(Data1);
// You can customize your optimization, e.g. Cplex1.MemoryEmphasis = 1;
opl1.generate();
// Make sure to attach the current solution value (all variables) as a solution starting point
Cplex1.solve()
{
opl1.postProcess();
}
I hope this helps.
#DecisionOptimization#OPLusingCPLEXOptimizer