How to Maximize Education While Minimizing Energy Costs