fixed the bug of initial energy and upper bound
make the node power initialization more stable
more readable print and adjusting for initial_average
cleaned the logic of the algorithms