Optimal path selection in MANET considering network stability and power cost