Fix errors when resources are infinity. Add flag for constraint ports and agus