Skip to main content

CTrace: Language for Definition of Epidemiological Models with Contact-Tracing Transmission

  • Conference paper
  • First Online:
Lecture Notes in Data Engineering, Computational Intelligence, and Decision Making (ISDMCI 2022)

Abstract

In this work, we present our results in development of a domain-specific programming language for an agent-based infectious disease spread modeling with contact tracing transmission. We performed an analysis of methods and tools, accessible to a scientific community, which showed significant problems of currently developed approaches. Some methods provide significant performance, sacrificing ease-of-use, others offer simple programming interface but suffer with performance drawbacks. To address both of these issues, we designed a domain-specific programming language with simple and yet powerful syntax and minimal amount of boilerplate code. The chose of the underlying infectious disease spread model is based on a growing interest in agent-based models, which are becoming more popular due to higher simulation accuracy compared to classical compartmental models. At its core, each agent has its personal user-defined daily schedule, which dictates where the agent is situated at each simulation step based on numerous parameters, such as simulation “day”, agent’s inner state, inner states of linked to this agent compartments, which can be, for example, its house, place of work, school, etc. The underlying language’s engine uses this schedule to check, which agent pair were in contact with each other and where at each simulation step. The infectious disease, defined by a set of rules, which control how do these contacts affect inner states of both agents and how disease progresses in context of a single infected agent. We designed a compiler with Python as intermediate language for a simple programming interface and Numba support for machine language translation. Performed tests showed, that the language is capable of describing complex epidemiological models and the compiler is able to generate machine code efficiently enough to run simulations with medium number of entities. The main problem of a developed approach is the quadratic nature of algorithmic complexity of a contact tracing transmission process. We left optimization of it as a topic for a future research.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    All tests were done using a machine with Intel i7-8700K 3.7 GHz CPU.

  2. 2.

    Comparison was performed by evaluating the ratio between highest power coefficients of a fitted regression model.

References

  1. Swarm (2021). http://www.swarm.org/wiki/Main_Page

  2. Alvarez, F.E., Argente, D., Lippi, F.: A simple planning problem for Covid-19 lockdown. Technical report, National Bureau of Economic Research (2020). https://doi.org/10.3386/w26981

  3. Avilov, K., Solovey, O.Y.: Institute of Numerical Mathematics of Russian Academy Of Sciences Moscow Institute of Physics and Technology (State University)

    Google Scholar 

  4. Eisinger, D., Thulke, H.H.: Spatial pattern formation facilitates eradication of infectious diseases. J. Appl. Ecol. 45(2), 415 (2008). https://doi.org/10.1111/j.1365-2664.2007.01439.x

    Article  Google Scholar 

  5. Harko, T., Lobo, F.S., Mak, M.: Exact analytical solutions of the susceptible-infected-recovered (SIR) epidemic model and of the sir model with equal death and birth rates. Appl. Math. Comput. 236, 184–194 (2014). https://doi.org/10.1016/j.amc.2014.03.030

    Article  MathSciNet  MATH  Google Scholar 

  6. Hethcote, H.W., Van den Driessche, P.: Some epidemiological models with nonlinear incidence. J. Math. Biol. 29(3), 271–287 (1991). https://doi.org/10.1007/BF00160539

    Article  MathSciNet  MATH  Google Scholar 

  7. Merler, S., Ajelli, M.: The role of population heterogeneity and human mobility in the spread of pandemic influenza. Proc. Roy. Soc. B: Biol. Sci. 277(1681), 557–565 (2010). https://doi.org/10.1098/rspb.2009.1605

    Article  Google Scholar 

  8. Ng, W.L.: To lockdown? When to peak? Will there be an end? A macroeconomic analysis on Covid-19 epidemic in the united states. J. Macroecon. 65, 103230 (2020). https://doi.org/10.1016/j.jmacro.2020.103230

    Article  Google Scholar 

  9. Papoulias, N., Stinckwich, S., Ziane, M., Roche, B., et al.: The Kendrick modelling platform: language abstractions and tools for epidemiology. BMC Bioinform. 20(1), 1–13 (2019). https://doi.org/10.1186/s12859-019-2843-0

    Article  Google Scholar 

  10. Patlolla, P., Gunupudi, V., Mikler, A.R., Jacob, R.T.: Agent-based simulation tools in computational epidemiology. In: Böhme, T., Larios Rosillo, V.M., Unger, H., Unger, H. (eds.) IICS 2004. LNCS, vol. 3473, pp. 212–223. Springer, Heidelberg (2006). https://doi.org/10.1007/11553762_21

    Chapter  Google Scholar 

  11. Railsback, S.F., Grimm, V.: Agent-Based and Individual-Based Modeling: A Practical Introduction. Princeton University Press, Princeton (2019)

    Google Scholar 

  12. Rǎdulescu, A., Williams, C., Cavanagh, K.: Management strategies in a Seir-type model of Covid 19 community spread. Sci. Rep. 10(1), 1–16 (2020). https://doi.org/10.1038/s41598-020-77628-4

    Article  Google Scholar 

  13. Sun, W., Jiang, W., Trulls, E., Tagliasacchi, A., Yi, K.M.: ACNe: attentive context normalization for robust permutation-equivariant learning (2020). https://doi.org/10.48550/arXiv.1907.02545

  14. Wilensky, U.: Netlogo 6.2.2 user manual (2022). http://ccl.northwestern.edu/netlogo/docs/

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Vladyslav Sarnatskyi .

Editor information

Editors and Affiliations

A Appendix

A Appendix

Here, we describe a formal grammar of a developed language.

The set of terminal symbols is defined as: \(\varSigma =\{0..9,a..z,A..Z,+,-,*,/,^,==,!=,\) \(<>\),<,>,\(<=\),\(>=\),\(=,(,),\{,\},[,],.,~,\$\),\(->\),\(<-\),\(|\}\).

The set of non-terminal symbols is defined as: \(N=\{\)“letter”, “digit”, “number”, “id”, “expression”, “program”, “distribution_declaration”, “distribution_disc_declaration”, “distribution_cont_declaration”, “function_ declaration”, “param_declaration”, “param_sampling”, “struct_declaration”, “transition”, “infection” \(\}\).

The start symbol S is “program".

Production rules, presented using railroad diagrams, are defined in Figs. 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 and 21.

Fig. 6.
figure 6

Definition of letter non-terminal.

Fig. 7.
figure 7

Definition of digit non-terminal.

Fig. 8.
figure 8

Definition of number non-terminal.

Fig. 9.
figure 9

Definition of id non-terminal.

Fig. 10.
figure 10

Definition of program non-terminal.

Fig. 11.
figure 11

Definition of \(function\_declaration\) non-terminal.

Fig. 12.
figure 12

Definition of \(function\_declaration\_arguments\) non-terminal.

Fig. 13.
figure 13

Definition of \(param\_declaration\) non-terminal.

Fig. 14.
figure 14

Definition of \(distribution\_declaration\) non-terminal.

Fig. 15.
figure 15

Definition of \(distribution\_disc\_declaration\) non-terminal.

Fig. 16.
figure 16

Definition of \(distribution\_cont\_declaration\) non-terminal.

Fig. 17.
figure 17

Definition of \(param\_sampling\) non-terminal.

Fig. 18.
figure 18

Definition of \(struct\_declaration\) non-terminal.

Fig. 19.
figure 19

Definition of infection non-terminal.

Fig. 20.
figure 20

Definition of expression non-terminal.

Fig. 21.
figure 21

Definition of transition non-terminal.

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Sarnatskyi, V., Baklan, I. (2023). CTrace: Language for Definition of Epidemiological Models with Contact-Tracing Transmission. In: Babichev, S., Lytvynenko, V. (eds) Lecture Notes in Data Engineering, Computational Intelligence, and Decision Making. ISDMCI 2022. Lecture Notes on Data Engineering and Communications Technologies, vol 149. Springer, Cham. https://doi.org/10.1007/978-3-031-16203-9_25

Download citation

Publish with us

Policies and ethics