Recently, the IEEE 802.3 Ethernet Working Group has classified three architectures for the nextgeneration Ethernet passive optical network (NG-EPON). They are called single-scheduling domain (SSD) PON, multi-scheduling domain (MSD) PON, and wavelength-agile (WA) PON, and they differ based on how a group of optical network units (ONUs) share a wavelength. Existing dynamic bandwidth and wavelength allocation (DBWA) schemes for conventional EPON can be applied to MSD-PON and SSD-PON, but not WA-PON. This is because WA-PON is a new architecture with full flexibility where a flexible number of wavelengths can be assigned to one ONU, and multiple ONUs can transmit at the same time. In this work, we develop a mathematical model and a novel DBWA scheme for transmission scheduling in WA-PON. However, as WA-PON incurs penalties in terms of delay and power consumption when an ONU activates its transmissions on new wavelengths, a trade-off between energy saving and data-transfer latency reduction needs to be carefully addressed when performing transmission scheduling. So, we develop a power-consumption model and modify the proposed DBWA scheme to enhance the energy efficiency of WA-PON. Finally, we conduct simulation experiments for performance evaluation of the three PON architectures in terms of latency and packet loss ratio. We quantitatively investigate the influence of various parameters, such as the number of ONU transceivers and ONU buffer size, on WA-PON latency and packet loss ratio, and we evaluate the energy efficiency gain of the modified DBWA scheme.