$\max\{\pi_0 F_{L_0}(W)-\frac{\pi_1}{W}\int_0^W F_{L_1}( \alpha )d \alpha \}$ \
$\textrm{s.t.}\quad \int_0^W F_{L_0} (\alpha)d\alpha <\xi$ \
We should find the best $W$ when $\xi$ is constant, $F( \cdot )$ is probability distribution function, and $L_0$ and $L_1$ are random variables. Also, $\pi_0, \pi_1>0$ and $\pi_0 + \pi_1 =1$. Further, if needed, we can assume, for example, $F_{L_0}$ and $F_{L_1}$ such as below:
$F_{L_0}(\alpha) &=& 1-e^{-\mu \alpha} \quad \alpha \geq 0.$ $F_{L_1}(\alpha) &=& 1-e^{-\lambda \alpha} \quad \alpha \geq 0. $