Penalty and Barrier Methods for Constrained Optimization