Error when reading model
AnsweredDear all,
I want to read a quadratically constrained, non-convex MINLP model for parameter tuning. When building the model in python (using pyomo), and solving everything goes well. However, when I read the .mps file in the interactive shell I get the following error:
Error: duplicate quadratic elements.
Does anyone know how to resolve this?
Kind regards,
Ties
-
Did you write the MPS file using Pyomo's built-in write functionality? An MPS file generated by Pyomo does not necessarily capture the exact model as stored internally by Gurobi, and in some cases may not be compatible with Gurobi.
To write out the MPS file using Gurobi's own file-writer, you can set the \( \texttt{GURO_PAR_DUMP} \) parameter to 1. E.g., in Pyomo:
opt.options['GURO_PAR_DUMP'] = 1
You can read more about this topic in the article How do I write an MPS model file from a third-party API?.
Please sign in to leave a comment.
Comments
2 comments