Day-Ahead Planning and Real-Time Control of Integrated PV-Storage Systems by Stochastic Optimization