Algorithm optimization in secondary suppression with constraints