I want to solve the following problem:
Given a number $M$ and functions $g_i^k, \forall i,k$, for a design variable $\mathbf{x}\in\mathbb{R}^K$,
\begin{array}{cl} \text{maximize} & \displaystyle \sum_{k=1}^{K} \max \left\{ f_1^k (x_k), f_2^k (x_k), \ldots, f_N^k (x_k) \right\}\\ \text{subject to} & x_1+x_2+\cdots+x_N \le M,\\ & x_i\ge0, \quad i=1, 2, \ldots,N, \end{array}
where
\begin{equation} f_i^k(x_k) = \begin{cases} g_1^k(x_k), & \text{if} ~~ q_i < 0,\\ g_2^k(x_k), & \text{if} ~~ h_i(x_k) > 0,\\ g_3^k(x_k), & \text{if} ~~ q_i \ge 0 ~~ \text{and} ~~ h_i(x_k) \le 0. \end{cases} \end{equation}
- The functions, $g_1^k, g_2^k, g_3^k$, are concavely increasing with respect to $x_k$ for all $k=1, 2, \ldots,K$.
- $q_i$ is given, which is a deterministic value with respect to $i$.
- $h_i$ is given, which is a function of $x_k$.
- $f_i^k$ is concavely increasing with respect to $x_k$, and continuous although it is defined as a piecewise function.
I guess that the problem is solvable by the traditional convex programming softwares, e.g., CVX, since $f_i^k$ is a continuous increasing concave function.
However, I am struggling with two things: One is that in the definition of function $f_i^k$, the conditional statements are dependent on $x_k$ (e.g., $h_i(x_k)>0$), and the other is that there is maximization in maximization.
Could someone please provide me ways or directions to solve the above problem? Thank you for reading my question.