The default M in KKT operator #1072
-
Hi Dr. Johan, I am working with the KKT operator under the @lmi folder of YALMIP-master. kkt.txt If I get it correctly, the KKT operator uses a default M value 1e+4 to reformulate the complementaries as long as I turn off the dual bound derivation. In my case, I think the default M value 1e+4 is somehow small, so I want to change the 1e+4 to 1e+6. Maybe I can do this by slightly adjusting the code of the KKT operator? I have gone through the code of the KKT operator. I think the target codes are at lines 209-218 of kkt.m.
Maybe I can replace COuld you please share your ideas or suggestions with me? Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Those lines of code are related to some weird experimental feature minnormdual (turned off) which I have no memory of what it does, and you shouldn't bother with There is no big-M constant in the KKT code. The big-M modelling is done before solver call when the complementarity condition in the KKT model is modelled, and the big-M constant used there is automatically derived as tight as possible, based on the bounds available on primal and dual variables (which you add to the model, either by your own knowledge and/or using the bounds computed in KKT and returned in the details.primalbounds and details.dualbounds. If those bound derivations have failed, you simply add your own magic bounds on those). The lowest level resort to a magic bound is in derivebounds, where a arbitrary constant of 10^4 is used, when it fails to derive anything based on propagating suplied variable bounds to the involved operator. Change at your own risk, I hope you know that using huge constants is a recipe for poor models... |
Beta Was this translation helpful? Give feedback.
Those lines of code are related to some weird experimental feature minnormdual (turned off) which I have no memory of what it does, and you shouldn't bother with
There is no big-M constant in the KKT code. The big-M modelling is done before solver call when the complementarity condition in the KKT model is modelled, and the big-M constant used there is automatically derived as tight as possible, based on the bounds available on primal and dual variables (which you add to the model, either by your own knowledge and/or using the bounds computed in KKT and returned in the details.primalbounds and details.dualbounds. If those bound derivations have failed, you simply add your own magic bounds…