Combining approximation and exact penalty in hierarchical programming