hotstart doesn't work wit cplex (and I am provinding the fix ;-)
Hello,
hotstart is not working with CPLEX.
Actual code (solver_cplex.py, lines 729 - 737):
# Handle "hotstart" option.
if self.ext.options["hotstart"]:
names, values = [], []
for picosVar in self.ext.variables.values():
if picosVar.is_valued():
for localIndex in range(picosVar.dim):
picosIndex = picosVar.startIndex + localIndex
cplexName = _cplexVarName[picosIndex]
indices.append(cplexName)
values.append(picosVar.valueAsMatrix[localIndex])
My fix:
# Handle "hotstart" option.
if self.ext.options["hotstart"]:
names, values = [], []
for picosVar in self.ext.variables.values():
if picosVar.is_valued():
for localIndex in range(picosVar.dim):
picosIndex = picosVar.startIndex + localIndex
cplexName = self.int.variables.get_names([0])[0]
names.append(cplexName)
values.append(picosVar.valueAsMatrix[localIndex])
It worked for me (apparently). If it really works then you own me a beer.
Edited by José Roberto Colombo Junior