Optimal Sensing and Actuation Policies for Networked Mobile Agents in a Class of Cyber-Physical Systems