optimal electricity supply