I have a set of $n$ observations $O_j = (a_j, b_j)$
I have a state $S_j = (A_j, P_j)$ with an initial state $S_0 = (0,0)$
I must consume all my observations, such that my final state has its $P_j$ at the maximum value it can be. Whenever I make an observation $O_j$, my state transitions as follows:
$$S_{j+1} = (A_j + a_j, P_j + (A_j + a_j) * b_j) $$
Where $a_j$ and $b_j$ represent the 2 dimensions of my chosen observation. Is there a name for such optimization problems? I am not really looking for a solution, but rather a place to perform further reading.