The most tractable implementation of a PWL-like function
I need to implement a piecewise linear function f(x) for which the sections are not "activated" by the value of x (as they normally would be) but by some other decesion variable w. Mathematically, such a function with k sections can be defined as follows
f(x, w) = {a_{1,k} * x + a_{0,k}, if b_k <= w < b_{k+1},
{0 , otherwise,
for some increasing values of b_k.
My question is, how should I implement this function so that Gurobi has the easiest possible job solving a MILP where such a function is used extensively (1k-10k times)? Or may be even how to set the solver so that it perform better for this kind of model.
I tried two implementations and Gurobi seems to be strugling with both of them.
In the first implementation I implemented this function purely in CVXPY. I cannot share the exact code. A sort of python psedu code follows:
import cvxpy as cp
def binary_continuous_product(a, x, y, x_upper_bound):
constraints = [
y - x <= cp.multiply(x_upper_bound, 1 - a),
y - x >= cp.multiply(-x_upper_bound, 1 - a),
y <= cp.multiply(x_upper_bound, a),
y >= cp.multiply(-x_upper_bound, a),
]
return constraints
y = cp.Variable() # f(x, w) = y
w = cp.Variable()
section_indicator = cp.Variable(len(b)-1, boolean=True)
# only one section can be active
constraints = [cp.sum(section_indicator) == 1]
# Iterate over sections
for k in range(len(b)-1):
yk = cp.Variable()
# define constraints for section_indicator[k] being
# active when b_k <= w < b_{k+1}
constraints += [
w >= cp.multiply(section_indicator[k], b[k]),
w <= cp.multiply(section_indicator[k], b[k + 1]) + cp.multiply(1 - section_indicator[k], w_upper_bound),
]
constraints += binary_continuous_product(
a=section_indicator[k],
x=a1[k]*x + a0[k],
y=yk,
x_upper_bound=y_max,
)
y += yk
I attach also the Gurobi log for the full model with this implementation:
Parameter OutputFlag unchanged
Value: 1 Min: 0 Max: 1 Default: 1
Changed value of parameter QCPDual to 1
Prev: 0 Min: 0 Max: 1 Default: 0
Changed value of parameter MIPGap to 0.05
Prev: 0.0001 Min: 0.0 Max: inf Default: 0.0001
Changed value of parameter Threads to 6
Prev: 0 Min: 0 Max: 1024 Default: 0
Changed value of parameter TimeLimit to 600.0
Prev: inf Min: 0.0 Max: inf Default: inf
Changed value of parameter GomoryPasses to 1
Prev: -1 Min: -1 Max: 2000000000 Default: -1
Changed value of parameter Cuts to 3
Prev: -1 Min: -1 Max: 3 Default: -1
Parameter QCPDual unchanged
Value: 1 Min: 0 Max: 1 Default: 0
Changed value of parameter PreSolve to 2
Prev: -1 Min: -1 Max: 2 Default: -1
Changed value of parameter PreDual to 1
Prev: -1 Min: -1 Max: 2 Default: -1
Changed value of parameter MIPFocus to 2
Prev: 0 Min: 0 Max: 3 Default: 0
Changed value of parameter Method to 3
Prev: -1 Min: -1 Max: 5 Default: -1
Changed value of parameter Symmetry to 2
Prev: -1 Min: -1 Max: 2 Default: -1
Gurobi Optimizer version 9.1.2 build v9.1.2rc0 (linux64)
Thread count: 16 physical cores, 16 logical processors, using up to 6 threads
Optimize a model with 80511 rows, 29414 columns and 285375 nonzeros
Model fingerprint: 0x983119df
Variable types: 26239 continuous, 3175 integer (1246 binary)
Coefficient statistics:
Matrix range [1e-03, 1e+03]
Objective range [2e-01, 1e+05]
Bounds range [1e+00, 1e+00]
RHS range [4e-02, 2e+03]
Presolve removed 62617 rows and 19178 columns
Presolve time: 0.42s
Presolved: 17894 rows, 10236 columns, 72803 nonzeros
Variable types: 7720 continuous, 2516 integer (991 binary)
Concurrent LP optimizer: primal simplex, dual simplex, and barrier
Showing barrier log only...
Presolve removed 76 rows and 185 columns
Presolved: 10160 rows, 26412 columns, 81173 nonzeros
Root barrier log...
Ordering time: 0.20s
Barrier statistics:
Free vars : 1630
AA' NZ : 1.072e+05
Factor NZ : 7.258e+05 (roughly 20 MBytes of memory)
Factor Ops : 1.267e+08 (less than 1 second per iteration)
Threads : 3
Objective Residual
Iter Primal Dual Primal Dual Compl Time
0 -8.21441520e+13 1.62728443e+11 1.26e+08 3.72e+04 1.07e+11 1s
1 -3.60423647e+13 1.16570712e+12 3.88e+07 1.96e+04 5.40e+10 1s
2 -1.97888559e+13 1.84110172e+12 8.88e+06 3.14e+03 9.58e+09 1s
3 -9.12863634e+12 1.23801984e+12 5.16e+05 1.60e+02 7.49e+08 1s
4 -4.96444232e+12 3.22999420e+11 2.21e+05 4.28e+01 2.56e+08 1s
5 -1.80711587e+12 1.69227959e+11 5.97e+04 4.96e+01 9.23e+07 1s
6 -6.58517318e+11 3.52089172e+10 1.28e+04 4.66e+01 2.50e+07 1s
7 -2.32768935e+11 1.03296633e+10 2.05e+03 3.58e+01 6.01e+06 1s
8 -1.30010748e+11 5.17804302e+09 7.49e+02 3.28e+01 2.41e+06 1s
9 -1.14203792e+11 3.31776966e+09 5.97e+02 2.39e+01 1.86e+06 1s
10 -8.22747189e+10 1.72989704e+09 3.06e+02 1.59e+01 9.72e+05 1s
11 -6.45565556e+10 8.81476428e+08 1.74e+02 1.16e+01 5.55e+05 1s
12 -4.94002056e+10 5.79212957e+08 7.86e+01 8.64e+00 2.65e+05 1s
13 -4.71397802e+10 5.18758003e+08 7.54e+01 1.95e+01 2.69e+05 1s
14 -4.29570896e+10 4.96251545e+08 6.85e+01 1.50e+01 2.51e+05 1s
15 -4.16657381e+10 4.90088901e+08 6.61e+01 1.40e+01 2.45e+05 1s
16 -3.80160481e+10 4.61496856e+08 5.79e+01 9.55e+00 2.29e+05 1s
17 -2.72973622e+10 4.08889203e+08 2.33e+01 6.06e+00 1.05e+05 1s
18 -1.87755654e+10 3.70575249e+08 4.60e+00 4.77e+00 2.40e+04 1s
19 -1.65447824e+10 3.43263316e+08 2.24e+00 4.64e+00 1.20e+04 1s
20 -1.41933329e+10 3.30604582e+08 9.17e-01 4.57e+00 5.30e+03 1s
21 -1.26137989e+10 3.22697273e+08 5.33e-01 4.53e+00 3.21e+03 1s
22 -1.13906270e+10 3.18605450e+08 3.58e-01 4.51e+00 2.25e+03 1s
23 -1.06827528e+10 3.17391905e+08 2.89e-01 4.51e+00 1.88e+03 1s
24 -8.04361951e+09 3.13715074e+08 8.18e-02 4.48e+00 6.96e+02 2s
25 -4.02356904e+09 3.11466310e+08 2.97e-02 4.47e+00 3.12e+02 2s
26 -2.60093942e+09 3.10151946e+08 2.79e-02 4.46e+00 3.00e+02 2s
27 -1.92149940e+09 3.09831349e+08 2.79e-02 4.43e+00 6.28e+02 2s
28 -7.77328916e+09 3.08444930e+08 2.72e-02 4.36e+00 5.75e+03 2s
29 -1.02111067e+10 3.07345262e+08 2.56e-02 4.30e+00 1.18e+04 2s
30 -1.88553541e+09 3.05848066e+08 1.60e-02 4.23e+00 3.38e+03 2s
31 -1.79724236e+09 3.05238930e+08 1.60e-02 4.21e+00 3.61e+03 2s
32 -6.41766996e+08 3.03868129e+08 1.44e-02 4.14e+00 2.05e+03 2s
33 -8.22873629e+08 3.02954627e+08 1.33e-02 4.10e+00 2.69e+03 2s
34 -5.92901121e+08 3.02405701e+08 1.29e-02 4.09e+00 2.24e+03 2s
35 -4.48945099e+08 3.01370468e+08 1.27e-02 4.06e+00 2.25e+03 2s
36 -3.99124810e+08 2.98855157e+08 1.25e-02 4.01e+00 2.39e+03 2s
37 -3.50397191e+08 2.93620195e+08 1.21e-02 3.95e+00 2.48e+03 2s
38 -3.01581148e+08 2.81970619e+08 1.16e-02 3.81e+00 2.57e+03 2s
39 -2.78465058e+08 2.77796859e+08 1.14e-02 3.75e+00 2.58e+03 2s
40 -2.39951377e+08 2.73423752e+08 1.10e-02 3.68e+00 2.49e+03 2s
41 -2.13272674e+08 2.66949220e+08 1.07e-02 3.60e+00 2.45e+03 2s
42 -1.60457053e+08 2.61391244e+08 1.02e-02 3.52e+00 2.20e+03 2s
43 -1.46841668e+08 2.56410195e+08 1.00e-02 3.45e+00 2.16e+03 2s
44 -1.27050365e+08 2.51288600e+08 9.57e-03 3.38e+00 2.04e+03 2s
45 -1.05921189e+08 2.31072028e+08 8.71e-03 3.11e+00 1.93e+03 2s
46 -8.27219384e+07 2.22947985e+08 7.81e-03 3.00e+00 1.67e+03 2s
47 -5.46406666e+07 2.05330395e+08 6.61e-03 2.77e+00 1.33e+03 2s
48 -3.94328575e+07 1.92790559e+08 5.46e-03 2.60e+00 1.07e+03 2s
49 -3.03727679e+07 1.81650789e+08 4.49e-03 2.45e+00 8.84e+02 2s
50 -2.93141856e+07 1.71361860e+08 4.06e-03 2.32e+00 8.47e+02 2s
51 -2.69965466e+07 1.57660670e+08 3.77e-03 2.15e+00 7.82e+02 2s
52 -2.63793741e+07 1.29499442e+08 3.13e-03 1.79e+00 7.09e+02 2s
53 -2.26864712e+07 8.02105931e+07 2.50e-03 1.18e+00 4.93e+02 2s
54 -2.14447187e+07 3.16869241e+07 1.51e-03 6.03e-01 2.71e+02 2s
55 -2.04630016e+07 2.51290170e+07 7.30e-04 5.25e-01 2.17e+02 2s
56 -2.01384853e+07 2.19657833e+07 5.85e-04 4.87e-01 1.96e+02 2s
57 -1.97324785e+07 1.04069892e+07 3.47e-04 3.49e-01 1.38e+02 2s
58 -1.94406647e+07 4.74662482e+06 1.58e-04 2.82e-01 1.07e+02 2s
59 -1.89305839e+07 2.02426076e+06 2.91e-02 2.50e-01 8.98e+01 2s
60 -1.78476222e+07 1.47867959e+06 2.19e-02 2.44e-01 8.23e+01 3s
61 -1.72307335e+07 1.31504556e+06 2.15e-02 2.41e-01 8.07e+01 3s
62 -1.36743107e+07 1.37809749e+06 1.72e-02 2.40e-01 7.21e+01 3s
63 -1.36455995e+07 1.37590146e+06 3.06e-02 2.40e-01 7.20e+01 3s
64 -5.58674200e+06 1.37449209e+06 7.22e-02 1.98e-01 7.51e+01 3s
65 -9.68013831e+06 1.28837308e+06 5.14e-02 1.66e-01 1.43e+02 3s
66 -7.94824217e+06 1.30770353e+06 2.96e-02 1.02e-01 1.86e+02 3s
67 -3.68199700e+06 1.21418411e+06 1.20e-02 7.85e-02 1.17e+02 3s
68 -8.32360941e+05 7.93637200e+05 5.63e-02 4.25e-02 4.54e+01 3s
69 -7.47645934e+05 6.91457220e+05 5.10e-02 3.92e-02 4.04e+01 3s
70 -4.17541471e+05 4.97868084e+05 1.80e-02 2.67e-02 2.65e+01 3s
71 -3.45554413e+05 4.43143292e+05 1.51e-02 2.47e-02 2.30e+01 3s
72 -2.82394375e+05 4.16715313e+05 1.26e-02 2.36e-02 2.04e+01 3s
73 -2.05328595e+05 2.11080326e+05 8.63e-03 1.55e-02 1.23e+01 3s
74 -1.99810699e+05 1.96444228e+05 8.32e-03 1.47e-02 1.17e+01 3s
75 -1.92391256e+05 1.86869034e+05 7.91e-03 1.43e-02 1.12e+01 3s
76 -1.92302767e+05 1.86862121e+05 2.96e-02 1.43e-02 1.12e+01 3s
77 -1.79445535e+05 1.82030900e+05 2.65e-02 1.40e-02 1.07e+01 3s
78 -1.79148026e+05 1.81541769e+05 2.65e-02 1.40e-02 1.06e+01 3s
79 -1.75596271e+05 1.72312562e+05 2.53e-02 1.35e-02 1.03e+01 3s
80 -1.74154464e+05 1.70149762e+05 2.39e-02 1.34e-02 1.01e+01 3s
81 -1.69938456e+05 1.62673407e+05 2.34e-02 1.30e-02 9.80e+00 3s
82 -1.68560984e+05 1.60315423e+05 2.29e-02 1.29e-02 9.70e+00 3s
83 -1.65186458e+05 1.54417072e+05 2.33e-02 1.26e-02 9.42e+00 3s
84 -1.64004775e+05 1.52107564e+05 2.09e-02 1.25e-02 9.32e+00 3s
85 -1.63701671e+05 1.49875006e+05 2.13e-02 1.24e-02 9.25e+00 3s
86 -1.61534354e+05 1.44647848e+05 2.06e-02 1.22e-02 9.03e+00 3s
87 -1.58893497e+05 1.29123328e+05 2.09e-02 1.14e-02 8.50e+00 3s
88 -1.57352688e+05 1.26950502e+05 1.92e-02 1.13e-02 8.39e+00 3s
89 -1.57034312e+05 1.25981415e+05 1.97e-02 1.12e-02 8.35e+00 3s
90 -1.55656320e+05 1.23223758e+05 1.98e-02 1.11e-02 8.23e+00 3s
91 -1.55637921e+05 1.23208880e+05 2.06e-02 1.11e-02 8.23e+00 3s
92 -1.52766467e+05 1.15577079e+05 2.09e-02 1.07e-02 7.92e+00 3s
93 -1.52656514e+05 1.15320307e+05 2.00e-02 1.07e-02 7.91e+00 3s
94 -1.51636825e+05 1.12860144e+05 1.98e-02 1.06e-02 7.80e+00 3s
95 -1.51178630e+05 1.11709355e+05 1.83e-02 1.05e-02 7.76e+00 3s
96 -1.51146037e+05 1.11621635e+05 1.90e-02 1.05e-02 7.75e+00 3s
97 -1.50575717e+05 1.09920375e+05 1.89e-02 1.04e-02 7.69e+00 3s
98 -1.50584873e+05 1.09905683e+05 1.87e-02 1.04e-02 7.69e+00 4s
99 -1.50497196e+05 1.09670574e+05 1.93e-02 1.04e-02 7.68e+00 4s
100 -1.49557291e+05 1.06007712e+05 1.88e-02 1.02e-02 7.54e+00 4s
101 -1.47527581e+05 1.02704286e+05 1.45e-02 1.01e-02 7.38e+00 4s
102 -1.43219054e+05 8.85857964e+04 1.36e-02 9.38e-03 6.84e+00 4s
103 -1.39746662e+05 8.16104998e+04 1.27e-02 9.04e-03 6.53e+00 4s
104 -1.39079002e+05 7.93376647e+04 1.26e-02 8.93e-03 6.45e+00 4s
105 -1.38624186e+05 7.79095122e+04 1.24e-02 8.85e-03 6.39e+00 4s
106 -1.38392545e+05 7.72099814e+04 1.26e-02 8.82e-03 6.36e+00 4s
107 -1.36596015e+05 7.15578549e+04 1.21e-02 8.54e-03 6.14e+00 4s
108 -1.36498560e+05 7.13110252e+04 1.57e-02 8.53e-03 6.13e+00 4s
109 -1.35426465e+05 6.73674082e+04 1.74e-02 8.33e-03 5.99e+00 4s
110 -1.35404828e+05 6.73404542e+04 1.80e-02 8.33e-03 5.98e+00 4s
111 -1.35168109e+05 6.64803251e+04 2.32e-02 8.28e-03 5.95e+00 4s
112 -1.35149395e+05 6.64789846e+04 2.57e-02 8.28e-03 5.95e+00 4s
113 -1.33432863e+05 5.51648096e+04 2.66e-02 7.68e-03 5.57e+00 4s
114 -1.27662309e+05 2.34616230e+04 1.82e-02 6.11e-03 4.47e+00 4s
115 -1.21219012e+05 9.61433608e+03 1.10e-02 5.42e-03 3.87e+00 4s
116 -1.19274915e+05 5.36982747e+03 1.16e-02 5.20e-03 3.68e+00 4s
117 -1.19146892e+05 5.23721890e+03 2.05e-02 5.20e-03 3.67e+00 4s
118 -1.19053647e+05 4.12211942e+03 1.94e-02 5.14e-03 3.64e+00 4s
119 -1.16710001e+05 4.89551414e+02 1.37e-02 4.96e-03 3.46e+00 4s
120 -1.15795980e+05 -1.04300043e+04 1.34e-02 4.40e-03 3.11e+00 4s
121 -1.14872699e+05 -1.17112979e+04 2.00e-02 4.34e-03 3.05e+00 4s
122 -1.12970777e+05 -1.61473496e+04 2.16e-02 4.12e-03 2.86e+00 4s
123 -1.11777709e+05 -1.84395978e+04 2.62e-02 4.00e-03 2.75e+00 4s
124 -1.11036516e+05 -2.37516479e+04 2.57e-02 3.73e-03 2.58e+00 4s
125 -1.10786040e+05 -2.60120390e+04 2.28e-02 3.61e-03 2.50e+00 4s
126 -1.07956489e+05 -3.74941950e+04 3.64e-02 3.03e-03 2.08e+00 4s
127 -1.07942499e+05 -3.75437232e+04 3.64e-02 3.03e-03 2.08e+00 4s
128 -1.07484456e+05 -3.87762295e+04 3.53e-02 2.96e-03 2.03e+00 4s
129 -1.07042218e+05 -4.18574336e+04 3.41e-02 2.80e-03 1.92e+00 4s
130 -1.05618662e+05 -4.26653797e+04 2.92e-02 2.76e-03 1.86e+00 4s
131 -1.05358688e+05 -4.33605229e+04 2.89e-02 2.73e-03 1.83e+00 4s
132 -1.04645672e+05 -4.54478841e+04 2.68e-02 2.62e-03 1.74e+00 4s
133 -1.04606198e+05 -4.54946822e+04 2.67e-02 2.61e-03 1.74e+00 4s
134 -1.04556941e+05 -4.58007625e+04 2.65e-02 2.60e-03 1.73e+00 4s
135 -1.04491292e+05 -4.63434254e+04 2.63e-02 2.57e-03 1.71e+00 4s
136 -1.03489780e+05 -4.95635280e+04 2.30e-02 2.40e-03 1.59e+00 4s
137 -1.03494802e+05 -4.95651108e+04 2.30e-02 2.40e-03 1.59e+00 5s
138 -1.03498137e+05 -4.95906171e+04 2.30e-02 2.40e-03 1.59e+00 5s
139 -1.03473554e+05 -4.96167973e+04 2.30e-02 2.40e-03 1.58e+00 5s
140 -1.03438256e+05 -4.99474515e+04 2.29e-02 2.38e-03 1.57e+00 5s
141 -1.03036730e+05 -5.15854660e+04 4.17e-02 2.30e-03 1.51e+00 5s
142 -1.02711780e+05 -5.30862395e+04 3.68e-02 2.22e-03 1.46e+00 5s
143 -1.02614238e+05 -5.35893030e+04 3.77e-02 2.19e-03 1.44e+00 5s
144 -1.02626481e+05 -5.35876845e+04 3.83e-02 2.19e-03 1.44e+00 5s
145 -1.02478069e+05 -5.40256166e+04 3.98e-02 2.17e-03 1.42e+00 5s
146 -1.02326239e+05 -5.45983023e+04 4.05e-02 2.14e-03 1.40e+00 5s
147 -1.01860302e+05 -5.93260604e+04 2.04e-02 1.89e-03 1.25e+00 5s
148 -1.01613775e+05 -5.96944092e+04 1.83e-02 1.87e-03 1.23e+00 5s
149 -9.98512566e+04 -7.08279642e+04 8.78e-03 1.29e-03 8.52e-01 5s
150 -9.98495756e+04 -7.08283177e+04 8.78e-03 1.29e-03 8.52e-01 5s
151 -9.97716272e+04 -7.14243929e+04 8.69e-03 1.26e-03 8.33e-01 5s
152 -9.95698503e+04 -7.28160811e+04 8.40e-03 1.19e-03 7.87e-01 5s
153 -9.92008574e+04 -7.39958462e+04 7.68e-03 1.12e-03 7.43e-01 5s
154 -9.81232431e+04 -7.83822891e+04 9.23e-03 8.93e-04 5.81e-01 5s
155 -9.79180335e+04 -7.86479735e+04 9.15e-03 8.79e-04 5.67e-01 5s
156 -9.68053737e+04 -8.31240678e+04 7.06e-02 6.44e-04 4.03e-01 5s
157 -9.67485611e+04 -8.34555683e+04 6.83e-02 6.26e-04 3.91e-01 5s
158 -9.62657545e+04 -8.39033988e+04 5.89e-02 6.02e-04 3.63e-01 5s
159 -9.62546362e+04 -8.42902440e+04 5.80e-02 5.81e-04 3.52e-01 5s
160 -9.62261283e+04 -8.46100689e+04 5.67e-02 5.64e-04 3.41e-01 5s
161 -9.57140773e+04 -8.66707363e+04 2.13e-02 4.54e-04 2.65e-01 5s
162 -9.57130500e+04 -8.66721166e+04 2.13e-02 4.54e-04 2.65e-01 5s
163 -9.56835670e+04 -8.68646237e+04 1.90e-02 4.43e-04 2.59e-01 5s
164 -9.56800276e+04 -8.68740140e+04 1.90e-02 4.43e-04 2.58e-01 5s
165 -9.56812502e+04 -8.68755252e+04 2.42e-02 4.43e-04 2.58e-01 5s
166 -9.56763956e+04 -8.68938801e+04 2.40e-02 4.42e-04 2.58e-01 5s
167 -9.56202099e+04 -8.78800068e+04 2.29e-02 3.89e-04 2.27e-01 5s
168 -9.55711338e+04 -8.79470214e+04 1.71e-02 3.85e-04 2.24e-01 5s
169 -9.55665943e+04 -8.79754526e+04 1.70e-02 3.83e-04 2.23e-01 5s
170 -9.55265755e+04 -8.98572389e+04 1.34e-02 2.80e-04 1.66e-01 5s
171 -9.53159068e+04 -9.06245097e+04 9.10e-03 2.39e-04 1.37e-01 5s
172 -9.53137493e+04 -9.06390354e+04 9.01e-03 2.38e-04 1.37e-01 5s
173 -9.52984171e+04 -9.07029758e+04 8.22e-03 2.34e-04 1.35e-01 5s
Barrier solved model in 173 iterations and 5.46 seconds
Optimal objective -9.52984171e+04
Root crossover log...
Restart crossover...
6031 DPushes remaining with DInf 0.0000000e+00 5s
0 DPushes remaining with DInf 0.0000000e+00 6s
23921 PPushes remaining with PInf 7.4650748e+00 6s
0 PPushes remaining with PInf 5.3755971e-03 7s
Push phase complete: Pinf 5.3755971e-03, Dinf 1.1617955e+06 7s
Root simplex log...
Iteration Objective Primal Inf. Dual Inf. Time
28740 -9.5479723e+04 0.000000e+00 1.161796e+06 7s
30046 -9.4905563e+04 0.000000e+00 0.000000e+00 8s
30048 -9.4905563e+04 0.000000e+00 0.000000e+00 8s
Extra simplex iterations after uncrush: 2
30059 -9.4905564e+04 0.000000e+00 0.000000e+00 8s
Extra simplex iterations from dual to original model: 11
Solved with barrier
Root relaxation: objective -9.490556e+04, 30059 iterations, 7.52 seconds
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 -94905.563 0 951 - -94905.563 - - 8s
0 0 -30269.796 0 811 - -30269.796 - - 19s
0 0 -30263.972 0 809 - -30263.972 - - 19s
0 0 -20187.701 0 855 - -20187.701 - - 24s
0 0 -20137.417 0 857 - -20137.417 - - 24s
0 0 -20093.769 0 860 - -20093.769 - - 24s
0 0 -20093.125 0 861 - -20093.125 - - 24s
0 0 -10816.973 0 865 - -10816.973 - - 29s
0 0 -10654.495 0 878 - -10654.495 - - 29s
0 0 -10642.921 0 882 - -10642.921 - - 30s
0 0 -8106.6051 0 863 - -8106.6051 - - 31s
0 0 -7937.3535 0 872 - -7937.3535 - - 32s
0 0 -7934.1548 0 880 - -7934.1548 - - 32s
0 0 -6558.3440 0 877 - -6558.3440 - - 34s
0 0 -6519.4270 0 870 - -6519.4270 - - 34s
0 0 -6516.6716 0 870 - -6516.6716 - - 34s
0 0 -6220.8880 0 856 - -6220.8880 - - 36s
0 0 -6151.7412 0 848 - -6151.7412 - - 36s
0 0 -6140.8704 0 866 - -6140.8704 - - 36s
0 0 -5888.8221 0 855 - -5888.8221 - - 37s
0 0 -5816.2593 0 866 - -5816.2593 - - 37s
0 0 -5810.7695 0 859 - -5810.7695 - - 37s
0 0 -5072.1064 0 832 - -5072.1064 - - 39s
0 0 -5056.8397 0 839 - -5056.8397 - - 39s
0 0 -4761.4460 0 842 - -4761.4460 - - 40s
0 0 -4740.0566 0 846 - -4740.0566 - - 40s
0 0 -4702.4851 0 847 - -4702.4851 - - 41s
0 0 -4701.5130 0 851 - -4701.5130 - - 42s
0 0 -4699.4901 0 848 - -4699.4901 - - 42s
0 0 -4699.4901 0 819 - -4699.4901 - - 43s
H 0 0 6.279739e+07 -4699.4901 100% - 50s
0 2 -4699.4900 0 806 6.2797e+07 -4699.4900 100% - 53s
H 31 38 6.279739e+07 -4674.4309 100% 249 57s
159 168 -4387.6294 28 827 6.2797e+07 -4674.4309 100% 50.8 60s
H 607 612 1.152369e+07 -4674.4309 100% 22.8 64s
634 641 7542.12836 97 818 1.1524e+07 -4674.4309 100% 32.8 65s
H 640 647 3119970.6431 -4674.4309 100% 34.8 74s
H 643 647 2762596.5276 -4674.4309 100% 37.0 74s
672 682 8825.42395 101 773 2762596.53 -4674.4309 100% 43.5 75s
723 731 10735.3640 108 749 2762596.53 -4674.4309 100% 75.6 80s
807 815 15908.4296 119 735 2762596.53 -4674.4309 100% 110 85s
922 932 17089.3198 134 647 2762596.53 -4674.4309 100% 137 90s
1020 1033 19197.9163 144 664 2762596.53 -4674.4309 100% 154 95s
H 1049 1056 2762403.4803 -4674.4309 100% 156 98s
H 1052 1056 2752450.1855 -4674.4309 100% 158 98s
1113 1130 20564.3853 154 651 2752450.19 -4674.4309 100% 163 100s
1214 1232 23303.5936 170 664 2752450.19 -4674.4309 100% 178 105s
1354 1381 34336.7750 184 614 2752450.19 -4674.4309 100% 191 110s
1516 1550 37004.5135 206 580 2752450.19 -4674.4309 100% 200 115s
1770 1818 40193.4427 228 511 2752450.19 -4674.4309 100% 201 120s
2091 2185 45487.6379 271 422 2752450.19 -4674.4309 100% 197 125s
H 2299 2309 2431998.3799 -4674.4309 100% 192 139s
H 2300 2309 1413769.5469 -4674.4309 100% 192 139s
H 2307 2309 653623.42924 -4674.4309 101% 191 139s
2308 2401 48291.8077 292 341 653623.429 -4674.4309 101% 192 141s
H 2374 2401 653616.99955 -4674.4309 101% 189 141s
H 2399 2401 653612.22557 -4674.4309 101% 188 141s
2660 2851 75362.1814 325 263 653612.226 -4674.4309 101% 182 145s
H 2867 2999 653575.32912 -4674.4309 101% 176 147s
H 2935 2999 653559.60905 -4674.4309 101% 173 147s
H 2963 2999 653543.88028 -4674.4309 101% 172 147s
2998 3072 77246.3773 366 216 653543.880 -4674.4309 101% 171 152s
* 3151 3062 550 65913.950829 -4674.4309 107% 167 154s
3280 3331 cutoff 399 65913.9508 -4528.8093 107% 165 156s
3830 3689 8852.90190 103 784 65913.9508 -4528.8093 107% 150 160s
4257 4113 11883.1116 120 744 65913.9508 -4528.8093 107% 146 166s
4617 4448 16572.0935 137 698 65913.9508 -4528.8093 107% 142 170s
H 4719 4130 61416.083179 -4528.8093 107% 142 170s
H 4875 4304 60490.404949 -4528.8093 107% 142 172s
H 5083 4348 60426.930084 -4528.8093 107% 138 175s
H 5114 4323 60292.335648 -4528.8093 108% 137 175s
H 5133 4293 60225.975407 -4528.8093 108% 138 175s
H 5200 3869 55996.565590 -4528.8093 108% 137 175s
H 5201 3868 55974.557571 -4528.8093 108% 137 175s
H 5647 4003 55974.557526 -4506.4371 108% 130 220s
5650 4005 46072.7705 264 904 55974.5575 -4506.4371 108% 130 228s
5651 4006 17162.8403 131 832 55974.5575 -3206.6194 106% 130 245s
5656 4009 3546.90446 84 795 55974.5575 3546.90446 93.7% 129 254s
5657 4010 3692.02825 28 823 55974.5575 3692.02825 93.4% 129 255s
5659 4011 47170.7141 331 827 55974.5575 3697.17594 93.4% 129 261s
5661 4013 54772.0097 455 810 55974.5575 6807.63519 87.8% 129 265s
5664 4015 38997.7742 166 815 55974.5575 6825.13184 87.8% 129 270s
H 5668 3816 55973.673798 8157.13578 85.4% 129 272s
5669 3817 24824.8260 173 806 55973.6738 8157.13786 85.4% 129 277s
H 5670 3626 55972.103485 8462.96579 84.9% 129 280s
H 5670 3445 55972.059063 8462.96579 84.9% 129 280s
H 5675 3275 55968.079796 8526.15056 84.8% 129 285s
H 5676 3112 55967.598236 8702.84343 84.5% 129 285s
5680 3114 9644.13573 105 820 55967.5982 8734.49707 84.4% 129 290s
H 5683 2959 55946.767471 9284.08765 83.4% 129 295s
5688 2963 37169.6595 161 810 55946.7675 9461.89688 83.1% 129 300s
5691 2965 53844.2162 300 811 55946.7675 9575.79923 82.9% 129 305s
5694 2967 9628.25333 78 758 55946.7675 9628.25333 82.8% 129 310s
H 5694 2818 55941.960815 9628.25333 82.8% 129 311s
H 5697 2678 55933.449440 9771.38015 82.5% 129 315s
5702 2681 9890.23638 77 779 55933.4494 9890.23638 82.3% 128 320s
H 5704 2547 55927.958485 10152.4187 81.8% 128 325s
5710 2551 10198.2005 48 831 55927.9585 10198.2005 81.8% 128 330s
5713 2553 14811.5934 104 810 55927.9585 10229.4709 81.7% 128 335s
5719 2557 44947.5037 265 794 55927.9585 10258.8045 81.7% 128 340s
H 5723 2431 55916.681210 10368.0216 81.5% 128 342s
5731 2436 34863.2390 225 797 55916.6812 10446.0567 81.3% 128 345s
H 5735 2315 55813.997383 10450.3159 81.3% 128 346s
H 5743 2205 55813.782940 10451.1760 81.3% 147 353s
H 5743 2095 55813.527542 10451.1760 81.3% 147 353s
...
The second implementation uses Gurobi's addGenConstrIndicator() function (just for this experiment, I hacked cvxpy so that I can use this function also in cvxpy).
import gurobipy as grb
import cvxpy as cp
y = cp.Variable() # f(x, w) = y
w = cp.Variable()
section_indicator = cp.Variable(len(b)-1, boolean=True)
constraints = [cp.sum(section_indicator) == 1]
# Iterate over sections
for k in range(len(b)-1):
yk = cp.Variable()
# define constraints for section_indicator[k] being
# active when b_k <= w < b_{k+1}
constraints += [
w >= cp.multiply(section_indicator[k], b[k]),
w <= cp.multiply(section_indicator[k], b[k + 1]) + cp.multiply(1 - section_indicator[k], w_upper_bound),
]
model.addGenConstrIndicator(section_indicator, True, a1[k]*x + a0[k] - yk, grb.GRB.EQUAL, 0)
model.addGenConstrIndicator(section_indicator, False, yk, grb.GRB.EQUAL, 0)
Again, I attach the log:
Parameter OutputFlag unchanged
Value: 1 Min: 0 Max: 1 Default: 1
Changed value of parameter QCPDual to 1
Prev: 0 Min: 0 Max: 1 Default: 0
Changed value of parameter MIPGap to 0.05
Prev: 0.0001 Min: 0.0 Max: inf Default: 0.0001
Changed value of parameter Threads to 6
Prev: 0 Min: 0 Max: 1024 Default: 0
Changed value of parameter TimeLimit to 600.0
Prev: inf Min: 0.0 Max: inf Default: inf
Changed value of parameter GomoryPasses to 1
Prev: -1 Min: -1 Max: 2000000000 Default: -1
Changed value of parameter Cuts to 3
Prev: -1 Min: -1 Max: 3 Default: -1
Parameter QCPDual unchanged
Value: 1 Min: 0 Max: 1 Default: 0
Changed value of parameter PreSolve to 2
Prev: -1 Min: -1 Max: 2 Default: -1
Changed value of parameter PreDual to 1
Prev: -1 Min: -1 Max: 2 Default: -1
Changed value of parameter MIPFocus to 2
Prev: 0 Min: 0 Max: 3 Default: 0
Changed value of parameter Method to 3
Prev: -1 Min: -1 Max: 5 Default: -1
Changed value of parameter Symmetry to 2
Prev: -1 Min: -1 Max: 2 Default: -1
Gurobi Optimizer version 9.1.2 build v9.1.2rc0 (linux64)
Thread count: 16 physical cores, 16 logical processors, using up to 6 threads
Optimize a model with 74717 rows, 29414 columns and 266619 nonzeros
Model fingerprint: 0x0e8e9693
Model has 3840 general constraints
Variable types: 26239 continuous, 3175 integer (1246 binary)
Coefficient statistics:
Matrix range [1e-03, 1e+03]
Objective range [2e-01, 1e+05]
Bounds range [1e+00, 1e+00]
RHS range [4e-02, 2e+03]
Presolve removed 56843 rows and 18572 columns
Presolve time: 0.72s
Presolved: 17874 rows, 10842 columns, 72432 nonzeros
Variable types: 8326 continuous, 2516 integer (991 binary)
Concurrent LP optimizer: primal simplex, dual simplex, and barrier
Showing barrier log only...
Presolve removed 65 rows and 186 columns
Presolved: 10777 rows, 27009 columns, 81432 nonzeros
Root barrier log...
Ordering time: 0.14s
Barrier statistics:
Dense cols : 1
Free vars : 2236
AA' NZ : 1.032e+05
Factor NZ : 6.620e+05 (roughly 20 MBytes of memory)
Factor Ops : 9.984e+07 (less than 1 second per iteration)
Threads : 3
Objective Residual
Iter Primal Dual Primal Dual Compl Time
0 -8.20962433e+13 1.55738098e+11 1.27e+08 3.77e+04 1.09e+11 1s
1 -3.48983909e+13 9.97102633e+11 3.73e+07 1.98e+04 5.29e+10 1s
2 -2.02889109e+13 1.63378713e+12 1.01e+07 3.60e+03 1.06e+10 1s
3 -9.99168661e+12 1.40412313e+12 5.81e+05 1.79e+02 8.22e+08 1s
4 -3.92709891e+12 3.80001378e+11 1.68e+05 3.85e+01 2.22e+08 1s
5 -1.41605391e+12 1.56746765e+11 4.65e+04 2.91e+01 7.47e+07 1s
6 -4.89544851e+11 3.99992600e+10 1.07e+04 2.32e+01 2.21e+07 1s
7 -1.26920262e+11 9.47534018e+09 1.53e+03 1.37e+01 4.43e+06 1s
8 -2.27466995e+10 1.99469248e+09 1.29e+02 6.40e+00 6.31e+05 1s
9 -5.07289059e+09 6.25261108e+08 2.67e+01 4.50e+00 1.42e+05 1s
10 -5.82208640e+09 5.94390477e+08 2.53e+01 4.21e+00 1.40e+05 1s
11 -5.15841685e+09 5.72530478e+08 2.41e+01 4.04e+00 1.34e+05 1s
12 -5.15379948e+09 5.59830202e+08 2.37e+01 3.93e+00 1.33e+05 1s
13 -4.03299211e+09 4.82483091e+08 2.01e+01 3.33e+00 1.13e+05 1s
14 -2.37355475e+09 3.98674268e+08 1.32e+01 2.61e+00 7.44e+04 1s
15 -9.02652306e+08 2.37654794e+08 4.40e+00 1.57e+00 3.00e+04 1s
16 -4.05508762e+08 8.57991291e+07 1.61e+00 6.50e-01 1.32e+04 1s
17 -1.78946048e+08 5.54702272e+07 6.24e-01 4.92e-01 5.96e+03 1s
18 -1.01235909e+08 2.58408339e+07 2.95e-01 3.17e-01 3.13e+03 2s
19 -7.81038912e+07 2.08984486e+07 2.10e-01 2.87e-01 2.40e+03 2s
20 -5.20373895e+07 1.44019440e+07 1.51e-01 2.45e-01 1.78e+03 2s
21 -4.68532873e+07 9.80594729e+06 1.00e-01 1.95e-01 1.36e+03 2s
22 -1.25774614e+07 4.62695916e+06 2.66e-02 1.02e-01 4.63e+02 2s
23 -3.59199070e+06 3.73314133e+06 7.94e-03 8.34e-02 2.05e+02 2s
24 -1.31287341e+06 8.86998655e+05 2.36e-03 1.59e-02 6.39e+01 2s
25 -8.03460915e+05 4.59396141e+05 1.46e-03 8.36e-03 3.71e+01 2s
26 -5.46021069e+05 3.20322031e+05 9.85e-04 6.07e-03 2.55e+01 2s
27 -4.02571488e+05 2.25593805e+05 6.74e-04 4.60e-03 1.85e+01 2s
28 -2.79745031e+05 1.31338739e+05 4.03e-04 3.64e-03 1.21e+01 2s
29 -2.13438989e+05 7.23442507e+04 2.54e-04 2.64e-03 8.38e+00 2s
30 -1.54670309e+05 7.82192337e+02 1.19e-03 1.74e-03 4.55e+00 2s
31 -1.41257639e+05 -4.02401506e+04 9.37e-05 9.71e-04 2.97e+00 2s
32 -1.21975219e+05 -6.28827539e+04 1.23e-03 6.23e-04 1.73e+00 2s
33 -1.13023501e+05 -6.87004269e+04 6.07e-02 5.24e-04 1.30e+00 2s
34 -1.07125682e+05 -8.08607123e+04 4.01e-02 3.05e-04 7.71e-01 2s
35 -1.01739280e+05 -8.65837881e+04 2.24e-02 1.95e-04 4.44e-01 2s
36 -9.89055943e+04 -9.05755938e+04 1.27e-02 1.18e-04 2.44e-01 2s
37 -9.89068856e+04 -9.05756965e+04 1.27e-02 1.18e-04 2.44e-01 2s
38 -9.89043588e+04 -9.05756970e+04 1.27e-02 1.18e-04 2.44e-01 2s
39 -9.88973102e+04 -9.05757139e+04 1.27e-02 1.18e-04 2.44e-01 2s
40 -9.89041983e+04 -9.05757120e+04 1.27e-02 1.18e-04 2.44e-01 2s
41 -9.88951160e+04 -9.05809616e+04 1.27e-02 1.18e-04 2.43e-01 2s
42 -9.88917736e+04 -9.05809612e+04 1.27e-02 1.18e-04 2.43e-01 2s
43 -9.88887831e+04 -9.05809544e+04 1.27e-02 1.18e-04 2.43e-01 2s
44 -9.88914441e+04 -9.05809591e+04 1.27e-02 1.18e-04 2.43e-01 2s
45 -9.88904512e+04 -9.05809782e+04 1.27e-02 1.18e-04 2.43e-01 2s
46 -9.88880309e+04 -9.05831407e+04 1.27e-02 1.18e-04 2.43e-01 2s
Barrier performed 46 iterations in 2.15 seconds
Sub-optimal termination - objective -9.88880309e+04
Restart crossover...
Extra simplex iterations after uncrush: 9
Extra simplex iterations from dual to original model: 4
Solved with barrier
Root relaxation: objective -9.497796e+04, 32402 iterations, 3.55 seconds
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 -94977.964 0 915 - -94977.964 - - 4s
0 0 -36224.537 0 839 - -36224.537 - - 16s
0 0 -35939.135 0 814 - -35939.135 - - 17s
0 0 -35938.571 0 823 - -35938.571 - - 17s
0 0 -21288.628 0 933 - -21288.628 - - 23s
0 0 -21181.181 0 937 - -21181.181 - - 24s
0 0 -21174.680 0 901 - -21174.680 - - 24s
0 0 -10062.150 0 802 - -10062.150 - - 32s
0 0 -9717.8607 0 817 - -9717.8607 - - 33s
0 0 -9688.6781 0 819 - -9688.6781 - - 33s
0 0 -9683.5920 0 817 - -9683.5920 - - 33s
0 0 -7766.0854 0 828 - -7766.0854 - - 35s
0 0 -7714.0897 0 852 - -7714.0897 - - 36s
0 0 -7696.0769 0 849 - -7696.0769 - - 36s
0 0 -6782.8054 0 834 - -6782.8054 - - 38s
0 0 -6742.2663 0 836 - -6742.2663 - - 38s
0 0 -6740.1445 0 842 - -6740.1445 - - 38s
0 0 -6290.3460 0 822 - -6290.3460 - - 39s
0 0 -6234.6254 0 833 - -6234.6254 - - 40s
0 0 -6232.2079 0 833 - -6232.2079 - - 40s
0 0 -6100.5709 0 839 - -6100.5709 - - 41s
0 0 -6073.6276 0 826 - -6073.6276 - - 41s
0 0 -6072.1800 0 839 - -6072.1800 - - 42s
0 0 -5702.7435 0 798 - -5702.7435 - - 43s
0 0 -5693.9243 0 794 - -5693.9243 - - 43s
0 0 -4643.1971 0 847 - -4643.1971 - - 45s
0 0 -4613.8041 0 842 - -4613.8041 - - 46s
0 0 -4609.0042 0 845 - -4609.0042 - - 46s
0 0 -4457.7065 0 828 - -4457.7065 - - 47s
0 0 -4454.1631 0 833 - -4454.1631 - - 47s
0 0 -4031.0306 0 832 - -4031.0306 - - 49s
0 0 -3985.9189 0 829 - -3985.9189 - - 49s
0 0 -3974.4397 0 828 - -3974.4397 - - 49s
0 0 -3542.9095 0 833 - -3542.9095 - - 51s
0 0 -3531.8332 0 831 - -3531.8332 - - 51s
0 0 -3226.5212 0 823 - -3226.5212 - - 52s
0 0 -3222.4924 0 824 - -3222.4924 - - 52s
0 0 -2945.5956 0 832 - -2945.5956 - - 54s
H 0 0 1.368527e+08 -2945.5956 100% - 54s
0 0 -2917.2175 0 826 1.3685e+08 -2917.2175 100% - 56s
0 0 -2916.0935 0 837 1.3685e+08 -2916.0935 100% - 56s
0 0 -2764.8125 0 823 1.3685e+08 -2764.8125 100% - 57s
H 0 0 1.192112e+08 -2764.8125 100% - 57s
0 0 -2759.7797 0 826 1.1921e+08 -2759.7797 100% - 58s
0 0 -2486.9055 0 778 1.1921e+08 -2486.9055 100% - 59s
0 0 -2485.3635 0 782 1.1921e+08 -2485.3635 100% - 59s
H 0 0 220883.56623 -2485.3635 101% - 60s
H 0 0 220874.20784 -2485.3635 101% - 60s
0 0 -2293.9194 0 829 220874.208 -2293.9194 101% - 60s
0 0 -2289.5542 0 831 220874.208 -2289.5542 101% - 61s
0 0 -1901.2326 0 846 220874.208 -1901.2326 101% - 62s
0 0 -1897.7734 0 846 220874.208 -1897.7734 101% - 63s
0 0 -1885.8296 0 836 220874.208 -1885.8296 101% - 63s
0 0 -1885.1516 0 850 220874.208 -1885.1516 101% - 64s
0 0 -1877.3175 0 849 220874.208 -1877.3175 101% - 64s
0 0 -1877.3132 0 832 220874.208 -1877.3132 101% - 65s
0 2 -1877.3132 0 823 220874.208 -1877.3132 101% - 69s
1 4 -1767.5390 1 814 220874.208 -1876.9851 101% 155 70s
H 123 127 220867.03575 -1852.1221 101% 39.4 73s
H 189 196 220522.48589 -1852.1221 101% 26.2 73s
219 232 -1633.2433 39 809 220522.486 -1852.1221 101% 22.8 75s
H 220 232 220522.48147 -1852.1221 101% 22.7 75s
H 222 232 220375.85498 -1852.1221 101% 22.6 75s
H 228 232 220353.24482 -1852.1221 101% 22.0 75s
H 450 452 212648.27272 -1852.1221 101% 14.5 77s
H 550 556 197307.08351 -1852.1221 101% 12.6 118s
H 552 527 119626.98995 -1852.1221 102% 12.6 118s
H 555 527 101801.19708 -1852.1221 102% 12.5 118s
H 556 533 101291.68915 -1852.1221 102% 12.5 120s
H 557 533 82045.710777 -1852.1221 102% 12.5 120s
H 560 533 81892.473919 -1852.1221 102% 12.4 120s
H 593 550 81705.914829 -1852.1221 102% 16.4 126s
H 595 550 81152.517452 -1852.1221 102% 17.6 126s
H 597 550 76517.465336 -1852.1221 102% 18.9 126s
628 585 10758.6288 98 816 76517.4653 -1852.1221 102% 43.7 130s
651 607 13893.9231 101 787 76517.4653 -1852.1221 102% 73.0 135s
664 619 14503.8591 102 788 76517.4653 -1852.1221 102% 101 140s
706 665 15573.0586 110 721 76517.4653 -1852.1221 102% 135 151s
H 716 671 76145.966442 -1852.1221 102% 134 156s
H 717 671 75820.646629 -1852.1221 102% 135 156s
H 718 671 71386.804920 -1852.1221 103% 135 156s
744 703 16079.5556 115 740 71386.8049 -1852.1221 103% 150 160s
827 776 19181.8719 125 657 71386.8049 -1852.1221 103% 174 165s
892 850 20095.4498 135 589 71386.8049 -1852.1221 103% 194 170s
1065 1020 22936.3068 154 581 71386.8049 -1852.1221 103% 202 175s
1263 1231 25867.5134 185 465 71386.8049 -1852.1221 103% 205 180s
1549 1532 34116.6172 241 349 71386.8049 -1852.1221 103% 200 185s
H 1815 1748 70485.064068 -1852.1221 103% 198 194s
1821 1820 39682.0139 294 254 70485.0641 -1852.1221 103% 197 195s
2155 2188 42373.4367 345 156 70485.0641 -1852.1221 103% 189 200s
2571 2605 9723.02700 79 802 70485.0641 -1789.7274 103% 180 205s
* 2753 2667 516 48740.294758 -1789.7274 104% 175 207s
3069 2859 14162.6509 86 789 48740.2948 -1789.7274 104% 164 211s
3194 2982 15604.7548 97 733 48740.2948 -1789.7274 104% 168 215s
3399 3211 19675.4928 117 609 48740.2948 -1789.7274 104% 172 220s
3754 3577 24693.6444 153 528 48740.2948 -1789.7274 104% 170 226s
4057 3880 33101.6161 223 356 48740.2948 -1789.7274 104% 167 230s
4663 4455 45429.0863 396 88 48740.2948 -1789.7274 104% 155 235s
* 4784 4354 517 48453.177616 -1789.7274 104% 151 235s
H 4943 4130 48453.177570 -1789.7274 104% 151 290s
4946 4132 40476.8247 204 839 48453.1776 -1789.7274 104% 151 297s
4947 4133 47076.3309 334 739 48453.1776 -1789.7274 104% 151 314s
4948 4134 27735.7518 192 756 48453.1776 -637.38740 101% 150 318s
4953 4137 31930.5851 231 827 48453.1776 4424.42222 90.9% 150 325s
4957 4140 4592.08168 33 839 48453.1776 4592.08168 90.5% 150 332s
4958 4140 20000.5909 133 826 48453.1776 7900.48356 83.7% 150 337s
4962 4143 45000.3939 273 834 48453.1776 8036.87186 83.4% 150 343s
4963 4144 31660.2170 229 776 48453.1776 9460.56926 80.5% 150 347s
4967 4146 39567.6606 289 790 48453.1776 9541.48896 80.3% 150 354s
...
Based on the logs, my guess is that the solver struggles to make tight LP relaxations but I have no idea how to help him to make them better.
0
Please sign in to leave a comment.
Comments
0 comments