1. A method for optimizing energy consumption in a system, the method comprising: identifying, by a processor, a plurality of candidate solutions for including one or more parameters of the system related to the energy consumption in the system; initializing, by the processor, a two-step genetic algorithm with at least one population of the plurality of identified candidate solutions; determining, by the processor utilizing the two-step genetic algorithm, an optimum energy consumption based on a cost of the energy for the system; and determining, by the processor, at least one parameter of the one or more parameters of the system based on the optimum energy consumption.