On a method of optimization in pattern synthesis of array antennas