How algorithms could help the grid operate with zero-carbon