Stochastic Modeling And Optimization For Community Energy Storage Systems