Multi-class queuing networks models for energy optimization