1. A method for optimizing energy consumption in a system, the method comprising: identifying a plurality of candidate solutions for one or more parameters related to the energy consumption in the system; initializing a two-step genetic algorithm with a subset of the plurality of identified candidate solutions; solving, with a processor using the two-step genetic algorithm, for an optimum energy consumption in the system with respect to a cost of the energy consumption in the system; and determining the one or more parameters related to the energy consumption in the system based on the optimum energy consumption.