Cost-benefit analysis for renewable energy