Suppose I start month 1 with $\$ 400$ and beginning of months 1,2,3 and 4 I receive as revenue $\$ 400,800,300,300$ respectively and pay bills $600,500,500,$ and $250$ month 1,2,3 and 4 respectively. Any money left over for one month can be invested at interest rate $0.1 \%$ per month, for two months $0.5 \%$ per month, for three months $1 \%$ per three months or for four months at $2 \%$ per month. My goal is to formulate a linear programming that can be used to maximize my total cash at hand at beginning of month 5.
If I call $x_i$ the amount of money at month $i$, i=1,2,3,4, then I want to maximize the function
$$ f(x_1,...,x_4) = -200x_1 + 300 x_2 - 200 x_3 + 50 x_4$$
at month 1, I have left over $800-200 = 200$ thus $0.1x_1 \geq 200$ month 2, $0.5x_2 \geq 500 $ month 3, $1 x_3 \geq 300 $ and month 4 , $2x_4 \geq 450 $.
also $x_i \geq 0$
Is this a correct formulation?