Modification of the activated sludge model for chemical dosage