The Optimization of Generalizability Studies with Resource Constraints