I have no clue about the penalty method. But is it a good way to have a fixed value for the scaling? And why 1e10 and not another value? Maybe this should a parameter?