Power grids across the world depend on optimization models that capture interactions between producers, transmission and consumers. The recent explosion of renewable supply such as wind, solar and hydro has led to increased volatility at different time scales. Various countries have announced target dates for 100% renewable electricity systems, requiring long-term investment planning, medium-term storage management (including batteries and pumped storage), and short-term analysis of demand-response, load curtailment and congestion. We develop optimization models for these issues that consider investment and fuel costs, emissions, electricity prices, and lost-load.