  In this article, we pay attention to transitive dynamical systems having the
shadowing property and the entropy functions are upper semicontinuous. As for
these dynamical systems, when we consider ergodic optimization restricted on
the subset of invariant measures whose metric entropy are equal or greater than
a given constant, we prove that for generic real continuous functions the
ergodic optimization measure is unique, ergodic, full support and have metric
entropy equal to the given constant. Similar results also hold for suspension
flows over transitive subshift of finite type, Cr (r\geq 2)- generic geometric
Lorenz attractors and C1-generic singular hyperbolic attractors.
