hpipm
hpipm copied to clipboard
One slack variable for softening multiple constraints
I believe that it is currently not possible to have one slack variable assigned to soften multiple constraints. I.e., having a recurring index in idxs_rev
. If I have this in e.g. a chain of masses problem, HPIPM does not seem to converge. If every soft constraint has its own pair of slacks all is fine.
Is this observation correct? If so, would it be a big effort to support this feature?
After browsing the code a bit, I came across possible show stoppers in the logic in (not sure if that's all though):
Hi Niels,
the soft constraints were originally designed to require one slack per soft constraint, and this was necessary (also) due to the encoding in idxs
.
Now, recently I replaced it with idxs_rev
, and this encoding in theory would allow to have a single slack for multiple soft constraints.
However, I didn't check yet what else should be changed to allow this, it may well be that I implicitly exploited the old encoding in other places, as some of the ones you spotted.
I can't really give an estimate of how much effort it is to support the feature, it depends on how much other stuff should be changed, or if there is some bigger intrinsic issue.
I'll try to check it, just it may take a bit of time as I'm quite busy in this period.
Hi Gianluca, thanks for the quick response!
Is there any update on this issue? I'd also like to implement a maximum norm penalty for slack variables which results in using only a single slack variable for each constraint. Otherwise the number of optimization variables becomes much larger than of the actual problem.