Invia SMS: Analysis and optimization of stochastic systems