replace Min and Max constraints by Range constraint.