Cost Model -- On Maximizing Residual Energy of Actors in Wireless Sensor and Actor