Optimal maintenance policies of n-unit repairable systems with applications to electrical power networks