Quality of service optimization in solar cells-based energy harvesting wireless sensor networks