alexliniger/MPCC

hipipmInterface::setCost

DreamonZhu opened this issue · 1 comments

Hi,
https://github.com/alexliniger/MPCC/blob/3ec7805e7a176c57250c1a414a6d2b871e472d74/C%2B%2B/Interfaces/hpipm_interface.cpp#L60-#L63
here you get 4 matrix fot the cost of slack variables.
According to the explaination here in

// min_x,u sum_k=0^N 1/2*[s_lower,k;s_upper,k]^T*[Z_lower,k , 0; 0 , Z_upper,k]*[s_lower,k;s_upper,k] + [z_lower,k; z_upper,k]^T*[s_lower,k;s_upper,k]

so how did s_lower and s_upper arise? Cause in the paper, the corresponding cost C(S_{c,k}) = q_s * S_c,k + S_c,k^T * q_ss * S_c,k , which only has a varible s_c,k.

This is related to the hpipm interface, that has slacks for the upper and the lower values of the constraint.
Otherwise it is basically the same, you can always consider upper and lower limits as twice as many constraints.