In wireless sensor and actuator networks (WSANs), because of unreliable transmission of sensory measurements and controller commands by wireless multi-hop, the controller??s view of the system status is obscure and intermittent, resulting in infeasibility of direct analytical optimisation methods for WSAN applications. A simulated annealing based method is proposed, which features in stochastic trials and selective accepting. It is shown by simulations that the method is powerful in terms of satisfying user requirements.