Modeling time-varying operations in complex energy systems optimization problems is often computationally intractable, and time-series input data are thus often aggregated to representative periods. In this work, we introduce a framework for using clustering methods for this purpose, and we compare both conventionally-used methods (k-means, k-medoids, and hierarchical clustering), and shape-based clustering methods (dynamic time warping barycenter averaging and k-shape). We compare these methods in the domain of the objective function of two example operational optimization problems: battery charge/discharge optimization and gas turbine scheduling, which exhibit characteristics of complex optimization problems. We show that centroid-based clustering methods represent the operational part of the optimization problem more predictably than medoid-based approaches but are biased in objective function estimate. On certain problems that exploit intra-daily variability, such as battery scheduling, we show that k-shape improves performance significantly over conventionally-used clustering methods. Comparing all locally-converged solutions of the clustering methods, we show that a better representation in terms of clustering measure is not necessarily better in terms of objective function value of the optimization problem.