  We analyze an optimal control problem governed by a rate-independent system
in an abstract infinite-dimensional setting. The rate-independent system is
characterized by a nonconvex stored energy functional, which depends on time
via a time-dependent external loading, and by a convex dissipation potential,
which is assumed to be bounded and positively homogeneous of degree one.
  The optimal control problem uses the external load as control variable and is
constrained to normalized parametrized balanced viscosity solutions (BV
solutions) of the rate-independent system. Solutions of this type appear as
vanishing viscosity limits of viscously regularized versions of the original
rate-independent system. Since BV solutions in general are not unique, as a
main ingredient for the existence of optimal solutions we prove the compactness
of solution sets for BV solutions.
