Heterogeneous flywheel modeling and optimization