Implementation of various termination detection of algorithms in peersim