Code for Tianlai Project simulation.