Adding the sumWeight constraint