Given the inventory process $ \{X_t\}$ with dynamic $ X_{t+1}=X_t+A_t-\xi_{t+1}$ , where $ A_t=\#$ of items produced and $ \xi_t\sim Poiss(5)$ , i want to find the process $ \{A_t\}$ such that $ $ S=E\left[\sum_{t=0}^{59}0.3^t(10A_t+2\max\{0,X_{t+1}\}+\max\{0,-X_{t+1}\})\right]$ $ is minimum.

First of all, note that trivially $ S=\sum_{t=0}^{59}0.3^tE[10A_t+2\max\{0,X_{t+1}\}+\max\{0,-X_{t+1}\}]$ . Now, $ X_{t+1}\ge0$ iff $ 0\ge-X_{t+1}$ , so $ 2\max\{0,X_{t+1}\}+\max\{0,-X_{t+1}\}=2E[X_{t+1}]$ if $ X_{t+1}\ge0$ and $ -E[X_{t+1}]$ if $ X_{t+1}<0$ , so I tried to use $ E[X]=E[E[X|Y]]$ , but i can’t get explicitely the pdf of $ X_{t}$ .\

On the other hand, i believe that $ \{A_t\}$ should be, intuitively, $ \xi_{t+1}$ , since it represents the items produced and $ \xi_{t+1}$ is the number of sold items.

How can i solve this problem?