I have a problem of the form
$min\quad |e|,\quad x_1 - x_1',\quad x_2 - x_2',\quad x_3 - x_3'$
$subject\ to\quad \sum x_n <= x_{tot}$
$and\quad (1) \sum f_n(x_n)=K-e$
$and\quad x_1 <= x_1',\quad x_2 <= x_2',\quad x_3 <= x_3'$
In the domain I'd like to apply this problem, I can not use a linear programming solver (on embedded hardware) and the solve rate required is >100Hz/sec, so I would like to create an O(1) solution.
I'd like to extract a series of simple equations from this problem ($x_1=..., x_2=...$) so that given any combination of inputs $x_{tot}, K, x_n'$, I can solve optimal $x_1, x_2, x_3$. Variable $e$ included for best achievable solution when the problem can not be solved because of $(1)$.
Is there a general (simply understood) method of doing this and verifying its correctness?