A deterministic and stochastic variational approach to multistage equilibrium problems under uncertainty and application to an electricity market