ERROR: Solver (gurobi) returned non-zero return code (1)
ERROR: Solver log:
-------------------------------------------- Warning: your license will
expire in 10 days --------------------------------------------
Using license file C:\Users\DustinDesktop\gurobi.lic Academic license -
for non-commercial use only - expires 2021-04-03 Read LP format model from
file C:\Users\DUSTIN~1\AppData\Local\Temp\tmppuxw1duf.pyomo.lp Reading
time = 0.00 seconds x9: 1 rows, 6 columns, 1 nonzeros Gurobi Optimizer
version 9.1.0 build v9.1.0rc0 (win64) Thread count: 6 physical cores, 6
logical processors, using up to 6 threads Optimize a model with 1 rows, 6
columns and 1 nonzeros Model fingerprint: 0xbd480e1d Model has 4 quadratic
constraints Coefficient statistics:
Matrix range [1e+00, 1e+00] QMatrix range [2e-04, 1e+00] QLMatrix
range [8e-01, 1e+04] Objective range [1e+00, 1e+00] Bounds range
[0e+00, 0e+00] RHS range [1e+00, 1e+00]
Presolve removed 1 rows and 1 columns Traceback (most recent call last):
File "<stdin>", line 5, in <module> File
"C:\Users\DustinDesktop\Anaconda3\envs\pyomo\lib\site-
packages\pyomo\solvers\plugins\solvers\GUROBI_RUN.py", line 114, in
gurobi_run
model.optimize()
File "src\gurobipy\model.pxi", line 847, in
gurobipy.gurobipy.Model.optimize
gurobipy.gurobipy.GurobiError: Quadratic equality constraints are non-
convex. Set NonConvex parameter to 2 to solve model.
It appears that a new flag or check must be introduced for gurobi to solve nonconvex problems.
Within the gurobi python API this is done with
model.setParam('NonConvex', 2)
after model construction.Here is an example of the problem. Where we are doing a variation of the example CSTR reactor problem.