For $i=1, \dotsc, K$, we have $n_i$ ordered real numbers:
$$ x_i(1) \leq x_i(2) \leq \dotsc \leq x_i(n_i) $$
I want to solve the following optimization problem:
\begin{align} \mathrm{maximize} \; \sum_{i=1}^Kr_i \;\; s.t. \\ r_i \in \{1,\dotsc, n_i\}\\ \sum_{i=1}^Kr_i \leq c\sum_{i=1}^K x_i(r_i) \end{align}
Now, I had the idea of expressing this problem as a MILP as follows:
For each $i$, define binary variables which satisfy the linear constraints:
\begin{align} z_i(1) \geq z_i(2) \geq \dotsc \geq z_i(n_i) \in \{0,1\} \end{align}
Also define $y_i(k) = x_i(k)-x_i(k-1), k = 1,\dotsc, n_i$, where $x_i(0)=0$.
Then we can solve the MILP:
\begin{align} \mathrm{maximize} \; \sum_{i=1}^K \sum_{j=1}^{n_i} z_i(j) \;\; s.t. \\ z_i(1) \geq z_i(2) \geq \dotsc \geq z_i(n_i) \in \{0,1\} \\ \sum_{i=1}^K \sum_{j=1}^{n_i} z_i(j) \leq c\sum_{i=1}^K \sum_{j=1}^{n_i} y_i(j)z_i(j) \end{align}
Now I have the following questions:
Is there any obvious easier way of modelling this problem? e.g. as a MILP with less integer variables or using another optimization methodology.
Is there any simple way to intervene with the solvers in order to improve the solution speed of this problem?
In most of my problems, the number of binary variables is between 20000-100000. For this reason, I was actually very surprised that using the Symphony solver, those problems get solved in less than a minute! Should these problem sizes not be prohibitive?
Based on prior information, I also tried to remove the highest $x_i(j)$ values, thus reducing the total number of binary variables. E.g. reducing the number of variables by 50% often lead to substantial speed gains. On the other hand, it was often the case that when I reduced the number of variables to 10%, the solver would actually take longer than with all the variables (even though it would eventually return the same solution). How can this be explained?