Evaluating the Impact of Covid-19 Measures in a School Environment by Simulating a Potential Outbreak


Introduction and Motivation

Many schools have been reopening during the Covid-19 pandemic, so therefore the key question of how to do it safely has been important, especially for many secondary school students like me. The government has issued guidelines on how to open schools safely [1]. Firstly, the effectiveness of these guidelines and the impact of these measures are not clear. Secondly, if this advice and measures are effective elsewhere, it is not clear whether they will be effective in a school environment. Also, there may be more measures, not listed by government guidance, that may be effective at controlling a virus in a school setting. The effectiveness and impact of those are not clear. 

In order to tackle these questions, the objectives of this article are:

  • To increase awareness of the effectiveness and impact of measures and guidelines.
  • Create a platform to evaluate the effectiveness and impact of different measures in a school.
  • Create a platform to test new measures or measures not mentioned in the government guidelines and see the effectiveness and impact of those measures.
  • Make possible recommendations for schools and governments, in order to make an opening school in a pandemic safer.

Two computer programs, called Program 1 and Program 2, have been developed by me using Javascript graphics to simulate the spread of Covid-19 within a school environment and to create a platform to evaluate the effectiveness of these different measures.

The Program

The programs/simulations are based on a school environment with a corridor, three classrooms and a capacity for 75 students, as illustrated in Figure 1. The circles in the programs represent people. The red circles represent infected people and blue circles represent the uninfected people. In the program, an uninfected person can be infected by coming into contact with an infected person. If a face mask is being worn, the radius of the circle shrinks by 3 times (as when you cough or sneeze or breathe, the particles and droplets travel 3 times less distance if you wear a mask) and if social distancing is implemented, the delay between each student arriving is 1 second.

Figure 1: Simulation environment in a school setting

I have tried to replicate the school environment as much as possible by adding these things:

  • People walking at different speeds.
  • Narrow corridor
  • Students sitting in rows

One of the biggest risks of school reopening during a pandemic is movement around school. Therefore, the two programs focus on arrival (and sort of departure) and movements between lessons, as these are the times when movement around school is the greatest, which creates a greater risk of transmission of the virus.

Program 1 focuses on the aspect of arrival into school, to show what is the best arrangement for students arriving at school and highlights the effectiveness of social distancing, the use of face masks and the implementation of a one-way system. The share link for that program is here (if you want to view and run the code):

Program 2 focuses on the aspect of getting between lessons during the school day. This answers the crucial question of whether it is the students or the teachers who should move between lessons and how that affects the spread of a virus during an outbreak. This also shows whether having a reduced number of students physically in school has an effect on the spread of a virus. If it works, schools could consider decreasing the number of students physically in school by operating a mix of classroom and distance learning. The share link for that program is also here.

Program Visualisation (Arrival at School/ Program 1)

Here are some examples of the program being run. These are provided for better visualisations of what exactly happens during an outbreak and provides a clearer picture of the impact each precaution (and combination of precautions) has.

Here is what happens when no measures are implemented:

Figure 2: The effect of no measure.

As you can see, if no measures are implemented, most of the students will get infected in a possible outbreak. The impact and effects of social distancing, the use of face masks and one-way system are demonstrated in Figure 3, 4 and 5, respectively.

Figure 3: The effect of social distancing.

Figure 4: The effect of face masks

Figure 5: The effect of a one-way system

Even though the number of infected students has been decreased by implementing a measure, there is still a large proportion of people getting infected. It can be concluded that one measure is not enough, as evident by those examples. Therefore, the impact of the implementation of all three measures should be considered. It is illustrated in Figure 6.

Figure 6: The effect of all three mentioned measures

As you can see, the number of infections in the event of an outbreak has decreased significantly, when compared to the previous examples. Therefore, in order to control a potential outbreak in a school environment, all three measures should be implemented.

Program Visualisation (Movement around school / Program 2)

Next, the movement between lessons will be simulated, as this is the other major risk. Firstly, we should look at whether teachers should move or students should move between lessons:

Figure 7: Students moving around school simulation

Figure 8: Teachers moving around school simulation

As you can see from Figures 7 and 8, having teachers instead of students move between lessons is a lot safer. Now, the effect of reducing the number of people in school is simulated next, as shown in Figure 9.

Figure 9: School at a reduced capacity simulation


Here is the results table and bar chart for Program 1. The programs have been demonstrated above and the actual results are here. For each combination of measures, the data has been collected three times and took the average to avoid anomalies, as shown in table 1.

Table 1: Program 1 results

MeasuresAttempt 1Attempt 2Attempt 3Average Infection /75Percentage Infected (2 d.p)
OWS + mask17162820.3333333327.11
OWS + distance1473719.3333333325.78
mask + distance2241513.6666666718.22
All three2152.6666666673.56
Figure 10: Effectiveness of Different Measures When Arriving at School

As you can see, the effect of implementing only one measure is very limited. However, the impact of a possible outbreak can be decreased dramatically if you implement and enforce a combination of a one-way system, the use of face masks and social distancing.

Table 2 shows the simulation result for Program 2.

Table 2: Program 2 results

Attempt 1Attempt 2Attempt 3Average Infection /75Percentage Infected (2 d.p)
Student Move (full capacity71707170.6666666794.22
Student Move (half capacity)14322824.6666666732.89
Teacher Move (full capacity)17161716.6666666722.22
Teacher Move (half capacity)102107.3333333339.78

From these results, having teachers move between lessons, instead of students, can significantly decrease the number of infections. This means that teachers should move between lessons instead of students, where appropriate. Please note that the figures for infection of the program running at half capacity is still out of 75. This is because the number of people exposed to the virus decreases if a school is running at half capacity, which makes it safer. Therefore, schools should consider running at half capacity with teachers moving between lessons instead of students.

Recommendations and Conclusion

Based on the results, a number of recommendations and conclusions can be made:

  1. As demonstrated, even when all possible measures are implemented, not all transmission of Covid-19 can be avoided. Therefore, the safest option is to switch to distance learning online. The following recommendations should only be considered if distance learning is not possible for your current situation.
  2. Masks and social distancing should be considered to be compulsory when arriving (and probably leaving) school. Social distancing could be made easier by staggering arrival and departure times.
  3. A one-way system should be implemented and enforced throughout schools.
  4. Teachers should move between lessons instead of students where appropriate. Another advantage of teachers moving instead of students is that the process is actually quicker. An exception to this rule may be made for science and sports-related subjects, which need to be taken in specialised areas.
  5. Reduced capacity in schools could also be considered where appropriate. This can be done using a rota system, where you learn school for a few days and then learn at home or live-streaming lessons using video conferencing technology (such as zoom).
  6. Most importantly, be bothered to enforce anything that is implemented properly. 

Lastly, I just want to comment on the fact that although this article has been mostly dealing with numbers, we should not forget that behind each number is an actual human being and we should not desensitize numbers, especially regarding Covid-19.


  1. UK Government Guidance, “Guidance for teachers, school leaders, carers, parents and students”, https://www.gov.uk/coronavirus/education-and-childcare, 2020


Leave a Comment