An optimization-theoretic approach to transmit power control in wireless sensor networks