I am interested in the problem of minimizing the functional $$ J(k_1,\dots,k_p) = \sum_{j=1}^p|a_j - k_j|, $$ where the $a_j$ are constants, over all real $p$-vectors $k = [k_1,\dots,k_p]^{tr}$ and subject to the constraint $$ \sum_{j=1}^p k_j = 1. $$ The only meaningful values for the differences $|a_j-k_j|$ are positive, but without the absolute value the problem fails to be convex.
Any advice?
With or without absolute value problem is convex .
But without Absolut value, problem might be unbounded = $- \infty$.
when you have absolute value this problem is equivalent to the following LP
$$ \min \sum_{j}\epsilon_j ~ ~st ~~ \sum_{j=1}^p k_j = 1, ~~ |a_j - k_j| \leq \epsilon_j ~ ~j=1,2..,n $$
P.S : Note that the constraint $ |a_j - k_j| \leq \epsilon_j$ is linear since it is same as $ -\epsilon_j \leq a_j - k_j \leq \epsilon_j$, So you can solve problem effectively using Simplex method