-
Notifications
You must be signed in to change notification settings - Fork 561
Description
Hi,
First of all, thanks a lot for your great software!
While using it, I found one possible issue:
When I, for example, declare the quadratic objective function
problem.obj = pyo.Objective(expr = -1*problem.x[0]problem.x[0] + 4problem.x[0]*problem.x[1])
and write the problem to an MPS file,
problem.write("file_name")
then the objective function in the MPS-file looks like this:
QUADOBJ
x1 x1 -2
x1 x2 4
x2 x1 4
But according to my knowledge, this is the formulation if you use the QMATRIX keyword. For the QUADOBJ keyword, only the upper diagonal elements of the Q matrix are entered (http://www-eio.upc.edu/lceio/manuals/cplex-11/html/reffileformatscplex/reffileformatscplex13.html),
QUADOBJ
x1 x1 -2
x1 x2 4
In your code (Pyomo/pyomo/blob/main/pyomo/repn/plugins/mps.py l.705), I can see that you originally intended to write QMATRIX instead of QUADOBJ. Could you check if this is a correct or not?
Thanks a lot for your help!