I have the following convex optimization problem:
$$ \begin{align*} \min_{x} &f(x) \\ \text{subject to} \\ x_{k+1} &= x_k+\cdots\qquad k=0,1,2,\ldots,N-1 \end{align*} $$
I managed to solve the above problem using YALMIP, using its very fast optimizer parser. Unfortunately, while optimizer can give me the dual variables associated with my $N$ constraints, it gives them out of order - in other words, the second element in the array of duals that optimizer returns does not necessarily correspond to the dual of the constraint $x_2=x_1+\cdots$.
Question: how can I recover the duals of this optimization problem, either by direct calculation or by matching the out-of-order duals that I have with the constraints?
I think this is a mathematical question rather than a programming one. In the end, I'm just asking how I can compute the duals of an already-solved optimization problem.