This page provides codes that are used in "Modeling the effects of contact-tracing apps on the spread of the coronavirus disease: mechanisms, conditions, and efficiency."