1. A method for solving a unit commitment problem for a set of generators with a set of configurations having a set of 2 N.T schedules, wherein N is a number of generators i and T is a number of decision time steps, comprising the steps of: determining a reduced set of configurations; and defining a functional metric to measure a similarity of all possible pairs of the configurations; applying dynamic programming to the reduced set of configurations using the similarity metric to determine an optimal configuration, wherein the steps are performed in a processor.