Polynomial Algorithms for Performance Evaluation of Communication Networks by Stochastic Regular Petri Nets