penalty and barrier methods for constrained optimization