I using scipy library for optimization. I use basinhopping method for global optimization and trust-constr for finding local minimum. When I finding local minimum part of iteration out of constrains and I must reject this iterations, but this iterations has minimum objective function and basinhopping algorithm accept this solution. I know how to reject all bassinghoping step, but I want reject only bad minimum and accept minimum in this basinhopping step inside constrains. May be trust-constr method has atribute of "accept" or "reject" iteration?