Error reading LP format file.. Malformed term in expression Neighboring tokens
Dear community,
I am trying to use the Gurobi solver from Python scripts using the Pyomo package.
Yet, I have tested several other solver, which worked well but not all at good performance.
Thus, I want to test Gurobi as well. However, when running the model, I get the following error (see Log and excerpt of lp file below):
Error reading LP format file C:\Users\DECARB~1\AppData\Local\Temp\tmp4quwryu9.pyomo.lp at line 51578
Malformed term in expression
Neighboring tokens: " inf x10 -50146.236369016311 x1001 -11143.608082003626 "
I assume, that the issue is cause by the "-inf" or "inf" in general in that line (and actually in many following lines, see lp file).
I already searched online and also read your articles related to that issue, however I do not know how to change to the recommended other file format "mps". All of my scripts from preprocessing and model creation to excel output of the solution is done using Python (pyomo). The invoicing of the solver is done there as well.
Does anyone know a solution? Is the problem on the 'Gurobi side' or on the 'Python / pyomo side' (pyomo and Gurobi not well compatible)?
Thanks for any idea!


-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Infinite or NaN coefficients in linear constraints are disallowed, and we do not support them in file formats like LP, or MPS. Most often the presence of such coefficients point at an error during data generation. Maybe you could find out the origin (and meaning?) of these infinite coefficients?
Robert
0
Post is closed for comments.
Comments
2 comments