Maximizing summation function with variable in index and in upper bound

66 Views Asked by At

I have a function $f(N_i, P_i) = \sum_{i=1}^M(N_i(1-kP_i))-\sum_{i=1}^M\sum_{j=1}^{N_i}\alpha_{ij}$, where $\alpha_{ij}$ are parameters. I want to maximize this function. I want to maximize this function under the given constraint $P_i\leq P$.

I could apply the lagrangian method to solve this, but the issue is $N_i$ is coming in the index term.

Can anyone please suggest how to approach this problem?

Thanks!

Edit(regarding thoughts I have been able to gather) - It appears that the value of $N_i$ will be discrete(or a set of values). So will it be advisable to try discrete optimization?