Traveling wave model of an AWG-based multiwavelength laser