-
Notifications
You must be signed in to change notification settings - Fork 41
Description
I have a question about the computation of the dual feasibility in your code. We need to evaluate
q * y + l * lambda^+ - u* lambda^-
where lambda is projection of c - K^T * y to the space Lambda.
We first compute c - K^Ty
cuPDLP-C/cupdlp/cupdlp_solver.c
Line 87 in 7b94c41
| cupdlp_dual_feasibility_kernel_1_cuda(dualResidual, aty, |
Next we need to compute compute the projection to the space Lambda which is here
cuPDLP-C/cupdlp/cupdlp_solver.c
Line 90 in 7b94c41
| cupdlp_dual_feasibility_kernel_2_cuda(dSlackPos, dualResidual, |
and here
cuPDLP-C/cupdlp/cupdlp_solver.c
Line 97 in 7b94c41
| cupdlp_dual_feasibility_kernel_3_cuda(dSlackNeg, dualResidual, |
I do not understand why do you use two vectors dSlackPos and dSlackNeg since thge result should be representable just by one vector lambda. But especially I am not sure about the line
| z[i] = -min(dualResidual[i], 0.0) * hasUpper[i]; |
Why is there the minus sign on front of min in the computation dSlackNeg? You then compute u*lambda^+ using
cuPDLP-C/cupdlp/cupdlp_solver.c
Line 100 in 7b94c41
| cupdlp_dot(work, lp->nCols, dSlackNeg, resobj->dUpperFiltered, &temp); |
and after that you subtract from dDualObj
cuPDLP-C/cupdlp/cupdlp_solver.c
Line 101 in 7b94c41
| *dDualObj -= temp; |
So it seems to me that you have two minus signs in your code instead of just one.