Optimal design of dielectric elastomer generators