Search code examples
pythonpackagecplexpyomo

Pyomo doesn't receive solution from solver


I run pyomo with cplex for a while now. I code in Jupyter. Today I pip installed 'nteract', an extension for Jupyter. Since then I have this problem: My pyomo models don't get solved anymore. Pandas and Pyomo packages weren't found anymore. So I pip installed them again. Since then it doesn't work right anymore:

When I execute:

In [13]: solver = SolverFactory('cplex')
         print(solver.solve(model))

I receive from the solver:

Problem:
- Lower bound: -inf
  Upper bound: inf
  Number of objectives: 1
  Number of constraints: 0
  Number of variables: None
  Number of nonzeros: None
  Sense: unknown
Solver:
- Status: ok
  Termination condition: unknown
  Error rc: 0
  Time: 0.04337573051452637

...even though my model is constructed and contains all the variables, constraints, etc.

It does it for different models too. Here(PDF) is my example if you want to see it.

But I think it has something to do with the environment I run all this in and I don't have any ideas on how to tackle this.


Solution

  • problem discovered by solving the model with tee=Tree.

    problem solved: One shouldn't have blank spaces in the path to python file. Blank spaces in python file itself don't make this error occur.

    Issue reported on GitHub.

    Edit: Issue fixed and closed.