Optimal transition from coal to gas and renewable power under capacity constraints and adjustment costs