SMS: Detailed simulation of distance protection for its testing and setting