An economic threshold model for spraying herbicides in cereals