tag:blogger.com,1999:blog-593563533834706486.post8708002428836205352..comments2024-03-28T10:35:10.453-04:00Comments on Yet Another Math Programming Consultant: Maximum Correlation, Global MINLP vs GAErwin Kalvelagenhttp://www.blogger.com/profile/09496091402502236997noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-593563533834706486.post-79524515098597285182020-10-12T08:08:53.251-04:002020-10-12T08:08:53.251-04:00Thanks for attaching the LP. The number of explore...Thanks for attaching the LP. The number of explored nodes is very different for our models. I suspect that the "sigma"-constraints are not formulated ideally for Gurobi in your model. Instead of summing "(a-b)^2" directly, one can create a new intermediate variable "c=a-b" and sum "c^2" instead. Usually, this helps Gurobi's performance tremendously. Couldn't test it, because I suspect I hit a Gurobi bug...Simonhttps://www.blogger.com/profile/06717578296386099512noreply@blogger.comtag:blogger.com,1999:blog-593563533834706486.post-24662450286242284252020-10-11T13:54:22.718-04:002020-10-11T13:54:22.718-04:00I have attached the Gurobi LP file demonstrating t...I have attached the Gurobi LP file demonstrating the problem.Erwin Kalvelagenhttps://www.blogger.com/profile/09496091402502236997noreply@blogger.comtag:blogger.com,1999:blog-593563533834706486.post-57507003976194457412020-10-11T13:17:21.523-04:002020-10-11T13:17:21.523-04:00Interesting! Solvers can be weird...
But it can&...Interesting! Solvers can be weird... <br /><br />But it can't be that alone. When I remove all variable bounds from my model, the root relaxation of my model is "3.225447". After 1s the solver finds "0.9481638". (The optimum is found after 640s, and proving optimality takes more than 1000s.)<br />Simonhttps://www.blogger.com/profile/06717578296386099512noreply@blogger.comtag:blogger.com,1999:blog-593563533834706486.post-21658852289790796862020-10-09T17:54:45.693-04:002020-10-09T17:54:45.693-04:00Thanks. Yes, I know what is happening. In my formu...Thanks. Yes, I know what is happening. In my formulation I did not have an upper bound on z (the objective). Somehow, this leads to an unbounded relaxation, from which Gurobi never recovers. After adding the bound z<=1 (we know the correlation coefficient is less than 1), I get similar results as you. I will add some notes in the post about this. Erwin Kalvelagenhttps://www.blogger.com/profile/09496091402502236997noreply@blogger.comtag:blogger.com,1999:blog-593563533834706486.post-65922879371687696422020-10-09T16:05:55.514-04:002020-10-09T16:05:55.514-04:00Hi Erwin. Thanks for the interesting blog post. I ...Hi Erwin. Thanks for the interesting blog post. I formulated the problem as a non-convex MIQP and solved it with Gurobi 9.0.3 as well. I got *very* different results. Here's the log:<br /><br />Optimize a model with 52 rows, 133 columns and 202 nonzeros<br />Model fingerprint: 0xf968fe80<br />Model has 6 quadratic constraints<br />Model has 100 general constraints<br />Variable types: 108 continuous, 25 integer (25 binary)<br />Coefficient statistics:<br /> Matrix range [4e-02, 1e+00]<br /> QMatrix range [1e+00, 1e+00]<br /> QLMatrix range [1e+00, 1e+00]<br /> Objective range [1e+00, 1e+00]<br /> Bounds range [1e+00, 1e+06]<br /> RHS range [0e+00, 0e+00]<br />Presolve removed 0 rows and 50 columns<br />Presolve time: 0.01s<br />Presolved: 321 rows, 161 columns, 968 nonzeros<br />Presolved model has 79 bilinear constraint(s)<br />Variable types: 136 continuous, 25 integer (25 binary)<br /><br />Root relaxation: objective 1.000000e+00, 189 iterations, 0.00 seconds<br /><br /> Nodes | Current Node | Objective Bounds | Work<br /> Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time<br /><br /> 0 0 1.00000 0 85 - 1.00000 - - 0s<br /> 0 0 1.00000 0 82 - 1.00000 - - 0s<br /> 0 0 1.00000 0 80 - 1.00000 - - 0s<br /> 0 0 1.00000 0 80 - 1.00000 - - 0s<br /> 0 0 1.00000 0 80 - 1.00000 - - 0s<br /> 0 0 1.00000 0 78 - 1.00000 - - 0s<br /> 0 0 1.00000 0 78 - 1.00000 - - 0s<br /> 0 0 1.00000 0 78 - 1.00000 - - 0s<br /> 0 0 1.00000 0 78 - 1.00000 - - 0s<br /> 0 2 1.00000 0 78 - 1.00000 - - 0s<br />* 285 184 39 0.9333298 1.00000 7.14% 25.8 0s<br />* 322 197 31 0.9384552 1.00000 6.56% 26.1 0s<br />...<br /> 49221 3823 0.97881 29 85 0.95289 1.00000 4.94% 24.7 35s<br />*49503 3713 34 0.9554842 1.00000 4.66% 24.7 35s<br /> 55321 3829 0.98481 27 87 0.95548 0.99728 4.37% 24.9 40s<br />*60201 3345 33 0.9559043 0.99209 3.79% 25.6 44s<br /> 60617 3247 0.95599 23 88 0.95590 0.99170 3.74% 25.7 45s<br />*61614 3123 33 0.9564515 0.99071 3.58% 25.9 45s<br /> 65850 2317 infeasible 29 0.95645 0.98537 3.02% 26.8 50s<br /> 71208 659 cutoff 27 0.95645 0.96873 1.28% 28.7 55s<br /><br />Cutting planes:<br /> RLT: 42<br /><br />Explored 72714 nodes (2139918 simplex iterations) in 56.59 seconds<br />Thread count was 4 (of 4 available processors)Simonhttps://www.blogger.com/profile/06717578296386099512noreply@blogger.com