Added constraint generation codes, but posed some bugs yet