Principles of Optimal Design: Modeling and Computation