{"id":1023,"date":"2020-03-01T19:50:45","date_gmt":"2020-03-01T18:50:45","guid":{"rendered":"http:\/\/julia2.lucaamore.com\/?p=1023"},"modified":"2025-12-01T17:33:24","modified_gmt":"2025-12-01T15:33:24","slug":"infection-spread-simulator-construction-kit","status":"publish","type":"post","link":"https:\/\/www.lucaamore.com\/?p=1023","title":{"rendered":"Infection Spread Simulator Construction Kit"},"content":{"rendered":"\n<p>Al fine di comprendere meglio l&#8217;articolo: <strong>&#8220;<a href=\"https:\/\/web.archive.org\/web\/20230320042234\/https:\/\/triplebyte.com\/blog\/modeling-infectious-diseases\">Modeling How Infectious Diseases like Coronavirus Spread<\/a>&#8220;<\/strong> ed i riferimenti citati, continuando ad approfondire, mi sono ritrovato a costruire il framework: <strong>&#8220;Infection Spread Simulator Construction Kit&#8221;<\/strong>.<\/p>\n\n\n\n<p>Si tratta di un <strong>notebook Python <\/strong>su Colab per la <strong>modellazione della diffusione di un&#8217;infezione attraverso un modello SEIR<\/strong> descritto da un sistema di equazioni differenziali (o un algoritmo); lo stesso modello proposto per l&#8217;analisi della diffusione del covid-19 nell&#8217;articolo che ha ispirato questo lavoro.<\/p>\n\n\n\n<p>Chiunque, anche senza nessuna base matematica, con una conoscenza basilare di programmazione, pu\u00f2 modificare il notebook all&#8217;interno della propria sandbox Colab, <strong>descrivere un virus o il comportamento di un&#8217;infezione<\/strong> ed analizzare la sua diffusione nel tempo per comprendere come la variazione di certi parametri pu\u00f2 incidere nella diffusione.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.lucaamore.com\/wp-content\/uploads\/2020\/03\/lukelv_a_cyberpunk_futuristic_coronavirus_secret_laboratory_6dfe209b-3e34-41e8-aa0b-0ed6ffb44573.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/www.lucaamore.com\/wp-content\/uploads\/2020\/03\/lukelv_a_cyberpunk_futuristic_coronavirus_secret_laboratory_6dfe209b-3e34-41e8-aa0b-0ed6ffb44573-1024x1024.png\" alt=\"\" class=\"wp-image-1527\" srcset=\"https:\/\/www.lucaamore.com\/wp-content\/uploads\/2020\/03\/lukelv_a_cyberpunk_futuristic_coronavirus_secret_laboratory_6dfe209b-3e34-41e8-aa0b-0ed6ffb44573.png 1024w, https:\/\/www.lucaamore.com\/wp-content\/uploads\/2020\/03\/lukelv_a_cyberpunk_futuristic_coronavirus_secret_laboratory_6dfe209b-3e34-41e8-aa0b-0ed6ffb44573-300x300.png 300w, https:\/\/www.lucaamore.com\/wp-content\/uploads\/2020\/03\/lukelv_a_cyberpunk_futuristic_coronavirus_secret_laboratory_6dfe209b-3e34-41e8-aa0b-0ed6ffb44573-150x150.png 150w, https:\/\/www.lucaamore.com\/wp-content\/uploads\/2020\/03\/lukelv_a_cyberpunk_futuristic_coronavirus_secret_laboratory_6dfe209b-3e34-41e8-aa0b-0ed6ffb44573-768x768.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Si tratta di un <strong>prototipo, nato per uso strettamente personale, con molti limiti<\/strong> ma voglio comunque condividerlo con la comunit\u00e0 rilasciandolo come <strong>software libero <\/strong>sotto la licenza GNU\/GPL v.3.<\/p>\n\n\n\n<p>Sarei felice di ricevere i vostri <strong>feedback, i vostri modelli, le vostre evoluzioni<\/strong> anche direttamente su github. Nei prossimi giorni, utilizzando questo framework o una sua evoluzione, vorrei <strong>provare a realizzare il complesso modello di diffusione del covid-19<\/strong> descritto nell&#8217;articolo.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.lucaamore.com\/wp-content\/uploads\/2020\/03\/seir-simulation-luke.avif\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/www.lucaamore.com\/wp-content\/uploads\/2020\/03\/seir-simulation-luke.avif\" alt=\"\" class=\"wp-image-2625\" srcset=\"https:\/\/www.lucaamore.com\/wp-content\/uploads\/2020\/03\/seir-simulation-luke.avif 1024w, https:\/\/www.lucaamore.com\/wp-content\/uploads\/2020\/03\/seir-simulation-luke-300x300.avif 300w, https:\/\/www.lucaamore.com\/wp-content\/uploads\/2020\/03\/seir-simulation-luke-150x150.avif 150w, https:\/\/www.lucaamore.com\/wp-content\/uploads\/2020\/03\/seir-simulation-luke-768x768.avif 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Segue il link diretto al notebook su github:<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/lookee\/seir-model\/blob\/master\/SEIR_model.ipynb\">NOTEBOOK INFECTION SPREAD SIMULATOR CONSTRUCTION KIT (GITHUB)<\/a><\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"668\" height=\"125\" data-id=\"1029\" src=\"https:\/\/www.lucaamore.com\/wp-content\/uploads\/2020\/03\/SEIR_block_model.png\" alt=\"\" class=\"wp-image-1029\"\/><\/figure>\n<\/figure>\n\n\n\n<p><img src='https:\/\/s0.wp.com\/latex.php?latex=+%5Cbegin%7Bcases%7D+%5Cdfrac%7B%5Cpartial+s%28t%29%7D%7B%5Cpartial+t%7D+%3D+-%5Clambda+s%28t%29i%28t%29+%5C%5C+%5Cdfrac%7B%5Cpartial+e%28t%29%7D%7B%5Cpartial+t%7D+%3D+%5Clambda+s%28t%29i%28t%29+-+%5Cdfrac%7Be%28t%29%7D%7B%5Cxi%7D+%5C%5C+%5Cdfrac%7B%5Cpartial+i%28t%29%7D%7B%5Cpartial+t%7D+%3D+%5Cdfrac%7Bh%7D%7B%5Cxi%7D+e%28t%29+-+%5Cdfrac%7Bi%28t%29%7D%7B%5Cmu%7D+%5C%5C+%5Cdfrac%7B%5Cpartial+r%28t%29%7D%7B%5Cpartial+t%7D+%3D+%5Cdfrac%7Bh%7D%7B%5Cmu%7D+i%28t%29+%5Cend%7Bcases%7D+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt=' \\begin{cases} \\dfrac{\\partial s(t)}{\\partial t} = -\\lambda s(t)i(t) \\\\ \\dfrac{\\partial e(t)}{\\partial t} = \\lambda s(t)i(t) - \\dfrac{e(t)}{\\xi} \\\\ \\dfrac{\\partial i(t)}{\\partial t} = \\dfrac{h}{\\xi} e(t) - \\dfrac{i(t)}{\\mu} \\\\ \\dfrac{\\partial r(t)}{\\partial t} = \\dfrac{h}{\\mu} i(t) \\end{cases} ' title=' \\begin{cases} \\dfrac{\\partial s(t)}{\\partial t} = -\\lambda s(t)i(t) \\\\ \\dfrac{\\partial e(t)}{\\partial t} = \\lambda s(t)i(t) - \\dfrac{e(t)}{\\xi} \\\\ \\dfrac{\\partial i(t)}{\\partial t} = \\dfrac{h}{\\xi} e(t) - \\dfrac{i(t)}{\\mu} \\\\ \\dfrac{\\partial r(t)}{\\partial t} = \\dfrac{h}{\\mu} i(t) \\end{cases} ' class='latex' \/><\/p>\n\n\n\n<p><strong>MALARIA<\/strong><br>Il primo <strong>modello reale<\/strong> (estensione del SEIR) che rilascio \u00e8 quello della <strong>malaria<\/strong>. In questo caso ho dovuto apportare delle modifiche pi\u00f9 complesse al modello base.<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/lookee\/seir-model\/blob\/master\/malaria_model.ipynb\">MALARIA NOTEBOOK (GITHUB)<\/a><\/p>\n\n\n\n<p><mark style=\"background-color:#ecdf4a\" class=\"has-inline-color\">\ud83c\udd95 <strong>SARS-CoV-2 (COVID-19)<\/strong> \ud83c\udd95<br><strong>Modello di diffusione del COVID-19<\/strong><\/mark><\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/lookee\/seir-model\/blob\/master\/covid19_model.ipynb\" data-type=\"link\" data-id=\"https:\/\/github.com\/lookee\/seir-model\/blob\/master\/covid19_model.ipynb\">SARS-CoV-2 (COVID-19)\u00a0 (GITHUB)<\/a><\/p>\n\n\n\n<p>Per maggiori informazioni sul progetto:<\/p>\n\n\n\n<p><strong><a href=\"https:\/\/github.com\/lookee\/seir-model\" data-type=\"link\" data-id=\"https:\/\/github.com\/lookee\/seir-model\">PROGETTO GITHUB<\/a><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-3 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" data-id=\"2632\" src=\"https:\/\/www.lucaamore.com\/wp-content\/uploads\/2020\/03\/toy-virus.avif\" alt=\"\" class=\"wp-image-2632\" srcset=\"https:\/\/www.lucaamore.com\/wp-content\/uploads\/2020\/03\/toy-virus.avif 1024w, https:\/\/www.lucaamore.com\/wp-content\/uploads\/2020\/03\/toy-virus-300x300.avif 300w, https:\/\/www.lucaamore.com\/wp-content\/uploads\/2020\/03\/toy-virus-150x150.avif 150w, https:\/\/www.lucaamore.com\/wp-content\/uploads\/2020\/03\/toy-virus-768x768.avif 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Al fine di comprendere meglio l&#8217;articolo: &#8220;Modeling How Infectious Diseases like Coronavirus Spread&#8220; ed i riferimenti citati, continuando ad approfondire, mi sono ritrovato a costruire il framework: &#8220;Infection Spread Simulator Construction Kit&#8221;. Si tratta di un notebook Python su Colab &hellip; <a href=\"https:\/\/www.lucaamore.com\/?p=1023\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":1540,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":"","footnotes":""},"categories":[69,167,166,11,49,165],"tags":[60],"class_list":["post-1023","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-modeling","category-models","category-programming","category-python","category-simulazione","category-top","tag-inction"],"_links":{"self":[{"href":"https:\/\/www.lucaamore.com\/index.php?rest_route=\/wp\/v2\/posts\/1023","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lucaamore.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lucaamore.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lucaamore.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lucaamore.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1023"}],"version-history":[{"count":40,"href":"https:\/\/www.lucaamore.com\/index.php?rest_route=\/wp\/v2\/posts\/1023\/revisions"}],"predecessor-version":[{"id":2658,"href":"https:\/\/www.lucaamore.com\/index.php?rest_route=\/wp\/v2\/posts\/1023\/revisions\/2658"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lucaamore.com\/index.php?rest_route=\/wp\/v2\/media\/1540"}],"wp:attachment":[{"href":"https:\/\/www.lucaamore.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lucaamore.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lucaamore.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}