Skip to content
Commits on Source (9)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE UserProject SYSTEM "UserProject-4.0.dtd">
<!-- eric4 user project file for project Epigrass -->
<!-- Saved: 2012-11-13, 11:36:49 -->
<!-- Copyright (C) 2012 , -->
<UserProject version="4.0">
</UserProject>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Session SYSTEM "Session-4.4.dtd">
<!-- eric4 session file for project Epigrass -->
<!-- This file was generated automatically, do not edit. -->
<Session version="4.4">
<Filenames>
<Filename cline="0" cindex="0" folds="" zoom="0">/home/fccoelho/Documents/Projects_software/EpigrassQt4/setup.py</Filename>
<Filename cline="521" cindex="0" folds="" zoom="0">/home/fccoelho/Documents/Projects_software/EpigrassQt4/Epigrass/epigrass.py</Filename>
<Filename cline="0" cindex="0" folds="" zoom="0">/home/fccoelho/Documents/Projects_software/EpigrassQt4/Epigrass/manager.py</Filename>
<Filename cline="100" cindex="228" folds="" zoom="0">/home/fccoelho/Documents/Projects_software/EpigrassQt4/Epigrass/dgraph.py</Filename>
<Filename cline="74" cindex="53" folds="" zoom="0">/home/fccoelho/Documents/Projects_software/EpigrassQt4/Epigrass/Ui_display.py</Filename>
<Filename cline="194" cindex="45" folds="" zoom="0">/home/fccoelho/Documents/Projects_software/EpigrassQt4/Epigrass/epgeditor.py</Filename>
<Filename cline="184" cindex="25" folds="" zoom="0">/home/fccoelho/Documents/Projects_software/EpigrassQt4/Epigrass/epiplay.py</Filename>
<Filename cline="260" cindex="7" folds="" zoom="0">/home/fccoelho/Documents/Projects_software/EpigrassQt4/Epigrass/neteditor.py</Filename>
</Filenames>
<ActiveWindow cline="260" cindex="7">/home/fccoelho/Documents/Projects_software/EpigrassQt4/Epigrass/neteditor.py</ActiveWindow>
<Breakpoints>
</Breakpoints>
<Watchexpressions>
</Watchexpressions>
<DebugInfo>
<CommandLine></CommandLine>
<WorkingDirectory></WorkingDirectory>
<Environment></Environment>
<ReportExceptions value="True" />
<Exceptions>
</Exceptions>
<IgnoredExceptions>
</IgnoredExceptions>
<AutoClearShell value="True" />
<TracePython value="False" />
<AutoContinue value="True" />
<CovexcPattern></CovexcPattern>
</DebugInfo>
<Bookmarks>
</Bookmarks>
</Session>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Tasks SYSTEM "Tasks-4.2.dtd">
<!-- eric4 tasks file for project Epigrass -->
<Tasks version="4.2">
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: read meta-info from table and show in the tooltip</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:10</Created>
<Resource>
<Filename>Epigrass/epigrass.py</Filename>
<Linenumber>519</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: fix this</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:17</Created>
<Resource>
<Filename>Epigrass/dgraph.py</Filename>
<Linenumber>170</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="True">
<Summary>FIXME: verify time overhead of this check</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:17</Created>
<Resource>
<Filename>Epigrass/dgraph.py</Filename>
<Linenumber>540</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="True">
<Summary>FIXME: eitehr integrate this into the graph object, or make it a separate function</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:17</Created>
<Resource>
<Filename>Epigrass/dgraph.py</Filename>
<Linenumber>577</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="True">
<Summary>FIXME: consertar algoritmo para funcionar com qualquer sistema de coordenadas</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:17</Created>
<Resource>
<Filename>Epigrass/dgraph.py</Filename>
<Linenumber>719</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: remove dependency on SQLObject</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:20</Created>
<Resource>
<Filename>Epigrass/epiplay.py</Filename>
<Linenumber>13</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="True">
<Summary>FIXME: the animation rate is not working....</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:20</Created>
<Resource>
<Filename>Epigrass/epiplay.py</Filename>
<Linenumber>181</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: not implemented yet</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:22</Created>
<Resource>
<Filename>Epigrass/neteditor.py</Filename>
<Linenumber>56</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: not implemented yet</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:22</Created>
<Resource>
<Filename>Epigrass/neteditor.py</Filename>
<Linenumber>64</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: not implemented yet</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:22</Created>
<Resource>
<Filename>Epigrass/neteditor.py</Filename>
<Linenumber>72</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: not implemented yet</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:22</Created>
<Resource>
<Filename>Epigrass/neteditor.py</Filename>
<Linenumber>87</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: not implemented yet</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:22</Created>
<Resource>
<Filename>Epigrass/neteditor.py</Filename>
<Linenumber>95</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: not implemented yet</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:22</Created>
<Resource>
<Filename>Epigrass/neteditor.py</Filename>
<Linenumber>103</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: not implemented yet</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:22</Created>
<Resource>
<Filename>Epigrass/neteditor.py</Filename>
<Linenumber>111</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: not implemented yet</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:22</Created>
<Resource>
<Filename>Epigrass/neteditor.py</Filename>
<Linenumber>119</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: not implemented yet</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:22</Created>
<Resource>
<Filename>Epigrass/neteditor.py</Filename>
<Linenumber>127</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: not implemented yet</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:22</Created>
<Resource>
<Filename>Epigrass/neteditor.py</Filename>
<Linenumber>193</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: not implemented yet</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:22</Created>
<Resource>
<Filename>Epigrass/neteditor.py</Filename>
<Linenumber>201</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: not implemented yet</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:22</Created>
<Resource>
<Filename>Epigrass/neteditor.py</Filename>
<Linenumber>228</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: not implemented yet</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:22</Created>
<Resource>
<Filename>Epigrass/neteditor.py</Filename>
<Linenumber>236</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="True">
<Summary>FIXME: verify time overhead of this check</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:22</Created>
<Resource>
<Filename>Epigrass/neteditor.py</Filename>
<Linenumber>424</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="True">
<Summary>FIXME: eitehr integrate this into the graph object, or make it a separate function</Summary>
<Description></Description>
<Created>2012-10-06, 06:53:22</Created>
<Resource>
<Filename>Epigrass/neteditor.py</Filename>
<Linenumber>461</Linenumber>
</Resource>
</Task>
</Tasks>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE UserProject SYSTEM "UserProject-4.0.dtd">
<!-- eric4 user project file for project Epigrass_qt4 -->
<UserProject version="4.0">
</UserProject>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Session SYSTEM "Session-4.4.dtd">
<!-- eric4 session file for project Epigrass_qt4 -->
<!-- This file was generated automatically, do not edit. -->
<Session version="4.4">
<Filenames>
<Filename cline="481" cindex="30" folds="" zoom="0">/home/fccoelho/Documents/Projects_software/EpigrassQt4/Epigrass/epigrass.py</Filename>
<Filename cline="62" cindex="33" folds="" zoom="0">/home/fccoelho/Documents/Projects_software/EpigrassQt4/Epigrass/manager.py</Filename>
<Filename cline="185" cindex="22" folds="" zoom="0">/home/fccoelho/Documents/Projects_software/EpigrassQt4/Epigrass/epiplay.py</Filename>
<Filename cline="138" cindex="0" folds="" zoom="0">/home/fccoelho/Documents/Projects_software/EpigrassQt4/Epigrass/dgraph.py</Filename>
<Filename cline="121" cindex="60" folds="" zoom="0">/home/fccoelho/Documents/Projects_software/EpigrassQt4/Epigrass/Ui_display.py</Filename>
</Filenames>
<ActiveWindow cline="138" cindex="0">/home/fccoelho/Documents/Projects_software/EpigrassQt4/Epigrass/dgraph.py</ActiveWindow>
<Breakpoints>
</Breakpoints>
<Watchexpressions>
</Watchexpressions>
<DebugInfo>
<CommandLine></CommandLine>
<WorkingDirectory></WorkingDirectory>
<Environment></Environment>
<ReportExceptions value="True" />
<Exceptions>
</Exceptions>
<IgnoredExceptions>
</IgnoredExceptions>
<AutoClearShell value="True" />
<TracePython value="False" />
<AutoContinue value="True" />
<CovexcPattern></CovexcPattern>
</DebugInfo>
<Bookmarks>
</Bookmarks>
</Session>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Tasks SYSTEM "Tasks-4.2.dtd">
<!-- eric4 tasks file for project Epigrass_qt4 -->
<Tasks version="4.2">
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: check this connection string</Summary>
<Description></Description>
<Created>2008-06-23, 14:22:24</Created>
<Resource>
<Filename>Epigrass/dataObject.py</Filename>
<Linenumber>26</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="True">
<Summary>FIXME: find out why replay function does not runright after regular run</Summary>
<Description></Description>
<Created>2008-07-01, 17:09:53</Created>
<Resource>
<Filename>epigrass.py</Filename>
<Linenumber>314</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: read meta-info from table and show in the tooltip</Summary>
<Description></Description>
<Created>2008-07-01, 17:09:53</Created>
<Resource>
<Filename>epigrass.py</Filename>
<Linenumber>478</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: move this import to the graph level</Summary>
<Description></Description>
<Created>2008-07-09, 11:49:40</Created>
<Resource>
<Filename>Epigrass/simobj.py</Filename>
<Linenumber>402</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="False">
<Summary>TODO: read meta-info from table and show in the tooltip</Summary>
<Description></Description>
<Created>2011-09-11, 17:35:37</Created>
<Resource>
<Filename>Epigrass/epigrass.py</Filename>
<Linenumber>519</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="True">
<Summary>FIXME: the animation rate is not working....</Summary>
<Description></Description>
<Created>2011-09-11, 17:35:38</Created>
<Resource>
<Filename>Epigrass/epiplay.py</Filename>
<Linenumber>174</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="True">
<Summary>FIXME: verify time overhead of this check</Summary>
<Description></Description>
<Created>2011-09-11, 17:46:12</Created>
<Resource>
<Filename>Epigrass/dgraph.py</Filename>
<Linenumber>496</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="True">
<Summary>FIXME: eitehr integrate this into the graph object, or make it a separate function</Summary>
<Description></Description>
<Created>2011-09-11, 17:46:12</Created>
<Resource>
<Filename>Epigrass/dgraph.py</Filename>
<Linenumber>533</Linenumber>
</Resource>
</Task>
<Task priority="1" completed="False" bugfix="True">
<Summary>FIXME: consertar algoritmo para funcionar com qualquer sistema de coordenadas</Summary>
<Description></Description>
<Created>2011-09-11, 17:46:12</Created>
<Resource>
<Filename>Epigrass/dgraph.py</Filename>
<Linenumber>675</Linenumber>
</Resource>
</Task>
</Tasks>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 2.7.3 (/usr/bin/python)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="ReSTService">
<option name="workdir" value="$MODULE_DIR$/docs" />
<option name="DOC_DIR" value="$MODULE_DIR$/docs" />
</component>
<component name="TestRunnerService">
<option name="projectConfiguration" value="Nosetests" />
<option name="PROJECT_TEST_RUNNER" value="Nosetests" />
</component>
</module>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<profile version="1.0" is_locked="false">
<option name="myName" value="Project Default" />
<inspection_tool class="PyCompatibilityInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ourVersions">
<value>
<list size="6">
<item index="0" class="java.lang.String" itemvalue="2.7" />
<item index="1" class="java.lang.String" itemvalue="3.4" />
<item index="2" class="java.lang.String" itemvalue="3.5" />
<item index="3" class="java.lang.String" itemvalue="3.6" />
<item index="4" class="java.lang.String" itemvalue="3.7" />
<item index="5" class="java.lang.String" itemvalue="3.8" />
</list>
</value>
</option>
</inspection_tool>
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="1">
<item index="0" class="java.lang.String" itemvalue="pymongo" />
</list>
</value>
</option>
</inspection_tool>
<inspection_tool class="SqlDialectInspection" enabled="false" level="WARNING" enabled_by_default="false" />
</profile>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7" project-jdk-type="Python SDK" />
<component name="PythonCompatibilityInspectionAdvertiser">
<option name="version" value="1" />
</component>
</project>
\ No newline at end of file
This diff is collapsed.
# The default ``config.py``
def set_prefs(prefs):
"""This function is called before opening the project"""
# Specify which files and folders to ignore in the project.
# Changes to ignored resources are not added to the history and
# VCSs. Also they are not returned in `Project.get_files()`.
# Note that ``?`` and ``*`` match all characters but slashes.
# '*.pyc': matches 'test.pyc' and 'pkg/test.pyc'
# 'mod*.pyc': matches 'test/mod1.pyc' but not 'mod/1.pyc'
# '.svn': matches 'pkg/.svn' and all of its children
# 'build/*.o': matches 'build/lib.o' but not 'build/sub/lib.o'
# 'build//*.o': matches 'build/lib.o' and 'build/sub/lib.o'
prefs['ignored_resources'] = ['*.pyc', '*~', '.ropeproject',
'.hg', '.svn', '_svn', '.git']
# Specifies which files should be considered python files. It is
# useful when you have scripts inside your project. Only files
# ending with ``.py`` are considered to be python files by
# default.
#prefs['python_files'] = ['*.py']
# Custom source folders: By default rope searches the project
# for finding source folders (folders that should be searched
# for finding modules). You can add paths to that list. Note
# that rope guesses project source folders correctly most of the
# time; use this if you have any problems.
# The folders should be relative to project root and use '/' for
# separating folders regardless of the platform rope is running on.
# 'src/my_source_folder' for instance.
#prefs.add('source_folders', 'src')
# You can extend python path for looking up modules
#prefs.add('python_path', '~/python/')
# Should rope save object information or not.
prefs['save_objectdb'] = True
prefs['compress_objectdb'] = False
# If `True`, rope analyzes each module when it is being saved.
prefs['automatic_soa'] = True
# The depth of calls to follow in static object analysis
prefs['soa_followed_calls'] = 0
# If `False` when running modules or unit tests "dynamic object
# analysis" is turned off. This makes them much faster.
prefs['perform_doa'] = True
# Rope can check the validity of its object DB when running.
prefs['validate_objectdb'] = True
# How many undos to hold?
prefs['max_history_items'] = 32
# Shows whether to save history across sessions.
prefs['save_history'] = True
prefs['compress_history'] = False
# Set the number spaces used for indenting. According to
# :PEP:`8`, it is best to use 4 spaces. Since most of rope's
# unit-tests use 4 spaces it is more reliable, too.
prefs['indent_size'] = 4
# Builtin and c-extension modules that are allowed to be imported
# and inspected by rope.
prefs['extension_modules'] = []
# Add all standard c-extensions to extension_modules list.
prefs['import_dynload_stdmods'] = True
# If `True` modules with syntax errors are considered to be empty.
# The default value is `False`; When `False` syntax errors raise
# `rope.base.exceptions.ModuleSyntaxError` exception.
prefs['ignore_syntax_errors'] = False
# If `True`, rope ignores unresolvable imports. Otherwise, they
# appear in the importing namespace.
prefs['ignore_bad_imports'] = False
def project_opened(project):
"""This function is called after opening the project"""
# Do whatever you like here!
]q(]q]qe.
\ No newline at end of file
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[latin1]{inputenc}
\usepackage[brazil]{babel}
\usepackage{natbib}
\usepackage{graphicx, subfigure}
%opening
\title{EPIGRASS: Epidemiological Models}
\author{EPIGRASS Development Group}
\begin{document}
\maketitle
\begin{abstract}
This chapter presents a brief, and hopefully gentile, introduction to epidemiological modeling in the context of EPIGRASS. This text is directed to users who are learning epidemiological modelling and also to those users with more experience, who want to grasp the approach used by Epigrass. The former may want to read it more carefully while the later may just take a look to get the feeling.
\end{abstract}
\section{Introduction}
Epidemiological models are implemented in the Epigrass environment as a tool to predict, understand and develop strategies to control the spread of infectious diseases at different time/spatial scales. In this context, we see two direct potential applications. One is to model the spread of new diseases into a entirely susceptible population (ecological invasion). Retrospectively, this was the case of Dengue Fever and cholera in Brazil. Prospectively, this may also be the case of a future pandemic flu. The velocity of spread of new diseases in a network of susceptible populations depends on their distribution, size, susceptibility and patterns of contact within and between populations. In a large scale, climate (seasonality) may also impact the dynamics of geographical spread as it introduces temporal and spatial heterogeneity. Understanding and predicting the direction and velocity of an invasion wave is key for emergency preparedness.
Besides invasion, network epidemiological models can also be used to understand patterns of geographical spread of endemic diseases. Many infectious diseases can only be maintained in a endemic state in cities with population size above a threshold, or with appropriate environmental conditions (climate, availability of a reservoir, vectors, etc). The variables and the magnitudes associated with endemicity threshold depends on the natural history of the disease. For measles, for example, only communities above 300,000 habitants can sustain an endemic disease. This magnitude may vary from place to place as it depends on the contact structure of the individuals. Predicting which cities are responsible for the endemicity and understanding the path of recurrent travelling waves may help us to design optimal surveillance and control strategies. For measles, for example, models suggest that geographical spread tend to follow a hierarchical pattern, starting in big cities (core) and then spreading to smaller neighborhood cities (satellites) (Grenfell et al, 2001. nature paper).
Epigrass implements a series of epidemiological models which, integrated with a set of analytical and visualization tools, may give us clues about the overal pattern of diseases spread in the geographical space (Brazil). Besides, it can be used for scenario analysis to compare alternative intervention scenarios.
\section{Notation}
\section{Epidemiological models}
Epidemiological models in EPIGRASS are defined as spatially explicit, multi-state, discrete time models, either deterministic or stochastic. The multi-state model describes the main disease/health states associated with a specific host-disease system, as well as the transitions between these states. For example, to model the dynamics of a childhood diseases in a population we could use a three states model:
\subsection{Directly-transmitted diseases with full/none immunity}
The models implemented are based on the time series SIR model proposed by Bjornstad and all grenfell (refs), but relaxing the assumption of constant infection duration (i.e., allowing the user to define the time step). They are implemented in a generic form so that some special cases can be derived easily by setting some constants to 1 or 0. They assume, however, a single class of susceptibles and infectives. Models can be simulated either deterministically or stochastically.
\begin{eqnarray}
\lambda(t+1) &=& \beta(t)S(t)(I(t)+\theta(t)]^\alpha\\
E(t+1) &=& (1-e)E(t) +\lambda\\
I_j(t+1)&=& e E(t) + (1-r)I(t)\\
S(t+1,s) &=& S(t,s) + B - I(t+1,s) + (1-\delta) rI(t)
\end{eqnarray}
where
\begin{description}
\item[$\lambda$] is the expected number of new cases at time $t+1$, place $s$;
\item[$\beta$] is the time and spatilly varying transmission parameter
\item[$S(t)$] is the number of susceptibles at time $t$, place $s$
\item[$I(t)$] is the number of infecteds (infectious) individuals at time $t$, place $s$
\item[$\theta$] is the number of migrants arriving in $s$, at time $t$ (see next section)
\item[$\alpha$] is the mixing rate ($\alpha=1$ implies homogeneous mixing)
\item[$r$] is the probability of recovery
\item[$e$] is the probability of an exposed individual move to the infectious class, per day
\item[$\delta$] is the probability of acquiring immunity after infection. In this framework, an individual either becomes fully immune ($\delta = 1$) or totally susceptible ($\delta=0$).
\item[$B$] is the birth rate
\end{description}
\subsubsection{Special cases}
From this framework, we can derive some special cases:
\begin{description}
\item[SEIR model ($\delta = 1$)] All infected individuals become fully immune and never return to the susceptible class
\item[SEIS model ($\delta = 0$)] All infected individuals return immediately to the susceptible class, after recovery
\item[SEIpartialR model ($0 \leq \delta \leq 1$)] This is an intermediate case between SIS and SIR where only a fraction $\delta$ of the infected individuals acquire (lifelong) immunity, while the remaining $(1-\delta)$ returns to the susceptible class.
\item[SIR model ($e=1$)] All individuals move directly to the infectious class (equivalent of removing the Exposed class)
\end{description}
\subsection{Directly transmitted diseases with immunity wane}
In this model, individuals acquire immunity but this immunity is lost through time until they become susceptible again. Loss of immunity is modelled by moving individuals, after infection, from a state of minimum susceptibility to states of progressively higher susceptibility, until they return to the susceptible class. This approach emulates a loss of immunity that follows a gamma distribution with attributes XX and YY.
Individuals partially immune may get infected with a certain probability (lower than the susceptible class).
To implement this, the user must provide the number of recovery compartments.
\section{Spatial coupling}
The parameter $\theta$ in the epidemiological models described above represent the infected individuals from the neighborhood of a site $X$ to which susceptibles from $X$, $S_X$, are exposed to, due to the commutation of individuals (either susceptibles or infected) between $X$ and its neighborhood (Grenfel).
Spatial coupling can be modelled in different ways. Grenfell et al, for example, use a simple approach were:
$$
\theta(t) = m \sum_{s \in N_s} I_s
$$
where for a given locality, $s$, $\theta(t)$ is the commutation rate, $m$, times the number of infecteds in the neighborhood of $s$, $N_s$. In Epigrass, we can define neighborhood using different methods: based on euclidean distance between cities, based on the existence of boundaries between municipalities, based on travelling distance or existence of roads. The commutation rate can be either constant for all places or different for each pair of sites.
\section{Stochastic epidemiological models}
In the stochastic version, the equation $I(t+1,s)$ is replaced by
$$
I(t+1) = (1-r) I(t) + i(t+1)\\
$$
where $i(t+1)$ is a random variable (observed number of new cases). The default is to assume that $i(t,s)$ follows a Negative Binomial distribution with mean equal to $\lambda(t+1)$ and clumping parameter $=I(t,s)$. This means that small $I_t$ results in clustered transmission (Grenfell et al, 2001).
$$
i(t) \sim NB(\lambda(t+1),I(t,s))
$$
\end{document}
\chapter{Interpreting the output} \label{cap:analysis}
\lettrine{T}he outputs of EpiGrass simulations were designed to be as flexible as possible. Beside the automated report generation which serves as an overview of the model and its results, raw data is also made available for ready utilization from other softwares such as R and Grass.
\section{Visualization}
On the graphical user interface, if you check the box \texttt{Visualize Graph}, a 3D display opens up when the simulation is started. This display will plot the network on the map (if a map is available). As the simulation progresses, the nodes change color from green to red as the localities become infected. Localities that get infected later are assigned a different shades of red which will tend to become blue as the time progresses. This way the sequence of infection remains visible throughout the simulation by means of this color scale.
The visualization module can also be invoked independently of the simulation to review the dynamics of simulation data stored on the database. This way, any previous simulation can be reviewed at any time. It is also recommended that simulataneous visualization be turned off to speed up calculations.
Currently, the visualization module displays only the temporal dynamics of infection with the number of infected individuals in each infected locality is represented by the size of the node object in the network plot.
\section{Database}
The simulated time series are stored in a MySQL table in the database epigrass: E, I, S, incidence (L), together with time, geocode and coordinates. The table is named after the filename of the script and date and time of the simulation.
Epigrass provides an R script for importing the data into R for further analysis and display \footnote{see appendix \ref{cap:introR}}.
\section{Epidemiological descriptors}
At the end of the simulation, Epigrass calculates a set of epidemiological stats. These stats are presented to the user in two ways: as a .csv table that can be imported by R or any other statistical package; and as a written (PDF format) report. Stats include descriptors of the epidemic dynamics at the whole graph level and also node-specific stats:
\paragraph*{Graph-level stats:}
\begin{description}
\item[Epidemic pop size] Total number of cases in the whole graph during the simulation.
\item[Epidemic size] Total number of cities that had authoctonous transmission during the simulation.
\item[Mean epidemic speed] Average number of new localities infected per time step.
\item[Epidemic Duration] Time between the first and last case.
\item[Median survival] Time to reach 50\% of the cities.
\item[Vaccinated] Total number of vaccinated individuals.
\item[Quarantined] Total number of quarantined individuals.
\item[Pass] Total number of infected individuals travelling through the network.
\item[Top ten nodes] Main cities in terms of number of infected.
\item[First ten nodes] First ten infected cities.
\end{description}
At the site scale, the report returns for each site $i$:
\begin{description}
\item[Incidence] Accumulated number of new cases per time step
\item[Local epidemic size] Total number of cases that occurred in the site during the simulation.
\item[Infectious arriving] Number of infected individuals arriving per time step
%\item[Local outbreak start point($t_i$)] Time step of first authoctonously transmitted infection in $i$.
%\item[Local arrival ($y_i$)] Total number of infected individuals that visited $i$ during the simulation.
%\item[Speed of spread($\sigma_1$)] Number (or proportion) of new localities infected per time step
%\item[Speed of spread($\sigma_2$)] Number (or proportion) of new localities infected per time step, weighed by population size of these localities (?).
%\item[Speed of propagation($\sigma_3$)] Velocitity of propagation in $km^2/day$, where velocity of propagation is defined as a velocity $c$ so that, if you run faster than $c$, you leave the epidemi behind and, if you run slower than $c$, the epidemic will eventually surrounds you (Rass and Radcliff. Spatial Deterministic epidemics, livro).
%\item[Speed of propagation($\sigma_4$)] Velocity of movement of the centroid of the epidemic region.
%\item{Mean direction of spread}
%\item{}
\end{description}
\section{Network Descriptive Statistics}
EpiGrass automatically calculates and displays descriptive statistics about the network structure in Reports 1 and 3.
\subsection{Basic Numbers}
\begin{description}
\item[Order (Number of Nodes):] The Number of localities the network is composed of.
\item[Size (Number of Edges):] The number of transportation routes connecting any pair of nodes.
\item [Eulerian:] Can be yes or No depending on if the networkgrap is eulerian o not. A Eulerian graph contains a circuit (Eulerian circuit) which includes all nodes an edges of the graph.
\item [Traversable:]Can be Yes or No depending on if the network graph contains an Eulerian trail, i.e. a trail tht includes all the nodes an edges of the graph.
\end{description}
\subsection{Shortest-path Distribution}
In a network there are frequently more than one path from locality A to locality B. Of these possible routes, the shortest path is the most important when dealing with epidemic processes over networks.
A network distance Matrix can be calculated whose elements represent the number of edges separating any pair of nodes via the shortest path between them. From this matrix a histogram of the Shortest-paths lengths can be generated which gives us an idea of give us an idea of how fast an epidemic would spread in our network, if distance was the only factor.
\subsection{Conectivity Matrix}
The most basic measure of accessibility involves network connectivity
where a network is represented as a connectivity matrix(figure \ref{fig:cm}), which
expresses the connectivity of each node with its adjacent nodes.
The number of columns and rows in this matrix is equal to the number
of nodes in the network and a value of 1 is given to each cell representing a directly connected pair and a value of 0 to each cell representing an unconnected pair. The summation of this matrix, along its rows or collumns, provides a very
basic measure of node accessibility, also known as the degree of a node.
\begin{figure}[h]
\includegraphics[scale=0.6]{cm.png}
\centering
\caption{Connectivity matrix of a simple grid network}
\label{fig:cm}
\end{figure}
indices = r"""
\subsection{Number of Cycles}
A cycle is a circular path, meaning that in ends wher it started, that does not repeat an edge. The index presented here is the maximum number of independent cycles in a network.
This number ($u$) is estimated by knowing the number of nodes ($v$),
links ($e$) and of sub-graphs ($p$);
Trees and simple networks will have a value of 0 since they have
no cycles.
The more complex a network is, the higher the value of u,
so it can be used as an indicator of the level of development
of a transport system.
$$ u=e-v+p$$
\subsection{Wiener Distance}
The Wiener distance is the sum of all the shortest distances in the network.
$$D_W =\sum_{i=1}^v\sum_{j=1}^i\;D_{ij}$$
where $D$ is the Shortest distance matrix.
\subsection{Mean Distance}
The mean distance of a network is the mean of of the set of shortest paths,
excluding the 0-length paths.
$$\bar{D}=\frac{1}{v}\sum_{i=1}^v\sum_{j=1}^i\;D_{ij}\;\;\; \forall\; D_{ij}\neq0$$
\subsection{Network Diameter}
The diameter of a network is the longest element of the shortest paths set.
\subsection{Length of the Network}
The length of a network is the sum in metric units (e.g., km) of all the edges in the network.
\subsection{Weight of the Network}
The weight of a network is the weight of all nodes in the graph ($W(N)$), which is the summation
of each node's order ($o$) multiplied by 2 for all orders above 1.
$W(N)=$
\subsection{Iota ($\iota$) Index}
The Iota index measures the ratio between the network and its weighed vertices.
It considers the structure, the length and the function
of a network and it is mainly used when data about traffic
is not available.
It divides the length of a network (L(N)) by its weight (W(N)).
The lower its value, the more efficient the network is.
This measure is based on the fact that an intersection
(represented as a node) of a high order is able to handle
large amounts of traffic.
The weight of all nodes in the network (W(N)) is the summation
of each node's order (o) multiplied by 2 for all orders above 1.
$\iota=\dfrac{L(N)}{W(N)}=$
\subsection{Pi ($\Pi$) Index}
The Pi index represents the relationship between the
total length of the network L(N)
and the distance along the diameter D(d).
It is labeled as Pi because of its similarity with the
trigonometric $\Pi$ (3.14), which is expressing the ratio between
the circumference and the diameter of a circle.
A high index shows a developed network. It is a measure
of distance per units of diameter and an indicator of
the shape of a network.
$\Pi=L(N)/D(d)=$
\subsection{Beta ($\beta$) Index}
The Beta index
measures the level of connectivity in a network and is
expressed by the relationship between the number of
edges (e) over the number of nodes (v).
Trees and simple networks have Beta value of less than one.
A connected network with one cycle has a value of 1.
More complex networks have a value greater than 1.
In a network with a fixed number of nodes, the higher the
number of links, the higher the number of paths possible in
the network. Complex networks have a high value of Beta.
$\beta = $
\subsection{Alpha ($\alpha$) Index}
The Alpha index is a measure of connectivity which evaluates
the number of cycles in a network in comparison with the maximum
number of cycles. The higher the alpha index, the more a network
is connected. Trees and simple networks will have a value of 0.
A value of 1 indicates a completely connected network.
Measures the level of connectivity independently of the number of
nodes. It is very rare that a network will have an alpha value of 1,
because this would imply very serious redundancies.
$\alpha=$
\subsection{Gamma ($\Gamma$) Index}
The Gamma index is a A measure of connectivity that considers
the relationship between the number of observed edges and the
number of possible edges.
The value of gamma is between 0 and 1 where a value of 1
indicates a completely connected network and would be extremely
unlikely in reality. Gamma is an efficient value to measure
the progression of a network in time.
$\Gamma=$
\subsection{Site Oriented Statistics}
\begin{description}
\item[Centrality:]Also known as closeness. A measure of global centrality, is the
inverse of the sum of the shortest paths to all other nodes
in the graph.
\item[Degree:]The order (degree) of a node is the number of its attached links
and is a simple, but effective measure of nodal importance.
The higher its value, the more a node is important in a graph
as many links converge to it. Hub nodes have a high order,
while terminal points have an order that can be as low as 1.
A perfect hub would have its order equal to the summation of
all the orders of the other nodes in the graph and a perfect
spoke would have an order of 1.
\item[Theta Index:]Measures the function of a node, that is the average
amount of traffic per intersection. The higher theta is,
the greater the load of the network.
\item[Betweeness:]Is the number of times any node figures in the the shortest path
between any other pair of nodes.
\end{description}
\section{Example}
\ No newline at end of file