Performance Issue Solving Convex QCP with Gurobi vs. CPLEX
Awaiting user inputWe are solving a convex Quadratically Constrained Program (QCP) using both Gurobi and CPLEX, and we’ve observed a significant performance difference we’d like your advice on.
The model is a central planner capacity expansion planning problem (optimization and convex problem), implemented in Julia (JuMP).
Objective: maximize total system welfare (consumer utility minus generation and storage costs).
Gurobi recognizes the model as QCP, but sub terminates. CPLEX solves the model successfully and provides correct results, but takes ~6 hours. We expected Gurobi to perform better, given that convex QCPs are within its supported scope.
Thanks in advance for your support.
-
Hi Andreas,
It might be easier to comment if we can see logging output.
Additionally, if you'd like to share a model file with us then please do so via a service like dropbox, Google Drive etc
- Riley
0 -
Hey Riley,
Thank you for your fast response. How can I share the logging output of both Gurobi and CPLEX?
0 -
Hi Andreas,
You can paste the Gurobi log into this thread. I think you can hold off on sharing the CPLEX log for the moment.
0 -
Gurobi 12.0.1 (win64) logging started Tue Jun 10 18:21:41 2025Set parameter LogFile to value "gurobi_log1.txt"
Gurobi 12.0.1 (win64) logging started Tue Jun 10 18:21:44 2025
Set parameter LogFile to value "gurobi_log1.txt"
Gurobi Optimizer version 12.0.1 build v12.0.1rc0 (win64 - Windows 11.0 (26100.2))CPU model: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz, instruction set [SSE2|AVX|AVX2]
Thread count: 6 physical cores, 12 logical processors, using up to 12 threadsOptimize a model with 4515 rows, 3629 columns and 11623 nonzeros
Model fingerprint: 0x502d6792
Model has 450 quadratic objective terms
Model has 6 quadratic constraints
Coefficient statistics:
Matrix range [1e-02, 2e+05]
QMatrix range [3e+01, 3e+04]
QLMatrix range [1e+00, 6e+04]
Objective range [2e-01, 2e+05]
QObjective range [1e+04, 1e+04]
Bounds range [0e+00, 0e+00]
RHS range [1e+00, 1e+02]
Presolve removed 1037 rows and 141 columns
Presolve time: 0.01s
Presolved: 4841 rows, 4402 columns, 14537 nonzeros
Presolved model has 7 second-order cone constraints
Ordering time: 0.00sBarrier statistics:
Dense cols : 12
Free vars : 2
AA' NZ : 1.692e+04
Factor NZ : 6.603e+04 (roughly 4 MB of memory)
Factor Ops : 1.015e+06 (less than 1 second per iteration)
Threads : 6Objective Residual
Iter Primal Dual Primal Dual Compl Time
0 -5.54856922e+10 6.67305357e+09 1.20e+07 7.02e+03 1.20e+08 0s
1 -4.38728150e+10 6.58619343e+09 2.09e+06 2.69e+03 3.66e+07 0s
2 -2.11524473e+10 4.52737732e+09 7.65e+04 3.86e+02 5.84e+06 0s
3 -4.76263794e+09 6.27930001e+08 3.49e+03 1.06e+01 6.82e+05 0s
4 -9.19008719e+08 5.47602066e+08 8.91e+02 5.52e-01 1.78e+05 0s
5 -2.16254472e+08 5.29260802e+08 4.35e+02 1.40e-01 9.02e+04 0s
6 4.46807525e+08 5.28104837e+08 2.23e+01 1.12e-01 9.81e+03 0s
7 4.81231816e+08 5.20016191e+08 1.02e+01 5.69e-03 4.68e+03 0s
8 4.87909843e+08 5.15099424e+08 7.62e+00 3.84e-03 3.28e+03 0s
9 4.96455219e+08 5.09685083e+08 3.48e+00 1.38e-03 1.60e+03 0s
10 4.98933020e+08 5.08426562e+08 2.48e+00 8.61e-04 1.15e+03 0s
11 4.99312244e+08 5.07599909e+08 2.31e+00 1.13e-03 1.00e+03 0s
12 5.00656406e+08 5.07131123e+08 1.75e+00 1.35e-03 7.83e+02 0s
13 5.01811252e+08 5.06453630e+08 1.32e+00 1.04e-03 5.62e+02 0s
14 5.02951346e+08 5.05874943e+08 2.09e+00 1.45e-03 3.53e+02 0s
15 5.03432623e+08 5.05449094e+08 1.37e+00 3.72e-03 2.44e+02 0s
16 5.03671045e+08 5.05292844e+08 1.01e+00 1.42e-03 1.96e+02 0s
17 5.03808870e+08 5.05098353e+08 5.53e-01 4.85e-02 1.56e+02 0s
18 5.03894463e+08 5.05043668e+08 4.63e-01 4.58e-02 1.39e+02 0s
19 5.04005034e+08 5.04930036e+08 2.02e+00 5.93e-02 1.12e+02 0s
20 -5.54856922e+10 6.67305357e+09 1.20e+07 7.02e+03 1.20e+08 0s
21 -1.32775733e+10 1.23781606e+09 3.28e+06 4.37e+01 5.69e+06 0s
22 -1.15413369e+09 9.85118892e+08 4.54e+05 7.68e+00 7.22e+05 0s
23 4.12364534e+08 6.42466295e+08 2.21e+04 2.27e+00 4.63e+04 0s
24 4.86865532e+08 5.89010478e+08 6.90e+03 1.32e+00 1.79e+04 0s
25 5.01357846e+08 5.43298671e+08 3.58e+03 4.65e-01 7.75e+03 0s
26 5.04740879e+08 5.28302254e+08 2.74e+03 2.13e-01 4.98e+03 0s
27 5.04879491e+08 5.13678691e+08 1.32e+03 3.53e-02 2.09e+03 0s
28 5.05970964e+08 5.09513394e+08 7.20e+02 6.34e-03 1.01e+03 0s
29 5.05171859e+08 5.09060678e+08 2.85e+02 3.46e-02 7.00e+02 0s
30 5.03350755e+08 5.08408913e+08 1.51e+02 2.03e-02 7.38e+02 0s
31 5.04492951e+08 5.07684967e+08 9.59e+01 9.33e-03 4.70e+02 0s
32 5.03842918e+08 5.05680142e+08 3.59e+01 1.63e-03 2.96e+02 0s
33 5.04063737e+08 5.05147430e+08 2.03e+01 4.15e-03 1.85e+02 0s
34 5.04183827e+08 5.04651648e+08 1.10e+01 3.62e-02 9.37e+01 0s
35 5.04227082e+08 5.04454134e+08 7.34e+00 2.20e-02 5.51e+01 0s
36 5.04241065e+08 5.04413461e+08 6.21e+00 1.72e-02 4.46e+01 0s
37 5.04269065e+08 5.04338635e+08 4.15e+00 1.18e-02 2.51e+01 0s
38 5.04315684e+08 5.04322205e+08 1.80e-01 6.14e-02 1.41e+00 0s
39 5.04313469e+08 5.04315186e+08 6.95e-02 8.36e-01 2.95e-01 0s
40 5.04313739e+08 5.04313855e+08 1.92e-01 7.01e+00 3.01e-02 0s
41 5.04313794e+08 5.04313806e+08 3.74e-01 2.60e+00 4.01e-03 0s
42 5.04313782e+08 5.04313795e+08 8.33e+03 2.59e+03 2.03e-03 1s
43 5.04313782e+08 5.04313794e+08 7.54e+03 2.08e+03 1.74e-03 1s
44 5.04313783e+08 5.04313792e+08 8.52e+03 4.94e+03 1.39e-03 1s
45 5.04313784e+08 5.04313784e+08 6.71e+03 2.70e+03 1.21e-04 1s
46 5.04313784e+08 5.04313784e+08 5.99e+05 2.66e+03 1.22e-04 1s
47 5.04313784e+08 5.04313784e+08 2.00e+05 3.89e+04 5.94e-05 1s
48 5.04313784e+08 5.04313784e+08 1.95e+05 4.62e+04 4.27e-05 1s
49 5.04313784e+08 5.04313784e+08 1.53e+05 3.01e+04 6.10e-05 1s
50 5.04313784e+08 5.04313784e+08 1.52e+05 5.15e+04 6.19e-05 1s
51 5.04313784e+08 5.04313784e+08 1.98e+05 2.75e+04 6.19e-05 1s
52 5.04313784e+08 5.04313784e+08 3.69e+05 4.57e+04 6.19e-05 1s
53 5.04313784e+08 5.04313784e+08 2.72e+05 7.38e+04 7.21e-05 1s
54 5.04313784e+08 5.04313784e+08 4.82e+05 8.56e+03 6.54e-05 1s
55 5.04313784e+08 5.04313784e+08 1.38e+05 1.38e+04 2.85e-05 1s
56 5.04313784e+08 5.04313784e+08 1.41e+05 4.60e+03 2.75e-05 1s
57 5.04313784e+08 5.04313784e+08 1.55e+05 8.07e+03 2.79e-05 1s
58 5.04313784e+08 5.04313784e+08 1.56e+05 3.05e+03 3.60e-05 1s
59 5.04313784e+08 5.04313784e+08 2.99e+04 4.55e+03 3.56e-05 1s
60 5.04313784e+08 5.04313784e+08 5.13e+04 2.02e+03 3.59e-05 1s
61 5.04313784e+08 5.04313784e+08 6.54e+04 7.69e+02 3.23e-05 1s
62 5.04313784e+08 5.04313784e+08 6.59e+04 1.80e+01 3.14e-05 1s
63 5.04313784e+08 5.04313784e+08 5.29e+04 2.89e+01 3.02e-05 1s
64 5.04313784e+08 5.04313784e+08 3.57e+04 1.09e+01 4.50e-05 1s
65 5.04313784e+08 5.04313784e+08 3.90e+04 1.77e+01 4.54e-05 1sBarrier performed 65 iterations in 1.27 seconds (0.51 work units)
Sub-optimal termination - objective 5.04313794e+08
User-callback calls 234, time in user-callback 0.00 sec
0 -
The first thing I would try is to set BarHomogeneous=1
Next I'd try experimenting with BarQCPConvTol
How about bounds on variables? Have you defined any? Often this can help.
0 -
I tried BarHomogeneous=1 and BarQCPConvTol, but the problem still sub-terminates. For bounds on variables, if you exclude positivity, I don't have anything else. Of course, I have some constraints that may combine different variables.
0 -
In that case I think we'd need to get a model in the hands of our dev team.
0 -
I can share my model.
0
Please sign in to leave a comment.
Comments
8 comments