A model-based framework for recipe design and optimization