Penalty function techniques: a tutorial