Penalty and Barrier Function Methods for Constrained Optimization