  We focus on real-time air quality monitoring systems that rely on devices
installed on automobiles in this research. We investigate an opportunistic
communication model in which devices can send the measured data directly to the
air quality server through a 4G communication channel or via Wi-Fi to adjacent
devices or the so-called Road Side Units deployed along the road. We aim to
reduce 4G costs while assuring data latency, where the data latency is defined
as the amount of time it takes for data to reach the server. We propose an
offloading scheme that leverages Q-learning to accomplish the purpose. The
experiment results show that our offloading method significantly cuts down
around 40-50% of the 4G communication cost while keeping the latency of 99.5%
packets smaller than the required threshold.
