Simulation Model For Atomic Ensemble Based Quantum Repeaters And The Optimization Of Their Positioning