My problem is as follows:
\begin{align} \underset{\boldsymbol{x}}\max \quad & \boldsymbol r^T\boldsymbol x-\boldsymbol t^T\boldsymbol x \\ \text{s.t.} \quad & \boldsymbol1^T\boldsymbol x = N \\ & e^{- x_i/N} \geq \eta_i \quad \forall i \in \left\{ 1, 2, ... , card(\boldsymbol x) \right\} \quad and \quad \boldsymbol 0 \leq \boldsymbol \eta \leq \boldsymbol 1\\ \end{align}
It is a convex problem (LP), and thus I can solve with CVX using solvers. However, in doing that, I have to give heuristic inputs for $\eta_i$. That is, I make a "grid" for $\eta_i$ in the range [0,1] like (0, 0.1, 0.2,...,1), and then run the optimisation on the different values to find which value(s) of $\boldsymbol \eta$ give the best $\boldsymbol x$. But this way of doing parameter selection is time consuming and tedious, as I need to run solve the optimisation problem for each $\boldsymbol \eta$. So, I would like to have an analytic solution (closed form?) for $\boldsymbol x$ in terms of the variable $\boldsymbol \eta$ and the constants $N$, $\boldsymbol r$ and $\boldsymbol t$. Granted, I would still need to solve the problem for each $\boldsymbol \eta$, but I could at least save time for running the optimisation if there is a closed form solution. Is it possible to do so? Alternately, is there a better way of optimal parameter selection that bypasses the need to "randomly" try out values for $\boldsymbol \eta$ from a grid?
For starters, when $r_i < t_i$, then $x_i$ is obviously $0$. So you can assume wlog that $\boldsymbol{r} \ge \boldsymbol{t}$. Second, since the $x_i$ are continuous, not discrete (otherwise you would have an NP-hard knapsack problem), you can use a greedy algorithm: sort the $x_i$ in decreasing order of $r_i-t_i$ and set, using Rodrigo de Azevedo's reformulation of the second constraint, namely $x_i\le N\log(1/\eta_i)$, $$ x_1 = \min\left\{N, N\log\left({{1}\over{\eta_1}}\right)\right\},$$ $$ x_2 = \max\left\{0,\min\left\{N-x_1, N\log\left({{1}\over{\eta_2}}\right)\right\}\right\},$$ and so on. This is not quite a closed-form solution, but it is probably the best you can do.