Immune Procedure for Optimal Scheduling of Complex Energy Systems