Stochastic model for short-term balancing of supply and consumption of electricity