LP solving time doubled by adding redundant constraints #1836
Replies: 3 comments 4 replies
-
If you've solved a model then added a bunch of constraints, HiGHS will solve from an advanced basis. If you don't add many constraints this should be very much more efficient than solving from scratch, but if you add a lot, then solution time could be longer than previously - when your first model is reduced by presolve and solved from scratch . However, if your redundant constraints can be eliminated by presolve, it might be much faster to solve from scratch. If you switched to Clp at that point, then it will be running presolve. HiGHS with "choose" will choose simplex. "IPM" is normally faster than simplex. "Pdlp" is an experimental first order solver that needs a GPU for top performance, but currently can only use CPU in HiGHS. If you use JuMP to generate an MPS or .LP file of your problem and share it with me, I can look further at the performance of HiGHS |
Beta Was this translation helpful? Give feedback.
-
The small penalty will not make the problem numerically difficult to solve. However, if it's the same order of magnitude as the cost perturbation used to alleviate dual degeneracy, it may trigger some extra iterations when the perturbation is removed. I can't say more until I run your models, and I can't do that this week as I'm travelling. |
Beta Was this translation helpful? Give feedback.
-
OK, I suggest that perhaps you don't waste of time on this, because it seems to depends on many peculiarities. E.g. this morning the running time of 50 s had dropped to 16s. After some digging, it happens that the change was a package update:
Something must have happened in that release, although nothing struck me in the release notes. Other relevant package versions:
Still, for the reference, I've appended the MPS and LP exports of the problems saved with MOI 1.31. Here is the link (valid until 2024-08-04). The two sibling problems are:
I haven't tried to load and save any of these MPS/LP files, since I'm not familiar. Only, I've checked that their checksums are different! |
Beta Was this translation helpful? Give feedback.
-
Hello,
I have a LP Energy system optimization model defined from JuMP. It takes about 20s to solve with the following characteristics:
Then, in the course of model development, I just found out I had missed specifying one constraint (in fact a vector constraint on an annual time series, so it makes for 8760 scalar constraints), but fortunately I know it cannot be active (it's redundant with an existing constraint). Only, the solving time jumped from 20 s to 50 s (more than ×2).
So I made some experiments by switching solvers (with the redundant constraints):
Now, I'm really not familiar with what may influence the solving time of an LP, but I really got surprised by this result (the doubling and the discrepancy with Clp) and I have no idea on how to diagnose it. In the notebook I mentioned above, the code is not easy to reproduce, but I should be able to make a standalone version if needed.
Beta Was this translation helpful? Give feedback.
All reactions