Elastic-plastic and limit-state analyses of frames with softening plastic-hinge models by mathematical programming