Why doesn't CBC find the Pyomo warmstart file?

Viewed 170

I'm trying to use the warmstart/mipstart option for the CBC solver 2.10.3 with Pyomo 5.7.3. It seems to me that CBC expects a relative path to the warmstart solution file, whereas Pyomo provides an absolute path. Is that right? And if so, are there any working alternative ways to provide CBC with a warmstart solution? Thank you very much, Stefan

Details:

First, I store a warmstart solution from a heuristic:

for assignment in heuristic_solution.assignments:
   model.xvars[assignment] = assignment.count

Then I ask Pyomo to call the CBC solver:

solver_factory.solve(model, warmstart=True)

Pyomo successfully creates a warmstart file (in line 267 of pyomo/solvers/plugins/solvers/CBCplugin.py):

self._warm_start_file_name = TempfileManager.create_tempfile(suffix = '.cbc.soln')

Pyomo then hands this file name over to CBC by creating a command line:

C:\<...>\cbc.exe -import C:\<...>\problem.lp -mipstart C:\<...>\warmstart.cbc.soln -solve

However, the _warm_start_file_name is an absolute path, whereas CBC accepts only relative paths. Thus, the warmstart solution is not being read by CBC.

0 Answers
Related