From 6a3e30320d253ae26fd9337a72046c531adb49c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20Code=C3=A7o=20Coelho?= Date: Sat, 12 Dec 2020 17:25:43 -0300 Subject: [PATCH] Minor improvements to epipanel Updated installation documentation --- CustomModel.py | 2 +- Epigrass/epimodels.c | 3022 +++++++++++++++----------------- Epigrass/epimodels.py | 366 ++-- Epigrass/epipanel.py | 119 +- Epigrass/manager.py | 2 +- Epigrass/simobj.py | 17 +- demos/CustomModel.py | 2 +- demos/CustomModel_example.py | 2 +- demos/rio.epg | 2 +- demos/spread.gml | 426 +++-- demos/spread.graphml | 420 +++-- demos/spread.json | 2 +- docs/build/html/overview.html | 12 +- docs/build/html/searchindex.js | 2 +- docs/source/analysis.md | 2 - docs/source/index.md | 23 - docs/source/install.md | 207 --- docs/source/intromodels.md | 467 ----- docs/source/overview.md | 265 --- docs/source/overview.rst | 15 +- docs/source/scripting.md | 420 ----- requirements.txt | 3 +- 22 files changed, 2252 insertions(+), 3546 deletions(-) delete mode 100644 docs/source/analysis.md delete mode 100644 docs/source/index.md delete mode 100644 docs/source/install.md delete mode 100644 docs/source/intromodels.md delete mode 100644 docs/source/overview.md delete mode 100644 docs/source/scripting.md diff --git a/CustomModel.py b/CustomModel.py index aa0742b..9f42ec5 100644 --- a/CustomModel.py +++ b/CustomModel.py @@ -28,7 +28,7 @@ def Model(inits, simstep, totpop, theta=0, npass=0, bi={}, bp={}, values=(), mod """ ##### Get state variables' current values - if simstep == 1: # get initial values + if simstep == 0: # get initial values E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) else: # get last value E, I, S = inits diff --git a/Epigrass/epimodels.c b/Epigrass/epimodels.c index 3e89eb2..f465ee7 100644 --- a/Epigrass/epimodels.c +++ b/Epigrass/epimodels.c @@ -1033,27 +1033,27 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) #endif -/* GetItemInt.proto */ -#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ - __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ - (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ - __Pyx_GetItemInt_Generic(o, to_py_func(i)))) -#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ - __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ - (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, - int wraparound, int boundscheck); -#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ - __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ - (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, - int wraparound, int boundscheck); -static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, - int is_list, int wraparound, int boundscheck); +/* PyObjectFormatSimple.proto */ +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#elif PY_MAJOR_VERSION < 3 + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\ + PyObject_Format(s, f)) +#elif CYTHON_USE_TYPE_SLOTS + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_str(s) :\ + likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_str(s) :\ + PyObject_Format(s, f)) +#else + #define __Pyx_PyObject_FormatSimple(s, f) (\ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ + PyObject_Format(s, f)) +#endif /* RaiseTooManyValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); @@ -1090,6 +1090,28 @@ static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { /* BytesEquals.proto */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck); + /* ObjectGetItem.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key); @@ -1103,17 +1125,6 @@ static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* s return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } -/* DictGetItem.proto */ -#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY -static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); -#define __Pyx_PyObject_Dict_GetItem(obj, name)\ - (likely(PyDict_CheckExact(obj)) ?\ - __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) -#else -#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) -#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) -#endif - /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); @@ -1359,7 +1370,7 @@ static const char __pyx_k_S3[] = "S3"; static const char __pyx_k_S4[] = "S4"; static const char __pyx_k_bi[] = "bi"; static const char __pyx_k_bp[] = "bp"; -static const char __pyx_k_ts[] = "{}:ts"; +static const char __pyx_k_ts[] = ":ts"; static const char __pyx_k_Ic1[] = "Ic1"; static const char __pyx_k_Ic2[] = "Ic2"; static const char __pyx_k_Ic3[] = "Ic3"; @@ -1415,6 +1426,7 @@ static const char __pyx_k_self[] = "self"; static const char __pyx_k_step[] = "step"; static const char __pyx_k_test[] = "__test__"; static const char __pyx_k_totc[] = "totc"; +static const char __pyx_k_ts_2[] = "{}:ts"; static const char __pyx_k_utf8[] = "utf8"; static const char __pyx_k_E1pos[] = "E1pos"; static const char __pyx_k_E2pos[] = "E2pos"; @@ -1434,7 +1446,7 @@ static const char __pyx_k_SIR_s[] = "SIR_s"; static const char __pyx_k_SIS_s[] = "SIS_s"; static const char __pyx_k_alpha[] = "alpha"; static const char __pyx_k_delta[] = "delta"; -static const char __pyx_k_inits[] = "{}:inits"; +static const char __pyx_k_inits[] = "inits"; static const char __pyx_k_items[] = "items"; static const char __pyx_k_model[] = "model"; static const char __pyx_k_npass[] = "npass"; @@ -1466,12 +1478,12 @@ static const char __pyx_k_author[] = "__author__"; static const char __pyx_k_format[] = "format"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_kwargs[] = "kwargs"; +static const char __pyx_k_lindex[] = "lindex"; static const char __pyx_k_lrange[] = "lrange"; static const char __pyx_k_migInf[] = "{}:migInf"; static const char __pyx_k_module[] = "__module__"; static const char __pyx_k_negbin[] = "negbin"; static const char __pyx_k_object[] = "object"; -static const char __pyx_k_sinits[] = "sinits"; static const char __pyx_k_totpop[] = "totpop"; static const char __pyx_k_vaccov[] = "vaccov"; static const char __pyx_k_values[] = "values"; @@ -1482,7 +1494,6 @@ static const char __pyx_k_SEIpRpS[] = "SEIpRpS"; static const char __pyx_k_epipath[] = "epipath"; static const char __pyx_k_geocode[] = "geocode"; static const char __pyx_k_hgetall[] = "hgetall"; -static const char __pyx_k_inits_2[] = "inits"; static const char __pyx_k_modtype[] = "modtype"; static const char __pyx_k_npass_2[] = "{}:npass"; static const char __pyx_k_poisson[] = "poisson"; @@ -1742,6 +1753,7 @@ static PyObject *__pyx_n_b_comp_age3; static PyObject *__pyx_n_b_comp_age4; static PyObject *__pyx_n_b_d; static PyObject *__pyx_n_s_d; +static PyObject *__pyx_n_b_delta; static PyObject *__pyx_n_s_delta; static PyObject *__pyx_n_s_dist; static PyObject *__pyx_n_s_doc; @@ -1769,11 +1781,11 @@ static PyObject *__pyx_n_b_incub_age4; static PyObject *__pyx_n_s_inf; static PyObject *__pyx_n_s_infected; static PyObject *__pyx_n_s_init; -static PyObject *__pyx_kp_s_inits; -static PyObject *__pyx_n_s_inits_2; +static PyObject *__pyx_n_s_inits; static PyObject *__pyx_n_s_items; static PyObject *__pyx_n_s_k; static PyObject *__pyx_n_s_kwargs; +static PyObject *__pyx_n_s_lindex; static PyObject *__pyx_n_s_lrange; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_metaclass; @@ -1792,6 +1804,7 @@ static PyObject *__pyx_kp_s_npass_2; static PyObject *__pyx_n_s_numpy; static PyObject *__pyx_n_s_numpy_random; static PyObject *__pyx_n_s_object; +static PyObject *__pyx_n_b_p; static PyObject *__pyx_n_s_p; static PyObject *__pyx_n_s_parallel; static PyObject *__pyx_n_b_pc1; @@ -1822,12 +1835,10 @@ static PyObject *__pyx_n_s_res; static PyObject *__pyx_n_s_results; static PyObject *__pyx_n_s_rpush; static PyObject *__pyx_n_b_s; -static PyObject *__pyx_n_s_s; static PyObject *__pyx_n_s_selectModel; static PyObject *__pyx_n_s_self; static PyObject *__pyx_n_s_set; static PyObject *__pyx_n_s_simstep; -static PyObject *__pyx_n_s_sinits; static PyObject *__pyx_n_s_state; static PyObject *__pyx_n_s_step; static PyObject *__pyx_n_s_stepFlu; @@ -1869,15 +1880,19 @@ static PyObject *__pyx_kp_s_totalcases; static PyObject *__pyx_n_s_totc; static PyObject *__pyx_n_s_totpop; static PyObject *__pyx_kp_s_totpop_2; -static PyObject *__pyx_kp_s_ts; +static PyObject *__pyx_kp_u_ts; +static PyObject *__pyx_kp_s_ts_2; static PyObject *__pyx_n_s_update_redis; static PyObject *__pyx_n_s_utf8; static PyObject *__pyx_n_s_v; +static PyObject *__pyx_n_b_vaccineNow; static PyObject *__pyx_n_s_vaccineNow; +static PyObject *__pyx_n_b_vaccov; static PyObject *__pyx_n_s_vaccov; static PyObject *__pyx_n_s_values; static PyObject *__pyx_kp_s_values_2; static PyObject *__pyx_n_s_vnames; +static PyObject *__pyx_n_b_w; static PyObject *__pyx_n_s_w; static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, long __pyx_v_geocode, PyObject *__pyx_v_modtype, int __pyx_v_parallel); /* proto */ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_2__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */ @@ -2388,7 +2403,6 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY long __pyx_v_totpop; double __pyx_v_theta; double __pyx_v_npass; - PyObject *__pyx_v_sinits = NULL; PyObject *__pyx_v_inits = NULL; PyObject *__pyx_v_bi = NULL; PyObject *__pyx_v_bp = NULL; @@ -2404,10 +2418,10 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; + int __pyx_t_5; PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; - long __pyx_t_8; + long __pyx_t_7; + PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; double __pyx_t_11; @@ -2419,40 +2433,28 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_args_from_redis", 0); - /* "Epigrass/epimodels.py":71 - * Get updated parameters from the redis database. - * """ - * sinits = redisclient.lrange("{}:inits".format(self.geocode), -1, -1) # <<<<<<<<<<<<<< + /* "Epigrass/epimodels.py":73 + * # sinits = redisclient.lindex("{}:inits".format(self.geocode), -1) * # print(sinits) - * inits = eval(sinits[0]) + * inits = eval(redisclient.lindex(f"{self.geocode}:ts", -1)) # <<<<<<<<<<<<<< + * simstep = int(redisclient.get("simstep")) + * totpop = int(float(redisclient.get("{}:totpop".format(self.geocode)))) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_redisclient); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_redisclient); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lrange); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lindex); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_inits, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 71, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_kp_u_ts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; - __pyx_t_7 = 0; + __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { @@ -2460,13 +2462,13 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); - __pyx_t_7 = 1; + __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_2, __pyx_int_neg_1, __pyx_int_neg_1}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error) + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_int_neg_1}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -2474,93 +2476,75 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_2, __pyx_int_neg_1, __pyx_int_neg_1}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error) + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_int_neg_1}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { - __pyx_t_5 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 71, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); - PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_int_neg_1); - __Pyx_INCREF(__pyx_int_neg_1); - __Pyx_GIVEREF(__pyx_int_neg_1); - PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_7, __pyx_int_neg_1); + PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_int_neg_1); __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_sinits = __pyx_t_1; - __pyx_t_1 = 0; - - /* "Epigrass/epimodels.py":73 - * sinits = redisclient.lrange("{}:inits".format(self.geocode), -1, -1) - * # print(sinits) - * inits = eval(sinits[0]) # <<<<<<<<<<<<<< - * simstep = int(redisclient.get("simstep")) - * totpop = int(float(redisclient.get("{}:totpop".format(self.geocode)))) - */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_sinits, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_Globals(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyDict_NewPresized(11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 73, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); if (__pyx_v_bi) { - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_bi, __pyx_v_bi) < 0) __PYX_ERR(0, 73, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_bi, __pyx_v_bi) < 0) __PYX_ERR(0, 73, __pyx_L1_error) } if (__pyx_v_bp) { - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_bp, __pyx_v_bp) < 0) __PYX_ERR(0, 73, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_bp, __pyx_v_bp) < 0) __PYX_ERR(0, 73, __pyx_L1_error) } if (__pyx_v_i) { - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_i, __pyx_v_i) < 0) __PYX_ERR(0, 73, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_i, __pyx_v_i) < 0) __PYX_ERR(0, 73, __pyx_L1_error) } if (__pyx_v_inits) { - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_inits_2, __pyx_v_inits) < 0) __PYX_ERR(0, 73, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_inits, __pyx_v_inits) < 0) __PYX_ERR(0, 73, __pyx_L1_error) } __pyx_t_2 = PyFloat_FromDouble(__pyx_v_npass); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_2) { - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_npass, __pyx_t_2) < 0) __PYX_ERR(0, 73, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_npass, __pyx_t_2) < 0) __PYX_ERR(0, 73, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_v_self) { - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_self, __pyx_v_self) < 0) __PYX_ERR(0, 73, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_self, __pyx_v_self) < 0) __PYX_ERR(0, 73, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_simstep); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_2) { - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_simstep, __pyx_t_2) < 0) __PYX_ERR(0, 73, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_simstep, __pyx_t_2) < 0) __PYX_ERR(0, 73, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__pyx_v_sinits) { - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_sinits, __pyx_v_sinits) < 0) __PYX_ERR(0, 73, __pyx_L1_error) - } __pyx_t_2 = PyFloat_FromDouble(__pyx_v_theta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_2) { - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_theta, __pyx_t_2) < 0) __PYX_ERR(0, 73, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_theta, __pyx_t_2) < 0) __PYX_ERR(0, 73, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_totpop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_2) { - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_totpop, __pyx_t_2) < 0) __PYX_ERR(0, 73, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_totpop, __pyx_t_2) < 0) __PYX_ERR(0, 73, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_v_values) { - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_values, __pyx_v_values) < 0) __PYX_ERR(0, 73, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_values, __pyx_v_values) < 0) __PYX_ERR(0, 73, __pyx_L1_error) } __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -2568,20 +2552,20 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_6); __pyx_t_1 = 0; __pyx_t_3 = 0; - __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 73, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_v_inits = __pyx_t_5; - __pyx_t_5 = 0; + __pyx_v_inits = __pyx_t_6; + __pyx_t_6 = 0; /* "Epigrass/epimodels.py":74 * # print(sinits) - * inits = eval(sinits[0]) + * inits = eval(redisclient.lindex(f"{self.geocode}:ts", -1)) * simstep = int(redisclient.get("simstep")) # <<<<<<<<<<<<<< * totpop = int(float(redisclient.get("{}:totpop".format(self.geocode)))) * theta = int(nan_to_num(float(redisclient.get("{}:theta".format(self.geocode))))) @@ -2601,49 +2585,49 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_n_s_simstep) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s_simstep); + __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_n_s_simstep) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_s_simstep); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 74, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 74, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_simstep = __pyx_t_8; + __pyx_v_simstep = __pyx_t_7; /* "Epigrass/epimodels.py":75 - * inits = eval(sinits[0]) + * inits = eval(redisclient.lindex(f"{self.geocode}:ts", -1)) * simstep = int(redisclient.get("simstep")) * totpop = int(float(redisclient.get("{}:totpop".format(self.geocode)))) # <<<<<<<<<<<<<< * theta = int(nan_to_num(float(redisclient.get("{}:theta".format(self.geocode))))) * npass = int(float(redisclient.get("{}:npass".format(self.geocode)))) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_redisclient); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 75, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_redisclient); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_totpop_2, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = NULL; + __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_6)) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } - __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 75, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -2655,9 +2639,9 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY __Pyx_DECREF_SET(__pyx_t_2, function); } } - __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); + __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -2667,9 +2651,9 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_8 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 75, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_long(__pyx_t_3); if (unlikely((__pyx_t_7 == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_totpop = __pyx_t_8; + __pyx_v_totpop = __pyx_t_7; /* "Epigrass/epimodels.py":76 * simstep = int(redisclient.get("simstep")) @@ -2685,57 +2669,57 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_theta_2, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 76, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_theta_2, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_10)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); + __Pyx_DECREF_SET(__pyx_t_8, function); } } - __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_9); + __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_6)) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 76, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyNumber_Float(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyNumber_Float(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_5)) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -2759,38 +2743,38 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_npass_2, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 77, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_npass_2, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); + __Pyx_DECREF_SET(__pyx_t_6, function); } } - __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -2817,38 +2801,38 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_hgetall); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_bi_2, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 78, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_bi_2, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); + __Pyx_DECREF_SET(__pyx_t_6, function); } } - __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_5)) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } - __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -2868,18 +2852,18 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_bi, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = NULL; + __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -2933,44 +2917,44 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { - __pyx_t_5 = PyList_GET_ITEM(sequence, 0); + __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 79, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 79, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 79, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 79, __pyx_L5_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_14 = Py_TYPE(__pyx_t_6)->tp_iternext; - index = 0; __pyx_t_5 = __pyx_t_14(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L8_unpacking_failed; - __Pyx_GOTREF(__pyx_t_5); - index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L8_unpacking_failed; + __pyx_t_14 = Py_TYPE(__pyx_t_8)->tp_iternext; + index = 0; __pyx_t_6 = __pyx_t_14(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L8_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_8); if (unlikely(!__pyx_t_1)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_6), 2) < 0) __PYX_ERR(0, 79, __pyx_L5_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_8), 2) < 0) __PYX_ERR(0, 79, __pyx_L5_error) __pyx_t_14 = NULL; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L9_unpacking_done; __pyx_L8_unpacking_failed:; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 79, __pyx_L5_error) __pyx_L9_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_k, __pyx_t_5); - __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_k, __pyx_t_6); + __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_v, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyNumber_Float(__pyx_7genexpr__pyx_v_v); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L5_error) @@ -3005,21 +2989,21 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_bp_2, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = NULL; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_6)) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } - __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -3120,36 +3104,36 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); - __pyx_t_5 = PyList_GET_ITEM(sequence, 1); + __pyx_t_6 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 81, __pyx_L13_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L13_error) + __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L13_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 81, __pyx_L13_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_14 = Py_TYPE(__pyx_t_6)->tp_iternext; - index = 0; __pyx_t_1 = __pyx_t_14(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L16_unpacking_failed; + __pyx_t_14 = Py_TYPE(__pyx_t_8)->tp_iternext; + index = 0; __pyx_t_1 = __pyx_t_14(__pyx_t_8); if (unlikely(!__pyx_t_1)) goto __pyx_L16_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); - index = 1; __pyx_t_5 = __pyx_t_14(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L16_unpacking_failed; - __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_6), 2) < 0) __PYX_ERR(0, 81, __pyx_L13_error) + index = 1; __pyx_t_6 = __pyx_t_14(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L16_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_8), 2) < 0) __PYX_ERR(0, 81, __pyx_L13_error) __pyx_t_14 = NULL; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L17_unpacking_done; __pyx_L16_unpacking_failed:; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 81, __pyx_L13_error) @@ -3157,8 +3141,8 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY } __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_k, __pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_v, __pyx_t_5); - __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_v, __pyx_t_6); + __pyx_t_6 = 0; __pyx_t_3 = __Pyx_PyNumber_Float(__pyx_8genexpr1__pyx_v_v); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 81, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_8genexpr1__pyx_v_k, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 81, __pyx_L13_error) @@ -3188,13 +3172,13 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_redisclient); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_lrange); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 82, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_lrange); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_values_2, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1); @@ -3205,92 +3189,92 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY __Pyx_DECREF_SET(__pyx_t_1, function); } } - __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_9, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); + __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; - __pyx_t_7 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + __pyx_t_5 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - __pyx_t_7 = 1; + __Pyx_DECREF_SET(__pyx_t_6, function); + __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { + if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_3, __pyx_int_0, __pyx_int_neg_1}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_t_3, __pyx_int_0, __pyx_int_neg_1}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_1) { - __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL; + __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_5, __pyx_int_0); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); - PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_7, __pyx_int_neg_1); + PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_5, __pyx_int_neg_1); __pyx_t_3 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { - __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_12 = 0; + __pyx_t_6 = __pyx_t_4; __Pyx_INCREF(__pyx_t_6); __pyx_t_12 = 0; __pyx_t_13 = NULL; } else { - __pyx_t_12 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 82, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_13 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_12 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 82, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_13)) { - if (likely(PyList_CheckExact(__pyx_t_5))) { - if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_5)) break; + if (likely(PyList_CheckExact(__pyx_t_6))) { + if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 82, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { - if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 82, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { - __pyx_t_4 = __pyx_t_13(__pyx_t_5); + __pyx_t_4 = __pyx_t_13(__pyx_t_6); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { @@ -3308,7 +3292,7 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_values = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; @@ -3322,12 +3306,12 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_simstep); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_totpop); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_totpop); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyFloat_FromDouble(__pyx_v_theta); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyFloat_FromDouble(__pyx_v_npass); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = PyFloat_FromDouble(__pyx_v_npass); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = PyTuple_New(8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_inits); @@ -3335,12 +3319,12 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_inits); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_8); __Pyx_INCREF(__pyx_v_bi); __Pyx_GIVEREF(__pyx_v_bi); PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_bi); @@ -3351,9 +3335,9 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY __Pyx_GIVEREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_v_values); __pyx_t_2 = 0; - __pyx_t_5 = 0; - __pyx_t_4 = 0; __pyx_t_6 = 0; + __pyx_t_4 = 0; + __pyx_t_8 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; @@ -3372,14 +3356,13 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_4get_args_from_redis(CY __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("Epigrass.epimodels.Epimodel.get_args_from_redis", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_XDECREF(__pyx_v_sinits); __Pyx_XDECREF(__pyx_v_inits); __Pyx_XDECREF(__pyx_v_bi); __Pyx_XDECREF(__pyx_v_bp); @@ -3497,7 +3480,7 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN * # Site state * state, Lpos, migInf = results # <<<<<<<<<<<<<< * # print("Updating redis: ", state, migInf) - * redisclient.rpush("{}:inits".format(self.geocode), str(state)) # updating inits + * # redisclient.rpush("{}:inits".format(self.geocode), str(state)) # updating inits */ if ((likely(PyTuple_CheckExact(__pyx_v_results))) || (PyList_CheckExact(__pyx_v_results))) { PyObject* sequence = __pyx_v_results; @@ -3557,21 +3540,21 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN __pyx_v_migInf = __pyx_t_3; __pyx_t_3 = 0; - /* "Epigrass/epimodels.py":93 - * state, Lpos, migInf = results + /* "Epigrass/epimodels.py":94 * # print("Updating redis: ", state, migInf) - * redisclient.rpush("{}:inits".format(self.geocode), str(state)) # updating inits # <<<<<<<<<<<<<< - * redisclient.rpush('{}:ts'.format(self.geocode), str(state)) + * # redisclient.rpush("{}:inits".format(self.geocode), str(state)) # updating inits + * redisclient.rpush('{}:ts'.format(self.geocode), str(state)) # <<<<<<<<<<<<<< * redisclient.set('{}:Lpos'.format(self.geocode), Lpos) + * totc = int(nan_to_num(float(redisclient.get('{}:totalcases'.format(self.geocode))))) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_redisclient); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_redisclient); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_rpush); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_rpush); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_inits, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_ts_2, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -3586,10 +3569,10 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_state); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_state); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; __pyx_t_8 = 0; @@ -3606,7 +3589,7 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_2, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -3616,7 +3599,7 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_2, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -3624,7 +3607,7 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -3635,28 +3618,28 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "Epigrass/epimodels.py":94 - * # print("Updating redis: ", state, migInf) - * redisclient.rpush("{}:inits".format(self.geocode), str(state)) # updating inits - * redisclient.rpush('{}:ts'.format(self.geocode), str(state)) # <<<<<<<<<<<<<< - * redisclient.set('{}:Lpos'.format(self.geocode), Lpos) + /* "Epigrass/epimodels.py":95 + * # redisclient.rpush("{}:inits".format(self.geocode), str(state)) # updating inits + * redisclient.rpush('{}:ts'.format(self.geocode), str(state)) + * redisclient.set('{}:Lpos'.format(self.geocode), Lpos) # <<<<<<<<<<<<<< * totc = int(nan_to_num(float(redisclient.get('{}:totalcases'.format(self.geocode))))) + * redisclient.set('{}:totalcases'.format(self.geocode), Lpos + totc) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_redisclient); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_redisclient); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_rpush); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_set); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_ts, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Lpos, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -3671,18 +3654,16 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_state); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = NULL; + __pyx_t_4 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_2)) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_8 = 1; @@ -3690,122 +3671,39 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_1, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_1, __pyx_v_Lpos}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_1, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (__pyx_t_2) { - __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL; - } - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_t_4); - __pyx_t_1 = 0; - __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "Epigrass/epimodels.py":95 - * redisclient.rpush("{}:inits".format(self.geocode), str(state)) # updating inits - * redisclient.rpush('{}:ts'.format(self.geocode), str(state)) - * redisclient.set('{}:Lpos'.format(self.geocode), Lpos) # <<<<<<<<<<<<<< - * totc = int(nan_to_num(float(redisclient.get('{}:totalcases'.format(self.geocode))))) - * redisclient.set('{}:totalcases'.format(self.geocode), Lpos + totc) - */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_redisclient); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 95, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_set); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Lpos, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 95, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_2)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_2); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 95, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - __pyx_t_8 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_8 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_7, __pyx_v_Lpos}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error) + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_1, __pyx_v_Lpos}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_7, __pyx_v_Lpos}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else #endif { - __pyx_t_1 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_4) { - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL; + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL; } - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_8, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_8, __pyx_t_1); __Pyx_INCREF(__pyx_v_Lpos); __Pyx_GIVEREF(__pyx_v_Lpos); - PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_8, __pyx_v_Lpos); - __pyx_t_7 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_8, __pyx_v_Lpos); + __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "Epigrass/epimodels.py":96 @@ -3815,73 +3713,73 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN * redisclient.set('{}:totalcases'.format(self.geocode), Lpos + totc) * redisclient.rpush('{}:incidence'.format(self.geocode), Lpos) */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_nan_to_num); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_redisclient); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 96, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_nan_to_num); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_redisclient); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_totalcases, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_totalcases, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_10)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_6, function); } } - __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9); + __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 96, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = NULL; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_2)) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyNumber_Float(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyNumber_Float(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); + __Pyx_DECREF_SET(__pyx_t_7, function); } } - __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 96, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_totc = __pyx_t_6; - __pyx_t_6 = 0; + __pyx_v_totc = __pyx_t_7; + __pyx_t_7 = 0; /* "Epigrass/epimodels.py":97 * redisclient.set('{}:Lpos'.format(self.geocode), Lpos) @@ -3895,35 +3793,35 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_set); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_totalcases, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_totalcases, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 97, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_2)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_2); + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); + __Pyx_DECREF_SET(__pyx_t_2, function); } } - __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_v_Lpos, __pyx_v_totc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = NULL; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyNumber_Add(__pyx_v_Lpos, __pyx_v_totc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_7)) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_8 = 1; @@ -3931,42 +3829,42 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_t_1}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_6); + PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_3, __pyx_t_2}; + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_t_1}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_6); + PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_3, __pyx_t_2}; + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { - __pyx_t_2 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (__pyx_t_7) { - __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); __pyx_t_7 = NULL; + __pyx_t_6 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__pyx_t_1) { + __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_8, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_8, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_t_2); __pyx_t_3 = 0; - __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "Epigrass/epimodels.py":98 * totc = int(nan_to_num(float(redisclient.get('{}:totalcases'.format(self.geocode))))) @@ -3977,64 +3875,64 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_redisclient); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_rpush); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_rpush); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_incidence, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_incidence, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_7); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); + __Pyx_DECREF_SET(__pyx_t_2, function); } } - __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = NULL; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; __pyx_t_8 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_1); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_4, __pyx_v_Lpos}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_6); + if (PyFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_4, __pyx_v_Lpos}; + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_4, __pyx_v_Lpos}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_4, __pyx_v_Lpos}; + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_3 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__pyx_t_1) { - __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL; + if (__pyx_t_2) { + __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_8, __pyx_t_4); @@ -4042,12 +3940,12 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN __Pyx_GIVEREF(__pyx_v_Lpos); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_8, __pyx_v_Lpos); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "Epigrass/epimodels.py":99 * redisclient.set('{}:totalcases'.format(self.geocode), Lpos + totc) @@ -4056,30 +3954,30 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN * * # Graph state */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_redisclient); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_redisclient); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_migInf, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = NULL; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_7)) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } - } - __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + } + __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; __pyx_t_8 = 0; @@ -4095,40 +3993,40 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_migInf}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error) + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_6, __pyx_v_migInf}; + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_migInf}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error) + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_6, __pyx_v_migInf}; + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { - __pyx_t_1 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_4) { - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL; + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL; } - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_8, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_v_migInf); __Pyx_GIVEREF(__pyx_v_migInf); - PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_8, __pyx_v_migInf); - __pyx_t_2 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_8, __pyx_v_migInf); + __pyx_t_6 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 99, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "Epigrass/epimodels.py":102 * @@ -4137,9 +4035,9 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN * infected = int(redisclient.get("simstep")) * redisclient.rpush("epipath", str((infected, self.geocode, {}))) # TODO: replace empty dict with infectors */ - __pyx_t_6 = PyObject_RichCompare(__pyx_v_Lpos, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 102, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 102, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = PyObject_RichCompare(__pyx_v_Lpos, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 102, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_11) { /* "Epigrass/epimodels.py":103 @@ -4151,29 +4049,29 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_redisclient); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); + __Pyx_DECREF_SET(__pyx_t_2, function); } } - __pyx_t_6 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_n_s_simstep) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_n_s_simstep); + __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_s_simstep) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_s_simstep); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 103, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_infected = __pyx_t_1; - __pyx_t_1 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_infected = __pyx_t_2; + __pyx_t_2 = 0; /* "Epigrass/epimodels.py":104 * if Lpos > 0: @@ -4182,28 +4080,28 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN * # self.parentGraph.epipath.append((self.parentGraph.simstep, self.geocode, self.infector)) * # TODO: have infector be stated in terms of geocodes */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_redisclient); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 104, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_rpush); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_redisclient); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_rpush); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_geocode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_infected); __Pyx_GIVEREF(__pyx_v_infected); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_infected); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_6); + __pyx_t_7 = 0; __pyx_t_6 = 0; - __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; __pyx_t_8 = 0; @@ -4219,40 +4117,40 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8Epimodel_6update_redis(CYTHON_UN } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_epipath, __pyx_t_2}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_epipath, __pyx_t_6}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_epipath, __pyx_t_2}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_epipath, __pyx_t_6}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 104, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_4) { - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_n_s_epipath); __Pyx_GIVEREF(__pyx_n_s_epipath); - PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_n_s_epipath); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_n_s_epipath); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "Epigrass/epimodels.py":102 * @@ -5085,7 +4983,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_3stepFlu(PyObject *__pyx_self, Py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stepFlu (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits_2,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); @@ -5119,7 +5017,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_3stepFlu(PyObject *__pyx_self, Py kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits_2)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -5340,19 +5238,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_2stepFlu(CYTHON_UNUSED PyObject * /* "Epigrass/epimodels.py":181 * 'Susc_age3', 'Incub_age3', 'Subc_age3', 'Sympt_age3', 'Comp_age3', * 'Susc_age4', 'Incub_age4', 'Subc_age4', 'Sympt_age4', 'Comp_age4',) - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< * S1, E1, Is1, Ic1, Ig1 = ( - * bi[b'susc_age1'], bi[b'incub_age1'], bi[b'subc_age1'], bi[b'sympt_age1'], bi[b'comp_age1']) + * bi[b'susc_age1'], bi[b'incub_age1'], bi[b'subc_age1'], bi[b'sympt_age1'], bi[b'comp_age1']) */ - __pyx_t_1 = ((__pyx_v_simstep == 1) != 0); + __pyx_t_1 = ((__pyx_v_simstep == 0) != 0); if (__pyx_t_1) { /* "Epigrass/epimodels.py":183 - * if simstep == 1: # get initial values + * if simstep == 0: # get initial values * S1, E1, Is1, Ic1, Ig1 = ( - * bi[b'susc_age1'], bi[b'incub_age1'], bi[b'subc_age1'], bi[b'sympt_age1'], bi[b'comp_age1']) # <<<<<<<<<<<<<< + * bi[b'susc_age1'], bi[b'incub_age1'], bi[b'subc_age1'], bi[b'sympt_age1'], bi[b'comp_age1']) # <<<<<<<<<<<<<< * S2, E2, Is2, Ic2, Ig2 = ( - * bi[b'susc_age2'], bi[b'incub_age2'], bi[b'subc_age2'], bi[b'sympt_age2'], bi[b'comp_age2']) + * bi[b'susc_age2'], bi[b'incub_age2'], bi[b'subc_age2'], bi[b'sympt_age2'], bi[b'comp_age2']) */ __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_susc_age1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -5376,11 +5274,11 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_2stepFlu(CYTHON_UNUSED PyObject * __pyx_t_6 = 0; /* "Epigrass/epimodels.py":185 - * bi[b'susc_age1'], bi[b'incub_age1'], bi[b'subc_age1'], bi[b'sympt_age1'], bi[b'comp_age1']) + * bi[b'susc_age1'], bi[b'incub_age1'], bi[b'subc_age1'], bi[b'sympt_age1'], bi[b'comp_age1']) * S2, E2, Is2, Ic2, Ig2 = ( - * bi[b'susc_age2'], bi[b'incub_age2'], bi[b'subc_age2'], bi[b'sympt_age2'], bi[b'comp_age2']) # <<<<<<<<<<<<<< + * bi[b'susc_age2'], bi[b'incub_age2'], bi[b'subc_age2'], bi[b'sympt_age2'], bi[b'comp_age2']) # <<<<<<<<<<<<<< * S3, E3, Is3, Ic3, Ig3 = ( - * bi[b'susc_age3'], bi[b'incub_age3'], bi[b'subc_age3'], bi[b'sympt_age3'], bi[b'comp_age3']) + * bi[b'susc_age3'], bi[b'incub_age3'], bi[b'subc_age3'], bi[b'sympt_age3'], bi[b'comp_age3']) */ __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_susc_age2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -5404,11 +5302,11 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_2stepFlu(CYTHON_UNUSED PyObject * __pyx_t_2 = 0; /* "Epigrass/epimodels.py":187 - * bi[b'susc_age2'], bi[b'incub_age2'], bi[b'subc_age2'], bi[b'sympt_age2'], bi[b'comp_age2']) + * bi[b'susc_age2'], bi[b'incub_age2'], bi[b'subc_age2'], bi[b'sympt_age2'], bi[b'comp_age2']) * S3, E3, Is3, Ic3, Ig3 = ( - * bi[b'susc_age3'], bi[b'incub_age3'], bi[b'subc_age3'], bi[b'sympt_age3'], bi[b'comp_age3']) # <<<<<<<<<<<<<< + * bi[b'susc_age3'], bi[b'incub_age3'], bi[b'subc_age3'], bi[b'sympt_age3'], bi[b'comp_age3']) # <<<<<<<<<<<<<< * S4, E4, Is4, Ic4, Ig4 = ( - * bi[b'susc_age4'], bi[b'incub_age4'], bi[b'subc_age4'], bi[b'sympt_age4'], bi[b'comp_age4']) + * bi[b'susc_age4'], bi[b'incub_age4'], bi[b'subc_age4'], bi[b'sympt_age4'], bi[b'comp_age4']) */ __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_susc_age3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -5432,9 +5330,9 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_2stepFlu(CYTHON_UNUSED PyObject * __pyx_t_6 = 0; /* "Epigrass/epimodels.py":189 - * bi[b'susc_age3'], bi[b'incub_age3'], bi[b'subc_age3'], bi[b'sympt_age3'], bi[b'comp_age3']) + * bi[b'susc_age3'], bi[b'incub_age3'], bi[b'subc_age3'], bi[b'sympt_age3'], bi[b'comp_age3']) * S4, E4, Is4, Ic4, Ig4 = ( - * bi[b'susc_age4'], bi[b'incub_age4'], bi[b'subc_age4'], bi[b'sympt_age4'], bi[b'comp_age4']) # <<<<<<<<<<<<<< + * bi[b'susc_age4'], bi[b'incub_age4'], bi[b'subc_age4'], bi[b'sympt_age4'], bi[b'comp_age4']) # <<<<<<<<<<<<<< * else: # get values from last time step * # print(len(inits)) */ @@ -5462,9 +5360,9 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_2stepFlu(CYTHON_UNUSED PyObject * /* "Epigrass/epimodels.py":181 * 'Susc_age3', 'Incub_age3', 'Subc_age3', 'Sympt_age3', 'Comp_age3', * 'Susc_age4', 'Incub_age4', 'Subc_age4', 'Sympt_age4', 'Comp_age4',) - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< * S1, E1, Is1, Ic1, Ig1 = ( - * bi[b'susc_age1'], bi[b'incub_age1'], bi[b'subc_age1'], bi[b'sympt_age1'], bi[b'comp_age1']) + * bi[b'susc_age1'], bi[b'incub_age1'], bi[b'subc_age1'], bi[b'sympt_age1'], bi[b'comp_age1']) */ goto __pyx_L3; } @@ -5834,8 +5732,8 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_2stepFlu(CYTHON_UNUSED PyObject * * # Vacination event * * if 'vaccineNow' in bp: # TODO: add to bp when creating model # <<<<<<<<<<<<<< - * vaccineNow = bp['vaccineNow'] - * vaccov = bp['vaccov'] + * vaccineNow = bp[b'vaccineNow'] + * vaccov = bp[b'vaccov'] */ __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_vaccineNow, __pyx_v_bp, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 216, __pyx_L1_error) __pyx_t_25 = (__pyx_t_1 != 0); @@ -5844,30 +5742,30 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_2stepFlu(CYTHON_UNUSED PyObject * /* "Epigrass/epimodels.py":217 * * if 'vaccineNow' in bp: # TODO: add to bp when creating model - * vaccineNow = bp['vaccineNow'] # <<<<<<<<<<<<<< - * vaccov = bp['vaccov'] + * vaccineNow = bp[b'vaccineNow'] # <<<<<<<<<<<<<< + * vaccov = bp[b'vaccov'] * S1 -= vaccov * S1 */ - __pyx_t_21 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_vaccineNow); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 217, __pyx_L1_error) + __pyx_t_21 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_vaccineNow); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_21); __pyx_v_vaccineNow = __pyx_t_21; __pyx_t_21 = 0; /* "Epigrass/epimodels.py":218 * if 'vaccineNow' in bp: # TODO: add to bp when creating model - * vaccineNow = bp['vaccineNow'] - * vaccov = bp['vaccov'] # <<<<<<<<<<<<<< + * vaccineNow = bp[b'vaccineNow'] + * vaccov = bp[b'vaccov'] # <<<<<<<<<<<<<< * S1 -= vaccov * S1 * S2 -= vaccov * S2 */ - __pyx_t_21 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_vaccov); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 218, __pyx_L1_error) + __pyx_t_21 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_vaccov); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_21); __pyx_v_vaccov = __pyx_t_21; __pyx_t_21 = 0; /* "Epigrass/epimodels.py":219 - * vaccineNow = bp['vaccineNow'] - * vaccov = bp['vaccov'] + * vaccineNow = bp[b'vaccineNow'] + * vaccov = bp[b'vaccov'] * S1 -= vaccov * S1 # <<<<<<<<<<<<<< * S2 -= vaccov * S2 * S3 -= vaccov * S3 @@ -5881,7 +5779,7 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_2stepFlu(CYTHON_UNUSED PyObject * __pyx_t_20 = 0; /* "Epigrass/epimodels.py":220 - * vaccov = bp['vaccov'] + * vaccov = bp[b'vaccov'] * S1 -= vaccov * S1 * S2 -= vaccov * S2 # <<<<<<<<<<<<<< * S3 -= vaccov * S3 @@ -5929,8 +5827,8 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_2stepFlu(CYTHON_UNUSED PyObject * * # Vacination event * * if 'vaccineNow' in bp: # TODO: add to bp when creating model # <<<<<<<<<<<<<< - * vaccineNow = bp['vaccineNow'] - * vaccov = bp['vaccov'] + * vaccineNow = bp[b'vaccineNow'] + * vaccov = bp[b'vaccov'] */ } @@ -6957,7 +6855,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_5stepSIS(PyObject *__pyx_self, Py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stepSIS (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits_2,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); @@ -6991,7 +6889,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_5stepSIS(PyObject *__pyx_self, Py kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits_2)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -7131,29 +7029,29 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_4stepSIS(CYTHON_UNUSED PyObject * /* "Epigrass/epimodels.py":291 * :return: * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ - __pyx_t_1 = ((__pyx_v_simstep == 1) != 0); + __pyx_t_1 = ((__pyx_v_simstep == 0) != 0); if (__pyx_t_1) { /* "Epigrass/epimodels.py":292 * """ - * if simstep == 1: # get initial values - * E, I, S = (bi['e'], bi['i'], bi['s']) # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) # <<<<<<<<<<<<<< * else: * E, I, S = inits */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 292, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 292, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 292, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -7164,15 +7062,15 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_4stepSIS(CYTHON_UNUSED PyObject * /* "Epigrass/epimodels.py":291 * :return: * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ goto __pyx_L3; } /* "Epigrass/epimodels.py":294 - * E, I, S = (bi['e'], bi['i'], bi['s']) + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: * E, I, S = inits # <<<<<<<<<<<<<< * N = totpop @@ -7247,18 +7145,18 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_4stepSIS(CYTHON_UNUSED PyObject * * E, I, S = inits * N = totpop # <<<<<<<<<<<<<< * - * beta = bp['beta']; + * beta = bp[b'beta']; */ __pyx_v_N = __pyx_v_totpop; /* "Epigrass/epimodels.py":297 * N = totpop * - * beta = bp['beta']; # <<<<<<<<<<<<<< - * alpha = bp['alpha']; - * r = bp['r']; + * beta = bp[b'beta']; # <<<<<<<<<<<<<< + * alpha = bp[b'alpha']; + * r = bp[b'r']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 297, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -7266,45 +7164,45 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_4stepSIS(CYTHON_UNUSED PyObject * /* "Epigrass/epimodels.py":298 * - * beta = bp['beta']; - * alpha = bp['alpha']; # <<<<<<<<<<<<<< - * r = bp['r']; - * b = bp['b'] + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; # <<<<<<<<<<<<<< + * r = bp[b'r']; + * b = bp[b'b'] */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_alpha = __pyx_t_3; /* "Epigrass/epimodels.py":299 - * beta = bp['beta']; - * alpha = bp['alpha']; - * r = bp['r']; # <<<<<<<<<<<<<< - * b = bp['b'] + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; + * r = bp[b'r']; # <<<<<<<<<<<<<< + * b = bp[b'b'] * */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 299, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_r = __pyx_t_3; /* "Epigrass/epimodels.py":300 - * alpha = bp['alpha']; - * r = bp['r']; - * b = bp['b'] # <<<<<<<<<<<<<< + * alpha = bp[b'alpha']; + * r = bp[b'r']; + * b = bp[b'b'] # <<<<<<<<<<<<<< * * Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_b = __pyx_t_3; /* "Epigrass/epimodels.py":302 - * b = bp['b'] + * b = bp[b'b'] * * Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # <<<<<<<<<<<<<< * # Model @@ -7439,7 +7337,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_7stepSIS_s(PyObject *__pyx_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stepSIS_s (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits_2,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,&__pyx_n_s_dist,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,&__pyx_n_s_dist,0}; PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0}; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); @@ -7476,7 +7374,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_7stepSIS_s(PyObject *__pyx_self, kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits_2)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -7630,29 +7528,29 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_6stepSIS_s(CYTHON_UNUSED PyObject /* "Epigrass/epimodels.py":322 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ - __pyx_t_1 = ((__pyx_v_simstep == 1) != 0); + __pyx_t_1 = ((__pyx_v_simstep == 0) != 0); if (__pyx_t_1) { /* "Epigrass/epimodels.py":323 * """ - * if simstep == 1: # get initial values - * E, I, S = (bi['e'], bi['i'], bi['s']) # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) # <<<<<<<<<<<<<< * else: * E, I, S = inits */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -7663,15 +7561,15 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_6stepSIS_s(CYTHON_UNUSED PyObject /* "Epigrass/epimodels.py":322 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ goto __pyx_L3; } /* "Epigrass/epimodels.py":325 - * E, I, S = (bi['e'], bi['i'], bi['s']) + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: * E, I, S = inits # <<<<<<<<<<<<<< * @@ -7745,19 +7643,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_6stepSIS_s(CYTHON_UNUSED PyObject * E, I, S = inits * * N = totpop # <<<<<<<<<<<<<< - * beta = bp['beta']; - * alpha = bp['alpha']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; */ __pyx_v_N = __pyx_v_totpop; /* "Epigrass/epimodels.py":328 * * N = totpop - * beta = bp['beta']; # <<<<<<<<<<<<<< - * alpha = bp['alpha']; - * # e = bp['e']; + * beta = bp[b'beta']; # <<<<<<<<<<<<<< + * alpha = bp[b'alpha']; + * # e = bp[b'e']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 328, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -7765,46 +7663,46 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_6stepSIS_s(CYTHON_UNUSED PyObject /* "Epigrass/epimodels.py":329 * N = totpop - * beta = bp['beta']; - * alpha = bp['alpha']; # <<<<<<<<<<<<<< - * # e = bp['e']; - * r = bp['r']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; # <<<<<<<<<<<<<< + * # e = bp[b'e']; + * r = bp[b'r']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_alpha = __pyx_t_3; /* "Epigrass/epimodels.py":331 - * alpha = bp['alpha']; - * # e = bp['e']; - * r = bp['r']; # <<<<<<<<<<<<<< - * # delta = bp['delta']; - * b = bp['b']; + * alpha = bp[b'alpha']; + * # e = bp[b'e']; + * r = bp[b'r']; # <<<<<<<<<<<<<< + * # delta = bp[b'delta']; + * b = bp[b'b']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 331, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 331, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_r = __pyx_t_3; /* "Epigrass/epimodels.py":333 - * r = bp['r']; - * # delta = bp['delta']; - * b = bp['b']; # <<<<<<<<<<<<<< - * # w = bp['w']; - * # p = bp['p'] + * r = bp[b'r']; + * # delta = bp[b'delta']; + * b = bp[b'b']; # <<<<<<<<<<<<<< + * # w = bp[b'w']; + * # p = bp[b'p'] */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 333, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_b = __pyx_t_3; /* "Epigrass/epimodels.py":336 - * # w = bp['w']; - * # p = bp['p'] + * # w = bp[b'w']; + * # p = bp[b'p'] * Lpos_esp = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # <<<<<<<<<<<<<< * * if dist == 'poisson': @@ -8071,7 +7969,7 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_6stepSIS_s(CYTHON_UNUSED PyObject /* Python wrapper */ static PyObject *__pyx_pw_8Epigrass_9epimodels_9stepSIR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_8Epigrass_9epimodels_8stepSIR[] = "\n calculates the model SIR, and return its values (no demographics)\n - inits = (E,I,S)\n - theta = infectious individuals from neighbor sites\n "; +static char __pyx_doc_8Epigrass_9epimodels_8stepSIR[] = "\n calculates the model SIR, and return its values (no demographics)\n - inits = current state (E,I,S)\n - theta = infectious individuals from neighbor sites\n "; static PyMethodDef __pyx_mdef_8Epigrass_9epimodels_9stepSIR = {"stepSIR", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8Epigrass_9epimodels_9stepSIR, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8Epigrass_9epimodels_8stepSIR}; static PyObject *__pyx_pw_8Epigrass_9epimodels_9stepSIR(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_inits = 0; @@ -8090,7 +7988,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_9stepSIR(PyObject *__pyx_self, Py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stepSIR (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits_2,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); @@ -8124,7 +8022,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_9stepSIR(PyObject *__pyx_self, Py kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits_2)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -8265,16 +8163,16 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8stepSIR(CYTHON_UNUSED PyObject * /* "Epigrass/epimodels.py":365 * """ * # print(inits) - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< * E, I, S = (bi.get(b'e', 0), bi[b'i'], bi[b's']) * else: */ - __pyx_t_1 = ((__pyx_v_simstep == 1) != 0); + __pyx_t_1 = ((__pyx_v_simstep == 0) != 0); if (__pyx_t_1) { /* "Epigrass/epimodels.py":366 * # print(inits) - * if simstep == 1: # get initial values + * if simstep == 0: # get initial values * E, I, S = (bi.get(b'e', 0), bi[b'i'], bi[b's']) # <<<<<<<<<<<<<< * else: * E, I, S = inits @@ -8301,7 +8199,7 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8stepSIR(CYTHON_UNUSED PyObject * /* "Epigrass/epimodels.py":365 * """ * # print(inits) - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< * E, I, S = (bi.get(b'e', 0), bi[b'i'], bi[b's']) * else: */ @@ -8393,7 +8291,7 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8stepSIR(CYTHON_UNUSED PyObject * * N = totpop * beta = bp[b'beta']; # <<<<<<<<<<<<<< * alpha = bp[b'alpha']; - * # e = bp['e']; + * # e = bp[b'e']; */ __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -8405,7 +8303,7 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8stepSIR(CYTHON_UNUSED PyObject * * N = totpop * beta = bp[b'beta']; * alpha = bp[b'alpha']; # <<<<<<<<<<<<<< - * # e = bp['e']; + * # e = bp[b'e']; * r = bp[b'r']; */ __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 371, __pyx_L1_error) @@ -8416,9 +8314,9 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8stepSIR(CYTHON_UNUSED PyObject * /* "Epigrass/epimodels.py":373 * alpha = bp[b'alpha']; - * # e = bp['e']; + * # e = bp[b'e']; * r = bp[b'r']; # <<<<<<<<<<<<<< - * # delta = bp['delta']; + * # delta = bp[b'delta']; * b = bp[b'b']; */ __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 373, __pyx_L1_error) @@ -8429,10 +8327,10 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8stepSIR(CYTHON_UNUSED PyObject * /* "Epigrass/epimodels.py":375 * r = bp[b'r']; - * # delta = bp['delta']; + * # delta = bp[b'delta']; * b = bp[b'b']; # <<<<<<<<<<<<<< - * # w = bp['w']; - * # p = bp['p'] + * # w = bp[b'w']; + * # p = bp[b'p'] */ __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -8441,8 +8339,8 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_8stepSIR(CYTHON_UNUSED PyObject * __pyx_v_b = __pyx_t_4; /* "Epigrass/epimodels.py":378 - * # w = bp['w']; - * # p = bp['p'] + * # w = bp[b'w']; + * # p = bp[b'p'] * Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # <<<<<<<<<<<<<< * * # Model @@ -8585,7 +8483,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_11stepSIR_s(PyObject *__pyx_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stepSIR_s (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits_2,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,&__pyx_n_s_dist,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,&__pyx_n_s_dist,0}; PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0}; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); @@ -8622,7 +8520,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_11stepSIR_s(PyObject *__pyx_self, kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits_2)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -8777,29 +8675,29 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_10stepSIR_s(CYTHON_UNUSED PyObjec /* "Epigrass/epimodels.py":401 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ - __pyx_t_1 = ((__pyx_v_simstep == 1) != 0); + __pyx_t_1 = ((__pyx_v_simstep == 0) != 0); if (__pyx_t_1) { /* "Epigrass/epimodels.py":402 * """ - * if simstep == 1: # get initial values - * E, I, S = (bi['e'], bi['i'], bi['s']) # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) # <<<<<<<<<<<<<< * else: * E, I, S = inits */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -8810,19 +8708,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_10stepSIR_s(CYTHON_UNUSED PyObjec /* "Epigrass/epimodels.py":401 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ goto __pyx_L3; } /* "Epigrass/epimodels.py":404 - * E, I, S = (bi['e'], bi['i'], bi['s']) + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: * E, I, S = inits # <<<<<<<<<<<<<< * N = totpop - * beta = bp['beta']; + * beta = bp[b'beta']; */ /*else*/ { if ((likely(PyTuple_CheckExact(__pyx_v_inits))) || (PyList_CheckExact(__pyx_v_inits))) { @@ -8892,19 +8790,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_10stepSIR_s(CYTHON_UNUSED PyObjec * else: * E, I, S = inits * N = totpop # <<<<<<<<<<<<<< - * beta = bp['beta']; - * alpha = bp['alpha']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; */ __pyx_v_N = __pyx_v_totpop; /* "Epigrass/epimodels.py":406 * E, I, S = inits * N = totpop - * beta = bp['beta']; # <<<<<<<<<<<<<< - * alpha = bp['alpha']; - * # e = bp['e']; + * beta = bp[b'beta']; # <<<<<<<<<<<<<< + * alpha = bp[b'alpha']; + * # e = bp[b'e']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 406, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 406, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -8912,46 +8810,46 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_10stepSIR_s(CYTHON_UNUSED PyObjec /* "Epigrass/epimodels.py":407 * N = totpop - * beta = bp['beta']; - * alpha = bp['alpha']; # <<<<<<<<<<<<<< - * # e = bp['e']; - * r = bp['r']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; # <<<<<<<<<<<<<< + * # e = bp[b'e']; + * r = bp[b'r']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 407, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 407, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_alpha = __pyx_t_3; /* "Epigrass/epimodels.py":409 - * alpha = bp['alpha']; - * # e = bp['e']; - * r = bp['r']; # <<<<<<<<<<<<<< - * # delta = bp['delta']; - * b = bp['b']; + * alpha = bp[b'alpha']; + * # e = bp[b'e']; + * r = bp[b'r']; # <<<<<<<<<<<<<< + * # delta = bp[b'delta']; + * b = bp[b'b']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 409, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_r = __pyx_t_3; /* "Epigrass/epimodels.py":411 - * r = bp['r']; - * # delta = bp['delta']; - * b = bp['b']; # <<<<<<<<<<<<<< - * # w = bp['w']; - * # p = bp['p'] + * r = bp[b'r']; + * # delta = bp[b'delta']; + * b = bp[b'b']; # <<<<<<<<<<<<<< + * # w = bp[b'w']; + * # p = bp[b'p'] */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 411, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_b = __pyx_t_3; /* "Epigrass/epimodels.py":414 - * # w = bp['w']; - * # p = bp['p'] + * # w = bp[b'w']; + * # p = bp[b'p'] * Lpos_esp = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # <<<<<<<<<<<<<< * * if dist == 'poisson': @@ -9246,7 +9144,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_13stepSEIS(PyObject *__pyx_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stepSEIS (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits_2,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); @@ -9280,7 +9178,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_13stepSEIS(PyObject *__pyx_self, kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits_2)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -9422,29 +9320,29 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_12stepSEIS(CYTHON_UNUSED PyObject /* "Epigrass/epimodels.py":443 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ - __pyx_t_1 = ((__pyx_v_simstep == 1) != 0); + __pyx_t_1 = ((__pyx_v_simstep == 0) != 0); if (__pyx_t_1) { /* "Epigrass/epimodels.py":444 * """ - * if simstep == 1: # get initial values - * E, I, S = (bi['e'], bi['i'], bi['s']) # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) # <<<<<<<<<<<<<< * else: * E, I, S = inits */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -9455,19 +9353,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_12stepSEIS(CYTHON_UNUSED PyObject /* "Epigrass/epimodels.py":443 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ goto __pyx_L3; } /* "Epigrass/epimodels.py":446 - * E, I, S = (bi['e'], bi['i'], bi['s']) + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: * E, I, S = inits # <<<<<<<<<<<<<< * N = totpop - * beta = bp['beta']; + * beta = bp[b'beta']; */ /*else*/ { if ((likely(PyTuple_CheckExact(__pyx_v_inits))) || (PyList_CheckExact(__pyx_v_inits))) { @@ -9537,19 +9435,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_12stepSEIS(CYTHON_UNUSED PyObject * else: * E, I, S = inits * N = totpop # <<<<<<<<<<<<<< - * beta = bp['beta']; - * alpha = bp['alpha']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; */ __pyx_v_N = __pyx_v_totpop; /* "Epigrass/epimodels.py":448 * E, I, S = inits * N = totpop - * beta = bp['beta']; # <<<<<<<<<<<<<< - * alpha = bp['alpha']; - * e = bp['e']; + * beta = bp[b'beta']; # <<<<<<<<<<<<<< + * alpha = bp[b'alpha']; + * e = bp[b'e']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 448, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 448, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -9557,58 +9455,58 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_12stepSEIS(CYTHON_UNUSED PyObject /* "Epigrass/epimodels.py":449 * N = totpop - * beta = bp['beta']; - * alpha = bp['alpha']; # <<<<<<<<<<<<<< - * e = bp['e']; - * r = bp['r']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; # <<<<<<<<<<<<<< + * e = bp[b'e']; + * r = bp[b'r']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 449, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 449, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_alpha = __pyx_t_3; /* "Epigrass/epimodels.py":450 - * beta = bp['beta']; - * alpha = bp['alpha']; - * e = bp['e']; # <<<<<<<<<<<<<< - * r = bp['r']; - * # delta = bp['delta']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; + * e = bp[b'e']; # <<<<<<<<<<<<<< + * r = bp[b'r']; + * # delta = bp[b'delta']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_e); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 450, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_e); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_e = __pyx_t_7; __pyx_t_7 = 0; /* "Epigrass/epimodels.py":451 - * alpha = bp['alpha']; - * e = bp['e']; - * r = bp['r']; # <<<<<<<<<<<<<< - * # delta = bp['delta']; - * b = bp['b']; + * alpha = bp[b'alpha']; + * e = bp[b'e']; + * r = bp[b'r']; # <<<<<<<<<<<<<< + * # delta = bp[b'delta']; + * b = bp[b'b']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 451, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_r = __pyx_t_3; /* "Epigrass/epimodels.py":453 - * r = bp['r']; - * # delta = bp['delta']; - * b = bp['b']; # <<<<<<<<<<<<<< - * # w = bp['w']; - * # p = bp['p'] + * r = bp[b'r']; + * # delta = bp[b'delta']; + * b = bp[b'b']; # <<<<<<<<<<<<<< + * # w = bp[b'w']; + * # p = bp[b'p'] */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 453, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_b = __pyx_t_3; /* "Epigrass/epimodels.py":456 - * # w = bp['w']; - * # p = bp['p'] + * # w = bp[b'w']; + * # p = bp[b'p'] * Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # <<<<<<<<<<<<<< * * # Model @@ -9781,7 +9679,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_15stepSEIS_s(PyObject *__pyx_self __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stepSEIS_s (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits_2,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,&__pyx_n_s_dist,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,&__pyx_n_s_dist,0}; PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0}; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); @@ -9818,7 +9716,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_15stepSEIS_s(PyObject *__pyx_self kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits_2)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -9974,29 +9872,29 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_14stepSEIS_s(CYTHON_UNUSED PyObje /* "Epigrass/epimodels.py":480 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ - __pyx_t_1 = ((__pyx_v_simstep == 1) != 0); + __pyx_t_1 = ((__pyx_v_simstep == 0) != 0); if (__pyx_t_1) { /* "Epigrass/epimodels.py":481 * """ - * if simstep == 1: # get initial values - * E, I, S = (bi['e'], bi['i'], bi['s']) # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) # <<<<<<<<<<<<<< * else: * E, I, S = inits */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 481, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 481, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 481, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -10007,19 +9905,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_14stepSEIS_s(CYTHON_UNUSED PyObje /* "Epigrass/epimodels.py":480 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ goto __pyx_L3; } /* "Epigrass/epimodels.py":483 - * E, I, S = (bi['e'], bi['i'], bi['s']) + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: * E, I, S = inits # <<<<<<<<<<<<<< * N = totpop - * beta = bp['beta']; + * beta = bp[b'beta']; */ /*else*/ { if ((likely(PyTuple_CheckExact(__pyx_v_inits))) || (PyList_CheckExact(__pyx_v_inits))) { @@ -10089,19 +9987,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_14stepSEIS_s(CYTHON_UNUSED PyObje * else: * E, I, S = inits * N = totpop # <<<<<<<<<<<<<< - * beta = bp['beta']; - * alpha = bp['alpha']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; */ __pyx_v_N = __pyx_v_totpop; /* "Epigrass/epimodels.py":485 * E, I, S = inits * N = totpop - * beta = bp['beta']; # <<<<<<<<<<<<<< - * alpha = bp['alpha']; - * e = bp['e']; + * beta = bp[b'beta']; # <<<<<<<<<<<<<< + * alpha = bp[b'alpha']; + * e = bp[b'e']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 485, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -10109,58 +10007,58 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_14stepSEIS_s(CYTHON_UNUSED PyObje /* "Epigrass/epimodels.py":486 * N = totpop - * beta = bp['beta']; - * alpha = bp['alpha']; # <<<<<<<<<<<<<< - * e = bp['e']; - * r = bp['r']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; # <<<<<<<<<<<<<< + * e = bp[b'e']; + * r = bp[b'r']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 486, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_alpha = __pyx_t_3; /* "Epigrass/epimodels.py":487 - * beta = bp['beta']; - * alpha = bp['alpha']; - * e = bp['e']; # <<<<<<<<<<<<<< - * r = bp['r']; - * # delta = bp['delta']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; + * e = bp[b'e']; # <<<<<<<<<<<<<< + * r = bp[b'r']; + * # delta = bp[b'delta']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_e); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 487, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_e); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_e = __pyx_t_7; __pyx_t_7 = 0; /* "Epigrass/epimodels.py":488 - * alpha = bp['alpha']; - * e = bp['e']; - * r = bp['r']; # <<<<<<<<<<<<<< - * # delta = bp['delta']; - * b = bp['b']; + * alpha = bp[b'alpha']; + * e = bp[b'e']; + * r = bp[b'r']; # <<<<<<<<<<<<<< + * # delta = bp[b'delta']; + * b = bp[b'b']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 488, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 488, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_r = __pyx_t_3; /* "Epigrass/epimodels.py":490 - * r = bp['r']; - * # delta = bp['delta']; - * b = bp['b']; # <<<<<<<<<<<<<< - * # w = bp['w']; - * # p = bp['p'] + * r = bp[b'r']; + * # delta = bp[b'delta']; + * b = bp[b'b']; # <<<<<<<<<<<<<< + * # w = bp[b'w']; + * # p = bp[b'p'] */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 490, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 490, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_b = __pyx_t_3; /* "Epigrass/epimodels.py":493 - * # w = bp['w']; - * # p = bp['p'] + * # w = bp[b'w']; + * # p = bp[b'p'] * Lpos_esp = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # <<<<<<<<<<<<<< * * if dist == 'poisson': @@ -10485,7 +10383,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_17stepSEIR(PyObject *__pyx_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stepSEIR (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits_2,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); @@ -10519,7 +10417,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_17stepSEIR(PyObject *__pyx_self, kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits_2)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -10662,29 +10560,29 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_16stepSEIR(CYTHON_UNUSED PyObject /* "Epigrass/epimodels.py":522 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ - __pyx_t_1 = ((__pyx_v_simstep == 1) != 0); + __pyx_t_1 = ((__pyx_v_simstep == 0) != 0); if (__pyx_t_1) { /* "Epigrass/epimodels.py":523 * """ - * if simstep == 1: # get initial values - * E, I, S = (bi['e'], bi['i'], bi['s']) # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) # <<<<<<<<<<<<<< * else: * E, I, S = inits */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -10695,19 +10593,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_16stepSEIR(CYTHON_UNUSED PyObject /* "Epigrass/epimodels.py":522 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ goto __pyx_L3; } /* "Epigrass/epimodels.py":525 - * E, I, S = (bi['e'], bi['i'], bi['s']) + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: * E, I, S = inits # <<<<<<<<<<<<<< * N = totpop - * beta = bp['beta']; + * beta = bp[b'beta']; */ /*else*/ { if ((likely(PyTuple_CheckExact(__pyx_v_inits))) || (PyList_CheckExact(__pyx_v_inits))) { @@ -10777,19 +10675,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_16stepSEIR(CYTHON_UNUSED PyObject * else: * E, I, S = inits * N = totpop # <<<<<<<<<<<<<< - * beta = bp['beta']; - * alpha = bp['alpha']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; */ __pyx_v_N = __pyx_v_totpop; /* "Epigrass/epimodels.py":527 * E, I, S = inits * N = totpop - * beta = bp['beta']; # <<<<<<<<<<<<<< - * alpha = bp['alpha']; - * e = bp['e']; + * beta = bp[b'beta']; # <<<<<<<<<<<<<< + * alpha = bp[b'alpha']; + * e = bp[b'e']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 527, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 527, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -10797,58 +10695,58 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_16stepSEIR(CYTHON_UNUSED PyObject /* "Epigrass/epimodels.py":528 * N = totpop - * beta = bp['beta']; - * alpha = bp['alpha']; # <<<<<<<<<<<<<< - * e = bp['e']; - * r = bp['r']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; # <<<<<<<<<<<<<< + * e = bp[b'e']; + * r = bp[b'r']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 528, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 528, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_alpha = __pyx_t_3; /* "Epigrass/epimodels.py":529 - * beta = bp['beta']; - * alpha = bp['alpha']; - * e = bp['e']; # <<<<<<<<<<<<<< - * r = bp['r']; - * # delta = bp['delta']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; + * e = bp[b'e']; # <<<<<<<<<<<<<< + * r = bp[b'r']; + * # delta = bp[b'delta']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_e); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 529, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_e); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_e = __pyx_t_7; __pyx_t_7 = 0; /* "Epigrass/epimodels.py":530 - * alpha = bp['alpha']; - * e = bp['e']; - * r = bp['r']; # <<<<<<<<<<<<<< - * # delta = bp['delta']; - * b = bp['b']; + * alpha = bp[b'alpha']; + * e = bp[b'e']; + * r = bp[b'r']; # <<<<<<<<<<<<<< + * # delta = bp[b'delta']; + * b = bp[b'b']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 530, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 530, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_r = __pyx_t_3; /* "Epigrass/epimodels.py":532 - * r = bp['r']; - * # delta = bp['delta']; - * b = bp['b']; # <<<<<<<<<<<<<< - * # w = bp['w']; - * # p = bp['p'] + * r = bp[b'r']; + * # delta = bp[b'delta']; + * b = bp[b'b']; # <<<<<<<<<<<<<< + * # w = bp[b'w']; + * # p = bp[b'p'] */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 532, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_b = __pyx_t_3; /* "Epigrass/epimodels.py":535 - * # w = bp['w']; - * # p = bp['p'] + * # w = bp[b'w']; + * # p = bp[b'p'] * Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # <<<<<<<<<<<<<< * * # Model @@ -11049,7 +10947,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_19stepSEIR_s(PyObject *__pyx_self __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stepSEIR_s (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits_2,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,&__pyx_n_s_dist,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,&__pyx_n_s_dist,0}; PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0}; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); @@ -11086,7 +10984,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_19stepSEIR_s(PyObject *__pyx_self kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits_2)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -11243,29 +11141,29 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_18stepSEIR_s(CYTHON_UNUSED PyObje /* "Epigrass/epimodels.py":560 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ - __pyx_t_1 = ((__pyx_v_simstep == 1) != 0); + __pyx_t_1 = ((__pyx_v_simstep == 0) != 0); if (__pyx_t_1) { /* "Epigrass/epimodels.py":561 * """ - * if simstep == 1: # get initial values - * E, I, S = (bi['e'], bi['i'], bi['s']) # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) # <<<<<<<<<<<<<< * else: * E, I, S = inits */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 561, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 561, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 561, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -11276,19 +11174,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_18stepSEIR_s(CYTHON_UNUSED PyObje /* "Epigrass/epimodels.py":560 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ goto __pyx_L3; } /* "Epigrass/epimodels.py":563 - * E, I, S = (bi['e'], bi['i'], bi['s']) + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: * E, I, S = inits # <<<<<<<<<<<<<< * N = totpop - * beta = bp['beta']; + * beta = bp[b'beta']; */ /*else*/ { if ((likely(PyTuple_CheckExact(__pyx_v_inits))) || (PyList_CheckExact(__pyx_v_inits))) { @@ -11358,19 +11256,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_18stepSEIR_s(CYTHON_UNUSED PyObje * else: * E, I, S = inits * N = totpop # <<<<<<<<<<<<<< - * beta = bp['beta']; - * alpha = bp['alpha']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; */ __pyx_v_N = __pyx_v_totpop; /* "Epigrass/epimodels.py":565 * E, I, S = inits * N = totpop - * beta = bp['beta']; # <<<<<<<<<<<<<< - * alpha = bp['alpha']; - * e = bp['e']; + * beta = bp[b'beta']; # <<<<<<<<<<<<<< + * alpha = bp[b'alpha']; + * e = bp[b'e']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 565, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 565, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -11378,58 +11276,58 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_18stepSEIR_s(CYTHON_UNUSED PyObje /* "Epigrass/epimodels.py":566 * N = totpop - * beta = bp['beta']; - * alpha = bp['alpha']; # <<<<<<<<<<<<<< - * e = bp['e']; - * r = bp['r']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; # <<<<<<<<<<<<<< + * e = bp[b'e']; + * r = bp[b'r']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 566, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 566, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_alpha = __pyx_t_3; /* "Epigrass/epimodels.py":567 - * beta = bp['beta']; - * alpha = bp['alpha']; - * e = bp['e']; # <<<<<<<<<<<<<< - * r = bp['r']; - * # delta = bp['delta']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; + * e = bp[b'e']; # <<<<<<<<<<<<<< + * r = bp[b'r']; + * # delta = bp[b'delta']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_e); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 567, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_e); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_e = __pyx_t_7; __pyx_t_7 = 0; /* "Epigrass/epimodels.py":568 - * alpha = bp['alpha']; - * e = bp['e']; - * r = bp['r']; # <<<<<<<<<<<<<< - * # delta = bp['delta']; - * b = bp['b']; + * alpha = bp[b'alpha']; + * e = bp[b'e']; + * r = bp[b'r']; # <<<<<<<<<<<<<< + * # delta = bp[b'delta']; + * b = bp[b'b']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 568, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 568, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_r = __pyx_t_3; /* "Epigrass/epimodels.py":570 - * r = bp['r']; - * # delta = bp['delta']; - * b = bp['b']; # <<<<<<<<<<<<<< - * # w = bp['w']; - * # p = bp['p'] + * r = bp[b'r']; + * # delta = bp[b'delta']; + * b = bp[b'b']; # <<<<<<<<<<<<<< + * # w = bp[b'w']; + * # p = bp[b'p'] */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 570, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 570, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_b = __pyx_t_3; /* "Epigrass/epimodels.py":573 - * # w = bp['w']; - * # p = bp['p'] + * # w = bp[b'w']; + * # p = bp[b'p'] * Lpos_esp = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # <<<<<<<<<<<<<< * * if dist == 'poisson': @@ -11782,7 +11680,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_21stepSIpRpS(PyObject *__pyx_self __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stepSIpRpS (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits_2,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); @@ -11816,7 +11714,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_21stepSIpRpS(PyObject *__pyx_self kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits_2)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -11958,29 +11856,29 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_20stepSIpRpS(CYTHON_UNUSED PyObje /* "Epigrass/epimodels.py":604 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ - __pyx_t_1 = ((__pyx_v_simstep == 1) != 0); + __pyx_t_1 = ((__pyx_v_simstep == 0) != 0); if (__pyx_t_1) { /* "Epigrass/epimodels.py":605 * """ - * if simstep == 1: # get initial values - * E, I, S = (bi['e'], bi['i'], bi['s']) # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) # <<<<<<<<<<<<<< * else: * E, I, S = inits */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 605, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 605, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 605, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 605, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 605, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 605, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -11991,19 +11889,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_20stepSIpRpS(CYTHON_UNUSED PyObje /* "Epigrass/epimodels.py":604 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ goto __pyx_L3; } /* "Epigrass/epimodels.py":607 - * E, I, S = (bi['e'], bi['i'], bi['s']) + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: * E, I, S = inits # <<<<<<<<<<<<<< * N = totpop - * beta = bp['beta']; + * beta = bp[b'beta']; */ /*else*/ { if ((likely(PyTuple_CheckExact(__pyx_v_inits))) || (PyList_CheckExact(__pyx_v_inits))) { @@ -12073,19 +11971,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_20stepSIpRpS(CYTHON_UNUSED PyObje * else: * E, I, S = inits * N = totpop # <<<<<<<<<<<<<< - * beta = bp['beta']; - * alpha = bp['alpha']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; */ __pyx_v_N = __pyx_v_totpop; /* "Epigrass/epimodels.py":609 * E, I, S = inits * N = totpop - * beta = bp['beta']; # <<<<<<<<<<<<<< - * alpha = bp['alpha']; - * # e = bp['e']; + * beta = bp[b'beta']; # <<<<<<<<<<<<<< + * alpha = bp[b'alpha']; + * # e = bp[b'e']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 609, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -12093,58 +11991,58 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_20stepSIpRpS(CYTHON_UNUSED PyObje /* "Epigrass/epimodels.py":610 * N = totpop - * beta = bp['beta']; - * alpha = bp['alpha']; # <<<<<<<<<<<<<< - * # e = bp['e']; - * r = bp['r']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; # <<<<<<<<<<<<<< + * # e = bp[b'e']; + * r = bp[b'r']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 610, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 610, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_alpha = __pyx_t_3; /* "Epigrass/epimodels.py":612 - * alpha = bp['alpha']; - * # e = bp['e']; - * r = bp['r']; # <<<<<<<<<<<<<< - * delta = bp['delta']; - * b = bp['b']; + * alpha = bp[b'alpha']; + * # e = bp[b'e']; + * r = bp[b'r']; # <<<<<<<<<<<<<< + * delta = bp[b'delta']; + * b = bp[b'b']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_r = __pyx_t_3; /* "Epigrass/epimodels.py":613 - * # e = bp['e']; - * r = bp['r']; - * delta = bp['delta']; # <<<<<<<<<<<<<< - * b = bp['b']; - * # w = bp['w']; + * # e = bp[b'e']; + * r = bp[b'r']; + * delta = bp[b'delta']; # <<<<<<<<<<<<<< + * b = bp[b'b']; + * # w = bp[b'w']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_delta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 613, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_delta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_delta = __pyx_t_7; __pyx_t_7 = 0; /* "Epigrass/epimodels.py":614 - * r = bp['r']; - * delta = bp['delta']; - * b = bp['b']; # <<<<<<<<<<<<<< - * # w = bp['w']; - * # p = bp['p'] + * r = bp[b'r']; + * delta = bp[b'delta']; + * b = bp[b'b']; # <<<<<<<<<<<<<< + * # w = bp[b'w']; + * # p = bp[b'p'] */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 614, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_b = __pyx_t_3; /* "Epigrass/epimodels.py":617 - * # w = bp['w']; - * # p = bp['p'] + * # w = bp[b'w']; + * # p = bp[b'p'] * Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # <<<<<<<<<<<<<< * * # Model @@ -12329,7 +12227,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_23stepSIpRpS_s(PyObject *__pyx_se __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stepSIpRpS_s (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits_2,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,&__pyx_n_s_dist,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,&__pyx_n_s_dist,0}; PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0}; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); @@ -12366,7 +12264,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_23stepSIpRpS_s(PyObject *__pyx_se kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits_2)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -12522,29 +12420,29 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_22stepSIpRpS_s(CYTHON_UNUSED PyOb /* "Epigrass/epimodels.py":640 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ - __pyx_t_1 = ((__pyx_v_simstep == 1) != 0); + __pyx_t_1 = ((__pyx_v_simstep == 0) != 0); if (__pyx_t_1) { /* "Epigrass/epimodels.py":641 * """ - * if simstep == 1: # get initial values - * E, I, S = (bi['e'], bi['i'], bi['s']) # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) # <<<<<<<<<<<<<< * else: * E, I, S = inits */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -12555,19 +12453,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_22stepSIpRpS_s(CYTHON_UNUSED PyOb /* "Epigrass/epimodels.py":640 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ goto __pyx_L3; } /* "Epigrass/epimodels.py":643 - * E, I, S = (bi['e'], bi['i'], bi['s']) + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: * E, I, S = inits # <<<<<<<<<<<<<< * N = totpop - * beta = bp['beta']; + * beta = bp[b'beta']; */ /*else*/ { if ((likely(PyTuple_CheckExact(__pyx_v_inits))) || (PyList_CheckExact(__pyx_v_inits))) { @@ -12637,19 +12535,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_22stepSIpRpS_s(CYTHON_UNUSED PyOb * else: * E, I, S = inits * N = totpop # <<<<<<<<<<<<<< - * beta = bp['beta']; - * alpha = bp['alpha']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; */ __pyx_v_N = __pyx_v_totpop; /* "Epigrass/epimodels.py":645 * E, I, S = inits * N = totpop - * beta = bp['beta']; # <<<<<<<<<<<<<< - * alpha = bp['alpha']; - * # e = bp['e']; + * beta = bp[b'beta']; # <<<<<<<<<<<<<< + * alpha = bp[b'alpha']; + * # e = bp[b'e']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 645, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -12657,58 +12555,58 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_22stepSIpRpS_s(CYTHON_UNUSED PyOb /* "Epigrass/epimodels.py":646 * N = totpop - * beta = bp['beta']; - * alpha = bp['alpha']; # <<<<<<<<<<<<<< - * # e = bp['e']; - * r = bp['r']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; # <<<<<<<<<<<<<< + * # e = bp[b'e']; + * r = bp[b'r']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 646, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_alpha = __pyx_t_3; /* "Epigrass/epimodels.py":648 - * alpha = bp['alpha']; - * # e = bp['e']; - * r = bp['r']; # <<<<<<<<<<<<<< - * delta = bp['delta']; - * b = bp['b']; + * alpha = bp[b'alpha']; + * # e = bp[b'e']; + * r = bp[b'r']; # <<<<<<<<<<<<<< + * delta = bp[b'delta']; + * b = bp[b'b']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 648, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_r = __pyx_t_3; /* "Epigrass/epimodels.py":649 - * # e = bp['e']; - * r = bp['r']; - * delta = bp['delta']; # <<<<<<<<<<<<<< - * b = bp['b']; - * # w = bp['w']; + * # e = bp[b'e']; + * r = bp[b'r']; + * delta = bp[b'delta']; # <<<<<<<<<<<<<< + * b = bp[b'b']; + * # w = bp[b'w']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_delta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 649, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_delta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_delta = __pyx_t_7; __pyx_t_7 = 0; /* "Epigrass/epimodels.py":650 - * r = bp['r']; - * delta = bp['delta']; - * b = bp['b']; # <<<<<<<<<<<<<< - * # w = bp['w']; - * # p = bp['p'] + * r = bp[b'r']; + * delta = bp[b'delta']; + * b = bp[b'b']; # <<<<<<<<<<<<<< + * # w = bp[b'w']; + * # p = bp[b'p'] */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 650, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 650, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_b = __pyx_t_3; /* "Epigrass/epimodels.py":653 - * # w = bp['w']; - * # p = bp['p'] + * # w = bp[b'w']; + * # p = bp[b'p'] * Lpos_esp = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # <<<<<<<<<<<<<< * * if dist == 'poisson': @@ -13045,7 +12943,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_25stepSEIpRpS(PyObject *__pyx_sel __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stepSEIpRpS (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits_2,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); @@ -13079,7 +12977,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_25stepSEIpRpS(PyObject *__pyx_sel kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits_2)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -13223,29 +13121,29 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_24stepSEIpRpS(CYTHON_UNUSED PyObj /* "Epigrass/epimodels.py":682 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ - __pyx_t_1 = ((__pyx_v_simstep == 1) != 0); + __pyx_t_1 = ((__pyx_v_simstep == 0) != 0); if (__pyx_t_1) { /* "Epigrass/epimodels.py":683 * """ - * if simstep == 1: # get initial values - * E, I, S = (bi['e'], bi['i'], bi['s']) # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) # <<<<<<<<<<<<<< * else: * E, I, S = inits */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 683, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 683, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 683, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 683, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 683, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 683, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -13256,19 +13154,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_24stepSEIpRpS(CYTHON_UNUSED PyObj /* "Epigrass/epimodels.py":682 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ goto __pyx_L3; } /* "Epigrass/epimodels.py":685 - * E, I, S = (bi['e'], bi['i'], bi['s']) + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: * E, I, S = inits # <<<<<<<<<<<<<< * N = totpop - * beta = bp['beta']; + * beta = bp[b'beta']; */ /*else*/ { if ((likely(PyTuple_CheckExact(__pyx_v_inits))) || (PyList_CheckExact(__pyx_v_inits))) { @@ -13338,19 +13236,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_24stepSEIpRpS(CYTHON_UNUSED PyObj * else: * E, I, S = inits * N = totpop # <<<<<<<<<<<<<< - * beta = bp['beta']; - * alpha = bp['alpha']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; */ __pyx_v_N = __pyx_v_totpop; /* "Epigrass/epimodels.py":687 * E, I, S = inits * N = totpop - * beta = bp['beta']; # <<<<<<<<<<<<<< - * alpha = bp['alpha']; - * e = bp['e']; + * beta = bp[b'beta']; # <<<<<<<<<<<<<< + * alpha = bp[b'alpha']; + * e = bp[b'e']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 687, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -13358,69 +13256,69 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_24stepSEIpRpS(CYTHON_UNUSED PyObj /* "Epigrass/epimodels.py":688 * N = totpop - * beta = bp['beta']; - * alpha = bp['alpha']; # <<<<<<<<<<<<<< - * e = bp['e']; - * r = bp['r']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; # <<<<<<<<<<<<<< + * e = bp[b'e']; + * r = bp[b'r']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 688, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_alpha = __pyx_t_3; /* "Epigrass/epimodels.py":689 - * beta = bp['beta']; - * alpha = bp['alpha']; - * e = bp['e']; # <<<<<<<<<<<<<< - * r = bp['r']; - * delta = bp['delta']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; + * e = bp[b'e']; # <<<<<<<<<<<<<< + * r = bp[b'r']; + * delta = bp[b'delta']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_e); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 689, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_e); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_e = __pyx_t_7; __pyx_t_7 = 0; /* "Epigrass/epimodels.py":690 - * alpha = bp['alpha']; - * e = bp['e']; - * r = bp['r']; # <<<<<<<<<<<<<< - * delta = bp['delta']; - * b = bp['b']; + * alpha = bp[b'alpha']; + * e = bp[b'e']; + * r = bp[b'r']; # <<<<<<<<<<<<<< + * delta = bp[b'delta']; + * b = bp[b'b']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 690, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_r = __pyx_t_3; /* "Epigrass/epimodels.py":691 - * e = bp['e']; - * r = bp['r']; - * delta = bp['delta']; # <<<<<<<<<<<<<< - * b = bp['b']; - * # w = bp['w']; + * e = bp[b'e']; + * r = bp[b'r']; + * delta = bp[b'delta']; # <<<<<<<<<<<<<< + * b = bp[b'b']; + * # w = bp[b'w']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_delta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 691, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_delta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_delta = __pyx_t_7; __pyx_t_7 = 0; /* "Epigrass/epimodels.py":692 - * r = bp['r']; - * delta = bp['delta']; - * b = bp['b']; # <<<<<<<<<<<<<< - * # w = bp['w']; - * # p = bp['p'] + * r = bp[b'r']; + * delta = bp[b'delta']; + * b = bp[b'b']; # <<<<<<<<<<<<<< + * # w = bp[b'w']; + * # p = bp[b'p'] */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 692, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_b = __pyx_t_3; /* "Epigrass/epimodels.py":696 - * # p = bp['p'] + * # p = bp[b'p'] * * Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # <<<<<<<<<<<<<< * @@ -13660,7 +13558,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_27stepSEIpRpS_s(PyObject *__pyx_s __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stepSEIpRpS_s (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits_2,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,&__pyx_n_s_dist,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,&__pyx_n_s_dist,0}; PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0}; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); @@ -13697,7 +13595,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_27stepSEIpRpS_s(PyObject *__pyx_s kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits_2)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -13855,29 +13753,29 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_26stepSEIpRpS_s(CYTHON_UNUSED PyO /* "Epigrass/epimodels.py":719 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ - __pyx_t_1 = ((__pyx_v_simstep == 1) != 0); + __pyx_t_1 = ((__pyx_v_simstep == 0) != 0); if (__pyx_t_1) { /* "Epigrass/epimodels.py":720 * """ - * if simstep == 1: # get initial values - * E, I, S = (bi['e'], bi['i'], bi['s']) # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) # <<<<<<<<<<<<<< * else: * E, I, S = inits */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 720, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 720, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 720, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -13888,19 +13786,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_26stepSEIpRpS_s(CYTHON_UNUSED PyO /* "Epigrass/epimodels.py":719 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ goto __pyx_L3; } /* "Epigrass/epimodels.py":722 - * E, I, S = (bi['e'], bi['i'], bi['s']) + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: * E, I, S = inits # <<<<<<<<<<<<<< * N = totpop - * beta = bp['beta']; + * beta = bp[b'beta']; */ /*else*/ { if ((likely(PyTuple_CheckExact(__pyx_v_inits))) || (PyList_CheckExact(__pyx_v_inits))) { @@ -13970,19 +13868,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_26stepSEIpRpS_s(CYTHON_UNUSED PyO * else: * E, I, S = inits * N = totpop # <<<<<<<<<<<<<< - * beta = bp['beta']; - * alpha = bp['alpha']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; */ __pyx_v_N = __pyx_v_totpop; /* "Epigrass/epimodels.py":724 * E, I, S = inits * N = totpop - * beta = bp['beta']; # <<<<<<<<<<<<<< - * alpha = bp['alpha']; - * e = bp['e']; + * beta = bp[b'beta']; # <<<<<<<<<<<<<< + * alpha = bp[b'alpha']; + * e = bp[b'e']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 724, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 724, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -13990,70 +13888,70 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_26stepSEIpRpS_s(CYTHON_UNUSED PyO /* "Epigrass/epimodels.py":725 * N = totpop - * beta = bp['beta']; - * alpha = bp['alpha']; # <<<<<<<<<<<<<< - * e = bp['e']; - * r = bp['r']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; # <<<<<<<<<<<<<< + * e = bp[b'e']; + * r = bp[b'r']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 725, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 725, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_alpha = __pyx_t_3; /* "Epigrass/epimodels.py":726 - * beta = bp['beta']; - * alpha = bp['alpha']; - * e = bp['e']; # <<<<<<<<<<<<<< - * r = bp['r']; - * delta = bp['delta']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; + * e = bp[b'e']; # <<<<<<<<<<<<<< + * r = bp[b'r']; + * delta = bp[b'delta']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_e); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_e); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_e = __pyx_t_7; __pyx_t_7 = 0; /* "Epigrass/epimodels.py":727 - * alpha = bp['alpha']; - * e = bp['e']; - * r = bp['r']; # <<<<<<<<<<<<<< - * delta = bp['delta']; - * b = bp['b']; + * alpha = bp[b'alpha']; + * e = bp[b'e']; + * r = bp[b'r']; # <<<<<<<<<<<<<< + * delta = bp[b'delta']; + * b = bp[b'b']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_r = __pyx_t_3; /* "Epigrass/epimodels.py":728 - * e = bp['e']; - * r = bp['r']; - * delta = bp['delta']; # <<<<<<<<<<<<<< - * b = bp['b']; - * # w = bp['w']; + * e = bp[b'e']; + * r = bp[b'r']; + * delta = bp[b'delta']; # <<<<<<<<<<<<<< + * b = bp[b'b']; + * # w = bp[b'w']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_delta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 728, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_delta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_delta = __pyx_t_7; __pyx_t_7 = 0; /* "Epigrass/epimodels.py":729 - * r = bp['r']; - * delta = bp['delta']; - * b = bp['b']; # <<<<<<<<<<<<<< - * # w = bp['w']; - * # p = bp['p'] + * r = bp[b'r']; + * delta = bp[b'delta']; + * b = bp[b'b']; # <<<<<<<<<<<<<< + * # w = bp[b'w']; + * # p = bp[b'p'] */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 729, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 729, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_b = __pyx_t_3; /* "Epigrass/epimodels.py":732 - * # w = bp['w']; - * # p = bp['p'] + * # w = bp[b'w']; + * # p = bp[b'p'] * Lpos_esp = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # <<<<<<<<<<<<<< * * if dist == 'poisson': @@ -14444,7 +14342,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_29stepSIpR(PyObject *__pyx_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stepSIpR (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits_2,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); @@ -14478,7 +14376,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_29stepSIpR(PyObject *__pyx_self, kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits_2)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -14622,29 +14520,29 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_28stepSIpR(CYTHON_UNUSED PyObject /* "Epigrass/epimodels.py":761 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ - __pyx_t_1 = ((__pyx_v_simstep == 1) != 0); + __pyx_t_1 = ((__pyx_v_simstep == 0) != 0); if (__pyx_t_1) { /* "Epigrass/epimodels.py":762 * """ - * if simstep == 1: # get initial values - * E, I, S = (bi['e'], bi['i'], bi['s']) # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) # <<<<<<<<<<<<<< * else: * E, I, S = inits */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -14655,15 +14553,15 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_28stepSIpR(CYTHON_UNUSED PyObject /* "Epigrass/epimodels.py":761 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ goto __pyx_L3; } /* "Epigrass/epimodels.py":764 - * E, I, S = (bi['e'], bi['i'], bi['s']) + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: * E, I, S = inits # <<<<<<<<<<<<<< * N = totpop @@ -14738,7 +14636,7 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_28stepSIpR(CYTHON_UNUSED PyObject * E, I, S = inits * N = totpop # <<<<<<<<<<<<<< * R = N - E - I - S - * beta = bp['beta']; + * beta = bp[b'beta']; */ __pyx_v_N = __pyx_v_totpop; @@ -14746,19 +14644,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_28stepSIpR(CYTHON_UNUSED PyObject * E, I, S = inits * N = totpop * R = N - E - I - S # <<<<<<<<<<<<<< - * beta = bp['beta']; - * alpha = bp['alpha']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; */ __pyx_v_R = (((__pyx_v_N - __pyx_v_E) - __pyx_v_I) - __pyx_v_S); /* "Epigrass/epimodels.py":767 * N = totpop * R = N - E - I - S - * beta = bp['beta']; # <<<<<<<<<<<<<< - * alpha = bp['alpha']; - * # e = bp['e']; + * beta = bp[b'beta']; # <<<<<<<<<<<<<< + * alpha = bp[b'alpha']; + * # e = bp[b'e']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 767, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -14766,58 +14664,58 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_28stepSIpR(CYTHON_UNUSED PyObject /* "Epigrass/epimodels.py":768 * R = N - E - I - S - * beta = bp['beta']; - * alpha = bp['alpha']; # <<<<<<<<<<<<<< - * # e = bp['e']; - * r = bp['r']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; # <<<<<<<<<<<<<< + * # e = bp[b'e']; + * r = bp[b'r']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 768, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 768, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_alpha = __pyx_t_3; /* "Epigrass/epimodels.py":770 - * alpha = bp['alpha']; - * # e = bp['e']; - * r = bp['r']; # <<<<<<<<<<<<<< - * # delta = bp['delta']; - * b = bp['b']; + * alpha = bp[b'alpha']; + * # e = bp[b'e']; + * r = bp[b'r']; # <<<<<<<<<<<<<< + * # delta = bp[b'delta']; + * b = bp[b'b']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 770, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 770, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_r = __pyx_t_3; /* "Epigrass/epimodels.py":772 - * r = bp['r']; - * # delta = bp['delta']; - * b = bp['b']; # <<<<<<<<<<<<<< - * # w = bp['w']; - * p = bp['p'] + * r = bp[b'r']; + * # delta = bp[b'delta']; + * b = bp[b'b']; # <<<<<<<<<<<<<< + * # w = bp[b'w']; + * p = bp[b'p'] */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 772, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 772, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_b = __pyx_t_3; /* "Epigrass/epimodels.py":774 - * b = bp['b']; - * # w = bp['w']; - * p = bp['p'] # <<<<<<<<<<<<<< + * b = bp[b'b']; + * # w = bp[b'w']; + * p = bp[b'p'] # <<<<<<<<<<<<<< * Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases * Lpos2 = p * float(beta) * R * ((I + theta) / (N + npass)) ** alpha # number of secondary Infections */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_p); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 774, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_p); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_p = __pyx_t_7; __pyx_t_7 = 0; /* "Epigrass/epimodels.py":775 - * # w = bp['w']; - * p = bp['p'] + * # w = bp[b'w']; + * p = bp[b'p'] * Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # <<<<<<<<<<<<<< * Lpos2 = p * float(beta) * R * ((I + theta) / (N + npass)) ** alpha # number of secondary Infections * @@ -14831,7 +14729,7 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_28stepSIpR(CYTHON_UNUSED PyObject __pyx_v_Lpos = ((__pyx_v_beta * __pyx_v_S) * pow((__pyx_t_3 / __pyx_t_4), __pyx_v_alpha)); /* "Epigrass/epimodels.py":776 - * p = bp['p'] + * p = bp[b'p'] * Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases * Lpos2 = p * float(beta) * R * ((I + theta) / (N + npass)) ** alpha # number of secondary Infections # <<<<<<<<<<<<<< * @@ -15012,7 +14910,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_31stepSIpR_s(PyObject *__pyx_self __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stepSIpR_s (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits_2,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,&__pyx_n_s_dist,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,&__pyx_n_s_dist,0}; PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0}; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); @@ -15049,7 +14947,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_31stepSIpR_s(PyObject *__pyx_self kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits_2)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -15207,29 +15105,29 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_30stepSIpR_s(CYTHON_UNUSED PyObje /* "Epigrass/epimodels.py":799 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ - __pyx_t_1 = ((__pyx_v_simstep == 1) != 0); + __pyx_t_1 = ((__pyx_v_simstep == 0) != 0); if (__pyx_t_1) { /* "Epigrass/epimodels.py":800 * """ - * if simstep == 1: # get initial values - * E, I, S = (bi['e'], bi['i'], bi['s']) # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) # <<<<<<<<<<<<<< * else: * E, I, S = inits */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 800, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 800, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 800, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -15240,19 +15138,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_30stepSIpR_s(CYTHON_UNUSED PyObje /* "Epigrass/epimodels.py":799 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ goto __pyx_L3; } /* "Epigrass/epimodels.py":802 - * E, I, S = (bi['e'], bi['i'], bi['s']) + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: * E, I, S = inits # <<<<<<<<<<<<<< * N = totpop - * beta = bp['beta']; + * beta = bp[b'beta']; */ /*else*/ { if ((likely(PyTuple_CheckExact(__pyx_v_inits))) || (PyList_CheckExact(__pyx_v_inits))) { @@ -15322,19 +15220,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_30stepSIpR_s(CYTHON_UNUSED PyObje * else: * E, I, S = inits * N = totpop # <<<<<<<<<<<<<< - * beta = bp['beta']; - * alpha = bp['alpha']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; */ __pyx_v_N = __pyx_v_totpop; /* "Epigrass/epimodels.py":804 * E, I, S = inits * N = totpop - * beta = bp['beta']; # <<<<<<<<<<<<<< - * alpha = bp['alpha']; - * # e = bp['e']; + * beta = bp[b'beta']; # <<<<<<<<<<<<<< + * alpha = bp[b'alpha']; + * # e = bp[b'e']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 804, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 804, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -15342,58 +15240,58 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_30stepSIpR_s(CYTHON_UNUSED PyObje /* "Epigrass/epimodels.py":805 * N = totpop - * beta = bp['beta']; - * alpha = bp['alpha']; # <<<<<<<<<<<<<< - * # e = bp['e']; - * r = bp['r']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; # <<<<<<<<<<<<<< + * # e = bp[b'e']; + * r = bp[b'r']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 805, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_alpha = __pyx_t_3; /* "Epigrass/epimodels.py":807 - * alpha = bp['alpha']; - * # e = bp['e']; - * r = bp['r']; # <<<<<<<<<<<<<< - * # delta = bp['delta']; - * b = bp['b']; + * alpha = bp[b'alpha']; + * # e = bp[b'e']; + * r = bp[b'r']; # <<<<<<<<<<<<<< + * # delta = bp[b'delta']; + * b = bp[b'b']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 807, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_r = __pyx_t_3; /* "Epigrass/epimodels.py":809 - * r = bp['r']; - * # delta = bp['delta']; - * b = bp['b']; # <<<<<<<<<<<<<< - * # w = bp['w']; - * p = bp['p'] + * r = bp[b'r']; + * # delta = bp[b'delta']; + * b = bp[b'b']; # <<<<<<<<<<<<<< + * # w = bp[b'w']; + * p = bp[b'p'] */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 809, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 809, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_b = __pyx_t_3; /* "Epigrass/epimodels.py":811 - * b = bp['b']; - * # w = bp['w']; - * p = bp['p'] # <<<<<<<<<<<<<< + * b = bp[b'b']; + * # w = bp[b'w']; + * p = bp[b'p'] # <<<<<<<<<<<<<< * R = N - E - I - S * */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_p); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 811, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_p); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_p = __pyx_t_7; __pyx_t_7 = 0; /* "Epigrass/epimodels.py":812 - * # w = bp['w']; - * p = bp['p'] + * # w = bp[b'w']; + * p = bp[b'p'] * R = N - E - I - S # <<<<<<<<<<<<<< * * Lpos_esp = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases @@ -15861,7 +15759,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_33stepSEIpR(PyObject *__pyx_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stepSEIpR (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits_2,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); @@ -15895,7 +15793,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_33stepSEIpR(PyObject *__pyx_self, kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits_2)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -16041,29 +15939,29 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_32stepSEIpR(CYTHON_UNUSED PyObjec /* "Epigrass/epimodels.py":846 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ - __pyx_t_1 = ((__pyx_v_simstep == 1) != 0); + __pyx_t_1 = ((__pyx_v_simstep == 0) != 0); if (__pyx_t_1) { /* "Epigrass/epimodels.py":847 * """ - * if simstep == 1: # get initial values - * E, I, S = (bi['e'], bi['i'], bi['s']) # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) # <<<<<<<<<<<<<< * else: * E, I, S = inits */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -16074,15 +15972,15 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_32stepSEIpR(CYTHON_UNUSED PyObjec /* "Epigrass/epimodels.py":846 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ goto __pyx_L3; } /* "Epigrass/epimodels.py":849 - * E, I, S = (bi['e'], bi['i'], bi['s']) + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: * E, I, S = inits # <<<<<<<<<<<<<< * N = totpop @@ -16157,7 +16055,7 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_32stepSEIpR(CYTHON_UNUSED PyObjec * E, I, S = inits * N = totpop # <<<<<<<<<<<<<< * R = N - E - I - S - * beta = bp['beta']; + * beta = bp[b'beta']; */ __pyx_v_N = __pyx_v_totpop; @@ -16165,19 +16063,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_32stepSEIpR(CYTHON_UNUSED PyObjec * E, I, S = inits * N = totpop * R = N - E - I - S # <<<<<<<<<<<<<< - * beta = bp['beta']; - * alpha = bp['alpha']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; */ __pyx_v_R = (((__pyx_v_N - __pyx_v_E) - __pyx_v_I) - __pyx_v_S); /* "Epigrass/epimodels.py":852 * N = totpop * R = N - E - I - S - * beta = bp['beta']; # <<<<<<<<<<<<<< - * alpha = bp['alpha']; - * e = bp['e']; + * beta = bp[b'beta']; # <<<<<<<<<<<<<< + * alpha = bp[b'alpha']; + * e = bp[b'e']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 852, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -16185,69 +16083,69 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_32stepSEIpR(CYTHON_UNUSED PyObjec /* "Epigrass/epimodels.py":853 * R = N - E - I - S - * beta = bp['beta']; - * alpha = bp['alpha']; # <<<<<<<<<<<<<< - * e = bp['e']; - * r = bp['r']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; # <<<<<<<<<<<<<< + * e = bp[b'e']; + * r = bp[b'r']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 853, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 853, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_alpha = __pyx_t_3; /* "Epigrass/epimodels.py":854 - * beta = bp['beta']; - * alpha = bp['alpha']; - * e = bp['e']; # <<<<<<<<<<<<<< - * r = bp['r']; - * # delta = bp['delta']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; + * e = bp[b'e']; # <<<<<<<<<<<<<< + * r = bp[b'r']; + * # delta = bp[b'delta']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_e); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_e); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 854, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_e = __pyx_t_7; __pyx_t_7 = 0; /* "Epigrass/epimodels.py":855 - * alpha = bp['alpha']; - * e = bp['e']; - * r = bp['r']; # <<<<<<<<<<<<<< - * # delta = bp['delta']; - * b = bp['b']; + * alpha = bp[b'alpha']; + * e = bp[b'e']; + * r = bp[b'r']; # <<<<<<<<<<<<<< + * # delta = bp[b'delta']; + * b = bp[b'b']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 855, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_r = __pyx_t_3; /* "Epigrass/epimodels.py":857 - * r = bp['r']; - * # delta = bp['delta']; - * b = bp['b']; # <<<<<<<<<<<<<< - * # w = bp['w']; - * p = bp['p'] + * r = bp[b'r']; + * # delta = bp[b'delta']; + * b = bp[b'b']; # <<<<<<<<<<<<<< + * # w = bp[b'w']; + * p = bp[b'p'] */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 857, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 857, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_b = __pyx_t_3; /* "Epigrass/epimodels.py":859 - * b = bp['b']; - * # w = bp['w']; - * p = bp['p'] # <<<<<<<<<<<<<< + * b = bp[b'b']; + * # w = bp[b'w']; + * p = bp[b'p'] # <<<<<<<<<<<<<< * * Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_p); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 859, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_p); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_p = __pyx_t_7; __pyx_t_7 = 0; /* "Epigrass/epimodels.py":861 - * p = bp['p'] + * p = bp[b'p'] * * Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # <<<<<<<<<<<<<< * Lpos2 = p * float(beta) * R * ((I + theta) / (N + npass)) ** alpha # secondary infections @@ -16478,7 +16376,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_35stepSEIpR_s(PyObject *__pyx_sel __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stepSEIpR_s (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits_2,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,&__pyx_n_s_dist,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,&__pyx_n_s_dist,0}; PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0}; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); @@ -16515,7 +16413,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_35stepSEIpR_s(PyObject *__pyx_sel kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits_2)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -16675,29 +16573,29 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_34stepSEIpR_s(CYTHON_UNUSED PyObj /* "Epigrass/epimodels.py":886 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ - __pyx_t_1 = ((__pyx_v_simstep == 1) != 0); + __pyx_t_1 = ((__pyx_v_simstep == 0) != 0); if (__pyx_t_1) { /* "Epigrass/epimodels.py":887 * """ - * if simstep == 1: # get initial values - * E, I, S = (bi['e'], bi['i'], bi['s']) # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) # <<<<<<<<<<<<<< * else: * E, I, S = inits */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -16708,19 +16606,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_34stepSEIpR_s(CYTHON_UNUSED PyObj /* "Epigrass/epimodels.py":886 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ goto __pyx_L3; } /* "Epigrass/epimodels.py":889 - * E, I, S = (bi['e'], bi['i'], bi['s']) + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: * E, I, S = inits # <<<<<<<<<<<<<< * N = totpop - * beta = bp['beta']; + * beta = bp[b'beta']; */ /*else*/ { if ((likely(PyTuple_CheckExact(__pyx_v_inits))) || (PyList_CheckExact(__pyx_v_inits))) { @@ -16790,19 +16688,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_34stepSEIpR_s(CYTHON_UNUSED PyObj * else: * E, I, S = inits * N = totpop # <<<<<<<<<<<<<< - * beta = bp['beta']; - * alpha = bp['alpha']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; */ __pyx_v_N = __pyx_v_totpop; /* "Epigrass/epimodels.py":891 * E, I, S = inits * N = totpop - * beta = bp['beta']; # <<<<<<<<<<<<<< - * alpha = bp['alpha']; - * e = bp['e']; + * beta = bp[b'beta']; # <<<<<<<<<<<<<< + * alpha = bp[b'alpha']; + * e = bp[b'e']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 891, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 891, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 891, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -16810,70 +16708,70 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_34stepSEIpR_s(CYTHON_UNUSED PyObj /* "Epigrass/epimodels.py":892 * N = totpop - * beta = bp['beta']; - * alpha = bp['alpha']; # <<<<<<<<<<<<<< - * e = bp['e']; - * r = bp['r']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; # <<<<<<<<<<<<<< + * e = bp[b'e']; + * r = bp[b'r']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 892, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 892, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_alpha = __pyx_t_3; /* "Epigrass/epimodels.py":893 - * beta = bp['beta']; - * alpha = bp['alpha']; - * e = bp['e']; # <<<<<<<<<<<<<< - * r = bp['r']; - * # delta = bp['delta']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; + * e = bp[b'e']; # <<<<<<<<<<<<<< + * r = bp[b'r']; + * # delta = bp[b'delta']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_e); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 893, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_e); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_e = __pyx_t_7; __pyx_t_7 = 0; /* "Epigrass/epimodels.py":894 - * alpha = bp['alpha']; - * e = bp['e']; - * r = bp['r']; # <<<<<<<<<<<<<< - * # delta = bp['delta']; - * b = bp['b']; + * alpha = bp[b'alpha']; + * e = bp[b'e']; + * r = bp[b'r']; # <<<<<<<<<<<<<< + * # delta = bp[b'delta']; + * b = bp[b'b']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 894, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 894, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_r = __pyx_t_3; /* "Epigrass/epimodels.py":896 - * r = bp['r']; - * # delta = bp['delta']; - * b = bp['b']; # <<<<<<<<<<<<<< - * # w = bp['w']; - * p = bp['p'] + * r = bp[b'r']; + * # delta = bp[b'delta']; + * b = bp[b'b']; # <<<<<<<<<<<<<< + * # w = bp[b'w']; + * p = bp[b'p'] */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_b = __pyx_t_3; /* "Epigrass/epimodels.py":898 - * b = bp['b']; - * # w = bp['w']; - * p = bp['p'] # <<<<<<<<<<<<<< + * b = bp[b'b']; + * # w = bp[b'w']; + * p = bp[b'p'] # <<<<<<<<<<<<<< * R = N - E - I - S * */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_p); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_p); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_p = __pyx_t_7; __pyx_t_7 = 0; /* "Epigrass/epimodels.py":899 - * # w = bp['w']; - * p = bp['p'] + * # w = bp[b'w']; + * p = bp[b'p'] * R = N - E - I - S # <<<<<<<<<<<<<< * * Lpos_esp = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases @@ -17376,7 +17274,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_37stepSIRS(PyObject *__pyx_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stepSIRS (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits_2,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,0}; PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); @@ -17410,7 +17308,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_37stepSIRS(PyObject *__pyx_self, kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits_2)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -17553,29 +17451,29 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_36stepSIRS(CYTHON_UNUSED PyObject /* "Epigrass/epimodels.py":935 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ - __pyx_t_1 = ((__pyx_v_simstep == 1) != 0); + __pyx_t_1 = ((__pyx_v_simstep == 0) != 0); if (__pyx_t_1) { /* "Epigrass/epimodels.py":936 * """ - * if simstep == 1: # get initial values - * E, I, S = (bi['e'], bi['i'], bi['s']) # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) # <<<<<<<<<<<<<< * else: * E, I, S = inits */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 936, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 936, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 936, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -17586,15 +17484,15 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_36stepSIRS(CYTHON_UNUSED PyObject /* "Epigrass/epimodels.py":935 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ goto __pyx_L3; } /* "Epigrass/epimodels.py":938 - * E, I, S = (bi['e'], bi['i'], bi['s']) + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: * E, I, S = inits # <<<<<<<<<<<<<< * N = totpop @@ -17669,7 +17567,7 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_36stepSIRS(CYTHON_UNUSED PyObject * E, I, S = inits * N = totpop # <<<<<<<<<<<<<< * R = N - (E + I + S) - * beta = bp['beta']; + * beta = bp[b'beta']; */ __pyx_v_N = __pyx_v_totpop; @@ -17677,19 +17575,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_36stepSIRS(CYTHON_UNUSED PyObject * E, I, S = inits * N = totpop * R = N - (E + I + S) # <<<<<<<<<<<<<< - * beta = bp['beta']; - * alpha = bp['alpha']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; */ __pyx_v_R = (__pyx_v_N - ((__pyx_v_E + __pyx_v_I) + __pyx_v_S)); /* "Epigrass/epimodels.py":941 * N = totpop * R = N - (E + I + S) - * beta = bp['beta']; # <<<<<<<<<<<<<< - * alpha = bp['alpha']; - * # e = bp['e']; + * beta = bp[b'beta']; # <<<<<<<<<<<<<< + * alpha = bp[b'alpha']; + * # e = bp[b'e']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 941, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -17697,59 +17595,59 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_36stepSIRS(CYTHON_UNUSED PyObject /* "Epigrass/epimodels.py":942 * R = N - (E + I + S) - * beta = bp['beta']; - * alpha = bp['alpha']; # <<<<<<<<<<<<<< - * # e = bp['e']; - * r = bp['r']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; # <<<<<<<<<<<<<< + * # e = bp[b'e']; + * r = bp[b'r']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 942, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 942, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 942, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_alpha = __pyx_t_3; /* "Epigrass/epimodels.py":944 - * alpha = bp['alpha']; - * # e = bp['e']; - * r = bp['r']; # <<<<<<<<<<<<<< - * # delta = bp['delta']; - * b = bp['b']; + * alpha = bp[b'alpha']; + * # e = bp[b'e']; + * r = bp[b'r']; # <<<<<<<<<<<<<< + * # delta = bp[b'delta']; + * b = bp[b'b']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 944, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 944, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_r = __pyx_t_3; /* "Epigrass/epimodels.py":946 - * r = bp['r']; - * # delta = bp['delta']; - * b = bp['b']; # <<<<<<<<<<<<<< - * w = bp['w']; - * # p = bp['p'] + * r = bp[b'r']; + * # delta = bp[b'delta']; + * b = bp[b'b']; # <<<<<<<<<<<<<< + * w = bp[b'w']; + * # p = bp[b'p'] */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 946, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 946, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_b = __pyx_t_3; /* "Epigrass/epimodels.py":947 - * # delta = bp['delta']; - * b = bp['b']; - * w = bp['w']; # <<<<<<<<<<<<<< - * # p = bp['p'] + * # delta = bp[b'delta']; + * b = bp[b'b']; + * w = bp[b'w']; # <<<<<<<<<<<<<< + * # p = bp[b'p'] * Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_w); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 947, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_w); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 947, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_w = __pyx_t_3; /* "Epigrass/epimodels.py":949 - * w = bp['w']; - * # p = bp['p'] + * w = bp[b'w']; + * # p = bp[b'p'] * Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # <<<<<<<<<<<<<< * * # Model @@ -17892,7 +17790,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_39stepSIRS_s(PyObject *__pyx_self __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stepSIRS_s (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits_2,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,&__pyx_n_s_dist,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inits,&__pyx_n_s_simstep,&__pyx_n_s_totpop,&__pyx_n_s_theta,&__pyx_n_s_npass,&__pyx_n_s_bi,&__pyx_n_s_bp,&__pyx_n_s_values,&__pyx_n_s_model,&__pyx_n_s_dist,0}; PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0}; values[5] = ((PyObject *)((PyObject *)Py_None)); values[6] = ((PyObject *)((PyObject *)Py_None)); @@ -17929,7 +17827,7 @@ static PyObject *__pyx_pw_8Epigrass_9epimodels_39stepSIRS_s(PyObject *__pyx_self kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits_2)) != 0)) kw_args--; + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inits)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -18086,29 +17984,29 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_38stepSIRS_s(CYTHON_UNUSED PyObje /* "Epigrass/epimodels.py":972 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ - __pyx_t_1 = ((__pyx_v_simstep == 1) != 0); + __pyx_t_1 = ((__pyx_v_simstep == 0) != 0); if (__pyx_t_1) { /* "Epigrass/epimodels.py":973 * """ - * if simstep == 1: # get initial values - * E, I, S = (bi['e'], bi['i'], bi['s']) # <<<<<<<<<<<<<< + * if simstep == 0: # get initial values + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) # <<<<<<<<<<<<<< * else: * E, I, S = inits */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 973, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 973, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bi, __pyx_n_s_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_bi, __pyx_n_b_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 973, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -18119,15 +18017,15 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_38stepSIRS_s(CYTHON_UNUSED PyObje /* "Epigrass/epimodels.py":972 * - theta = infectious individuals from neighbor sites * """ - * if simstep == 1: # get initial values # <<<<<<<<<<<<<< - * E, I, S = (bi['e'], bi['i'], bi['s']) + * if simstep == 0: # get initial values # <<<<<<<<<<<<<< + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: */ goto __pyx_L3; } /* "Epigrass/epimodels.py":975 - * E, I, S = (bi['e'], bi['i'], bi['s']) + * E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) * else: * E, I, S = inits # <<<<<<<<<<<<<< * N = totpop @@ -18202,7 +18100,7 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_38stepSIRS_s(CYTHON_UNUSED PyObje * E, I, S = inits * N = totpop # <<<<<<<<<<<<<< * R = N - (E + I + S) - * beta = bp['beta']; + * beta = bp[b'beta']; */ __pyx_v_N = __pyx_v_totpop; @@ -18210,19 +18108,19 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_38stepSIRS_s(CYTHON_UNUSED PyObje * E, I, S = inits * N = totpop * R = N - (E + I + S) # <<<<<<<<<<<<<< - * beta = bp['beta']; - * alpha = bp['alpha']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; */ __pyx_v_R = (__pyx_v_N - ((__pyx_v_E + __pyx_v_I) + __pyx_v_S)); /* "Epigrass/epimodels.py":978 * N = totpop * R = N - (E + I + S) - * beta = bp['beta']; # <<<<<<<<<<<<<< - * alpha = bp['alpha']; - * # e = bp['e']; + * beta = bp[b'beta']; # <<<<<<<<<<<<<< + * alpha = bp[b'alpha']; + * # e = bp[b'e']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 978, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_beta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 978, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -18230,59 +18128,59 @@ static PyObject *__pyx_pf_8Epigrass_9epimodels_38stepSIRS_s(CYTHON_UNUSED PyObje /* "Epigrass/epimodels.py":979 * R = N - (E + I + S) - * beta = bp['beta']; - * alpha = bp['alpha']; # <<<<<<<<<<<<<< - * # e = bp['e']; - * r = bp['r']; + * beta = bp[b'beta']; + * alpha = bp[b'alpha']; # <<<<<<<<<<<<<< + * # e = bp[b'e']; + * r = bp[b'r']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 979, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_alpha); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 979, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 979, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_alpha = __pyx_t_3; /* "Epigrass/epimodels.py":981 - * alpha = bp['alpha']; - * # e = bp['e']; - * r = bp['r']; # <<<<<<<<<<<<<< - * # delta = bp['delta']; - * b = bp['b']; + * alpha = bp[b'alpha']; + * # e = bp[b'e']; + * r = bp[b'r']; # <<<<<<<<<<<<<< + * # delta = bp[b'delta']; + * b = bp[b'b']; */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 981, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_r = __pyx_t_3; /* "Epigrass/epimodels.py":983 - * r = bp['r']; - * # delta = bp['delta']; - * b = bp['b']; # <<<<<<<<<<<<<< - * w = bp['w']; - * # p = bp['p'] + * r = bp[b'r']; + * # delta = bp[b'delta']; + * b = bp[b'b']; # <<<<<<<<<<<<<< + * w = bp[b'w']; + * # p = bp[b'p'] */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 983, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 983, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 983, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_b = __pyx_t_3; /* "Epigrass/epimodels.py":984 - * # delta = bp['delta']; - * b = bp['b']; - * w = bp['w']; # <<<<<<<<<<<<<< - * # p = bp['p'] + * # delta = bp[b'delta']; + * b = bp[b'b']; + * w = bp[b'w']; # <<<<<<<<<<<<<< + * # p = bp[b'p'] * Lpos_esp = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases */ - __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_bp, __pyx_n_s_w); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 984, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_bp, __pyx_n_b_w); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 984, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 984, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_w = __pyx_t_3; /* "Epigrass/epimodels.py":986 - * w = bp['w']; - * # p = bp['p'] + * w = bp[b'w']; + * # p = bp[b'p'] * Lpos_esp = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # <<<<<<<<<<<<<< * * if dist == 'poisson': @@ -18747,6 +18645,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_b_comp_age4, __pyx_k_comp_age4, sizeof(__pyx_k_comp_age4), 0, 0, 0, 1}, {&__pyx_n_b_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 0, 1}, {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1}, + {&__pyx_n_b_delta, __pyx_k_delta, sizeof(__pyx_k_delta), 0, 0, 0, 1}, {&__pyx_n_s_delta, __pyx_k_delta, sizeof(__pyx_k_delta), 0, 0, 1, 1}, {&__pyx_n_s_dist, __pyx_k_dist, sizeof(__pyx_k_dist), 0, 0, 1, 1}, {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, @@ -18774,11 +18673,11 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_inf, __pyx_k_inf, sizeof(__pyx_k_inf), 0, 0, 1, 1}, {&__pyx_n_s_infected, __pyx_k_infected, sizeof(__pyx_k_infected), 0, 0, 1, 1}, {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, - {&__pyx_kp_s_inits, __pyx_k_inits, sizeof(__pyx_k_inits), 0, 0, 1, 0}, - {&__pyx_n_s_inits_2, __pyx_k_inits_2, sizeof(__pyx_k_inits_2), 0, 0, 1, 1}, + {&__pyx_n_s_inits, __pyx_k_inits, sizeof(__pyx_k_inits), 0, 0, 1, 1}, {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1}, {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1}, {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1}, + {&__pyx_n_s_lindex, __pyx_k_lindex, sizeof(__pyx_k_lindex), 0, 0, 1, 1}, {&__pyx_n_s_lrange, __pyx_k_lrange, sizeof(__pyx_k_lrange), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, @@ -18797,6 +18696,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, {&__pyx_n_s_numpy_random, __pyx_k_numpy_random, sizeof(__pyx_k_numpy_random), 0, 0, 1, 1}, {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1}, + {&__pyx_n_b_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 0, 1}, {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1}, {&__pyx_n_s_parallel, __pyx_k_parallel, sizeof(__pyx_k_parallel), 0, 0, 1, 1}, {&__pyx_n_b_pc1, __pyx_k_pc1, sizeof(__pyx_k_pc1), 0, 0, 0, 1}, @@ -18827,12 +18727,10 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_results, __pyx_k_results, sizeof(__pyx_k_results), 0, 0, 1, 1}, {&__pyx_n_s_rpush, __pyx_k_rpush, sizeof(__pyx_k_rpush), 0, 0, 1, 1}, {&__pyx_n_b_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 0, 1}, - {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1}, {&__pyx_n_s_selectModel, __pyx_k_selectModel, sizeof(__pyx_k_selectModel), 0, 0, 1, 1}, {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1}, {&__pyx_n_s_simstep, __pyx_k_simstep, sizeof(__pyx_k_simstep), 0, 0, 1, 1}, - {&__pyx_n_s_sinits, __pyx_k_sinits, sizeof(__pyx_k_sinits), 0, 0, 1, 1}, {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1}, {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1}, {&__pyx_n_s_stepFlu, __pyx_k_stepFlu, sizeof(__pyx_k_stepFlu), 0, 0, 1, 1}, @@ -18874,15 +18772,19 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_totc, __pyx_k_totc, sizeof(__pyx_k_totc), 0, 0, 1, 1}, {&__pyx_n_s_totpop, __pyx_k_totpop, sizeof(__pyx_k_totpop), 0, 0, 1, 1}, {&__pyx_kp_s_totpop_2, __pyx_k_totpop_2, sizeof(__pyx_k_totpop_2), 0, 0, 1, 0}, - {&__pyx_kp_s_ts, __pyx_k_ts, sizeof(__pyx_k_ts), 0, 0, 1, 0}, + {&__pyx_kp_u_ts, __pyx_k_ts, sizeof(__pyx_k_ts), 0, 1, 0, 0}, + {&__pyx_kp_s_ts_2, __pyx_k_ts_2, sizeof(__pyx_k_ts_2), 0, 0, 1, 0}, {&__pyx_n_s_update_redis, __pyx_k_update_redis, sizeof(__pyx_k_update_redis), 0, 0, 1, 1}, {&__pyx_n_s_utf8, __pyx_k_utf8, sizeof(__pyx_k_utf8), 0, 0, 1, 1}, {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1}, + {&__pyx_n_b_vaccineNow, __pyx_k_vaccineNow, sizeof(__pyx_k_vaccineNow), 0, 0, 0, 1}, {&__pyx_n_s_vaccineNow, __pyx_k_vaccineNow, sizeof(__pyx_k_vaccineNow), 0, 0, 1, 1}, + {&__pyx_n_b_vaccov, __pyx_k_vaccov, sizeof(__pyx_k_vaccov), 0, 0, 0, 1}, {&__pyx_n_s_vaccov, __pyx_k_vaccov, sizeof(__pyx_k_vaccov), 0, 0, 1, 1}, {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, {&__pyx_kp_s_values_2, __pyx_k_values_2, sizeof(__pyx_k_values_2), 0, 0, 1, 0}, {&__pyx_n_s_vnames, __pyx_k_vnames, sizeof(__pyx_k_vnames), 0, 0, 1, 1}, + {&__pyx_n_b_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 0, 1}, {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; @@ -18911,7 +18813,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { /* "Epigrass/epimodels.py":366 * # print(inits) - * if simstep == 1: # get initial values + * if simstep == 0: # get initial values * E, I, S = (bi.get(b'e', 0), bi[b'i'], bi[b's']) # <<<<<<<<<<<<<< * else: * E, I, S = inits @@ -18962,10 +18864,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * Get updated parameters from the redis database. */ - __pyx_tuple__9 = PyTuple_Pack(15, __pyx_n_s_self, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_sinits, __pyx_n_s_inits_2, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_k, __pyx_n_s_v, __pyx_n_s_k, __pyx_n_s_v, __pyx_n_s_i); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_tuple__9 = PyTuple_Pack(14, __pyx_n_s_self, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_inits, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_k, __pyx_n_s_v, __pyx_n_s_k, __pyx_n_s_v, __pyx_n_s_i); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(1, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_get_args_from_redis, 67, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(1, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_get_args_from_redis, 67, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 67, __pyx_L1_error) /* "Epigrass/epimodels.py":85 * return inits, simstep, totpop, theta, npass, bi, bp, values @@ -18998,7 +18900,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * Flu model with classes S,E,I subclinical, I mild, I medium, I serious, deaths */ - __pyx_tuple__15 = PyTuple_Pack(85, __pyx_n_s_inits_2, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_vnames, __pyx_n_s_S1, __pyx_n_s_E1, __pyx_n_s_Is1, __pyx_n_s_Ic1, __pyx_n_s_Ig1, __pyx_n_s_S2, __pyx_n_s_E2, __pyx_n_s_Is2, __pyx_n_s_Ic2, __pyx_n_s_Ig2, __pyx_n_s_S3, __pyx_n_s_E3, __pyx_n_s_Is3, __pyx_n_s_Ic3, __pyx_n_s_Ig3, __pyx_n_s_S4, __pyx_n_s_E4, __pyx_n_s_Is4, __pyx_n_s_Ic4, __pyx_n_s_Ig4, __pyx_n_s_e, __pyx_n_s_c, __pyx_n_s_g, __pyx_n_s_d, __pyx_n_s_pc1, __pyx_n_s_pc2, __pyx_n_s_pc3, __pyx_n_s_pc4, __pyx_n_s_pp1, __pyx_n_s_pp2, __pyx_n_s_pp3, __pyx_n_s_pp4, __pyx_n_s_vaccineNow, __pyx_n_s_vaccov, __pyx_n_s_Infectantes, __pyx_n_s_L1pos, __pyx_n_s_L2pos, __pyx_n_s_L3pos, __pyx_n_s_L4pos, __pyx_n_s_E1pos, __pyx_n_s_Is1pos, __pyx_n_s_Ic1pos, __pyx_n_s_Ig1pos, __pyx_n_s_S1pos, __pyx_n_s_E2pos, __pyx_n_s_Is2pos, __pyx_n_s_Ic2pos, __pyx_n_s_Ig2pos, __pyx_n_s_S2pos, __pyx_n_s_E3pos, __pyx_n_s_Is3pos, __pyx_n_s_Ic3pos, __pyx_n_s_Ig3pos, __pyx_n_s_S3pos, __pyx_n_s_E4pos, __pyx_n_s_Is4pos, __pyx_n_s_Ic4pos, __pyx_n_s_Ig4pos, __pyx_n_s_S4pos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_tuple__15 = PyTuple_Pack(85, __pyx_n_s_inits, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_vnames, __pyx_n_s_S1, __pyx_n_s_E1, __pyx_n_s_Is1, __pyx_n_s_Ic1, __pyx_n_s_Ig1, __pyx_n_s_S2, __pyx_n_s_E2, __pyx_n_s_Is2, __pyx_n_s_Ic2, __pyx_n_s_Ig2, __pyx_n_s_S3, __pyx_n_s_E3, __pyx_n_s_Is3, __pyx_n_s_Ic3, __pyx_n_s_Ig3, __pyx_n_s_S4, __pyx_n_s_E4, __pyx_n_s_Is4, __pyx_n_s_Ic4, __pyx_n_s_Ig4, __pyx_n_s_e, __pyx_n_s_c, __pyx_n_s_g, __pyx_n_s_d, __pyx_n_s_pc1, __pyx_n_s_pc2, __pyx_n_s_pc3, __pyx_n_s_pc4, __pyx_n_s_pp1, __pyx_n_s_pp2, __pyx_n_s_pp3, __pyx_n_s_pp4, __pyx_n_s_vaccineNow, __pyx_n_s_vaccov, __pyx_n_s_Infectantes, __pyx_n_s_L1pos, __pyx_n_s_L2pos, __pyx_n_s_L3pos, __pyx_n_s_L4pos, __pyx_n_s_E1pos, __pyx_n_s_Is1pos, __pyx_n_s_Ic1pos, __pyx_n_s_Ig1pos, __pyx_n_s_S1pos, __pyx_n_s_E2pos, __pyx_n_s_Is2pos, __pyx_n_s_Ic2pos, __pyx_n_s_Ig2pos, __pyx_n_s_S2pos, __pyx_n_s_E3pos, __pyx_n_s_Is3pos, __pyx_n_s_Ic3pos, __pyx_n_s_Ig3pos, __pyx_n_s_S3pos, __pyx_n_s_E4pos, __pyx_n_s_Is4pos, __pyx_n_s_Ic4pos, __pyx_n_s_Ig4pos, __pyx_n_s_S4pos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(9, 0, 85, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_stepFlu, 172, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 172, __pyx_L1_error) @@ -19010,7 +18912,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * calculates the model SIS, and return its values (no demographics) */ - __pyx_tuple__17 = PyTuple_Pack(25, __pyx_n_s_inits_2, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_tuple__17 = PyTuple_Pack(25, __pyx_n_s_inits, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(9, 0, 25, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_stepSIS, 276, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 276, __pyx_L1_error) @@ -19022,7 +18924,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * Defines an stochastic model SIS: */ - __pyx_tuple__19 = PyTuple_Pack(27, __pyx_n_s_inits_2, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_dist, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_prob, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 316, __pyx_L1_error) + __pyx_tuple__19 = PyTuple_Pack(27, __pyx_n_s_inits, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_dist, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_prob, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 316, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(10, 0, 27, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_stepSIS_s, 316, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 316, __pyx_L1_error) @@ -19034,7 +18936,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * calculates the model SIR, and return its values (no demographics) */ - __pyx_tuple__21 = PyTuple_Pack(25, __pyx_n_s_inits_2, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 358, __pyx_L1_error) + __pyx_tuple__21 = PyTuple_Pack(25, __pyx_n_s_inits, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(9, 0, 25, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_stepSIR, 358, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 358, __pyx_L1_error) @@ -19046,7 +18948,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * Defines an stochastic model SIR: */ - __pyx_tuple__23 = PyTuple_Pack(27, __pyx_n_s_inits_2, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_dist, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_prob, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 395, __pyx_L1_error) + __pyx_tuple__23 = PyTuple_Pack(27, __pyx_n_s_inits, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_dist, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_prob, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(10, 0, 27, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_stepSIR_s, 395, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 395, __pyx_L1_error) @@ -19058,7 +18960,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * Defines the model SEIS: */ - __pyx_tuple__25 = PyTuple_Pack(27, __pyx_n_s_inits_2, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_e, __pyx_n_s_Epos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 437, __pyx_L1_error) + __pyx_tuple__25 = PyTuple_Pack(27, __pyx_n_s_inits, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_e, __pyx_n_s_Epos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(9, 0, 27, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_stepSEIS, 437, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 437, __pyx_L1_error) @@ -19070,7 +18972,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * Defines an stochastic model SEIS: */ - __pyx_tuple__27 = PyTuple_Pack(29, __pyx_n_s_inits_2, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_dist, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_e, __pyx_n_s_prob, __pyx_n_s_Epos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 473, __pyx_L1_error) + __pyx_tuple__27 = PyTuple_Pack(29, __pyx_n_s_inits, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_dist, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_e, __pyx_n_s_prob, __pyx_n_s_Epos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(10, 0, 29, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_stepSEIS_s, 473, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 473, __pyx_L1_error) @@ -19082,7 +18984,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * Defines the model SEIR: */ - __pyx_tuple__29 = PyTuple_Pack(27, __pyx_n_s_inits_2, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_e, __pyx_n_s_Epos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 515, __pyx_L1_error) + __pyx_tuple__29 = PyTuple_Pack(27, __pyx_n_s_inits, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_e, __pyx_n_s_Epos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__29); __Pyx_GIVEREF(__pyx_tuple__29); __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(9, 0, 27, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_stepSEIR, 515, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 515, __pyx_L1_error) @@ -19094,7 +18996,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * Defines an stochastic model SEIR: */ - __pyx_tuple__31 = PyTuple_Pack(29, __pyx_n_s_inits_2, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_dist, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_e, __pyx_n_s_prob, __pyx_n_s_Epos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 553, __pyx_L1_error) + __pyx_tuple__31 = PyTuple_Pack(29, __pyx_n_s_inits, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_dist, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_e, __pyx_n_s_prob, __pyx_n_s_Epos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 553, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__31); __Pyx_GIVEREF(__pyx_tuple__31); __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(10, 0, 29, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_stepSEIR_s, 553, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 553, __pyx_L1_error) @@ -19106,7 +19008,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * calculates the model SIpRpS, and return its values (no demographics) */ - __pyx_tuple__33 = PyTuple_Pack(26, __pyx_n_s_inits_2, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_delta, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 598, __pyx_L1_error) + __pyx_tuple__33 = PyTuple_Pack(26, __pyx_n_s_inits, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_delta, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__33); __Pyx_GIVEREF(__pyx_tuple__33); __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(9, 0, 26, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_stepSIpRpS, 598, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 598, __pyx_L1_error) @@ -19118,7 +19020,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * Defines an stochastic model SIpRpS: */ - __pyx_tuple__35 = PyTuple_Pack(28, __pyx_n_s_inits_2, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_dist, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_delta, __pyx_n_s_prob, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 634, __pyx_L1_error) + __pyx_tuple__35 = PyTuple_Pack(28, __pyx_n_s_inits, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_dist, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_delta, __pyx_n_s_prob, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__35); __Pyx_GIVEREF(__pyx_tuple__35); __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(10, 0, 28, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_stepSIpRpS_s, 634, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 634, __pyx_L1_error) @@ -19130,7 +19032,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * Defines the model SEIpRpS: */ - __pyx_tuple__37 = PyTuple_Pack(28, __pyx_n_s_inits_2, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_e, __pyx_n_s_delta, __pyx_n_s_Epos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 676, __pyx_L1_error) + __pyx_tuple__37 = PyTuple_Pack(28, __pyx_n_s_inits, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_e, __pyx_n_s_delta, __pyx_n_s_Epos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__37); __Pyx_GIVEREF(__pyx_tuple__37); __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(9, 0, 28, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_stepSEIpRpS, 676, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 676, __pyx_L1_error) @@ -19142,7 +19044,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * Defines an stochastic model SEIpRpS: */ - __pyx_tuple__39 = PyTuple_Pack(30, __pyx_n_s_inits_2, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_dist, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_e, __pyx_n_s_delta, __pyx_n_s_prob, __pyx_n_s_Epos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 713, __pyx_L1_error) + __pyx_tuple__39 = PyTuple_Pack(30, __pyx_n_s_inits, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_dist, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_e, __pyx_n_s_delta, __pyx_n_s_prob, __pyx_n_s_Epos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 713, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__39); __Pyx_GIVEREF(__pyx_tuple__39); __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(10, 0, 30, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_stepSEIpRpS_s, 713, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 713, __pyx_L1_error) @@ -19154,7 +19056,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * calculates the model SIpR, and return its values (no demographics) */ - __pyx_tuple__41 = PyTuple_Pack(27, __pyx_n_s_inits_2, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_p, __pyx_n_s_Lpos2, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 755, __pyx_L1_error) + __pyx_tuple__41 = PyTuple_Pack(27, __pyx_n_s_inits, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_p, __pyx_n_s_Lpos2, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 755, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__41); __Pyx_GIVEREF(__pyx_tuple__41); __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(9, 0, 27, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_stepSIpR, 755, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 755, __pyx_L1_error) @@ -19166,7 +19068,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * Defines an stochastic model SIpRs: */ - __pyx_tuple__43 = PyTuple_Pack(30, __pyx_n_s_inits_2, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_dist, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_p, __pyx_n_s_Lpos2_esp, __pyx_n_s_Lpos2, __pyx_n_s_prob, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 793, __pyx_L1_error) + __pyx_tuple__43 = PyTuple_Pack(30, __pyx_n_s_inits, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_dist, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_p, __pyx_n_s_Lpos2_esp, __pyx_n_s_Lpos2, __pyx_n_s_prob, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 793, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__43); __Pyx_GIVEREF(__pyx_tuple__43); __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(10, 0, 30, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_stepSIpR_s, 793, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 793, __pyx_L1_error) @@ -19178,7 +19080,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * calculates the model SEIpR, and return its values (no demographics) */ - __pyx_tuple__45 = PyTuple_Pack(29, __pyx_n_s_inits_2, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_e, __pyx_n_s_p, __pyx_n_s_Lpos2, __pyx_n_s_Epos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 840, __pyx_L1_error) + __pyx_tuple__45 = PyTuple_Pack(29, __pyx_n_s_inits, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_e, __pyx_n_s_p, __pyx_n_s_Lpos2, __pyx_n_s_Epos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 840, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__45); __Pyx_GIVEREF(__pyx_tuple__45); __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(9, 0, 29, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_stepSEIpR, 840, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 840, __pyx_L1_error) @@ -19190,7 +19092,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * Defines an stochastic model SEIpRs: */ - __pyx_tuple__47 = PyTuple_Pack(32, __pyx_n_s_inits_2, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_dist, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_e, __pyx_n_s_p, __pyx_n_s_Lpos2_esp, __pyx_n_s_Lpos2, __pyx_n_s_prob, __pyx_n_s_Epos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 880, __pyx_L1_error) + __pyx_tuple__47 = PyTuple_Pack(32, __pyx_n_s_inits, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_dist, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_e, __pyx_n_s_p, __pyx_n_s_Lpos2_esp, __pyx_n_s_Lpos2, __pyx_n_s_prob, __pyx_n_s_Epos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 880, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__47); __Pyx_GIVEREF(__pyx_tuple__47); __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(10, 0, 32, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_stepSEIpR_s, 880, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 880, __pyx_L1_error) @@ -19202,7 +19104,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * calculates the model SIRS, and return its values (no demographics) */ - __pyx_tuple__49 = PyTuple_Pack(25, __pyx_n_s_inits_2, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 929, __pyx_L1_error) + __pyx_tuple__49 = PyTuple_Pack(25, __pyx_n_s_inits, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 929, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__49); __Pyx_GIVEREF(__pyx_tuple__49); __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(9, 0, 25, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_stepSIRS, 929, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 929, __pyx_L1_error) @@ -19214,7 +19116,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * """ * Defines an stochastic model SIR: */ - __pyx_tuple__51 = PyTuple_Pack(27, __pyx_n_s_inits_2, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_dist, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_prob, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 966, __pyx_L1_error) + __pyx_tuple__51 = PyTuple_Pack(27, __pyx_n_s_inits, __pyx_n_s_simstep, __pyx_n_s_totpop, __pyx_n_s_theta, __pyx_n_s_npass, __pyx_n_s_bi, __pyx_n_s_bp, __pyx_n_s_values, __pyx_n_s_model, __pyx_n_s_dist, __pyx_n_s_beta, __pyx_n_s_alpha, __pyx_n_s_E, __pyx_n_s_I, __pyx_n_s_S, __pyx_n_s_N, __pyx_n_s_r, __pyx_n_s_b, __pyx_n_s_w, __pyx_n_s_Lpos_2, __pyx_n_s_Lpos_esp, __pyx_n_s_R, __pyx_n_s_Ipos, __pyx_n_s_Spos, __pyx_n_s_Rpos, __pyx_n_s_prob, __pyx_n_s_migInf_2); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 966, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__51); __Pyx_GIVEREF(__pyx_tuple__51); __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(10, 0, 27, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Epigrass_epimodels_py, __pyx_n_s_stepSIRS_s, 966, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 966, __pyx_L1_error) @@ -21472,93 +21374,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { } #endif -/* GetItemInt */ -static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { - PyObject *r; - if (!j) return NULL; - r = PyObject_GetItem(o, j); - Py_DECREF(j); - return r; -} -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, - CYTHON_NCP_UNUSED int wraparound, - CYTHON_NCP_UNUSED int boundscheck) { -#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - Py_ssize_t wrapped_i = i; - if (wraparound & unlikely(i < 0)) { - wrapped_i += PyList_GET_SIZE(o); - } - if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { - PyObject *r = PyList_GET_ITEM(o, wrapped_i); - Py_INCREF(r); - return r; - } - return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); -#else - return PySequence_GetItem(o, i); -#endif -} -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, - CYTHON_NCP_UNUSED int wraparound, - CYTHON_NCP_UNUSED int boundscheck) { -#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - Py_ssize_t wrapped_i = i; - if (wraparound & unlikely(i < 0)) { - wrapped_i += PyTuple_GET_SIZE(o); - } - if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { - PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); - Py_INCREF(r); - return r; - } - return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); -#else - return PySequence_GetItem(o, i); -#endif -} -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, - CYTHON_NCP_UNUSED int wraparound, - CYTHON_NCP_UNUSED int boundscheck) { -#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS - if (is_list || PyList_CheckExact(o)) { - Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); - if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { - PyObject *r = PyList_GET_ITEM(o, n); - Py_INCREF(r); - return r; - } - } - else if (PyTuple_CheckExact(o)) { - Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); - if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { - PyObject *r = PyTuple_GET_ITEM(o, n); - Py_INCREF(r); - return r; - } - } else { - PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; - if (likely(m && m->sq_item)) { - if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { - Py_ssize_t l = m->sq_length(o); - if (likely(l >= 0)) { - i += l; - } else { - if (!PyErr_ExceptionMatches(PyExc_OverflowError)) - return NULL; - PyErr_Clear(); - } - } - return m->sq_item(o, i); - } - } -#else - if (is_list || PySequence_Check(o)) { - return PySequence_GetItem(o, i); - } -#endif - return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); -} - /* RaiseTooManyValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, @@ -21666,6 +21481,93 @@ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int eq #endif } +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (!j) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + PyObject *r = PyList_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return m->sq_item(o, i); + } + } +#else + if (is_list || PySequence_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + /* ObjectGetItem */ #if CYTHON_USE_TYPE_SLOTS static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) { @@ -21695,30 +21597,6 @@ static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { } #endif -/* DictGetItem */ -#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY -static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { - PyObject *value; - value = PyDict_GetItemWithError(d, key); - if (unlikely(!value)) { - if (!PyErr_Occurred()) { - if (unlikely(PyTuple_Check(key))) { - PyObject* args = PyTuple_Pack(1, key); - if (likely(args)) { - PyErr_SetObject(PyExc_KeyError, args); - Py_DECREF(args); - } - } else { - PyErr_SetObject(PyExc_KeyError, key); - } - } - return NULL; - } - Py_INCREF(value); - return value; -} -#endif - /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractCObj(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { diff --git a/Epigrass/epimodels.py b/Epigrass/epimodels.py index 9cd8fe8..1a3c907 100644 --- a/Epigrass/epimodels.py +++ b/Epigrass/epimodels.py @@ -68,9 +68,9 @@ def get_args_from_redis(self): """ Get updated parameters from the redis database. """ - sinits = redisclient.lrange("{}:inits".format(self.geocode), -1, -1) + # sinits = redisclient.lindex("{}:inits".format(self.geocode), -1) # print(sinits) - inits = eval(sinits[0]) + inits = eval(redisclient.lindex(f"{self.geocode}:ts", -1)) simstep = int(redisclient.get("simstep")) totpop = int(float(redisclient.get("{}:totpop".format(self.geocode)))) theta = int(nan_to_num(float(redisclient.get("{}:theta".format(self.geocode))))) @@ -90,7 +90,7 @@ def update_redis(self, results): # Site state state, Lpos, migInf = results # print("Updating redis: ", state, migInf) - redisclient.rpush("{}:inits".format(self.geocode), str(state)) # updating inits + # redisclient.rpush("{}:inits".format(self.geocode), str(state)) # updating inits redisclient.rpush('{}:ts'.format(self.geocode), str(state)) redisclient.set('{}:Lpos'.format(self.geocode), Lpos) totc = int(nan_to_num(float(redisclient.get('{}:totalcases'.format(self.geocode))))) @@ -157,7 +157,7 @@ def selectModel(modtype): # try: # # TODO: move this import to the graph level # import CustomModel - # vnames['Custom'] = CustomModel.vnames + # vnames[b'Custom'] = CustomModel.vnames # return CustomModel.Model # except ImportError: # print("You have to Create a CustomModel.py file before you can select\nthe Custom model type") @@ -178,15 +178,15 @@ def stepFlu(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, values=N 'Susc_age2', 'Incub_age2', 'Subc_age2', 'Sympt_age2', 'Comp_age2', 'Susc_age3', 'Incub_age3', 'Subc_age3', 'Sympt_age3', 'Comp_age3', 'Susc_age4', 'Incub_age4', 'Subc_age4', 'Sympt_age4', 'Comp_age4',) - if simstep == 1: # get initial values + if simstep == 0: # get initial values S1, E1, Is1, Ic1, Ig1 = ( - bi[b'susc_age1'], bi[b'incub_age1'], bi[b'subc_age1'], bi[b'sympt_age1'], bi[b'comp_age1']) + bi[b'susc_age1'], bi[b'incub_age1'], bi[b'subc_age1'], bi[b'sympt_age1'], bi[b'comp_age1']) S2, E2, Is2, Ic2, Ig2 = ( - bi[b'susc_age2'], bi[b'incub_age2'], bi[b'subc_age2'], bi[b'sympt_age2'], bi[b'comp_age2']) + bi[b'susc_age2'], bi[b'incub_age2'], bi[b'subc_age2'], bi[b'sympt_age2'], bi[b'comp_age2']) S3, E3, Is3, Ic3, Ig3 = ( - bi[b'susc_age3'], bi[b'incub_age3'], bi[b'subc_age3'], bi[b'sympt_age3'], bi[b'comp_age3']) + bi[b'susc_age3'], bi[b'incub_age3'], bi[b'subc_age3'], bi[b'sympt_age3'], bi[b'comp_age3']) S4, E4, Is4, Ic4, Ig4 = ( - bi[b'susc_age4'], bi[b'incub_age4'], bi[b'subc_age4'], bi[b'sympt_age4'], bi[b'comp_age4']) + bi[b'susc_age4'], bi[b'incub_age4'], bi[b'subc_age4'], bi[b'sympt_age4'], bi[b'comp_age4']) else: # get values from last time step # print(len(inits)) S1, E1, Is1, Ic1, Ig1, S2, E2, Is2, Ic2, Ig2, S3, E3, Is3, Ic3, Ig3, S4, E4, Is4, Ic4, Ig4 = inits @@ -214,8 +214,8 @@ def stepFlu(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, values=N # Vacination event if 'vaccineNow' in bp: # TODO: add to bp when creating model - vaccineNow = bp['vaccineNow'] - vaccov = bp['vaccov'] + vaccineNow = bp[b'vaccineNow'] + vaccov = bp[b'vaccov'] S1 -= vaccov * S1 S2 -= vaccov * S2 S3 -= vaccov * S3 @@ -288,16 +288,16 @@ def stepSIS(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, values=N :param values: tuple of extra values :return: """ - if simstep == 1: # get initial values - E, I, S = (bi['e'], bi['i'], bi['s']) + if simstep == 0: # get initial values + E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) else: E, I, S = inits N = totpop - beta = bp['beta']; - alpha = bp['alpha']; - r = bp['r']; - b = bp['b'] + beta = bp[b'beta']; + alpha = bp[b'alpha']; + r = bp[b'r']; + b = bp[b'b'] Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # Model @@ -319,20 +319,20 @@ def stepSIS_s(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, values - inits = (E,I,S) - theta = infectious individuals from neighbor sites """ - if simstep == 1: # get initial values - E, I, S = (bi['e'], bi['i'], bi['s']) + if simstep == 0: # get initial values + E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) else: E, I, S = inits N = totpop - beta = bp['beta']; - alpha = bp['alpha']; - # e = bp['e']; - r = bp['r']; - # delta = bp['delta']; - b = bp['b']; - # w = bp['w']; - # p = bp['p'] + beta = bp[b'beta']; + alpha = bp[b'alpha']; + # e = bp[b'e']; + r = bp[b'r']; + # delta = bp[b'delta']; + b = bp[b'b']; + # w = bp[b'w']; + # p = bp[b'p'] Lpos_esp = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases if dist == 'poisson': @@ -358,23 +358,23 @@ def stepSIS_s(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, values def stepSIR(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, values=None, model=None): """ calculates the model SIR, and return its values (no demographics) - - inits = (E,I,S) + - inits = current state (E,I,S) - theta = infectious individuals from neighbor sites """ # print(inits) - if simstep == 1: # get initial values + if simstep == 0: # get initial values E, I, S = (bi.get(b'e', 0), bi[b'i'], bi[b's']) else: E, I, S = inits N = totpop beta = bp[b'beta']; alpha = bp[b'alpha']; - # e = bp['e']; + # e = bp[b'e']; r = bp[b'r']; - # delta = bp['delta']; + # delta = bp[b'delta']; b = bp[b'b']; - # w = bp['w']; - # p = bp['p'] + # w = bp[b'w']; + # p = bp[b'p'] Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # Model @@ -398,19 +398,19 @@ def stepSIR_s(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, values - inits = (E,I,S) - theta = infectious individuals from neighbor sites """ - if simstep == 1: # get initial values - E, I, S = (bi['e'], bi['i'], bi['s']) + if simstep == 0: # get initial values + E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) else: E, I, S = inits N = totpop - beta = bp['beta']; - alpha = bp['alpha']; - # e = bp['e']; - r = bp['r']; - # delta = bp['delta']; - b = bp['b']; - # w = bp['w']; - # p = bp['p'] + beta = bp[b'beta']; + alpha = bp[b'alpha']; + # e = bp[b'e']; + r = bp[b'r']; + # delta = bp[b'delta']; + b = bp[b'b']; + # w = bp[b'w']; + # p = bp[b'p'] Lpos_esp = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases if dist == 'poisson': @@ -440,19 +440,19 @@ def stepSEIS(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, values= - inits = (E,I,S) - theta = infectious individuals from neighbor sites """ - if simstep == 1: # get initial values - E, I, S = (bi['e'], bi['i'], bi['s']) + if simstep == 0: # get initial values + E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) else: E, I, S = inits N = totpop - beta = bp['beta']; - alpha = bp['alpha']; - e = bp['e']; - r = bp['r']; - # delta = bp['delta']; - b = bp['b']; - # w = bp['w']; - # p = bp['p'] + beta = bp[b'beta']; + alpha = bp[b'alpha']; + e = bp[b'e']; + r = bp[b'r']; + # delta = bp[b'delta']; + b = bp[b'b']; + # w = bp[b'w']; + # p = bp[b'p'] Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # Model @@ -477,19 +477,19 @@ def stepSEIS_s(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, value - par = (Beta, alpha, E,r,delta,B,w,p) see docs. - theta = infectious individuals from neighbor sites """ - if simstep == 1: # get initial values - E, I, S = (bi['e'], bi['i'], bi['s']) + if simstep == 0: # get initial values + E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) else: E, I, S = inits N = totpop - beta = bp['beta']; - alpha = bp['alpha']; - e = bp['e']; - r = bp['r']; - # delta = bp['delta']; - b = bp['b']; - # w = bp['w']; - # p = bp['p'] + beta = bp[b'beta']; + alpha = bp[b'alpha']; + e = bp[b'e']; + r = bp[b'r']; + # delta = bp[b'delta']; + b = bp[b'b']; + # w = bp[b'w']; + # p = bp[b'p'] Lpos_esp = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases if dist == 'poisson': @@ -519,19 +519,19 @@ def stepSEIR(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, values= - par = (Beta, alpha, E,r,delta,B,w,p) see docs. - theta = infectious individuals from neighbor sites """ - if simstep == 1: # get initial values - E, I, S = (bi['e'], bi['i'], bi['s']) + if simstep == 0: # get initial values + E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) else: E, I, S = inits N = totpop - beta = bp['beta']; - alpha = bp['alpha']; - e = bp['e']; - r = bp['r']; - # delta = bp['delta']; - b = bp['b']; - # w = bp['w']; - # p = bp['p'] + beta = bp[b'beta']; + alpha = bp[b'alpha']; + e = bp[b'e']; + r = bp[b'r']; + # delta = bp[b'delta']; + b = bp[b'b']; + # w = bp[b'w']; + # p = bp[b'p'] Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # Model @@ -557,19 +557,19 @@ def stepSEIR_s(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, value - par = (Beta, alpha, E,r,delta,B,w,p) see docs. - theta = infectious individuals from neighbor sites """ - if simstep == 1: # get initial values - E, I, S = (bi['e'], bi['i'], bi['s']) + if simstep == 0: # get initial values + E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) else: E, I, S = inits N = totpop - beta = bp['beta']; - alpha = bp['alpha']; - e = bp['e']; - r = bp['r']; - # delta = bp['delta']; - b = bp['b']; - # w = bp['w']; - # p = bp['p'] + beta = bp[b'beta']; + alpha = bp[b'alpha']; + e = bp[b'e']; + r = bp[b'r']; + # delta = bp[b'delta']; + b = bp[b'b']; + # w = bp[b'w']; + # p = bp[b'p'] Lpos_esp = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases if dist == 'poisson': @@ -601,19 +601,19 @@ def stepSIpRpS(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, value - inits = (E,I,S) - theta = infectious individuals from neighbor sites """ - if simstep == 1: # get initial values - E, I, S = (bi['e'], bi['i'], bi['s']) + if simstep == 0: # get initial values + E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) else: E, I, S = inits N = totpop - beta = bp['beta']; - alpha = bp['alpha']; - # e = bp['e']; - r = bp['r']; - delta = bp['delta']; - b = bp['b']; - # w = bp['w']; - # p = bp['p'] + beta = bp[b'beta']; + alpha = bp[b'alpha']; + # e = bp[b'e']; + r = bp[b'r']; + delta = bp[b'delta']; + b = bp[b'b']; + # w = bp[b'w']; + # p = bp[b'p'] Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # Model @@ -637,19 +637,19 @@ def stepSIpRpS_s(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, val - inits = (E,I,S) - theta = infectious individuals from neighbor sites """ - if simstep == 1: # get initial values - E, I, S = (bi['e'], bi['i'], bi['s']) + if simstep == 0: # get initial values + E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) else: E, I, S = inits N = totpop - beta = bp['beta']; - alpha = bp['alpha']; - # e = bp['e']; - r = bp['r']; - delta = bp['delta']; - b = bp['b']; - # w = bp['w']; - # p = bp['p'] + beta = bp[b'beta']; + alpha = bp[b'alpha']; + # e = bp[b'e']; + r = bp[b'r']; + delta = bp[b'delta']; + b = bp[b'b']; + # w = bp[b'w']; + # p = bp[b'p'] Lpos_esp = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases if dist == 'poisson': @@ -679,19 +679,19 @@ def stepSEIpRpS(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, valu - inits = (E,I,S) - theta = infectious individuals from neighbor sites """ - if simstep == 1: # get initial values - E, I, S = (bi['e'], bi['i'], bi['s']) + if simstep == 0: # get initial values + E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) else: E, I, S = inits N = totpop - beta = bp['beta']; - alpha = bp['alpha']; - e = bp['e']; - r = bp['r']; - delta = bp['delta']; - b = bp['b']; - # w = bp['w']; - # p = bp['p'] + beta = bp[b'beta']; + alpha = bp[b'alpha']; + e = bp[b'e']; + r = bp[b'r']; + delta = bp[b'delta']; + b = bp[b'b']; + # w = bp[b'w']; + # p = bp[b'p'] Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases @@ -716,19 +716,19 @@ def stepSEIpRpS_s(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, va - inits = (E,I,S) - theta = infectious individuals from neighbor sites """ - if simstep == 1: # get initial values - E, I, S = (bi['e'], bi['i'], bi['s']) + if simstep == 0: # get initial values + E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) else: E, I, S = inits N = totpop - beta = bp['beta']; - alpha = bp['alpha']; - e = bp['e']; - r = bp['r']; - delta = bp['delta']; - b = bp['b']; - # w = bp['w']; - # p = bp['p'] + beta = bp[b'beta']; + alpha = bp[b'alpha']; + e = bp[b'e']; + r = bp[b'r']; + delta = bp[b'delta']; + b = bp[b'b']; + # w = bp[b'w']; + # p = bp[b'p'] Lpos_esp = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases if dist == 'poisson': @@ -758,20 +758,20 @@ def stepSIpR(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, values= - inits = (E,I,S) - theta = infectious individuals from neighbor sites """ - if simstep == 1: # get initial values - E, I, S = (bi['e'], bi['i'], bi['s']) + if simstep == 0: # get initial values + E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) else: E, I, S = inits N = totpop R = N - E - I - S - beta = bp['beta']; - alpha = bp['alpha']; - # e = bp['e']; - r = bp['r']; - # delta = bp['delta']; - b = bp['b']; - # w = bp['w']; - p = bp['p'] + beta = bp[b'beta']; + alpha = bp[b'alpha']; + # e = bp[b'e']; + r = bp[b'r']; + # delta = bp[b'delta']; + b = bp[b'b']; + # w = bp[b'w']; + p = bp[b'p'] Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases Lpos2 = p * float(beta) * R * ((I + theta) / (N + npass)) ** alpha # number of secondary Infections @@ -796,19 +796,19 @@ def stepSIpR_s(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, value - inits = (E,I,S) - theta = infectious individuals from neighbor sites """ - if simstep == 1: # get initial values - E, I, S = (bi['e'], bi['i'], bi['s']) + if simstep == 0: # get initial values + E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) else: E, I, S = inits N = totpop - beta = bp['beta']; - alpha = bp['alpha']; - # e = bp['e']; - r = bp['r']; - # delta = bp['delta']; - b = bp['b']; - # w = bp['w']; - p = bp['p'] + beta = bp[b'beta']; + alpha = bp[b'alpha']; + # e = bp[b'e']; + r = bp[b'r']; + # delta = bp[b'delta']; + b = bp[b'b']; + # w = bp[b'w']; + p = bp[b'p'] R = N - E - I - S Lpos_esp = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases @@ -843,20 +843,20 @@ def stepSEIpR(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, values - inits = (E,I,S) - theta = infectious individuals from neighbor sites """ - if simstep == 1: # get initial values - E, I, S = (bi['e'], bi['i'], bi['s']) + if simstep == 0: # get initial values + E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) else: E, I, S = inits N = totpop R = N - E - I - S - beta = bp['beta']; - alpha = bp['alpha']; - e = bp['e']; - r = bp['r']; - # delta = bp['delta']; - b = bp['b']; - # w = bp['w']; - p = bp['p'] + beta = bp[b'beta']; + alpha = bp[b'alpha']; + e = bp[b'e']; + r = bp[b'r']; + # delta = bp[b'delta']; + b = bp[b'b']; + # w = bp[b'w']; + p = bp[b'p'] Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases Lpos2 = p * float(beta) * R * ((I + theta) / (N + npass)) ** alpha # secondary infections @@ -883,19 +883,19 @@ def stepSEIpR_s(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, valu - inits = (E,I,S) - theta = infectious individuals from neighbor sites """ - if simstep == 1: # get initial values - E, I, S = (bi['e'], bi['i'], bi['s']) + if simstep == 0: # get initial values + E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) else: E, I, S = inits N = totpop - beta = bp['beta']; - alpha = bp['alpha']; - e = bp['e']; - r = bp['r']; - # delta = bp['delta']; - b = bp['b']; - # w = bp['w']; - p = bp['p'] + beta = bp[b'beta']; + alpha = bp[b'alpha']; + e = bp[b'e']; + r = bp[b'r']; + # delta = bp[b'delta']; + b = bp[b'b']; + # w = bp[b'w']; + p = bp[b'p'] R = N - E - I - S Lpos_esp = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases @@ -932,20 +932,20 @@ def stepSIRS(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, values= - inits = (E,I,S) - theta = infectious individuals from neighbor sites """ - if simstep == 1: # get initial values - E, I, S = (bi['e'], bi['i'], bi['s']) + if simstep == 0: # get initial values + E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) else: E, I, S = inits N = totpop R = N - (E + I + S) - beta = bp['beta']; - alpha = bp['alpha']; - # e = bp['e']; - r = bp['r']; - # delta = bp['delta']; - b = bp['b']; - w = bp['w']; - # p = bp['p'] + beta = bp[b'beta']; + alpha = bp[b'alpha']; + # e = bp[b'e']; + r = bp[b'r']; + # delta = bp[b'delta']; + b = bp[b'b']; + w = bp[b'w']; + # p = bp[b'p'] Lpos = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases # Model @@ -969,20 +969,20 @@ def stepSIRS_s(inits, simstep, totpop, theta=0, npass=0, bi=None, bp=None, value - inits = (E,I,S) - theta = infectious individuals from neighbor sites """ - if simstep == 1: # get initial values - E, I, S = (bi['e'], bi['i'], bi['s']) + if simstep == 0: # get initial values + E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) else: E, I, S = inits N = totpop R = N - (E + I + S) - beta = bp['beta']; - alpha = bp['alpha']; - # e = bp['e']; - r = bp['r']; - # delta = bp['delta']; - b = bp['b']; - w = bp['w']; - # p = bp['p'] + beta = bp[b'beta']; + alpha = bp[b'alpha']; + # e = bp[b'e']; + r = bp[b'r']; + # delta = bp[b'delta']; + b = bp[b'b']; + w = bp[b'w']; + # p = bp[b'p'] Lpos_esp = float(beta) * S * ((I + theta) / (N + npass)) ** alpha # Number of new cases if dist == 'poisson': diff --git a/Epigrass/epipanel.py b/Epigrass/epipanel.py index 7953211..c257491 100644 --- a/Epigrass/epipanel.py +++ b/Epigrass/epipanel.py @@ -1,16 +1,20 @@ import pandas as pd import altair as alt +import networkx as NX +import nx_altair as nxa import geopandas as gpd import os import panel as pn import panel.widgets as pnw import hvplot.pandas +import holoviews as hv +from holoviews.operation.datashader import datashade, bundle_graph +from holoviews import opts from bokeh.resources import INLINE import param import base64 from sqlalchemy import create_engine import glob -# import gpdvega from functools import lru_cache enc_icon = b'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAA3ElEQVRYhe2WWQ7DIAxEH1XvVR+dmzkfVSJngWIW0VYZKV8EZgzDmABARFkhBDxomQs8z+tFvfoxBUG8nHkBgnircAlOwlt5LzxmkN4CbgFfJeB950vSrDHxUihOwtbEKxaQScKxQTUrCU87YJE5jnEeOJJfkdkxNUcTaDCnrbb0OCJRFbavmtySer3QVcAMI/5GEmaN1utNqAIhpjwghm8/Lsg2twbTd8CsU2/AlrnTTbhDbSX/swPgr2ZIeHl6QStX8tqsi79MBqxXMNcpu+LY7Ub0i48VdOv3CSxJ9X3LgJP02QAAAABJRU5ErkJggg==' @@ -41,6 +45,13 @@ def get_sims(fname): get_sims.cache_clear() return [] +def get_graph(pth): + full_path = os.path.join(os.path.abspath(pth), 'network.gml') + if os.path.exists(full_path): + G = NX.read_gml(full_path) + else: + G = NX.MultiDiGraph() + return G @lru_cache(maxsize=10) def get_meta_table(fname, simname): @@ -123,7 +134,7 @@ def update_sims(self): sims = get_sims(self.model_path) self.param['simulation_run'].objects = sims if sims: - self.simulation_run = sims[0] + self.simulation_run = sims[-1] self.df = read_simulation(self.model_path, self.simulation_run) @param.depends('simulation_run', watch=True) @@ -156,7 +167,7 @@ def view_meta(self): else: return pn.pane.Markdown("") - @param.depends('map_selector', 'simulation_run') + @param.depends('model_path', 'map_selector', 'simulation_run') def view_map(self): if self.map_selector and self.mapdf is not None: mapdf = self.mapdf @@ -201,6 +212,38 @@ def view_map(self): else: return pn.indicators.LoadingSpinner(value=True, width=100, height=100) + @param.depends('model_path') + def view_network(self): + G = get_graph(self.model_path) + if G.order == 0: + return pn.pane.Alert(f'## No network file found on {self.model_path}') + + # Draw the graph using Altair + pos = NX.get_node_attributes(G, 'pos') + # print(pos) + # viz = nxa.draw_networkx( + # G, pos=pos, + # node_color='weight', + # cmap='viridis', + # width='weight', + # edge_color='black', + # ) + + kwargs = dict(width=800, height=800, xaxis=None, yaxis=None) + hv.opts.defaults(opts.Nodes(**kwargs), opts.Graph(**kwargs)) + colors = ['#000000'] + hv.Cycle('Category20').values + epi_graph = hv.Graph.from_networkx(G, positions=pos) + + epi_graph.opts(cmap=colors, node_size=10, edge_line_width=1, + directed=True, + node_line_color='gray', + edge_color='gray', + node_color='circle' + ) + + f = epi_graph + return f + @param.depends('localities', 'time_slider', 'simulation_run') def view_series(self): if self.simulation_run is None: @@ -276,8 +319,9 @@ def altair_series(self): return chart -series_viewer = SeriesViewer() # model_path=sm.output()[0], sim_run=sm.output()[1], locality=sm.output()[2]) -button = pnw.Button(name='Refresh', button_type='primary') + + + def refresh(e): # Clear caches get_sims.cache_clear() @@ -289,46 +333,53 @@ def refresh(e): series_viewer.update_sims() series_viewer.update_localities() -button.on_click(refresh) - -# def save(fname='dashboard.html'): -# material.save(fname, resources=INLINE) -# save_button = pnw.Button(name="Save as HTML", button_type='warning') -# save_fname = pnw.TextInput(name="File name", value='Dashboard.html') -# save_button.on_click(save(save_fname.value)) - -# Assembling the panel -material.sidebar.append(pn.Param(series_viewer, name='Control Panel')) -material.sidebar.append(button) -material.sidebar.append(pn.layout.Divider()) -material.sidebar.append(series_viewer.view_meta) -# material.sidebar.append(pn.Row(save_fname, save_button)) - -# material.sidebar.append(pn.widgets.StaticText(sm.simulation_run.path)) -material.main.append( - pn.Column( - pn.Row( - pn.Card(series_viewer.view_map, title='Final State') - ), - pn.Row( - pn.Card(series_viewer.view_series, title='Time Map') - ), - pn.Row( - pn.Card(series_viewer.altair_series, title='Time Series') - ), +def main(): + global series_viewer + series_viewer = SeriesViewer() # model_path=sm.output()[0], sim_run=sm.output()[1], locality=sm.output()[2]) + button = pnw.Button(name='Refresh', button_type='primary') + button.on_click(refresh) + # Assembling the panel + material.sidebar.append(pn.Param(series_viewer, name='Control Panel')) + material.sidebar.append(button) + material.sidebar.append(pn.layout.Divider()) + material.sidebar.append(series_viewer.view_meta) + # material.sidebar.append(pn.Row(save_fname, save_button)) + # material.sidebar.append(pn.widgets.StaticText(sm.simulation_run.path)) + material.main.append( + pn.Column( + pn.Row( + pn.Card(series_viewer.view_map, title='Final State') + ), + # pn.Row( + # pn.Card(series_viewer.view_network, title='Network') + # ), + pn.Row( + pn.Card(series_viewer.view_series, title='Time Map') + ), + pn.Row( + pn.Card(series_viewer.altair_series, title='Time Series') + ), + + ) ) -) + return material, series_viewer + + + + + # material.servable(); def show(pth): + material, series_viewer = main() series_viewer.model_path = pth pn.serve(material, port=5006) if __name__ == "__main__": + material, series_viewer = main() series_viewer.model_path = '../demos/outdata-rio' refresh(None) pn.serve(material, port=5006, threaded=False) - diff --git a/Epigrass/manager.py b/Epigrass/manager.py index ac5cb58..b2282b9 100755 --- a/Epigrass/manager.py +++ b/Epigrass/manager.py @@ -862,7 +862,7 @@ def runGraph(self, graphobj, iterations=1, transp=1): g.maxstep = iterations sites = list(graphobj.site_dict.values()) edges = list(graphobj.edge_dict.values()) - + # redisclient.flushall() if transp: for n in tqdm(range(iterations), desc='Simulation steps'): # print() diff --git a/Epigrass/simobj.py b/Epigrass/simobj.py index 0e96918..2f012e7 100644 --- a/Epigrass/simobj.py +++ b/Epigrass/simobj.py @@ -8,6 +8,7 @@ import time import json import os +import numpy as np from numpy.random import binomial import networkx as NX from networkx.exception import NetworkXNoPath, NetworkXError @@ -171,7 +172,8 @@ def runModel(self, parallel=True): pipe = redisclient.pipeline() pipe.set("simstep", simstep) pipe.set("{}:totpop".format(self.geocode), totpop) - pipe.rpush("{}:inits".format(self.geocode), str(inits)) + # pipe.rpush("{}:inits".format(self.geocode), str(inits)) + pipe.rpush("{}:ts".format(self.geocode), str(inits)) pipe.set("{}:npass".format(self.geocode), float(npass)) pipe.set("{}:theta".format(self.geocode), int(nan_to_num(theta))) pipe.hmset("{}:bi".format(self.geocode), self.bi) @@ -197,10 +199,10 @@ def handle(self, res): Processes the output of a step updating simulation statistics :param res: Tuple with the output of the simulation model """ - pipe = redisclient.pipeline() - last_state, Lpos, migInf = pipe.lindex("{}:ts".format(self.geocode), -1) \ - .get("{}:Lpos".format(self.geocode)) \ - .get("{}:migInf".format(self.geocode)).execute() + # pipe = redisclient.pipeline() + last_state = redisclient.lindex("{}:ts".format(self.geocode), -1) + Lpos = redisclient.lindex(f"{self.geocode}:incidence", -1) + migInf = redisclient.get("{}:migInf".format(self.geocode)) self.ts.append(eval(last_state)) Lpos = float(Lpos) migInf = float(migInf) @@ -510,7 +512,7 @@ def __init__(self, graph_name, digraph=0): self.site_dict = {} # geocode as keys self.edge_dict = {} # geocode tuple as key self.speed = 0 # speed of the transportation system - self.simstep = 1 # current step in the simulation + self.simstep = 0 # current step in the simulation self.maxstep = 100 # maximum number of steps in the simulation self.epipath = [] self.graphdict = {} @@ -1023,12 +1025,11 @@ def save_topology(self, pa): g = NX.MultiDiGraph() for gc, n in self.site_dict.items(): - g.add_node(gc, name=n.sitename) + g.add_node(gc, name=str(n.sitename), pos=n.pos) for ed, e in self.edge_dict.items(): g.add_edge(ed[0], ed[1], weight=e.fmig + e.bmig) # print(g.nodes) # NX.write_graphml_lxml(g, pa) - NX.write_gexf(g, pa) NX.write_gml(g, pa.replace('gexf', 'gml')) nl = json_graph.node_link_data(g) jsonpath = pa.replace('gexf', 'json') diff --git a/demos/CustomModel.py b/demos/CustomModel.py index aa0742b..9f42ec5 100644 --- a/demos/CustomModel.py +++ b/demos/CustomModel.py @@ -28,7 +28,7 @@ def Model(inits, simstep, totpop, theta=0, npass=0, bi={}, bp={}, values=(), mod """ ##### Get state variables' current values - if simstep == 1: # get initial values + if simstep == 0: # get initial values E, I, S = (bi[b'e'], bi[b'i'], bi[b's']) else: # get last value E, I, S = inits diff --git a/demos/CustomModel_example.py b/demos/CustomModel_example.py index 37f9e0d..d78d853 100644 --- a/demos/CustomModel_example.py +++ b/demos/CustomModel_example.py @@ -17,7 +17,7 @@ def Model(inits,simstep, totpop,theta=0, npass=0,bi={},bp={},values=()): """ ##### Get state variables' current values - if simstep == 1: #get initial values + if simstep == 0: #get initial values E,I,S = (bi['e'], bi['i'], bi['s']) else: # get last value E,I,S = inits diff --git a/demos/rio.epg b/demos/rio.epg index 8e1dc40..82a1d0d 100644 --- a/demos/rio.epg +++ b/demos/rio.epg @@ -35,7 +35,7 @@ encoding = #==============================================================# #model types available: SIS, SIS_s ,SIR, SIR_s, SEIS, SEIS_s, SEIR, SEIR_s, # SIpRpS, SIpRpS_s,SIpR,SIpR_s,Influenza or Custom (see documentation for description). -modtype = SIR +modtype = SEIpRpS #==============================================================# [MODEL PARAMETERS] diff --git a/demos/spread.gml b/demos/spread.gml index 384daf2..1156c63 100644 --- a/demos/spread.gml +++ b/demos/spread.gml @@ -9,200 +9,200 @@ graph [ ] node [ id 1 - label "4550602" - name "Santo Cristo 2" - time 2 + label "4550701" + name "Av.Passos" + time 1 ] node [ id 2 - label "4550604" - name "Santo Cristo" - time 2 + label "4550702" + name "Mal.Floriano" + time 1 ] node [ id 3 - label "4550605" - name "Praca Maua" - time 2 + label "4550703" + name "Candelaria" + time 1 ] node [ id 4 - label "4550701" - name "Av.Passos" - time 2 + label "4550704" + name "1o. de marco" + time 1 ] node [ id 5 - label "4550702" - name "Mal.Floriano" - time 2 + label "4550705" + name "Aerop.S.Dumont" + time 1 ] node [ id 6 - label "4550703" - name "Candelaria" - time 2 + label "4550706" + name "Alm. Barroso" + time 1 ] node [ id 7 - label "4550704" - name "1o. de marco" - time 2 + label "4550709" + name "Cruz Vermelha" + time 1 ] node [ id 8 - label "4550705" - name "Aerop.S.Dumont" - time 2 + label "4550804" + name "Rio Comprido 1" + time 1 ] node [ id 9 - label "4550706" - name "Alm. Barroso" - time 2 + label "4550904" + name "Sao Salvador" + time 1 ] node [ id 10 - label "4550707" - name "Passeio Publico" - time 2 + label "4550906" + name "Morro da Viuva" + time 1 ] node [ id 11 - label "4550708" - name "Av. Chile" - time 2 + label "4550908" + name "General Glicerio" + time 1 ] node [ id 12 - label "4550709" - name "Cruz Vermelha" - time 2 + label "4550909" + name "Cosme Velho" + time 1 ] node [ id 13 - label "4550710" - name "Praca da Republica" - time 2 + label "4551001" + name "Leme" + time 1 ] node [ id 14 - label "4550711" - name "Central do Brasil" - time 2 + label "4551105" + name "Morro da Catacumba" + time 1 ] node [ id 15 - label "4550801" - name "Sambodromo" - time 2 + label "4551106" + name "Fonte da Saudade" + time 1 ] node [ id 16 - label "4550802" - name "Piranhao" - time 2 + label "4551107" + name "Parque Lage" + time 1 ] node [ id 17 - label "4550803" - name "Estacio" - time 2 + label "4551108" + name "Hipica" + time 1 ] node [ id 18 - label "4550804" - name "Rio Comprido 1" - time 2 + label "4551114" + name "Vidigal" + time 1 ] node [ id 19 - label "4550805" - name "Rio Comprido 2" - time 2 + label "4551310" + name "Vista Chinesa" + time 1 ] node [ id 20 - label "4550806" - name "Campos da Paz" - time 2 + label "4553301" + name "Rocinha" + time 1 ] node [ id 21 - label "4550904" - name "Sao Salvador" + label "4550604" + name "Santo Cristo" time 2 ] node [ id 22 - label "4550906" - name "Morro da Viuva" + label "4550605" + name "Praca Maua" time 2 ] node [ id 23 - label "4550908" - name "General Glicerio" + label "4550707" + name "Passeio Publico" time 2 ] node [ id 24 - label "4550909" - name "Cosme Velho" + label "4550708" + name "Av. Chile" time 2 ] node [ id 25 - label "4551001" - name "Leme" + label "4550710" + name "Praca da Republica" time 2 ] node [ id 26 - label "4551105" - name "Morro da Catacumba" + label "4550711" + name "Central do Brasil" time 2 ] node [ id 27 - label "4551106" - name "Fonte da Saudade" + label "4550801" + name "Sambodromo" time 2 ] node [ id 28 - label "4551107" - name "Parque Lage" + label "4550802" + name "Piranhao" time 2 ] node [ id 29 - label "4551108" - name "Hipica" + label "4550803" + name "Estacio" time 2 ] node [ id 30 - label "4551114" - name "Vidigal" + label "4550805" + name "Rio Comprido 2" time 2 ] node [ id 31 - label "4551308" - name "Alto da Boa Vista" + label "4550806" + name "Campos da Paz" time 2 ] node [ id 32 - label "4551309" - name "Sumare" + label "4551308" + name "Alto da Boa Vista" time 2 ] node [ id 33 - label "4551310" - name "Vista Chinesa" + label "4551309" + name "Sumare" time 2 ] node [ @@ -225,416 +225,512 @@ graph [ ] node [ id 37 - label "4553301" - name "Rocinha" - time 2 + label "4550602" + name "Santo Cristo 2" + time 3 ] node [ id 38 label "4550902" name "Gloria" - time 3 + time 6 ] edge [ source 1 target 0 key 0 - weight 1.731694281133084 + weight 1.19722073757349 ] edge [ source 2 target 0 key 0 - weight 4.040619989310529 + weight 1.1544628540887225 ] edge [ source 3 target 0 key 0 - weight 9.812934259754142 + weight 1.2399786210582575 ] edge [ source 4 target 0 key 0 - weight 16.162479957242116 + weight 1.4110101549973277 ] edge [ source 5 target 0 key 0 - weight 15.585248530197756 + weight 1.282736504543025 ] edge [ source 6 target 0 key 0 - weight 16.739711384286476 + weight 1.3254943880277925 ] edge [ source 7 target 0 key 0 - weight 19.048637092463924 + weight 1.3254943880277925 ] edge [ source 8 target 0 key 0 - weight 17.31694281133084 + weight 1.111704970603955 ] edge [ source 9 target 0 key 0 - weight 17.8941742383752 + weight 2.864778193479423 ] edge [ source 10 target 0 key 0 - weight 10.390165686798504 + weight 1.7530732228754677 ] edge [ source 11 target 0 key 0 - weight 13.27632282202031 + weight 4.44681988241582 ] edge [ source 12 target 0 key 0 - weight 17.8941742383752 + weight 2.693746659540353 ] edge [ source 13 target 0 key 0 - weight 8.081239978621058 + weight 1.19722073757349 ] edge [ source 14 target 0 key 0 - weight 9.23570283270978 + weight 1.6675574559059327 ] edge [ source 15 target 0 key 0 - weight 4.040619989310529 + weight 3.377872795296633 ] edge [ source 16 target 0 key 0 - weight 12.699091394975948 + weight 2.3516835916622125 ] edge [ source 17 target 0 key 0 - weight 9.23570283270978 + weight 3.035809727418493 ] edge [ source 18 target 0 key 0 - weight 15.008017103153394 + weight 2.2661678246926775 ] edge [ source 19 target 0 key 0 - weight 5.772314270443613 + weight 2.0951362907536075 ] edge [ source 20 target 0 key 0 - weight 9.23570283270978 + weight 1.282736504543025 ] edge [ source 21 target 0 key 0 - weight 38.67450561197221 + weight 0.9877071084981294 ] edge [ source 22 target 0 key 0 - weight 23.666488508818812 + weight 2.398717263495457 ] edge [ source 23 target 0 key 0 - weight 60.032068412613576 + weight 2.5398182789951895 ] edge [ source 24 target 0 key 0 - weight 36.36557990379476 + weight 3.2453233564938535 ] edge [ source 25 target 0 key 0 - weight 16.162479957242116 + weight 1.9754142169962587 ] edge [ source 26 target 0 key 0 - weight 22.512025654730092 + weight 2.257616247995724 ] edge [ source 27 target 0 key 0 - weight 45.601282736504544 + weight 0.9877071084981294 ] edge [ source 28 target 0 key 0 - weight 31.747728487439872 + weight 3.104222340994121 ] edge [ source 29 target 0 key 0 - weight 40.983431320149656 + weight 2.257616247995724 ] edge [ source 30 target 0 key 0 - weight 30.593265633351148 + weight 1.4110101549973277 ] edge [ source 31 target 0 key 0 - weight 8.081239978621058 + weight 2.257616247995724 ] edge [ source 32 target 0 key 0 - weight 11.544628540887226 + weight 1.9754142169962587 ] edge [ source 33 target 0 key 0 - weight 28.284339925173704 + weight 2.8220203099946555 ] edge [ source 34 target 0 key 0 - weight 8.081239978621058 + weight 1.9754142169962587 ] edge [ source 35 target 0 key 0 - weight 5.772314270443613 + weight 1.4110101549973277 ] edge [ source 36 target 0 key 0 - weight 4.61785141635489 + weight 1.128808123997862 ] edge [ source 37 target 0 key 0 - weight 17.31694281133084 + weight 0.6072853908283344 ] edge [ - source 38 + source 37 target 1 key 0 - weight 0.009610520991401111 + weight 8.03944688605424E-05 + ] + edge [ + source 37 + target 2 + key 0 + weight 0.0001023523993108272 + ] + edge [ + source 37 + target 5 + key 0 + weight 4.576868506567807E-05 + ] + edge [ + source 37 + target 7 + key 0 + weight 0.0015414937074024729 + ] + edge [ + source 37 + target 8 + key 0 + weight 0.001350266403912123 + ] + edge [ + source 37 + target 9 + key 0 + weight 0.00224094559115925 + ] + edge [ + source 37 + target 10 + key 0 + weight 0.0011730438499696798 + ] + edge [ + source 37 + target 11 + key 0 + weight 0.007386888273314867 + ] + edge [ + source 37 + target 12 + key 0 + weight 0.0011263212614798129 + ] + edge [ + source 37 + target 13 + key 0 + weight 0.0011421423326897454 + ] + edge [ + source 37 + target 14 + key 0 + weight 0.0009204517293871916 + ] + edge [ + source 37 + target 15 + key 0 + weight 0.0024476594256741995 + ] + edge [ + source 37 + target 16 + key 0 + weight 0.0012842939704612389 + ] + edge [ + source 37 + target 17 + key 0 + weight 0.0003303528168083513 + ] + edge [ + source 37 + target 18 + key 0 + weight 0.001163774862462971 + ] + edge [ + source 37 + target 19 + key 0 + weight 0.00019850131507121235 ] edge [ source 38 target 2 key 0 - weight 0.010226517359513217 + weight 0.002153738697943164 ] edge [ source 38 target 3 key 0 - weight 0.02311050243944193 + weight 0.0006630056498216648 ] edge [ source 38 - target 5 + target 6 key 0 - weight 0.010235239931082716 + weight 0.000564210101834547 ] edge [ source 38 - target 6 + target 7 + key 0 + weight 0.04865665890686591 + ] + edge [ + source 38 + target 8 key 0 - weight 0.003074026398201695 + weight 0.04429636541973846 ] edge [ source 38 target 9 key 0 - weight 0.002622364138399124 + weight 0.09455003391646427 ] edge [ source 38 target 10 key 0 - weight 0.02321262766945218 + weight 0.04891617612456331 ] edge [ source 38 target 11 key 0 - weight 0.0074204089786948655 + weight 0.19479693636011897 ] edge [ source 38 target 12 key 0 - weight 0.17220686845553343 + weight 0.046008563287747675 ] edge [ source 38 target 13 key 0 - weight 0.015904923899357177 + weight 0.02830258698071814 ] edge [ source 38 target 14 key 0 - weight 0.004531493882483259 + weight 0.040425048516331386 ] edge [ source 38 target 15 key 0 - weight 0.019385062732216896 + weight 0.06736542233236957 ] edge [ source 38 target 16 key 0 - weight 0.01688381123899035 + weight 0.033544009227359 ] edge [ source 38 target 17 key 0 - weight 0.10907314955502495 + weight 0.01607926277889584 ] edge [ source 38 target 18 key 0 - weight 0.17243266914823735 + weight 0.0564156646575458 ] edge [ source 38 target 19 key 0 - weight 0.0621992723858702 - ] - edge [ - source 38 - target 20 - key 0 - weight 0.06260671599317018 + weight 0.015628041444394218 ] edge [ source 38 target 21 key 0 - weight 0.3840365581712126 + weight 0.0017004891093350463 ] edge [ source 38 target 22 key 0 - weight 0.20806616762597796 + weight 0.004847082524729805 ] edge [ source 38 target 23 key 0 - weight 0.7670999360750053 + weight 0.004673859969101385 ] edge [ source 38 target 24 key 0 - weight 0.2027378270663663 + weight 0.001435492989447234 ] edge [ source 38 target 25 key 0 - weight 0.11747749707665951 + weight 0.0029268121293563017 ] edge [ source 38 target 26 key 0 - weight 0.17523984847948457 + weight 0.0007752383370329385 ] edge [ source 38 target 27 key 0 - weight 0.28847414659731635 + weight 0.0035067554120234187 ] edge [ source 38 target 28 key 0 - weight 0.14415092668452867 + weight 0.003376613148696513 ] edge [ source 38 target 29 key 0 - weight 0.07047526758578161 + weight 0.025701778945969492 ] edge [ source 38 target 30 key 0 - weight 0.23407744392721117 + weight 0.013151658667541045 ] edge [ source 38 target 31 key 0 - weight 0.08480865048234919 + weight 0.012866692735543124 ] edge [ source 38 target 32 key 0 - weight 0.01037344398340249 + weight 0.016514584123362944 ] edge [ source 38 target 33 key 0 - weight 0.06947546027492431 + weight 0.0018831379799933879 + ] + edge [ + source 38 + target 37 + key 0 + weight 0.002945408625030706 ] ] diff --git a/demos/spread.graphml b/demos/spread.graphml index 6822d84..624bf60 100644 --- a/demos/spread.graphml +++ b/demos/spread.graphml @@ -1,129 +1,133 @@ - + Rodoviaria 1 - - Santo Cristo 2 - 2 - - - Santo Cristo - 2 - - - Praca Maua - 2 - Av.Passos - 2 + 1 Mal.Floriano - 2 + 1 Candelaria - 2 + 1 1o. de marco - 2 + 1 Aerop.S.Dumont - 2 + 1 Alm. Barroso - 2 - - - Passeio Publico - 2 - - - Av. Chile - 2 + 1 Cruz Vermelha - 2 - - - Praca da Republica - 2 - - - Central do Brasil - 2 - - - Sambodromo - 2 - - - Piranhao - 2 - - - Estacio - 2 + 1 Rio Comprido 1 - 2 - - - Rio Comprido 2 - 2 - - - Campos da Paz - 2 + 1 Sao Salvador - 2 + 1 Morro da Viuva - 2 + 1 General Glicerio - 2 + 1 Cosme Velho - 2 + 1 Leme - 2 + 1 Morro da Catacumba - 2 + 1 Fonte da Saudade - 2 + 1 Parque Lage - 2 + 1 Hipica - 2 + 1 Vidigal + 1 + + + Vista Chinesa + 1 + + + Rocinha + 1 + + + Santo Cristo + 2 + + + Praca Maua + 2 + + + Passeio Publico + 2 + + + Av. Chile + 2 + + + Praca da Republica + 2 + + + Central do Brasil + 2 + + + Sambodromo + 2 + + + Piranhao + 2 + + + Estacio + 2 + + + Rio Comprido 2 + 2 + + + Campos da Paz 2 @@ -134,10 +138,6 @@ Sumare 2 - - Vista Chinesa - 2 - Paqueta 2 @@ -150,213 +150,261 @@ Andre Cavalcanti 2 - - Rocinha - 2 + + Santo Cristo 2 + 3 Gloria - 3 + 6 - - 1.731694281133084 - - - 4.040619989310529 - - - 9.812934259754142 - - 16.162479957242116 + 1.19722073757349 - 15.585248530197756 + 1.1544628540887225 - 16.739711384286476 + 1.2399786210582575 - 19.048637092463924 + 1.4110101549973277 - 17.31694281133084 + 1.282736504543025 - 17.8941742383752 - - - 10.390165686798504 - - - 13.27632282202031 + 1.3254943880277925 - 17.8941742383752 - - - 8.081239978621058 - - - 9.23570283270978 - - - 4.040619989310529 - - - 12.699091394975948 - - - 9.23570283270978 + 1.3254943880277925 - 15.008017103153394 - - - 5.772314270443613 - - - 9.23570283270978 + 1.111704970603955 - 38.67450561197221 + 2.864778193479423 - 23.666488508818812 + 1.7530732228754677 - 60.032068412613576 + 4.44681988241582 - 36.36557990379476 + 2.693746659540353 - 16.162479957242116 + 1.19722073757349 - 22.512025654730092 + 1.6675574559059327 - 45.601282736504544 + 3.377872795296633 - 31.747728487439872 + 2.3516835916622125 - 40.983431320149656 + 3.035809727418493 - 30.593265633351148 + 2.2661678246926775 + + + 2.0951362907536075 + + + 1.282736504543025 + + + 0.9877071084981294 + + + 2.398717263495457 + + + 2.5398182789951895 + + + 3.2453233564938535 + + + 1.9754142169962587 + + + 2.257616247995724 + + + 0.9877071084981294 + + + 3.104222340994121 + + + 2.257616247995724 + + + 1.4110101549973277 + + + 2.257616247995724 - 8.081239978621058 + 1.9754142169962587 - 11.544628540887226 - - - 28.284339925173704 + 2.8220203099946555 - 8.081239978621058 + 1.9754142169962587 - 5.772314270443613 + 1.4110101549973277 - 4.61785141635489 + 1.128808123997862 - - 17.31694281133084 + + 0.6072853908283344 - - 0.009610520991401111 + + 8.03944688605424e-05 - - 0.010226517359513217 + + 0.0001023523993108272 - - 0.02311050243944193 + + 4.576868506567807e-05 - - 0.010235239931082716 + + 0.0015414937074024729 - - 0.003074026398201695 + + 0.001350266403912123 - - 0.002622364138399124 + + 0.00224094559115925 - - 0.02321262766945218 + + 0.0011730438499696798 - - 0.0074204089786948655 + + 0.007386888273314867 - - 0.17220686845553343 + + 0.0011263212614798129 - - 0.015904923899357177 + + 0.0011421423326897454 - - 0.004531493882483259 + + 0.0009204517293871916 - - 0.019385062732216896 + + 0.0024476594256741995 - - 0.01688381123899035 + + 0.0012842939704612389 - - 0.10907314955502495 + + 0.0003303528168083513 - - 0.17243266914823735 + + 0.001163774862462971 - - 0.0621992723858702 + + 0.00019850131507121235 - - 0.06260671599317018 + + 0.002153738697943164 + + + 0.0006630056498216648 + + + 0.000564210101834547 + + + 0.04865665890686591 + + + 0.04429636541973846 - 0.3840365581712126 + 0.09455003391646427 - 0.20806616762597796 + 0.04891617612456331 - 0.7670999360750053 + 0.19479693636011897 - 0.2027378270663663 + 0.046008563287747675 - 0.11747749707665951 + 0.02830258698071814 - 0.17523984847948457 + 0.040425048516331386 - 0.28847414659731635 + 0.06736542233236957 - 0.14415092668452867 + 0.033544009227359 - 0.07047526758578161 + 0.01607926277889584 - 0.23407744392721117 + 0.0564156646575458 + + + 0.015628041444394218 + + + 0.0017004891093350463 + + + 0.004847082524729805 + + + 0.004673859969101385 + + + 0.001435492989447234 + + + 0.0029268121293563017 + + + 0.0007752383370329385 + + + 0.0035067554120234187 + + + 0.003376613148696513 + + + 0.025701778945969492 + + + 0.013151658667541045 + + + 0.012866692735543124 - 0.08480865048234919 + 0.016514584123362944 - 0.01037344398340249 + 0.0018831379799933879 - - 0.06947546027492431 + + 0.002945408625030706 \ No newline at end of file diff --git a/demos/spread.json b/demos/spread.json index c6cfd9c..46f522d 100644 --- a/demos/spread.json +++ b/demos/spread.json @@ -1 +1 @@ -{"directed": true, "multigraph": true, "graph": {}, "nodes": [{"name": "Rodoviaria", "time": 1, "id": 4550603}, {"name": "Santo Cristo 2", "time": 2, "id": 4550602}, {"name": "Santo Cristo", "time": 2, "id": 4550604}, {"name": "Praca Maua", "time": 2, "id": 4550605}, {"name": "Av.Passos", "time": 2, "id": 4550701}, {"name": "Mal.Floriano", "time": 2, "id": 4550702}, {"name": "Candelaria", "time": 2, "id": 4550703}, {"name": "1o. de marco", "time": 2, "id": 4550704}, {"name": "Aerop.S.Dumont", "time": 2, "id": 4550705}, {"name": "Alm. Barroso", "time": 2, "id": 4550706}, {"name": "Passeio Publico", "time": 2, "id": 4550707}, {"name": "Av. Chile", "time": 2, "id": 4550708}, {"name": "Cruz Vermelha", "time": 2, "id": 4550709}, {"name": "Praca da Republica", "time": 2, "id": 4550710}, {"name": "Central do Brasil", "time": 2, "id": 4550711}, {"name": "Sambodromo", "time": 2, "id": 4550801}, {"name": "Piranhao", "time": 2, "id": 4550802}, {"name": "Estacio", "time": 2, "id": 4550803}, {"name": "Rio Comprido 1", "time": 2, "id": 4550804}, {"name": "Rio Comprido 2", "time": 2, "id": 4550805}, {"name": "Campos da Paz", "time": 2, "id": 4550806}, {"name": "Sao Salvador", "time": 2, "id": 4550904}, {"name": "Morro da Viuva", "time": 2, "id": 4550906}, {"name": "General Glicerio", "time": 2, "id": 4550908}, {"name": "Cosme Velho", "time": 2, "id": 4550909}, {"name": "Leme", "time": 2, "id": 4551001}, {"name": "Morro da Catacumba", "time": 2, "id": 4551105}, {"name": "Fonte da Saudade", "time": 2, "id": 4551106}, {"name": "Parque Lage", "time": 2, "id": 4551107}, {"name": "Hipica", "time": 2, "id": 4551108}, {"name": "Vidigal", "time": 2, "id": 4551114}, {"name": "Alto da Boa Vista", "time": 2, "id": 4551308}, {"name": "Sumare", "time": 2, "id": 4551309}, {"name": "Vista Chinesa", "time": 2, "id": 4551310}, {"name": "Paqueta", "time": 2, "id": 4552601}, {"name": "Santa Tereza", "time": 2, "id": 4552802}, {"name": "Andre Cavalcanti", "time": 2, "id": 4552803}, {"name": "Rocinha", "time": 2, "id": 4553301}, {"name": "Gloria", "time": 3, "id": 4550902}], "links": [{"weight": 1.731694281133084, "source": 4550602, "target": 4550603, "key": 0}, {"weight": 4.040619989310529, "source": 4550604, "target": 4550603, "key": 0}, {"weight": 9.812934259754142, "source": 4550605, "target": 4550603, "key": 0}, {"weight": 16.162479957242116, "source": 4550701, "target": 4550603, "key": 0}, {"weight": 15.585248530197756, "source": 4550702, "target": 4550603, "key": 0}, {"weight": 16.739711384286476, "source": 4550703, "target": 4550603, "key": 0}, {"weight": 19.048637092463924, "source": 4550704, "target": 4550603, "key": 0}, {"weight": 17.31694281133084, "source": 4550705, "target": 4550603, "key": 0}, {"weight": 17.8941742383752, "source": 4550706, "target": 4550603, "key": 0}, {"weight": 10.390165686798504, "source": 4550707, "target": 4550603, "key": 0}, {"weight": 13.27632282202031, "source": 4550708, "target": 4550603, "key": 0}, {"weight": 17.8941742383752, "source": 4550709, "target": 4550603, "key": 0}, {"weight": 8.081239978621058, "source": 4550710, "target": 4550603, "key": 0}, {"weight": 9.23570283270978, "source": 4550711, "target": 4550603, "key": 0}, {"weight": 4.040619989310529, "source": 4550801, "target": 4550603, "key": 0}, {"weight": 12.699091394975948, "source": 4550802, "target": 4550603, "key": 0}, {"weight": 9.23570283270978, "source": 4550803, "target": 4550603, "key": 0}, {"weight": 15.008017103153394, "source": 4550804, "target": 4550603, "key": 0}, {"weight": 5.772314270443613, "source": 4550805, "target": 4550603, "key": 0}, {"weight": 9.23570283270978, "source": 4550806, "target": 4550603, "key": 0}, {"weight": 38.67450561197221, "source": 4550904, "target": 4550603, "key": 0}, {"weight": 23.666488508818812, "source": 4550906, "target": 4550603, "key": 0}, {"weight": 60.032068412613576, "source": 4550908, "target": 4550603, "key": 0}, {"weight": 36.36557990379476, "source": 4550909, "target": 4550603, "key": 0}, {"weight": 16.162479957242116, "source": 4551001, "target": 4550603, "key": 0}, {"weight": 22.512025654730092, "source": 4551105, "target": 4550603, "key": 0}, {"weight": 45.601282736504544, "source": 4551106, "target": 4550603, "key": 0}, {"weight": 31.747728487439872, "source": 4551107, "target": 4550603, "key": 0}, {"weight": 40.983431320149656, "source": 4551108, "target": 4550603, "key": 0}, {"weight": 30.593265633351148, "source": 4551114, "target": 4550603, "key": 0}, {"weight": 8.081239978621058, "source": 4551308, "target": 4550603, "key": 0}, {"weight": 11.544628540887226, "source": 4551309, "target": 4550603, "key": 0}, {"weight": 28.284339925173704, "source": 4551310, "target": 4550603, "key": 0}, {"weight": 8.081239978621058, "source": 4552601, "target": 4550603, "key": 0}, {"weight": 5.772314270443613, "source": 4552802, "target": 4550603, "key": 0}, {"weight": 4.61785141635489, "source": 4552803, "target": 4550603, "key": 0}, {"weight": 17.31694281133084, "source": 4553301, "target": 4550603, "key": 0}, {"weight": 0.009610520991401111, "source": 4550902, "target": 4550602, "key": 0}, {"weight": 0.010226517359513217, "source": 4550902, "target": 4550604, "key": 0}, {"weight": 0.02311050243944193, "source": 4550902, "target": 4550605, "key": 0}, {"weight": 0.010235239931082716, "source": 4550902, "target": 4550702, "key": 0}, {"weight": 0.003074026398201695, "source": 4550902, "target": 4550703, "key": 0}, {"weight": 0.002622364138399124, "source": 4550902, "target": 4550706, "key": 0}, {"weight": 0.02321262766945218, "source": 4550902, "target": 4550707, "key": 0}, {"weight": 0.0074204089786948655, "source": 4550902, "target": 4550708, "key": 0}, {"weight": 0.17220686845553343, "source": 4550902, "target": 4550709, "key": 0}, {"weight": 0.015904923899357177, "source": 4550902, "target": 4550710, "key": 0}, {"weight": 0.004531493882483259, "source": 4550902, "target": 4550711, "key": 0}, {"weight": 0.019385062732216896, "source": 4550902, "target": 4550801, "key": 0}, {"weight": 0.01688381123899035, "source": 4550902, "target": 4550802, "key": 0}, {"weight": 0.10907314955502495, "source": 4550902, "target": 4550803, "key": 0}, {"weight": 0.17243266914823735, "source": 4550902, "target": 4550804, "key": 0}, {"weight": 0.0621992723858702, "source": 4550902, "target": 4550805, "key": 0}, {"weight": 0.06260671599317018, "source": 4550902, "target": 4550806, "key": 0}, {"weight": 0.3840365581712126, "source": 4550902, "target": 4550904, "key": 0}, {"weight": 0.20806616762597796, "source": 4550902, "target": 4550906, "key": 0}, {"weight": 0.7670999360750053, "source": 4550902, "target": 4550908, "key": 0}, {"weight": 0.2027378270663663, "source": 4550902, "target": 4550909, "key": 0}, {"weight": 0.11747749707665951, "source": 4550902, "target": 4551001, "key": 0}, {"weight": 0.17523984847948457, "source": 4550902, "target": 4551105, "key": 0}, {"weight": 0.28847414659731635, "source": 4550902, "target": 4551106, "key": 0}, {"weight": 0.14415092668452867, "source": 4550902, "target": 4551107, "key": 0}, {"weight": 0.07047526758578161, "source": 4550902, "target": 4551108, "key": 0}, {"weight": 0.23407744392721117, "source": 4550902, "target": 4551114, "key": 0}, {"weight": 0.08480865048234919, "source": 4550902, "target": 4551308, "key": 0}, {"weight": 0.01037344398340249, "source": 4550902, "target": 4551309, "key": 0}, {"weight": 0.06947546027492431, "source": 4550902, "target": 4551310, "key": 0}]} \ No newline at end of file +{"directed": true, "multigraph": true, "graph": {}, "nodes": [{"name": "Rodoviaria", "time": 1, "id": 4550603}, {"name": "Av.Passos", "time": 1, "id": 4550701}, {"name": "Mal.Floriano", "time": 1, "id": 4550702}, {"name": "Candelaria", "time": 1, "id": 4550703}, {"name": "1o. de marco", "time": 1, "id": 4550704}, {"name": "Aerop.S.Dumont", "time": 1, "id": 4550705}, {"name": "Alm. Barroso", "time": 1, "id": 4550706}, {"name": "Cruz Vermelha", "time": 1, "id": 4550709}, {"name": "Rio Comprido 1", "time": 1, "id": 4550804}, {"name": "Sao Salvador", "time": 1, "id": 4550904}, {"name": "Morro da Viuva", "time": 1, "id": 4550906}, {"name": "General Glicerio", "time": 1, "id": 4550908}, {"name": "Cosme Velho", "time": 1, "id": 4550909}, {"name": "Leme", "time": 1, "id": 4551001}, {"name": "Morro da Catacumba", "time": 1, "id": 4551105}, {"name": "Fonte da Saudade", "time": 1, "id": 4551106}, {"name": "Parque Lage", "time": 1, "id": 4551107}, {"name": "Hipica", "time": 1, "id": 4551108}, {"name": "Vidigal", "time": 1, "id": 4551114}, {"name": "Vista Chinesa", "time": 1, "id": 4551310}, {"name": "Rocinha", "time": 1, "id": 4553301}, {"name": "Santo Cristo", "time": 2, "id": 4550604}, {"name": "Praca Maua", "time": 2, "id": 4550605}, {"name": "Passeio Publico", "time": 2, "id": 4550707}, {"name": "Av. Chile", "time": 2, "id": 4550708}, {"name": "Praca da Republica", "time": 2, "id": 4550710}, {"name": "Central do Brasil", "time": 2, "id": 4550711}, {"name": "Sambodromo", "time": 2, "id": 4550801}, {"name": "Piranhao", "time": 2, "id": 4550802}, {"name": "Estacio", "time": 2, "id": 4550803}, {"name": "Rio Comprido 2", "time": 2, "id": 4550805}, {"name": "Campos da Paz", "time": 2, "id": 4550806}, {"name": "Alto da Boa Vista", "time": 2, "id": 4551308}, {"name": "Sumare", "time": 2, "id": 4551309}, {"name": "Paqueta", "time": 2, "id": 4552601}, {"name": "Santa Tereza", "time": 2, "id": 4552802}, {"name": "Andre Cavalcanti", "time": 2, "id": 4552803}, {"name": "Santo Cristo 2", "time": 3, "id": 4550602}, {"name": "Gloria", "time": 6, "id": 4550902}], "links": [{"weight": 1.19722073757349, "source": 4550701, "target": 4550603, "key": 0}, {"weight": 1.1544628540887225, "source": 4550702, "target": 4550603, "key": 0}, {"weight": 1.2399786210582575, "source": 4550703, "target": 4550603, "key": 0}, {"weight": 1.4110101549973277, "source": 4550704, "target": 4550603, "key": 0}, {"weight": 1.282736504543025, "source": 4550705, "target": 4550603, "key": 0}, {"weight": 1.3254943880277925, "source": 4550706, "target": 4550603, "key": 0}, {"weight": 1.3254943880277925, "source": 4550709, "target": 4550603, "key": 0}, {"weight": 1.111704970603955, "source": 4550804, "target": 4550603, "key": 0}, {"weight": 2.864778193479423, "source": 4550904, "target": 4550603, "key": 0}, {"weight": 1.7530732228754677, "source": 4550906, "target": 4550603, "key": 0}, {"weight": 4.44681988241582, "source": 4550908, "target": 4550603, "key": 0}, {"weight": 2.693746659540353, "source": 4550909, "target": 4550603, "key": 0}, {"weight": 1.19722073757349, "source": 4551001, "target": 4550603, "key": 0}, {"weight": 1.6675574559059327, "source": 4551105, "target": 4550603, "key": 0}, {"weight": 3.377872795296633, "source": 4551106, "target": 4550603, "key": 0}, {"weight": 2.3516835916622125, "source": 4551107, "target": 4550603, "key": 0}, {"weight": 3.035809727418493, "source": 4551108, "target": 4550603, "key": 0}, {"weight": 2.2661678246926775, "source": 4551114, "target": 4550603, "key": 0}, {"weight": 2.0951362907536075, "source": 4551310, "target": 4550603, "key": 0}, {"weight": 1.282736504543025, "source": 4553301, "target": 4550603, "key": 0}, {"weight": 0.9877071084981294, "source": 4550604, "target": 4550603, "key": 0}, {"weight": 2.398717263495457, "source": 4550605, "target": 4550603, "key": 0}, {"weight": 2.5398182789951895, "source": 4550707, "target": 4550603, "key": 0}, {"weight": 3.2453233564938535, "source": 4550708, "target": 4550603, "key": 0}, {"weight": 1.9754142169962587, "source": 4550710, "target": 4550603, "key": 0}, {"weight": 2.257616247995724, "source": 4550711, "target": 4550603, "key": 0}, {"weight": 0.9877071084981294, "source": 4550801, "target": 4550603, "key": 0}, {"weight": 3.104222340994121, "source": 4550802, "target": 4550603, "key": 0}, {"weight": 2.257616247995724, "source": 4550803, "target": 4550603, "key": 0}, {"weight": 1.4110101549973277, "source": 4550805, "target": 4550603, "key": 0}, {"weight": 2.257616247995724, "source": 4550806, "target": 4550603, "key": 0}, {"weight": 1.9754142169962587, "source": 4551308, "target": 4550603, "key": 0}, {"weight": 2.8220203099946555, "source": 4551309, "target": 4550603, "key": 0}, {"weight": 1.9754142169962587, "source": 4552601, "target": 4550603, "key": 0}, {"weight": 1.4110101549973277, "source": 4552802, "target": 4550603, "key": 0}, {"weight": 1.128808123997862, "source": 4552803, "target": 4550603, "key": 0}, {"weight": 0.6072853908283344, "source": 4550602, "target": 4550603, "key": 0}, {"weight": 8.03944688605424e-05, "source": 4550602, "target": 4550701, "key": 0}, {"weight": 0.0001023523993108272, "source": 4550602, "target": 4550702, "key": 0}, {"weight": 4.576868506567807e-05, "source": 4550602, "target": 4550705, "key": 0}, {"weight": 0.0015414937074024729, "source": 4550602, "target": 4550709, "key": 0}, {"weight": 0.001350266403912123, "source": 4550602, "target": 4550804, "key": 0}, {"weight": 0.00224094559115925, "source": 4550602, "target": 4550904, "key": 0}, {"weight": 0.0011730438499696798, "source": 4550602, "target": 4550906, "key": 0}, {"weight": 0.007386888273314867, "source": 4550602, "target": 4550908, "key": 0}, {"weight": 0.0011263212614798129, "source": 4550602, "target": 4550909, "key": 0}, {"weight": 0.0011421423326897454, "source": 4550602, "target": 4551001, "key": 0}, {"weight": 0.0009204517293871916, "source": 4550602, "target": 4551105, "key": 0}, {"weight": 0.0024476594256741995, "source": 4550602, "target": 4551106, "key": 0}, {"weight": 0.0012842939704612389, "source": 4550602, "target": 4551107, "key": 0}, {"weight": 0.0003303528168083513, "source": 4550602, "target": 4551108, "key": 0}, {"weight": 0.001163774862462971, "source": 4550602, "target": 4551114, "key": 0}, {"weight": 0.00019850131507121235, "source": 4550602, "target": 4551310, "key": 0}, {"weight": 0.002153738697943164, "source": 4550902, "target": 4550702, "key": 0}, {"weight": 0.0006630056498216648, "source": 4550902, "target": 4550703, "key": 0}, {"weight": 0.000564210101834547, "source": 4550902, "target": 4550706, "key": 0}, {"weight": 0.04865665890686591, "source": 4550902, "target": 4550709, "key": 0}, {"weight": 0.04429636541973846, "source": 4550902, "target": 4550804, "key": 0}, {"weight": 0.09455003391646427, "source": 4550902, "target": 4550904, "key": 0}, {"weight": 0.04891617612456331, "source": 4550902, "target": 4550906, "key": 0}, {"weight": 0.19479693636011897, "source": 4550902, "target": 4550908, "key": 0}, {"weight": 0.046008563287747675, "source": 4550902, "target": 4550909, "key": 0}, {"weight": 0.02830258698071814, "source": 4550902, "target": 4551001, "key": 0}, {"weight": 0.040425048516331386, "source": 4550902, "target": 4551105, "key": 0}, {"weight": 0.06736542233236957, "source": 4550902, "target": 4551106, "key": 0}, {"weight": 0.033544009227359, "source": 4550902, "target": 4551107, "key": 0}, {"weight": 0.01607926277889584, "source": 4550902, "target": 4551108, "key": 0}, {"weight": 0.0564156646575458, "source": 4550902, "target": 4551114, "key": 0}, {"weight": 0.015628041444394218, "source": 4550902, "target": 4551310, "key": 0}, {"weight": 0.0017004891093350463, "source": 4550902, "target": 4550604, "key": 0}, {"weight": 0.004847082524729805, "source": 4550902, "target": 4550605, "key": 0}, {"weight": 0.004673859969101385, "source": 4550902, "target": 4550707, "key": 0}, {"weight": 0.001435492989447234, "source": 4550902, "target": 4550708, "key": 0}, {"weight": 0.0029268121293563017, "source": 4550902, "target": 4550710, "key": 0}, {"weight": 0.0007752383370329385, "source": 4550902, "target": 4550711, "key": 0}, {"weight": 0.0035067554120234187, "source": 4550902, "target": 4550801, "key": 0}, {"weight": 0.003376613148696513, "source": 4550902, "target": 4550802, "key": 0}, {"weight": 0.025701778945969492, "source": 4550902, "target": 4550803, "key": 0}, {"weight": 0.013151658667541045, "source": 4550902, "target": 4550805, "key": 0}, {"weight": 0.012866692735543124, "source": 4550902, "target": 4550806, "key": 0}, {"weight": 0.016514584123362944, "source": 4550902, "target": 4551308, "key": 0}, {"weight": 0.0018831379799933879, "source": 4550902, "target": 4551309, "key": 0}, {"weight": 0.002945408625030706, "source": 4550902, "target": 4550602, "key": 0}]} \ No newline at end of file diff --git a/docs/build/html/overview.html b/docs/build/html/overview.html index 3ac925d..441d8ff 100644 --- a/docs/build/html/overview.html +++ b/docs/build/html/overview.html @@ -148,12 +148,18 @@

The Simulation

Output¶

-

The output of a simulation in Epigrass is three-fold: A graphical display which the animated outcome of the simulation, +

The output of a simulation in Epigrass is three-fold: A web-based graphical dashboard to interact with outcome of the simulation, a written report, and a database table with numeric results.

Graphical display¶

-

During a simulation, selected epidemiological variables are animated in a 3-dimensional rendering over the map of the -region containing the network.

+

Epigrass’s Dashboard can be set to open immediately after the simulation has been completed:

+
$ epirunner -D mymodel.epg
+
+
+

or it can be invoked to explore simulations of a model already stored in the database, withou simulating it first:

+
$ epirunner -V mymodel
+
+

Report Generation¶

diff --git a/docs/build/html/searchindex.js b/docs/build/html/searchindex.js index 751df39..22d2e47 100644 --- a/docs/build/html/searchindex.js +++ b/docs/build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["analysis","index","install","intromodels","overview","scripting","using"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["analysis.rst","index.rst","install.rst","intromodels.rst","overview.rst","scripting.rst","using.rst"],objects:{"":{Graph:[5,0,1,""],Site:[5,0,1,""]},Graph:{edge_list:[5,1,1,""],episize:[5,1,1,""],getSite:[5,2,1,""],maxstep:[5,1,1,""],simstep:[5,1,1,""],site_list:[5,1,1,""],speed:[5,1,1,""]},Site:{bi:[5,1,1,""],bp:[5,1,1,""],edges:[5,1,1,""],geocode:[5,1,1,""],getDegree:[5,2,1,""],getDistanceFromNeighbor:[5,2,1,""],getInEdges:[5,2,1,""],getNeighbors:[5,2,1,""],getOutEdges:[5,2,1,""],incidence:[5,1,1,""],inedges:[5,1,1,""],infected:[5,1,1,""],modtype:[5,1,1,""],outedges:[5,1,1,""],parentGraph:[5,1,1,""],sitename:[5,1,1,""],totpop:[5,1,1,""],ts:[5,1,1,""],vaccinate:[5,2,1,""],vaccination:[5,1,1,""],vaccineNow:[5,1,1,""],vaccov:[5,1,1,""],values:[5,1,1,""]}},objnames:{"0":["py","class","Python class"],"1":["py","attribute","Python attribute"],"2":["py","method","Python method"]},objtypes:{"0":"py:class","1":"py:attribute","2":"py:method"},terms:{"4th":6,"boolean":5,"break":5,"case":[2,3,4,5,6],"class":[3,5],"default":6,"final":[5,6],"function":[3,5,6],"import":[3,4,5,6],"long":[5,6],"new":[2,3,4,5,6],"null":3,"public":6,"return":[3,4,5],"short":3,"true":5,"try":2,"var":5,"while":[3,6],And:[3,5],For:[3,4,5,6],Has:5,Its:2,L_S:3,Not:[5,6],One:[3,6],SIS:[3,6],That:6,The:[1,3],Their:6,There:[2,5],These:[3,4,6],Theses:3,Use:[5,6],Used:4,Using:[1,4],With:2,abil:5,about:[3,4,6],abov:[2,3,5,6],absenc:3,absolut:6,access:[2,4,5,6],accord:3,account:3,achiev:3,acquir:[3,6],act:3,action:6,actual:[5,6],add:[5,6],added:[4,6],adding:6,addit:4,address:6,advis:4,affect:6,after:[2,3,4,5,6],again:3,age:3,ahead:4,aid:3,air:3,align:3,all:[2,3,4,5,6],allow:[3,4,5,6],along:4,alpha:[3,5,6],alreadi:[5,6],also:[2,3,4,5,6],altern:3,although:4,alwai:5,analys:4,analysi:[1,3,4,6],analyt:3,analyz:[3,4,5],anapoli:6,andersonrmandmayrmandandersonb1992:3,ani:[1,3,5,6],anim:[4,6],anoth:[3,4,6],anyth:5,anywai:5,apend:6,appear:[5,6],append:5,appendix:4,appli:[4,6],applic:[2,3],approach:[1,3],appropri:[3,4,6],apt:2,aracaju:6,aracatuba:6,araguari:6,arbitrari:6,archetyp:[3,4],argument:[3,5],aris:3,around:[5,6],arrang:3,arriv:[3,5,6],arrow:3,artgraph:3,ascii:[4,6],aspect:[2,4,6],assign:6,associ:3,assum:3,assumpt:3,ate:5,attribut:[3,4,6],autocton:5,automat:[2,6],avail:[2,3,4,6],averag:[3,6],awai:5,back:6,backend:6,backward:[4,6],barbacena:6,barra_mansa:6,barreto:6,base:[3,4,6],basi:4,basic:[3,4],batch:[2,6],becam:5,becaus:[2,5,6],becom:[3,5,6],been:[4,5,6],befor:6,beggin:6,begin:[3,5],beginn:6,behavior:[3,6],being:[4,5,6],belong:5,below:[3,4,6],besid:[3,4,5,6],best:[2,5,6],beta:[3,5,6],between:[3,6],beyond:[5,6],big:3,binomi:3,birth:6,blumenau:6,born:3,both:5,bottom:6,box:[3,6],bracket:6,brazilian:6,brief:3,broker:2,btgrenfellandonbjoernstadandjkappey2001:3,build:[1,4,6],built:[2,3,4,5,6],button:6,calcul:[3,4,5,6],call:[2,3,4,5,6],campaign:6,can:[1,2,3,4,5,6],cannot:5,capabl:6,capit:6,care:[5,6],caricatur:3,carri:6,categori:3,caus:6,certain:3,chang:[5,6],chapter:[2,3,4,6],charact:6,character:3,check:[2,6],chickenpox:3,choos:[3,4,5,6],chosen:6,cite:3,citi:[3,4,6],classic:3,claus:5,clear:5,click:6,client:2,climat:[3,6],clue:3,clump:6,cluster:3,code:[4,5],coeffici:6,coincid:3,collect:[4,6],column:[4,6],com:2,combo:6,come:[4,6],comma:[4,6],command:[2,6],comment:6,commut:[3,6],compact:4,compar:3,compart:3,compartment:3,compil:[2,4],complet:[3,4,5],complex:2,compon:4,comprehens:4,comput:4,condit:[3,6],confer:3,confid:4,configur:6,connect:[1,3,5,6],consid:[3,6],consider:3,consist:4,consol:6,consolid:6,constant:6,construct:[1,4],contact:[3,6],contain:[4,5,6],content:[1,6],context:3,continu:[3,5],contribut:3,control:[3,4,6],convent:4,convert:4,coordin:[4,6],core:3,corner:6,correspond:6,corridor:3,could:3,cours:6,cov1:6,cov2:6,cov:5,covari:3,coverag:[5,6],creat:[2,4,6],cristo:6,csv:[4,5,6],cumbersom:6,current:[4,5,6],custom:[1,3,6],custommodel:5,custommodel_exampl:5,cycl:2,cython:2,dai:[5,6],daleydjandganijandcanningsc2001:3,dat:6,data:[1,2,3,4],databas:[5,6],datafil:6,datafram:6,datastorag:6,date:[4,6],dbhost:6,dbpass:6,dbuser:6,dbusernam:6,deb:2,debian:2,debug:6,decim:4,decis:3,declar:[5,6],def:5,defin:[3,5,6],definit:[4,6],degre:5,delai:3,delta:[3,5,6],demo:[4,5,6],demograph:[4,6],demographi:3,dengu:3,denot:5,densiti:3,depend:[3,4,6],deriv:2,describ:[3,4],descript:[3,4,6],descriptor:4,design:[3,6],desir:[4,6],despit:6,dest:6,destin:[4,6],detail:[3,4,6],determ:6,determin:4,determinist:[3,6],develop:[2,3],devot:6,diagram:3,diagrammat:3,dialog:6,dict:5,dictionari:5,diekmannoandheesterbeekjap2000:3,differ:[2,3,4,6],differenti:3,dimension:4,dir:6,direct:[3,4,6],directli:[2,3,6],directori:[4,6],disabl:6,disconnect:5,discret:3,discuss:4,diseas:[1,4,6],displai:6,disregard:6,distanc:[4,5,6],distant:6,distinct:[3,4],distinguish:3,distribut:[2,3,5,6],divers:3,divid:[3,6],doc:5,document:[2,4,5],doe:[3,4],doesn:6,doing:5,don:6,done:[3,4,6],dotransp:6,down:6,drag:6,draw:3,durat:3,dure:[4,6],dynam:[1,3,4,5,6],e_t:3,each:[3,4,5,6],easi:2,easili:[2,3],ecolog:3,edg:[3,5],edge_list:5,edit:[2,4,6],editor:6,effect:6,either:[3,4,6],elabor:6,element:[5,6],els:5,embed:3,embodi:3,emerg:3,empti:6,enabl:4,encapsul:4,encod:6,end:[3,4,5,6],endem:3,enjoy:1,enough:4,enter:6,entir:3,environ:[1,3,4],environment:3,epg:[4,5,6],epgeditor:6,epid:6,epidem:[1,4,5],epidemiolog:[1,3,4],epigrass:[3,5],epigrassrc:6,epipath:5,epirass:2,epirunn:[2,6],epis:5,equal:6,equat:3,equival:6,eras:6,error:[2,4,5,6],especi:6,essenti:2,establish:5,etc:[3,4,5,6],euclidean:6,even:[4,6],event:[3,5],everi:[4,5,6],exactli:6,exampl:[2,3,5,6],except:6,execut:[2,5,6],exist:6,exit:6,expect:[3,4,6],explain:6,explicitli:3,exponenti:3,expos:[3,5,6],exposur:3,express:3,extend:[3,4],extens:6,extra:[3,5,6],facilit:4,fact:6,far:[3,5],fast:2,favorit:6,featur:[3,4,5],feed:[5,6],femal:3,fever:3,few:[4,5,6],field:3,fifth:6,fig:3,figur:[3,5],file:[4,5],filenam:6,fill:6,finish:6,finkenstadt:3,fire:3,first:[5,6],fit:5,fix:5,flag:5,flow:3,flowd:6,flowsd:6,fold:4,folder:6,follow:[3,4,5,6],footnot:4,forc:3,forest:3,forget:6,form:[3,6],format:[4,5,6],forward:[4,6],found:[3,4,5,6],four:[3,6],fourth:[3,6],frac:3,fraction:[3,6],frame:3,framework:[1,3,4],from:[2,3,4,5,6],full:[3,5,6],further:3,futur:6,gener:[3,6],geo:[1,4],geocod:[4,5,6],geodest:6,geograph:[1,3,6],geopackag:4,geosourc:6,get:[1,2,3,4,6],getdegre:5,getdistancefromneighbor:5,getinedg:5,getneighbor:5,getoutedg:5,getsit:5,give:3,given:[3,5,6],global:[5,6],gnu:2,goal:6,goe:5,going:[5,6],good:6,got:2,graph:[4,6],graphic:1,grass:4,great:2,greater:3,grenfel:3,gui:[1,2],guid:6,guilabel:6,had:5,hand:[3,6],has:[3,4,5,6],have:[2,3,4,5,6],header:6,health:6,help:[2,3,5,6],her:[4,5,6],here:[3,6],heterogen:3,hidden:6,hierarch:[3,4],him:6,hint:6,his:[3,4,5,6],histori:[3,5],hold:3,home:6,homogen:3,host:3,hostnam:6,how:[2,4,5,6],howev:[1,2,3,5,6],http:2,human:3,hypothet:6,i_t:3,ident:3,identif:4,identifi:[3,4,6],illustr:3,immedi:6,immun:[3,6],impact:3,implement:[3,5,6],implicit:6,impos:5,inbound:5,incid:[3,5],includ:[3,6],inclus:3,incorpor:4,increas:3,incub:[3,6],independ:[3,4,6],index:[2,4,6],indic:[3,5,6],individu:[4,5,6],inedg:5,infect:[4,5,6],infecti:[5,6],infector:5,infinit:6,influenza:3,info:6,inform:[3,5,6],initi:[3,5,6],input:6,insensit:6,insert:5,insid:5,inspect:6,instal:1,instanc:[4,6],instantan:6,instruct:2,integ:6,integr:3,interact:[2,3],interest:[3,4],interfac:1,intermediari:3,intern:6,interpret:2,intervent:3,intra:5,introduc:[3,6],introduct:1,introspect:5,intruct:5,invas:3,invers:[3,6],invok:[2,6],involv:3,ip20:6,ipo:5,ishamvandmedleyg1996:3,isol:6,its:[1,2,3,4,5,6],itself:2,jose:6,just:6,keep:[3,5],kei:[2,3,5],kept:6,kglassandbtgrenfell2004:3,kilomet:4,know:6,knowledg:5,known:3,l_r:3,l_t:3,label:[3,4],lambda:3,lan:2,languag:[2,5,6],larg:2,larger:6,last:6,latent:3,later:[4,6],latest:2,latex:4,latin:6,latitud:[4,6],latter:3,lead:4,learn:[2,5],least:[1,5,6],leav:6,left:[3,6],length:[4,6],leq:3,less:3,let:[5,6],letter:6,level:[5,6],life:3,lifelong:3,like:6,limit:[4,5],line:[2,4,6],link:[2,3,5,6],linux:2,list:[4,5,6],local:[3,4,5,6],localhost:6,locality1:6,locality2:6,locat:[3,6],logic:5,longitud:[4,6],longrightarrow:3,look:[5,6],lose:3,lost:6,lower:3,lpo:5,magnitud:3,mai:[2,3,5,6],main:[1,3,6],maintain:[2,3],major:3,make:[2,5],male:3,manag:6,mani:[3,4],manual:[5,6],map:[4,6],match:4,math:3,mathemat:[3,6],matter:6,maxstep:5,mean:[2,3,4,5,6],meaning:5,measl:3,measur:4,mechan:6,memori:2,messag:[2,6],method:4,metric:6,miginf:5,migrat:4,mimic:4,minim:4,minimum:6,mix:[3,4],mjkeelingandbtgrenfell1997:3,mode:6,model2:6,model3:6,model4:6,model:[1,2],modelsindex:4,modifi:2,modtyp:[5,6],more:[3,4,6],most:[2,5,6],mous:6,move:[3,6],movement:[3,6],multi:[2,3],multipl:[4,6],must:[3,4,5,6],mymodel:6,mysql:6,mysqldb:2,mysqlout:6,n10:6,n11:6,n_t:3,name:[4,5,6],natur:[2,3,4,5],necessari:[4,6],necessarili:3,need:[2,5,6],neg:3,negbin:3,neighbor:5,neighborhood:3,nest:5,network:[1,5,6],networkx:2,never:3,newli:3,next:[3,6],node:[1,3,5,6],nome_zona:[4,6],non:[3,6],nonumb:3,nor:5,notat:[5,6],note:[3,5,6],notebook:6,notic:5,notif:3,now:[3,6],npass:5,number:[3,4,5,6],numer:[4,6],object:[2,4,5,6],obtain:2,occur:6,off:6,offici:6,often:[3,6],older:6,onc:[4,5,6],one:[3,5,6],ones:[3,6],onli:[3,4,5,6],open:6,opt:6,optim:3,option:[4,5],order:[4,5,6],org:2,orient:[2,4],origin:3,other:[3,4,5,6],outbound:5,outcom:4,outdat:2,outdir:6,outedg:5,outfil:6,output:5,over:[4,6],overal:3,overview:1,own:[4,5,6],pack:6,packag:1,page:6,pair:6,par:5,parallel:2,paramet:[3,4,5],parameter:[3,4],parent:5,parentgraph:5,parentsit:5,partial:[3,6],particular:4,pass:[4,6],passeng:[3,4,5,6],password:6,path:[3,4,5,6],pattern:3,paulista:6,pdf:[4,6],pechincha:6,peopl:5,per:[3,4,5,6],perform:4,period:[3,6],permiss:2,persist:2,person:[4,6],perspect:[4,5],pertussi:3,pip3:2,pip:2,place:[3,4,5,6],plai:[4,6],platform:[4,5],pleas:[5,6],plot:[4,6],poisson:[3,6],polygon:6,pool:3,pop:6,popul:[1,3,4,5,6],port:6,pose:4,possibl:[3,5,6],potenti:[3,4,5],power:[2,5],pre:[2,4,6],preced:6,predict:3,prefer:6,prepar:6,prepared:3,prerequisit:2,present:[3,6],press:6,pressin:6,preval:3,prevent:6,principl:3,priviledg:2,probabl:[2,3,5,6],problem:4,proce:[2,5],process:[3,4,6],processor:6,product:2,program:[5,6],programm:2,progress:[3,5,6],prompt:6,properti:[3,4],proport:3,protect:6,provid:[2,3,4,5,6],pure:1,purpos:[4,6],put:5,pypi:2,pythagora:6,python3:2,python:[1,5],quantiti:3,quarantin:6,quick:2,quickli:5,quit:[2,3],r_t:3,railroad:3,rais:5,ran:4,random:[3,6],randomli:3,randse:6,rang:3,rare:2,rate:[3,4,6],read:[4,6],reader:6,real:[4,5,6],realism:3,realiti:5,realiz:[3,5],recalcul:4,receiv:[3,5,6],recommend:[2,4,6],record:4,recov:[3,6],recoveri:3,recurr:3,reduc:4,ref:3,refer:[3,4,5],referenc:[1,4,6],regard:[3,6],region:4,rel:[4,6],relat:3,remain:[3,4,6],rememb:6,remind:6,remot:2,remov:[3,6],render:4,replai:6,replenish:3,replic:6,replica:6,report:6,repres:[3,4,6],represent:4,request:[2,6],requir:[1,3,4,5,6],research:4,reservoir:3,resid:3,respect:4,rest:5,result:[3,4,5,6],right:[3,6],riozonas_latlong:[4,6],risk:3,river:[3,6],road:[3,6],rout:[3,4],rpo:5,rule:6,run:[2,4,5],s_t:3,same:[4,5,6],sampl:6,santo:6,sarsdf:6,sarspa:6,sarsr:6,satellit:3,save:6,scale:3,scan:6,scenario:[3,4],script:[1,4],script_wed_jan_26_154411_2005:[4,6],scriptabl:1,sea:3,second:6,section:[4,6],see:[3,4,5,6],seed:6,sei:[3,6],seipr:[3,6],seipr_:6,seiprp:[3,6],seiprps_:6,seir:[3,4,6],seir_:6,seis_:6,select:[4,6],self:5,sensit:5,separ:[4,6],sequenc:3,sequenti:6,seri:[3,4,5,6],server:[2,6],set:[1,3,4,5],setup:6,sex:3,sexagesim:4,sexual:3,shapefil:[4,6],she:[4,6],should:[2,3,4,6],show:6,shown:[4,6],shp:[4,6],sim:3,similar:2,similarli:4,simpl:[2,3,6],simplest:3,simplic:2,simstep:5,simul:[1,2,3,5],sinc:[2,4,5,6],singl:[3,6],sipr:6,sipr_:6,siprp:[3,6],siprps_:6,sir:[5,6],sir_:6,sirs_:6,sis_:6,site:[2,3,4],site_list:5,sitenam:5,siteobj:5,siterep:[4,6],situat:6,sixth:6,size:[3,4,5,6],skip:2,slider:6,small:6,smaller:3,softwar:2,some:[2,3,5,6],someth:6,sophist:4,sourc:[2,3,4,5,6],space:3,spark:3,spatial:[3,6],spatio:4,speci:3,specif:[3,4,6],specifi:[1,4,5],speed:[3,5,6],sphinx:2,spo:5,spread:[3,5],sql:[2,5],sqlite:[4,6],sqlout:6,sqlsoup:2,stage:[3,6],stai:3,stand:3,standard:[2,4],start:[1,3,6],stat:5,state:[3,5,6],statement:5,statist:4,statu:6,step:[2,3,4,5,6],still:[3,4,6],stochast:[4,6],stochat:6,store:[2,4,5,6],straight:[4,6],straightforwardli:4,strategi:3,string:5,structur:[3,4],studi:4,sub:3,subject:3,success:6,sudo:2,suggest:[3,6],support:4,suppos:[3,4,6],sure:2,surveil:3,suscept:[3,4,5,6],symbol:[3,6],symptom:3,syntax:4,system:[1,2,3,4,5,6],tab:6,tabl:[4,6],take:[3,4,5,6],taken:6,task:[2,4],temp:6,temperatur:6,templat:4,tempor:[3,4],temporari:3,temporarili:3,tend:3,term:3,text:[4,6],textit:3,texttt:6,than:[3,6],thei:[2,3,6],them:[3,4,5,6],theorem:6,theta:[3,5],theta_t:3,thi:[1,2,3,4,5,6],thing:5,third:6,those:[3,4,6],though:4,thread:2,three:[2,3,4,6],threshold:3,through:[2,3,5,6],thu:[3,4,6],time:[3,4,5,6],timeseri:6,timestep:6,titl:6,togeth:3,tool:[2,3],tooltip:6,top:6,topolog:[3,4],total:[3,5,6],totalcas:5,totpop:5,touch:6,track:[3,5],tradit:3,transit:3,translat:6,transmiss:[3,4,6],transmit:3,transpar:4,transport:[1,4,5],travel:[3,4,6],trigger:3,trip:3,triplet:6,tupl:[5,6],turn:[5,6],tutori:4,two:[3,4,6],type:[2,3,4,5,6],ubuntu:2,under:[3,6],understand:[3,4],unind:5,uniqu:[4,6],unit:[3,4,6],until:4,updat:[2,4,5,6],usag:6,use:[2,3,4,5,6],used:[1,3,4,5,6],useful:[3,5,6],user:[1,2,3,4,5],uses:[2,3],using:[2,3,5,6],utf:6,vac:6,vaccin:[5,6],vaccinenow:5,vaccov:5,vacin:5,valid:5,valu:[2,3,4,5,6],vari:3,variabl:[3,4,5,6],variat:3,varibal:6,vector:3,veloc:3,veri:[2,3,4,5,6],version:[2,3,6],via:[4,6],visit:3,visitor:3,visual:[3,4],vname:5,vocat:1,wai:[3,4,5,6],walk:2,wane:[3,6],want:6,wave:3,web:2,weight:3,well:[2,3,4,6],what:6,when:[3,4,5,6],wher:6,where:[2,3,4,6],which:[3,4,5,6],whith:6,who:3,whole:4,widget:6,window:6,wise:5,wish:[3,6],within:[3,4,5,6],without:[2,3,4],word:[4,6],work:[4,6],worth:6,write:[1,6],written:[1,3,4,6],www:2,year:3,yellow:3,yet:[2,3],you:[2,4,5,6],your:[1,2,4,5,6],your_model:6,yourmodel:6,zero:[3,6],zona_traf:[4,6]},titles:["Analysis","Welcome to Epigrass\u2019s documentation!","Building and Installing","Epidemic Models","Overview of Epigrass","Writing Custom Models","Using Epigrass"],titleterms:{AND:6,THE:6,The:[4,5,6],Using:6,analysi:0,api:5,approach:4,attribut:5,background:4,build:2,cartograph:4,configur:2,correspond:3,custom:5,data:6,databas:[2,4],defin:4,develop:5,diseas:3,dispers:3,displai:4,document:1,edg:[4,6],environ:5,epidem:[3,6],epidemiolog:6,epigrass:[1,2,4,6],event:6,file:6,gener:4,geograph:4,get:5,graph:5,graphic:[4,6],gui:6,individu:3,infect:3,infecti:3,instal:2,interfac:6,introduct:3,like:3,method:5,model:[3,4,5,6],mysql:2,network:[3,4],node:4,oper:6,option:6,other:2,output:[4,6],overview:4,packag:2,paramet:6,part:6,post:2,python:2,redi:2,report:4,requir:2,run:6,script:6,set:6,simul:[4,6],sipr:3,sir:3,site:[5,6],sninrn:3,specifi:6,start:5,stochast:3,transport:[3,6],typolog:3,user:6,util:6,visual:6,welcom:1,world:6,write:5}}) \ No newline at end of file +Search.setIndex({docnames:["analysis","index","install","intromodels","overview","scripting","using"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["analysis.rst","index.rst","install.rst","intromodels.rst","overview.rst","scripting.rst","using.rst"],objects:{"":{Graph:[5,0,1,""],Site:[5,0,1,""]},Graph:{edge_list:[5,1,1,""],episize:[5,1,1,""],getSite:[5,2,1,""],maxstep:[5,1,1,""],simstep:[5,1,1,""],site_list:[5,1,1,""],speed:[5,1,1,""]},Site:{bi:[5,1,1,""],bp:[5,1,1,""],edges:[5,1,1,""],geocode:[5,1,1,""],getDegree:[5,2,1,""],getDistanceFromNeighbor:[5,2,1,""],getInEdges:[5,2,1,""],getNeighbors:[5,2,1,""],getOutEdges:[5,2,1,""],incidence:[5,1,1,""],inedges:[5,1,1,""],infected:[5,1,1,""],modtype:[5,1,1,""],outedges:[5,1,1,""],parentGraph:[5,1,1,""],sitename:[5,1,1,""],totpop:[5,1,1,""],ts:[5,1,1,""],vaccinate:[5,2,1,""],vaccination:[5,1,1,""],vaccineNow:[5,1,1,""],vaccov:[5,1,1,""],values:[5,1,1,""]}},objnames:{"0":["py","class","Python class"],"1":["py","attribute","Python attribute"],"2":["py","method","Python method"]},objtypes:{"0":"py:class","1":"py:attribute","2":"py:method"},terms:{"4th":6,"boolean":5,"break":5,"case":[2,3,4,5,6],"class":[3,5],"default":6,"final":[5,6],"function":[3,5,6],"import":[3,4,5,6],"long":[5,6],"new":[2,3,4,5,6],"null":3,"public":6,"return":[3,4,5],"short":3,"true":5,"try":2,"var":5,"while":[3,6],And:[3,5],For:[3,4,5,6],Has:5,Its:2,L_S:3,Not:[5,6],One:[3,6],SIS:[3,6],That:6,The:[1,3],Their:6,There:[2,5],These:[3,4,6],Theses:3,Use:[5,6],Used:4,Using:[1,4],With:2,abil:5,about:[3,4,6],abov:[2,3,5,6],absenc:3,absolut:6,access:[2,4,5,6],accord:3,account:3,achiev:3,acquir:[3,6],act:3,action:6,actual:[5,6],add:[5,6],added:[4,6],adding:6,addit:4,address:6,advis:4,affect:6,after:[2,3,4,5,6],again:3,age:3,ahead:4,aid:3,air:3,align:3,all:[2,3,4,5,6],allow:[3,4,5,6],along:4,alpha:[3,5,6],alreadi:[4,5,6],also:[2,3,4,5,6],altern:3,although:4,alwai:5,analys:4,analysi:[1,3,4,6],analyt:3,analyz:[3,4,5],anapoli:6,andersonrmandmayrmandandersonb1992:3,ani:[1,3,5,6],anim:6,anoth:[3,4,6],anyth:5,anywai:5,apend:6,appear:[5,6],append:5,appendix:4,appli:[4,6],applic:[2,3],approach:[1,3],appropri:[3,4,6],apt:2,aracaju:6,aracatuba:6,araguari:6,arbitrari:6,archetyp:[3,4],argument:[3,5],aris:3,around:[5,6],arrang:3,arriv:[3,5,6],arrow:3,artgraph:3,ascii:[4,6],aspect:[2,4,6],assign:6,associ:3,assum:3,assumpt:3,ate:5,attribut:[3,4,6],autocton:5,automat:[2,6],avail:[2,3,4,6],averag:[3,6],awai:5,back:6,backend:6,backward:[4,6],barbacena:6,barra_mansa:6,barreto:6,base:[3,4,6],basi:4,basic:[3,4],batch:[2,6],becam:5,becaus:[2,5,6],becom:[3,5,6],been:[4,5,6],befor:6,beggin:6,begin:[3,5],beginn:6,behavior:[3,6],being:[4,5,6],belong:5,below:[3,4,6],besid:[3,4,5,6],best:[2,5,6],beta:[3,5,6],between:[3,6],beyond:[5,6],big:3,binomi:3,birth:6,blumenau:6,born:3,both:5,bottom:6,box:[3,6],bracket:6,brazilian:6,brief:3,broker:2,btgrenfellandonbjoernstadandjkappey2001:3,build:[1,4,6],built:[2,3,4,5,6],button:6,calcul:[3,4,5,6],call:[2,3,4,5,6],campaign:6,can:[1,2,3,4,5,6],cannot:5,capabl:6,capit:6,care:[5,6],caricatur:3,carri:6,categori:3,caus:6,certain:3,chang:[5,6],chapter:[2,3,4,6],charact:6,character:3,check:[2,6],chickenpox:3,choos:[3,4,5,6],chosen:6,cite:3,citi:[3,4,6],classic:3,claus:5,clear:5,click:6,client:2,climat:[3,6],clue:3,clump:6,cluster:3,code:[4,5],coeffici:6,coincid:3,collect:[4,6],column:[4,6],com:2,combo:6,come:[4,6],comma:[4,6],command:[2,6],comment:6,commut:[3,6],compact:4,compar:3,compart:3,compartment:3,compil:[2,4],complet:[3,4,5],complex:2,compon:4,comprehens:4,comput:4,condit:[3,6],confer:3,confid:4,configur:6,connect:[1,3,5,6],consid:[3,6],consider:3,consist:4,consol:6,consolid:6,constant:6,construct:[1,4],contact:[3,6],contain:[4,5,6],content:[1,6],context:3,continu:[3,5],contribut:3,control:[3,4,6],convent:4,convert:4,coordin:[4,6],core:3,corner:6,correspond:6,corridor:3,could:3,cours:6,cov1:6,cov2:6,cov:5,covari:3,coverag:[5,6],creat:[2,4,6],cristo:6,csv:[4,5,6],cumbersom:6,current:[4,5,6],custom:[1,3,6],custommodel:5,custommodel_exampl:5,cycl:2,cython:2,dai:[5,6],daleydjandganijandcanningsc2001:3,dashboard:4,dat:6,data:[1,2,3,4],databas:[5,6],datafil:6,datafram:6,datastorag:6,date:[4,6],dbhost:6,dbpass:6,dbuser:6,dbusernam:6,deb:2,debian:2,debug:6,decim:4,decis:3,declar:[5,6],def:5,defin:[3,5,6],definit:[4,6],degre:5,delai:3,delta:[3,5,6],demo:[4,5,6],demograph:[4,6],demographi:3,dengu:3,denot:5,densiti:3,depend:[3,4,6],deriv:2,describ:[3,4],descript:[3,4,6],descriptor:4,design:[3,6],desir:[4,6],despit:6,dest:6,destin:[4,6],detail:[3,4,6],determ:6,determin:4,determinist:[3,6],develop:[2,3],devot:6,diagram:3,diagrammat:3,dialog:6,dict:5,dictionari:5,diekmannoandheesterbeekjap2000:3,differ:[2,3,4,6],differenti:3,dimension:[],dir:6,direct:[3,4,6],directli:[2,3,6],directori:[4,6],disabl:6,disconnect:5,discret:3,discuss:4,diseas:[1,4,6],displai:6,disregard:6,distanc:[4,5,6],distant:6,distinct:[3,4],distinguish:3,distribut:[2,3,5,6],divers:3,divid:[3,6],doc:5,document:[2,4,5],doe:[3,4],doesn:6,doing:5,don:6,done:[3,4,6],dotransp:6,down:6,drag:6,draw:3,durat:3,dure:6,dynam:[1,3,4,5,6],e_t:3,each:[3,4,5,6],easi:2,easili:[2,3],ecolog:3,edg:[3,5],edge_list:5,edit:[2,4,6],editor:6,effect:6,either:[3,4,6],elabor:6,element:[5,6],els:5,embed:3,embodi:3,emerg:3,empti:6,enabl:4,encapsul:4,encod:6,end:[3,4,5,6],endem:3,enjoy:1,enough:4,enter:6,entir:3,environ:[1,3,4],environment:3,epg:[4,5,6],epgeditor:6,epid:6,epidem:[1,4,5],epidemiolog:[1,3,4],epigrass:[3,5],epigrassrc:6,epipath:5,epirass:2,epirunn:[2,4,6],epis:5,equal:6,equat:3,equival:6,eras:6,error:[2,4,5,6],especi:6,essenti:2,establish:5,etc:[3,4,5,6],euclidean:6,even:[4,6],event:[3,5],everi:[4,5,6],exactli:6,exampl:[2,3,5,6],except:6,execut:[2,5,6],exist:6,exit:6,expect:[3,4,6],explain:6,explicitli:3,explor:4,exponenti:3,expos:[3,5,6],exposur:3,express:3,extend:[3,4],extens:6,extra:[3,5,6],facilit:4,fact:6,far:[3,5],fast:2,favorit:6,featur:[3,4,5],feed:[5,6],femal:3,fever:3,few:[4,5,6],field:3,fifth:6,fig:3,figur:[3,5],file:[4,5],filenam:6,fill:6,finish:6,finkenstadt:3,fire:3,first:[4,5,6],fit:5,fix:5,flag:5,flow:3,flowd:6,flowsd:6,fold:4,folder:6,follow:[3,4,5,6],footnot:4,forc:3,forest:3,forget:6,form:[3,6],format:[4,5,6],forward:[4,6],found:[3,4,5,6],four:[3,6],fourth:[3,6],frac:3,fraction:[3,6],frame:3,framework:[1,3,4],from:[2,3,4,5,6],full:[3,5,6],further:3,futur:6,gener:[3,6],geo:[1,4],geocod:[4,5,6],geodest:6,geograph:[1,3,6],geopackag:4,geosourc:6,get:[1,2,3,4,6],getdegre:5,getdistancefromneighbor:5,getinedg:5,getneighbor:5,getoutedg:5,getsit:5,give:3,given:[3,5,6],global:[5,6],gnu:2,goal:6,goe:5,going:[5,6],good:6,got:2,graph:[4,6],graphic:1,grass:4,great:2,greater:3,grenfel:3,gui:[1,2],guid:6,guilabel:6,had:5,hand:[3,6],has:[3,4,5,6],have:[2,3,4,5,6],header:6,health:6,help:[2,3,5,6],her:[4,5,6],here:[3,6],heterogen:3,hidden:6,hierarch:[3,4],him:6,hint:6,his:[3,4,5,6],histori:[3,5],hold:3,home:6,homogen:3,host:3,hostnam:6,how:[2,4,5,6],howev:[1,2,3,5,6],http:2,human:3,hypothet:6,i_t:3,ident:3,identif:4,identifi:[3,4,6],illustr:3,immedi:[4,6],immun:[3,6],impact:3,implement:[3,5,6],implicit:6,impos:5,inbound:5,incid:[3,5],includ:[3,6],inclus:3,incorpor:4,increas:3,incub:[3,6],independ:[3,4,6],index:[2,4,6],indic:[3,5,6],individu:[4,5,6],inedg:5,infect:[4,5,6],infecti:[5,6],infector:5,infinit:6,influenza:3,info:6,inform:[3,5,6],initi:[3,5,6],input:6,insensit:6,insert:5,insid:5,inspect:6,instal:1,instanc:[4,6],instantan:6,instruct:2,integ:6,integr:3,interact:[2,3,4],interest:[3,4],interfac:1,intermediari:3,intern:6,interpret:2,intervent:3,intra:5,introduc:[3,6],introduct:1,introspect:5,intruct:5,invas:3,invers:[3,6],invok:[2,4,6],involv:3,ip20:6,ipo:5,ishamvandmedleyg1996:3,isol:6,its:[1,2,3,4,5,6],itself:2,jose:6,just:6,keep:[3,5],kei:[2,3,5],kept:6,kglassandbtgrenfell2004:3,kilomet:4,know:6,knowledg:5,known:3,l_r:3,l_t:3,label:[3,4],lambda:3,lan:2,languag:[2,5,6],larg:2,larger:6,last:6,latent:3,later:[4,6],latest:2,latex:4,latin:6,latitud:[4,6],latter:3,lead:4,learn:[2,5],least:[1,5,6],leav:6,left:[3,6],length:[4,6],leq:3,less:3,let:[5,6],letter:6,level:[5,6],life:3,lifelong:3,like:6,limit:[4,5],line:[2,4,6],link:[2,3,5,6],linux:2,list:[4,5,6],local:[3,4,5,6],localhost:6,locality1:6,locality2:6,locat:[3,6],logic:5,longitud:[4,6],longrightarrow:3,look:[5,6],lose:3,lost:6,lower:3,lpo:5,magnitud:3,mai:[2,3,5,6],main:[1,3,6],maintain:[2,3],major:3,make:[2,5],male:3,manag:6,mani:[3,4],manual:[5,6],map:[4,6],match:4,math:3,mathemat:[3,6],matter:6,maxstep:5,mean:[2,3,4,5,6],meaning:5,measl:3,measur:4,mechan:6,memori:2,messag:[2,6],method:4,metric:6,miginf:5,migrat:4,mimic:4,minim:4,minimum:6,mix:[3,4],mjkeelingandbtgrenfell1997:3,mode:6,model2:6,model3:6,model4:6,model:[1,2],modelsindex:4,modifi:2,modtyp:[5,6],more:[3,4,6],most:[2,5,6],mous:6,move:[3,6],movement:[3,6],multi:[2,3],multipl:[4,6],must:[3,4,5,6],mymodel:[4,6],mysql:6,mysqldb:2,mysqlout:6,n10:6,n11:6,n_t:3,name:[4,5,6],natur:[2,3,4,5],necessari:[4,6],necessarili:3,need:[2,5,6],neg:3,negbin:3,neighbor:5,neighborhood:3,nest:5,network:[1,5,6],networkx:2,never:3,newli:3,next:[3,6],node:[1,3,5,6],nome_zona:[4,6],non:[3,6],nonumb:3,nor:5,notat:[5,6],note:[3,5,6],notebook:6,notic:5,notif:3,now:[3,6],npass:5,number:[3,4,5,6],numer:[4,6],object:[2,4,5,6],obtain:2,occur:6,off:6,offici:6,often:[3,6],older:6,onc:[4,5,6],one:[3,5,6],ones:[3,6],onli:[3,4,5,6],open:[4,6],opt:6,optim:3,option:[4,5],order:[4,5,6],org:2,orient:[2,4],origin:3,other:[3,4,5,6],outbound:5,outcom:4,outdat:2,outdir:6,outedg:5,outfil:6,output:5,over:[4,6],overal:3,overview:1,own:[4,5,6],pack:6,packag:1,page:6,pair:6,par:5,parallel:2,paramet:[3,4,5],parameter:[3,4],parent:5,parentgraph:5,parentsit:5,partial:[3,6],particular:4,pass:[4,6],passeng:[3,4,5,6],password:6,path:[3,4,5,6],pattern:3,paulista:6,pdf:[4,6],pechincha:6,peopl:5,per:[3,4,5,6],perform:4,period:[3,6],permiss:2,persist:2,person:[4,6],perspect:[4,5],pertussi:3,pip3:2,pip:2,place:[3,4,5,6],plai:[4,6],platform:[4,5],pleas:[5,6],plot:[4,6],poisson:[3,6],polygon:6,pool:3,pop:6,popul:[1,3,4,5,6],port:6,pose:4,possibl:[3,5,6],potenti:[3,4,5],power:[2,5],pre:[2,4,6],preced:6,predict:3,prefer:6,prepar:6,prepared:3,prerequisit:2,present:[3,6],press:6,pressin:6,preval:3,prevent:6,principl:3,priviledg:2,probabl:[2,3,5,6],problem:4,proce:[2,5],process:[3,4,6],processor:6,product:2,program:[5,6],programm:2,progress:[3,5,6],prompt:6,properti:[3,4],proport:3,protect:6,provid:[2,3,4,5,6],pure:1,purpos:[4,6],put:5,pypi:2,pythagora:6,python3:2,python:[1,5],quantiti:3,quarantin:6,quick:2,quickli:5,quit:[2,3],r_t:3,railroad:3,rais:5,ran:4,random:[3,6],randomli:3,randse:6,rang:3,rare:2,rate:[3,4,6],read:[4,6],reader:6,real:[4,5,6],realism:3,realiti:5,realiz:[3,5],recalcul:4,receiv:[3,5,6],recommend:[2,4,6],record:4,recov:[3,6],recoveri:3,recurr:3,reduc:4,ref:3,refer:[3,4,5],referenc:[1,4,6],regard:[3,6],region:[],rel:[4,6],relat:3,remain:[3,4,6],rememb:6,remind:6,remot:2,remov:[3,6],render:[],replai:6,replenish:3,replic:6,replica:6,report:6,repres:[3,4,6],represent:4,request:[2,6],requir:[1,3,4,5,6],research:4,reservoir:3,resid:3,respect:4,rest:5,result:[3,4,5,6],right:[3,6],riozonas_latlong:[4,6],risk:3,river:[3,6],road:[3,6],rout:[3,4],rpo:5,rule:6,run:[2,4,5],s_t:3,same:[4,5,6],sampl:6,santo:6,sarsdf:6,sarspa:6,sarsr:6,satellit:3,save:6,scale:3,scan:6,scenario:[3,4],script:[1,4],script_wed_jan_26_154411_2005:[4,6],scriptabl:1,sea:3,second:6,section:[4,6],see:[3,4,5,6],seed:6,sei:[3,6],seipr:[3,6],seipr_:6,seiprp:[3,6],seiprps_:6,seir:[3,4,6],seir_:6,seis_:6,select:[4,6],self:5,sensit:5,separ:[4,6],sequenc:3,sequenti:6,seri:[3,4,5,6],server:[2,6],set:[1,3,4,5],setup:6,sex:3,sexagesim:4,sexual:3,shapefil:[4,6],she:[4,6],should:[2,3,4,6],show:6,shown:[4,6],shp:[4,6],sim:3,similar:2,similarli:4,simpl:[2,3,6],simplest:3,simplic:2,simstep:5,simul:[1,2,3,5],sinc:[2,4,5,6],singl:[3,6],sipr:6,sipr_:6,siprp:[3,6],siprps_:6,sir:[5,6],sir_:6,sirs_:6,sis_:6,site:[2,3,4],site_list:5,sitenam:5,siteobj:5,siterep:[4,6],situat:6,sixth:6,size:[3,4,5,6],skip:2,slider:6,small:6,smaller:3,softwar:2,some:[2,3,5,6],someth:6,sophist:4,sourc:[2,3,4,5,6],space:3,spark:3,spatial:[3,6],spatio:4,speci:3,specif:[3,4,6],specifi:[1,4,5],speed:[3,5,6],sphinx:2,spo:5,spread:[3,5],sql:[2,5],sqlite:[4,6],sqlout:6,sqlsoup:2,stage:[3,6],stai:3,stand:3,standard:[2,4],start:[1,3,6],stat:5,state:[3,5,6],statement:5,statist:4,statu:6,step:[2,3,4,5,6],still:[3,4,6],stochast:[4,6],stochat:6,store:[2,4,5,6],straight:[4,6],straightforwardli:4,strategi:3,string:5,structur:[3,4],studi:4,sub:3,subject:3,success:6,sudo:2,suggest:[3,6],support:4,suppos:[3,4,6],sure:2,surveil:3,suscept:[3,4,5,6],symbol:[3,6],symptom:3,syntax:4,system:[1,2,3,4,5,6],tab:6,tabl:[4,6],take:[3,4,5,6],taken:6,task:[2,4],temp:6,temperatur:6,templat:4,tempor:[3,4],temporari:3,temporarili:3,tend:3,term:3,text:[4,6],textit:3,texttt:6,than:[3,6],thei:[2,3,6],them:[3,4,5,6],theorem:6,theta:[3,5],theta_t:3,thi:[1,2,3,4,5,6],thing:5,third:6,those:[3,4,6],though:4,thread:2,three:[2,3,4,6],threshold:3,through:[2,3,5,6],thu:[3,4,6],time:[3,4,5,6],timeseri:6,timestep:6,titl:6,togeth:3,tool:[2,3],tooltip:6,top:6,topolog:[3,4],total:[3,5,6],totalcas:5,totpop:5,touch:6,track:[3,5],tradit:3,transit:3,translat:6,transmiss:[3,4,6],transmit:3,transpar:4,transport:[1,4,5],travel:[3,4,6],trigger:3,trip:3,triplet:6,tupl:[5,6],turn:[5,6],tutori:4,two:[3,4,6],type:[2,3,4,5,6],ubuntu:2,under:[3,6],understand:[3,4],unind:5,uniqu:[4,6],unit:[3,4,6],until:4,updat:[2,4,5,6],usag:6,use:[2,3,4,5,6],used:[1,3,4,5,6],useful:[3,5,6],user:[1,2,3,4,5],uses:[2,3],using:[2,3,5,6],utf:6,vac:6,vaccin:[5,6],vaccinenow:5,vaccov:5,vacin:5,valid:5,valu:[2,3,4,5,6],vari:3,variabl:[3,4,5,6],variat:3,varibal:6,vector:3,veloc:3,veri:[2,3,4,5,6],version:[2,3,6],via:[4,6],visit:3,visitor:3,visual:[3,4],vname:5,vocat:1,wai:[3,4,5,6],walk:2,wane:[3,6],want:6,wave:3,web:[2,4],weight:3,well:[2,3,4,6],what:6,when:[3,4,5,6],wher:6,where:[2,3,4,6],which:[3,4,5,6],whith:6,who:3,whole:4,widget:6,window:6,wise:5,wish:[3,6],within:[3,4,5,6],withou:4,without:[2,3,4],word:[4,6],work:[4,6],worth:6,write:[1,6],written:[1,3,4,6],www:2,year:3,yellow:3,yet:[2,3],you:[2,4,5,6],your:[1,2,4,5,6],your_model:6,yourmodel:6,zero:[3,6],zona_traf:[4,6]},titles:["Analysis","Welcome to Epigrass\u2019s documentation!","Building and Installing","Epidemic Models","Overview of Epigrass","Writing Custom Models","Using Epigrass"],titleterms:{AND:6,THE:6,The:[4,5,6],Using:6,analysi:0,api:5,approach:4,attribut:5,background:4,build:2,cartograph:4,configur:2,correspond:3,custom:5,data:6,databas:[2,4],defin:4,develop:5,diseas:3,dispers:3,displai:4,document:1,edg:[4,6],environ:5,epidem:[3,6],epidemiolog:6,epigrass:[1,2,4,6],event:6,file:6,gener:4,geograph:4,get:5,graph:5,graphic:[4,6],gui:6,individu:3,infect:3,infecti:3,instal:2,interfac:6,introduct:3,like:3,method:5,model:[3,4,5,6],mysql:2,network:[3,4],node:4,oper:6,option:6,other:2,output:[4,6],overview:4,packag:2,paramet:6,part:6,post:2,python:2,redi:2,report:4,requir:2,run:6,script:6,set:6,simul:[4,6],sipr:3,sir:3,site:[5,6],sninrn:3,specifi:6,start:5,stochast:3,transport:[3,6],typolog:3,user:6,util:6,visual:6,welcom:1,world:6,write:5}}) \ No newline at end of file diff --git a/docs/source/analysis.md b/docs/source/analysis.md deleted file mode 100644 index 88282d2..0000000 --- a/docs/source/analysis.md +++ /dev/null @@ -1,2 +0,0 @@ -Analysis -======== diff --git a/docs/source/index.md b/docs/source/index.md deleted file mode 100644 index 36b6e2d..0000000 --- a/docs/source/index.md +++ /dev/null @@ -1,23 +0,0 @@ -# Welcome to Epigrass\'s documentation! - - -Epigrass is a framework for the construction and simulation of complex -network epidemiology models. At least this is its main vocation. -However, Epigrass can be used to simulate any dynamical system on a set -of nodes (connected into a network or not!). Epigrass is written in pure -Python and is scriptable in Python, for your enjoyment!. - -Contents: - -.. toctree:: - :maxdepth: 2 - - overview - install - intromodels - using - analysis - scripting - - - diff --git a/docs/source/install.md b/docs/source/install.md deleted file mode 100644 index 71ff41e..0000000 --- a/docs/source/install.md +++ /dev/null @@ -1,207 +0,0 @@ -Building and Installing {#install} -======================= - -This chapter will walk through all aspects of Epigrass installation. -From obtaining, building and installing the prerequisites to the -installation of Epigrass itself. - -Most of the steps will be quite simple and similar since they will make -use of standard tools for package installation on Debian GNU/Linux and -derivatives. If you use a different distribution, you should check its -documentation for package installation instructions. - -If, on your distribution, a package is not available for the required -version, you can try to obtain an updated version of the package at the -web-sites provided. On the rare cases where pre-built packages are not -available, instructions on how to build the software from source should -also be available from its web-site. - -Required Packages ------------------ - -### Python - -*Web-site:* - -: - -*Version required:* - -: \>= 2.5 \< 3 - -Python is a simple yet powerful object-oriented language. Its simplicity -makes it easy to learn, but its power means that large and complex -applications can also be created easily. Its interpreted nature means -that Python programmers are very productive because there is no -edit/compile/link/run development cycle. - -Python is probably installed automatically by your GNU/Linux -distribution (it is on Debian). If not, it is best to use your -distribution\'s standard tools for package installation. On Debian for -example: - -```bash -$ sudo apt-get install python python-dev build-essentials python-setuptools -``` - -### Numeric Python - -*Web-site:* - -: - -*Version required:* - -: \>= 1.0 - -Numeric Python is a module for fast numeric computations in Python. - -Example installation: - -```bash -$ sudo apt-get install python-numpy -``` - -### Matplotlib - -*Web-site:* - -: - -*Version required:* - -: \>0.9 - -Matplotlib is a Module that provides plotting capabilities to Python. - -```bash -$ sudo apt-get install python-matplotlib python-matplotlib-data python-matplotlib-doc -``` - -### PyQt - -*Web-site:* - -: - -*Version required:* - -: \>4.0 - -PyQt is a set of Python bindings for the Qt toolkit. PyQt combines all -the advantages of Qt and Python. A programmer has all the power of Qt, -but is able to exploit it with the simplicity of Python. - -PyQt depends on the Qt libraries to run. This dependency will be taken -care by the package installation tools of most distributions, which will -automatically install the required version of Qt. - -Example installation: - -```bash -$ sudo apt-get install python-qt4 -``` - -### PyQwt - -*Web-site:* - -: - -*Version required:* - -: \>5.0 - -PyQwt is a Python binding for the Qwt5 technical widget library. It is -necessary for some os Epigrass\' visualizations capabilities. - -Example installation: - -```bash -$ sudo apt-get install python-qwt5-qt4 -``` - -### MySQL - -*Web-site:* - -: - -*Version required:* - -: \>5.0 - -MySQL is a fast, multi-threaded, multi-user SQL database server. If you -have a MySQL server available in your LAN, you may skip this step after -making sure you have permission to access and use it to store your data. - -Example installation: - -```bash -$ sudo apt-get install mysql-server mysql-client python-mysqldb -``` - -### Redis - -*web-site:* - -: - -*Version required:* - -: \>=2.8 - -Redis is a persistent Key-value database. - -Example installation: - -```bash -$ sudo apt-get install redis-server -``` - -### Other Requirements - -Some other requirements can be installed directly from the Python -Package index using the *pip* tool: - -```bash -$ sudo pip install networkx redis sqlsoup requests sphinx -``` - -#### Post-install configuration - -After installing MySQL, you will need to create a new database in the -server, called *epigrass* and a user with all priviledges to access and -modify it. This is the user Epigrass will use to interact with MySQL. - -section{Installing Epigrass} If you got through all the steps above, it -will be an easy task to install Epigrass. There is a *.deb* package for -installing Epirass on Debian and Ubuntu. However, since it is not -maitained by the developers of Epigrass, It may very well be outdated. -So please download Epigrass\'s source tarball (something named -`Epigrass_someversion.tar.gz`{.interpreted-text role="file"}) from -Sourceforge and, after unpacking it to some temporary directory, install -it by typing: - -```bash -$ sudo python setup.py install -``` - -If the installation proceeds without errors, you will have three new -executables available on your system: - -*epigrass* - -: This starts Epigrass graphical user interface (GUI). - -*epirunner* - -: This is a command line version of Epigrass. With it you can run - models without invoking the GUI. It\'s great for batch simulations - and for remote use. for a quick help, try \"epirunner -h\". - -*epgeditor* - -: A graphical editor of .epg models. A easy way to edit already - existing models. Contains detailed explanations of every section of - the EPG file. $x_3+y$ diff --git a/docs/source/intromodels.md b/docs/source/intromodels.md deleted file mode 100644 index 3f88fb2..0000000 --- a/docs/source/intromodels.md +++ /dev/null @@ -1,467 +0,0 @@ -Epidemic Models -=============== - -::: {.index} -Model -::: - -Introduction ------------- - -::: {.index} -Epidemiological models -::: - -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, there are two direct potential applications. One is to model -the spread of new diseases through an entirely susceptible population -(ecological invasion). The velocity of spread of new diseases in a -network of susceptible populations depends on their spatial -distribution, size, susceptibility and patterns of contact. In a spatial -scale, climate and environment 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 under 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 -cite{MJKeelingandBTGrenfell1997}. Theses magnitudes may vary from place -to place as it depends on the contact structure of the individuals. -Predicting which cities are sources for the endemicity and understanding -the path of recurrent traveling 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) cite{BTGrenfellandONBjoernstadandJKappey2001}. - -EpiGrass implements a series of epidemiological models which, integrated -with a set of analytical and visualization tools, may give us clues -about the overall pattern of diseases spread in the geographical space. -Besides, it can be used for scenario analysis to compare alternative -intervention scenarios. - -Disease models --------------- - -Models of disease dynamics are quite diverse, ranging from caricatures -to very detailed simulations. Traditional models of spread of diseases -are based on the mean field assumption, i.e., that individuals interact -randomly at a certain rate. Important references to the subject are -cite{DiekmannOandHeesterbeekJAP2000,DaleyDJandGaniJandCanningsC2001,IshamVandMedleyG1996,AndersonRMandMayRMandAndersonB1992}. -These models are expressed mathematically as difference equations -(discrete time) or differential equations (continuous time). In the -simplest form, these models do not take into consideration either -individual heterogeneity or the local nature of transmission events. -Increased realism is achieved by structuring the population according to -age, risk behavior, sex, susceptibility, or other category associated -with different risk of getting or transmitting the disease. Within each -sub-population, however, the assumption of well mixing must hold. When -other species are involved in the transmission process (non-human hosts -and vectors), these are also considered as compartments that may be -sub-divided as well according to covariates associated with the risk of -acquiring or transmitting the disease. - -In this context, epidemiological models take the form of -multi-compartmental models where each compartment is a well-mixed -homogeneous population. The model describes the transition of the -individuals in this population through a sequence of disease-related -stages. These stages could be *Susceptible*, *Infected*, *Recovered*, -for example. And the transitions could be .. math:: Susceptible -longrightarrow Infected .. math:: Infected longrightarrow Recovered - -If only these transitions are allowed, then individuals in the recovered -class never become susceptible again (lifelong immunity). If, on the -other hand, immunity is only temporary (as in pertussis), then another -transition should be included: .. math:: Susceptible longrightarrow -Infected .. math:: Infected longrightarrow Recovered .. math:: Recovered -longrightarrow Susceptible - -One way to visualize these models is using state-flow diagrams, where -boxes represent states (compartments) and arrows indicate the -transitions. It is the state identity together with the transitions -allowed that define the type of model in use. - -### Dispersal of infected individuals - -A key feature of EpiGrass is to allow the simulation of geographical -spread of infection from one locality to others. Dispersal of infection -is modeled as in a \'forest fire\' model -cite{BTGrenfellandONBjoernstadandJKappey2001}. An infected individual, -traveling to another city, acts as a spark that may trigger an epidemic -in the new locality. This approach is based on the assumption that -individuals commute between localities and contribute temporarily to the -number of infected in the new locality, but not to its demography. -Further details about this approach can be found in Grenfell et al -(2001). - -In all models presented below, new infections in locality $i$ arise from -the contact between Susceptibles in $i$ and Infectious individuals. -Infectious individuals are of two types: those residents in $i$ $(I_t)$ -and those visiting $i$ $(\theta)$. Mathematically, this is written as: - -$$L_{t+1} = \beta S_t \frac{(I_t+\theta)^\alpha} {N_t+n_t}$$ - -where $L_{t+1}$ is the number of new cases, $\beta$ is the contact rate -between Susceptibles and Infectious individuals, $S_t$ is the number of -susceptibles, $I_t$ is the number of infectious individuals resident in -the locality, $\theta$ is the number of infectious individuals visiting -the locality, $N_t$ is the population residing in the locality and $n_t$ -is the total number of individuals visiting the locality. $\alpha$ is a -mixing parameter. $\alpha=1$ corresponds to homogeneous mixing -(Finkenstadt and Grenfell, 2000). - -### Typology of infectious diseases and corresponding models - -::: {.index} -Models;typology -::: - -Here we present a brief description of the typology of infectious -diseases models based on the main route of transmission, and type of -immunity resulting from infection. These models correspond to the types -of models built into EpiGrass. - -#### SIR-like models - -The natural history of many directly transmitted infectious diseases can -be appropriately described by a SIR-like model. *SIR* stands for -Susceptible $(S)$, Infected $(I)$ and Recovered $(R)$. Archetypal *SIRs* -are measles or chickenpox, i.e., diseases that confer lifelong immunity -(but see cite{KGlassandBTGrenfell2004}). An individual starts his life -in the $S$ state and may progress to the $I$ state. The rate of -progression of individuals from $S$ to $I$ is called the incidence rate -or force of infection $(\lambda)$ which is a function of contact rate, -probability of transmission per contact and density of infectious -individuals. Individuals stay in the infectious period for a certain -time and then move to the recovered state where they become immune to -new infections. Generally, the removal rate from the infectious class is -the inverse of the infectious period (i.e., it is assumed that the -duration of infection is exponentially distributed). - -> Figure: SIR-like models - -Variations of this model allow cases where infected individuals do not -acquire immunity after infection, thus returning to the susceptible pool -(*SIS* model). Another variation is the inclusion of a latent stage to -hold individuals that are infected but not infectious to others yet -(incubation period). These are the *SEIR* (with immunity) and *SEIS* (no -immunity) models. - -Next, we describe in more detail each one of these models in their -deterministic and stochastic versions, as used by EpiGrass. - -::: {.tabularcolumns} -l\| -::: - - -------------------------------------------------------------------- - **Symbol** **Meaning** - ---------------- --------------------------------------------------- - $L_t$ number of newly infected individuals at time - - $E$ number of exposed but not infectious individuals at - time t - - $I$ number of infectious individuals at time t - - $R$ number of recovered individuals at time t - - $\beta$ contact rate ($t^{-1}$) - - $\theta$ number of infectious visitors - - $\alpha$ mixing parameter ($\alpha = 1$ means homogeneous - mixing) - - $n$ number of visitors - - $N$ population $(S+E+I+R)$ - - $B$ susceptible pool replenishment - - $r$ fraction of $I$ recovering from infection per unit - of time $([0,1])$ - - $e$ fraction of $E$ becoming infectious per unit of - time $([0,1])$ - - $\delta$ probability of acquiring immunity $([0,1])$ - - $w$ probability of losing immunity $([0,1])$ - - $p$ probability of recovered individual acquiring - infection, given exposure $([0,1])$ - -------------------------------------------------------------------- - -::: {.index} -Models;SIR -::: - -**SIR models** - -: Examples of diseases represented by SIR models are measles, - chickenpox. Some diseases that do not confer lifelong immunity may - be represented by this model if only short term dynamics is of - interest. In the scale of a year, influenza and pertussis, for - example, could be described using SIR. The SIR model is implemented - in EpiGrass as a system of four difference equations. Besides the - three equations describing the dynamics of $S$, $I$ and $R$, a - fourth equation explicitly defines the number of new cases per time - step, $L(t)$ (i.e., the incidence). In general, this quantity is - embedded in the $I$ equation (prevalence), but it is important to - keep track of the incidence if one wishes to compare prediction with - notification data. - -$$\begin{aligned} -\begin{align} - L_{t+1} &= \beta S_t \frac{(I_t+\theta)^\alpha} {N_t+n_t}\nonumber \\ - I_{t+1} &= L_{t+1} + (1-r)I_t\nonumber\\ - S_{t+1} &= S_t + B - L_{t+1}\nonumber\\ - R_{t+1} &= N_t-(S_{t+1}+I_{t+1})\nonumber -\end{align} -\end{aligned}$$ - -This model can be easily extended to include diseases without recovery, -for example AIDS, the so called SI models. Basically, the recovery rate -is set to 0. - -::: {.index} -Models;SIS -::: - -**SIS models** - -: In the SIS model, individuals do not acquire immunity after the - infection. They return directly to the susceptible class. - - The only difference between \$SIS\$ and \$SIR\$ models is the - absence of \$R\$ and the flow of recovered individuals to the - susceptible stage: - -$$\begin{aligned} -\begin{align} - L_{t+1} &= \beta S_t \frac{(I_t+\theta)^\alpha} {N_t+n_t} \nonumber\\ - I_{t+1} &= L_{t+1} + (1-r)I_t\nonumber\\ - S_{t+1} &= S_t + B - L_{t+1} + r I_{t+1}\nonumber -\end{align} -\end{aligned}$$ - -::: {.index} -Models;SEIR -::: - -**SEIR models** - -: These models have an extra compartment for those individuals who - have acquired the infection but are still not infectious to others. - This is the latent period and it is often parameterized as the - inverse of the incubation period. Note, however, that for many - diseases, initiation of infectiousness does not necessarily - coincides with symptoms. In principle, any disease described by the - SIR model can also be described by the SEIR model. The decision - regarding the use of one or another depends on the magnitude of the - latent period in relation to the time frame of other events in the - simulation. The model has the form: - -$$\begin{aligned} -\begin{align} - L_{t+1} &= \beta S_t \frac{(I_t+\theta)^\alpha} {N_t+n_t}\nonumber \\ - E_{t+1} &= (1-e) E_t + L_{t+1}\nonumber\\ - I_{t+1} &= e E_t + (1-r)I_t\nonumber\\ - S_{t+1} &= S_t + B - L_{t+1}\nonumber\\ - R_{t+1} &= N_t-(S_{t+1}+I_{t+1}+E_{t+1})\nonumber -\end{align} -\end{aligned}$$ - -::: {.index} -Models;SEIS -::: - -**SEIS models** - -: These are SIS models with the inclusion of the latent stage. - -$$\begin{aligned} -\begin{align} - L_{t+1} &= \beta S_t \frac{(I_t+\theta)^\alpha} {N_t+n_t}\nonumber \\ - E_{t+1} &= (1-e) E_t + L_{t+1}\nonumber\\ - I_{t+1} &= e E_t + (1-r)I_t\nonumber\\ - S_{t+1} &= S_t + B - L_{t+1} + r I_t\nonumber -\end{align} -\end{aligned}$$ - -#### SIpR-like models - -These are *SIR* models with immunity intermediary between full (*SIR*) -and null (*SIS*). Some possibilities arise here: 1) Infection confers -full immunity to a fraction of the individuals and the remaining ones -return to the susceptible class again, after infection. (*SIpRpS*); 2) -Infection provides only partial immunity and recovered individuals are -partially susceptible to new infection (*SIpR*); 3) Immunity is full -right after infection but wanes with time (*SIRS*). Each model is -presented below. Figure `fig:sipr`{.interpreted-text role="ref"} -illustrates them diagrammatically. - -![SIpR-like models.](SIpRdiagram.png) - -Related models, that included the latent state \$E\$ are: -textit{SEIpRpS}, *SEIpR*, *SEIRS*. - -::: {.index} -Models;SIpRpS -::: - -**SIpRpS model** - -: This model assumes that a fraction \$delta\$ of infectious - individuals acquire full immunity while the remaining \$(1-delta)\$ - returns to the susceptible stage. The model is: - -$$\begin{aligned} -\begin{align} - L_{t+1} &= \beta S_t \frac{(I_t+\theta)^\alpha} {N_t+n_t}\nonumber \\ - I_{t+1} &= L_{t+1} + (1-r)I_t\nonumber\\ - S_{t+1} &= S_t + B - L_{t+1} + (1-\delta) r I_t\nonumber\\ - R_{t+1} &= N_t-(S_{t+1}+I_{t+1})\nonumber -\end{align} -\end{aligned}$$ - -**SIpR model** - -: This model assumes that immunity is only partial and recovered - individuals may acquire infection again (at a lower rate - $p \lambda$, where $0\leq p \leq 1$). Two equations calculate the - number of new infections. $L_S$ calculates the number of - susceptibles that become infected at $t+1$. $L_R$ calculates the - number of recovered that become infected at $t+1$. The latter are - less susceptible to the disease when compared to susceptibles. The - model is: - -$$\begin{aligned} -\begin{align} - L_{S,t+1} &= \beta S_t \frac{(I_t+\theta)^\alpha} {N_t+n_t}\nonumber \\ - L_{R,t+1} &= p \beta R_t \frac{(I_t+\theta)^\alpha} {N_t+n_t}\nonumber\\ - I_{t+1} &= L_{S,t+1} + L_{R,t+1} + (1-r)I_t\nonumber\\ - S_{t+1} &= S_t + B - L_{S,t+1} \nonumber\\ - R_{t+1} &= N_t-(S_{t+1}+I_{t+1}) \nonumber - \end{align} -\end{aligned}$$ - -::: {.index} -Models;SIRS -::: - -**SIRS model** - -: Here, the immunity acquired by infection wanes with time. Pertussis - is an example of this dynamic. - -$$\begin{aligned} -\begin{align} \label{} - L_{S,t+1} &= \beta S_t \frac{(I_t+\theta)^\alpha} {N_t+n_t}\nonumber \\ - I_{t+1} &= L_{S,t+1} + L_{R,t+1} + (1-r)I_t\nonumber\\ - S_{t+1} &= S_t + B - L_{S,t+1} + w R_t\nonumber\\ - R_{t+1} &= N_t-(S_{t+1}+I_{t+1}) \nonumber -\end{align} -\end{aligned}$$ - -#### SnInRn-like Models - -These are models with more than one compartment for susceptibles, -infected and recovered stages. They are used when infection involves -more than one distinct populations. Vector borne diseases are classical -examples where a SIR model is used to describe infection in humans and -another SIR-like model is used to describe infection in the vector -(and/or the reservoir(s)). Dengue fever and yellow fever are examples. -Sexually transmitted diseases may also be modeled with SnInRn models if -male and female populations are distinguished. These models can be -define by the user as a custom model. - -### Stochastic models - -::: {.index} -Models;Stochastic -::: - -All models described so far are deterministic. EpiGrass allows -simulation of stochastic processes. This is done by assuming that -$L_{t+1}$ is a random variable with expected value given by the -expressions found in the deterministic models. The user may choose the -probability distribution for $L_{t+1}$ between Poisson or Negative -Binomial to draw realizations of $L_{t+1}$: - -$$l_{t+1} \sim Poisson (L_{t+1})$$ - -or - -$$l_{t+1} \sim NegBin (I_t, \frac{I_t}{I_t+L_{t+1}})$$ - -The Poisson distribution assumes independent events while the negative -Binomial assume clustering of transmission events. - -Network transportation models ------------------------------ - -::: {.index} -Models;transportation -::: - -The transmission models describe the dynamics of infection in a -well-mixed population. EpiGrass allows the user to model the movement of -infectious individuals between well-mixed populations, thus simulating -the spread of disease through space. EpiGrass represents geographical -space as a network where cities or localities are nodes and -transportation routes are edges. The term network refers to the -framework of routes within a system of locations, identified as nodes or -sites. An edge is a single link between two sites (a road, a railroad, -an air route or a river/sea corridor). - -Transportation networks, like many networks, are generally embodied as -set of locations and a set of links representing connections between -those locations. The arrangement and connectivity of a network is known -as its *topology*. Major types of topology are illustrated in figure -ref{fig:artgraphs}. Velocity and direction of disease spread depend on -the topology and weight of the edges of the transport network and there -are many properties of networks that may useful when analyzing the -spread of diseases. EpiGrass calculates a set of these properties as -described in chapter `analysis`{.interpreted-text role="ref"}. - -In a transportation network, each edge (or link) is characterized by a -variable *flow* which states the number of passengers that travel -through that link per unit time. EpiGrass uses this information to -calculate the number of passengers arriving at each city, per time step. -For example, consider node $N1$ in figure `simpnet`{.interpreted-text -role="ref"}. At each time step, it receives 10 passengers from $N2$, 5 -from $N5$, 1 from $N4$. Now suppose that, at this time step, 10% of the -population within each site is infectious ($I$ state), according to the -epidemic model. Thus, a total of -$10\% \times 10 + 10\% \times 5 + 10\% \times 1 = 1.6$ infectious -individuals are visiting site $N1$. In the epidemic model embedded in -$N1$, EpiGrass sets $n = 16$ and $\theta = 1.6$. This calculation of -$\theta$ is based on a deterministic argument. The other possibility, -allowed by Epigrass, is to define $\theta$ as a random variable, that -follows a binomial distribution with parameters $n$,$p$, where $n$ is as -given in the deterministic version and $p$ is the proportion of -infectious individuals in the source population. From version 1.4 on, -EpiGrass can also take into account the specific delays of each -connection. When the average speed of the transportation system is set -to a value greater than zero, epigrass calculates the time required to -complete each trip and attributes this delay (in units of time) to the -parameter $\delta$. So, the number of infectious passengers arriving at -any given city, at time $t$ corresponds to the number of infectious -passengers that left the city of origin at time $t-\delta$. - -Deterministic: - -$$\Theta_t=n\times\frac{I_{t-\delta}}{N}$$ - -Stochastic: - -$$\Theta_t \sim Binomial(N,\frac{I_{t-\delta}}{N})$$$$A simple transportation network$$ diff --git a/docs/source/overview.md b/docs/source/overview.md deleted file mode 100644 index b25ffab..0000000 --- a/docs/source/overview.md +++ /dev/null @@ -1,265 +0,0 @@ -Overview of Epigrass -==================== - -Epigrass is a platform for network epidemiological simulation and -analysis. It enables researchers to perform comprehensive -spatio-temporal simulations incorporating epidemiological data and -models for disease transmission and control in order to create -sophisticated scenario analyses. - -Modeling Approach ------------------ - -The geographical networks over which epidemiological processes take -place can be very straightforwardly represented in a object-oriented -framework. In such a framework, the nodes and edges of the geographical -networks are objects with their attributes and methods. - -Once the archetypal node and edge objects are defined with appropriate -attributes and methods, then a code representation of the real system -can be constructed, where cities (or other geographical localities) and -transportation routes are instances of the node and edge objects, -respectively. The whole network is also an object with a whole -collection of attributes and methods. - -This framework leads to a compact and hierarchical computational model -consisting of a network object containing a variable number of node and -edge objects. This framework also do not pose limitations to -encapsulation, potentially allowing for networks within networks if -desirable. - -For the end user perspective, this framework is transparent since it -mimics the natural structure of the real system. Even after the model is -converted into a code object all of its component objects remain -accessible to the user\'s models. - -Geographical Network Models ---------------------------- - -::: {.index} -shapefile -::: - -Epigrass\'s geo-referenced models are built from two basic sources of -data: a map (in shapefile format) which provide the cartographical base -over which the models are represented and specific data about nodes and -edges that are provided by the user for the network of interest. - -### Defining the Cartographic Background - -If the user has a map for the georeferred data, this can be passed to -Epigrass. In this case, the cartographic background is defined by -defining the name of the shapefile file (with path relative to the -working directory) in the model\'.epg file. Along with the path to the -shapefile, the variable in the shapefile, which contains the geocode of -localities and their name must also be specified: - - shapefile = ['riozonas_LatLong.shp','nome_zonas','zona_trafe'] - -If the user does not have a map in shapefile format, he can still use -Epigrass. In this case, the georeferred data is read only from two .csv -files (more on that ahead). - -::: {.index} -node, site -::: - -### Defining Nodes - -A graph has nodes and edges. Nodes can be cities or other localities -depending on the model being constructed. The definition of nodes -require the setting of many attributes listed below. The nodes will have -many more attributes defined at run-time which will depend on other -aspects of the model, these will be discussed later. - -The data necessary at build time to create nodes come from a CSV -(comma-separated-values) ASCII-text file, with the following attributes, -(in this order): - -*Latitude, Longitude* - -: This attribute will be used to geo reference the node. The - coordinate system must match those used in the cartographic base - imported from GRASS. Coordinates can be coded in either decimal or - sexagesimal format. - -*Name* - -: Used for identification purposes only. It can be a city name, for - instance. - -*Population* - -: Since the simulation models will all be of a populational nature. - Population size must be specified at build time. - -*Geocode* - -: A Unique Geocode (a number) is required. It will be used as a - label/index to facilitate reference to specific nodes. - -::: {.index} -edge -::: - -### Defining Edges - -In Epigrass\' graphs, edges represent transportation routes. Similarly -to nodes, edges are defined at build-time with a reduced set of -attributes which will be extended at run-time. Epigrass also expects to -get these attributes from a CSV file: - -*Source* - -: The name of the source node. The edges are bi-directional, but the - nodes are labeled source and destination for reference purposes. - -*Destination* - -: The name of the destination node. - -*Forward migration* - -: Migration rate from source to destination, in number of persons per - unit of time. - -*Backward migration* - -: Migration rate from destination to source, in number of persons per - unit of time. - -*Length* - -: Distance in kilometers (or another unit) from source to destination - via the particular route (not straight line distance). - -*Source\'s geocode* - -: This is the unique numerical identifier used in the sites file. - -*Destination\'s geocode* - -: This is the unique numerical identifier used in the sites file. - -::: {.index} -models -::: - -### Defining models - -The word model in Epigrass can mean two distinct objects: The network -model and the node\'s epidemic model. - -Node objects, in an Epigrass model, contain well-mixed population -dynamic models within them. These models determine the dynamics of -epidemics within the particular environments of each node. Epigrass -comes with a few standard epidemiological -modelsindex{Models!epidemiological models} to choose from when setting -up your network. Currently, The same model type is applied to every node -although their parameterization is node-specific. Besides the built-in -model types, users can define their own, as shown in the chapter *Using -Epigrass*. - -::: {.index} -single: models;epidemiological models single: models;network models -::: - -Network models are specified in a ASCII-text script file (Called a -`.epg`{.interpreted-text role="file"} file). Epigrass comes with a few -demo Network models for the user to play with until he/she is confident -enough to build their own. Even then, it is advisable to use the demo -scripts provided as templates to minimize syntax errors. - -The script on the appendix specifies a network model with an stochastic -SEIR (see chapter on epidemiological modeling) epidemic model in its -nodes. The user should study this model and play with its parameters to -understand the features of Epigrass. A step-by-step tutorial on how to -edit the model script can be found in the chapter *Using Epigrass*. - -The Simulation --------------- - -A simulation run in Epigrass consists of a series of tasks performed at -each time step[^1] . - -*Calculate migration* - -: For all edges in the network, the number of persons traveling each - way is determined for the current time-step. - -*Run epidemic models* - -: For each node in the network the epidemic demographics are updated - based on the local number of infected and susceptible individuals - which have been updated by the transportation system. - -All aspects of the simulation such as number of passengers traveling on -each edge, number of infected/susceptible on each node and etc., are -recorded in a step-by-step basis. This complete record allows for the -model to be analyzed after the simulation has been completed without -having to recalculate it. - -### Output - -The output of a simulation in Epigrass is three-fold: A graphical -display which the animated outcome of the simulation, a written report, -and a database table with numeric results. - -#### Graphical display - -During a simulation, selected epidemiological variables are animated in -a 3-dimensional rendering over the map of the region containing the -network. - -#### Report Generation - -The report contains a detailed analysis of the network model and the -simulations ran with it. The report generates a LaTeX source file and -compiles it to a PDF document for visualization. - -Three types of report are currently available: - -**Report = 1** - -: Returns a set of descriptors of the network, described in chapter - -**Report = 2** - -: Returns a set of basic epidemiological measures and plots of the - time series. - -**Report = 3** - -: Report 1 + Report 2 - -Report Generation is an optional, though recommended, step done at the -end of the simulation. For the report, descriptive statistics are -generated for the network. These have to do with network topology and -properties. Additional sections can be added to the report with basic -statistical analyses of the output of pre-selected nodes[^2] . - -#### Database output - -::: {.index} -single: Database;results table single: Database;epigrass database -::: - -Time series of **L**, **S**, **E**, and **I**, from simulations, are -stored in a MySQL database named *epigrass* . The results of each -individual simulation is stored in a different table named after the -model\'s script name, the date and time the simulation has been run. For -instance, suppose you run a simulation of a model stored in a file named -`script.epg`{.interpreted-text role="file"}, then at the end of the -simulation, a new table in the epigrass database will be created with -the following name: *script\_Wed\_Jan\_26\_154411\_2005*. Thus, the -results of multiple runs from the same model get stored independently. - -Epigrass also supports the SQLite database and CSV files as output for -the time-series. The naming convention also applies to these other -formats. - -**Footnotes** - -[^1]: The number of time steps is defined in the model script - -[^2]: Listed in the siteRep variable at the script diff --git a/docs/source/overview.rst b/docs/source/overview.rst index 062007e..281383a 100644 --- a/docs/source/overview.rst +++ b/docs/source/overview.rst @@ -137,14 +137,23 @@ All aspects of the simulation such as number of passengers traveling on each edg Output ------ -The output of a simulation in Epigrass is three-fold: A graphical display which the animated outcome of the simulation, +The output of a simulation in Epigrass is three-fold: A web-based graphical dashboard to interact with outcome of the simulation, a written report, and a database table with numeric results. Graphical display ^^^^^^^^^^^^^^^^^ -During a simulation, selected epidemiological variables are animated in a 3-dimensional rendering over the map of the -region containing the network. +Epigrass's Dashboard can be set to open immediately after the simulation has been completed: + +.. code-block:: bash + + $ epirunner -D mymodel.epg + +or it can be invoked to explore simulations of a model already stored in the database, withou simulating it first: + +.. code-block:: bash + + $ epirunner -V mymodel Report Generation ^^^^^^^^^^^^^^^^^ diff --git a/docs/source/scripting.md b/docs/source/scripting.md deleted file mode 100644 index d3e6664..0000000 --- a/docs/source/scripting.md +++ /dev/null @@ -1,420 +0,0 @@ -Writing Custom Models {#custom} -===================== - -::: {.index} -custom models -::: - -The most powerful feature of Epigrass is the ability to use custom -models. It allows the user to specify intra-node dynamics and, in doing -so, break away from the limitations imposed by the built-in models. - -By learning to write his/her own models, the user begins to realize the -full potential of Epigrass, which goes beyond being a platform to -simulate networked epidemics. In reality Epigrass can be used to model -any distributed dynamical system taking place on a set of nodes -(connected or not). - -Getting Started ---------------- - -The best way to get started in writing custom models is to look at the -example distributed with Epigrass. It can be found in -`demos/CustomModel_example.py`{.interpreted-text role="file"}: - - # This is a custom model to used in place of Epigrass' built-in models. Custom - # models must always be on a file named CustomModel.py and contain at least - # a function named Model. Both the File name and the function Names are case-sensitive, - # so be careful. Please refer to the manual for intructions on how to write your - # own custom models. - - def Model(self,vars,par,theta=0, npass=0): - """ - Calculates the model SIR, and return its values. - * vars The state variables of the models - * par The parameters (Beta, alpha, E,r,delta,B, w, p) see docs. - * theta = infectious individuals from neighbor sites - * npass = Total number of people arriving at this node - """ - # Get state variables' current values - - if self.parentSite.parentGraph.simstep == 1: # if first step - # Define variable names to appear in the output - self.parentSite.vnames = ('Exposed','Infectious','Susceptible') - # And get state variables's initial values (stored in dict self.bi) - - E,I,S = (self.bi['e'],self.bi['i'],self.bi['s']) - else: # if nor first step - E,I,S = vars - - # Get parameter values - N = self.parentSite.totpop - beta,alpha,e,r,delta,B,w,p = (self.bp['beta'],self.bp['alpha'], - self.bp['e'],self.bp['r'],self.bp['delta'],self.bp['b'], - self.bp['w'],self.bp['p']) - - #Vacination event (optional) - if self.parentSite.vaccineNow: - S -= self.parentSite.vaccov*S - - # Model - Lpos = beta*S*((I+theta)/(N+npass))**alpha #Number of new cases - Ipos = (1-r)*I + Lpos - Spos = S + B - Lpos - Rpos = N-(Spos+Ipos) - - # Update stats - self.parentSite.totalcases += Lpos #update number of cases - self.parentSite.incidence.append(Lpos) - - # Raise site infected flag and add parent site to the epidemic history list. - if not self.parentSite.infected: - if Lpos > 0: - self.parentSite.infected = self.parentSite.parentGraph.simstep - self.parentSite.parentGraph.epipath.append( - (self.parentSite.parentGraph.simstep, - self.parentSite,self.parentSite.infector)) - - self.parentSite.migInf.append(Ipos) - - return [0,Ipos,Spos] - -Let\'s analyze the above code. The first thing to notice is that an -Epigrass custom model is a Python program. So anything you can do with -Python in your system, you can do in your custom model. Naturally, your -knowledge of the Python programming language will define how far you can -go in this customization. There are a few requirements on this Python -program in order to make it a valid custom model from Epigrass\'s -perspective. - -1. - - It must define a global function named **Model**. This function will be inserted as a method on every node object, at run time. - - : 1. - - This function must declare the following arguments: - - : - *self*: reference to the model object. - - *vars*: A list with the values of the model\'s state - variables in time t-1 in the same order as returned - by this function. - - *par*: The parameters of the model. Listed in the - same order as defined in the - `.epg`{.interpreted-text role="file"} file. - - *theta*: Number of infectious individuals arriving - from neighboring sites. For disconnected models, it - is 0. - - *npass*: The total number of passengers arriving - from neighboring sites. For disconnected models, it - is 0. - - 2. In the beginning of the function you define a list of - strings (self.parentSite.vnames) which will be the names - used when storing the resulting time-series in the database. - Choose strings that are not very long and are meaningful. - You only need to do this once, ate the beginning of the - simulation so put it inside an *if* statement, which will be - executed only at time-step 1 (see code above). - 3. After defining variable names, set their initial values in - the same *if* clause. An *else* clause linked to this one - will set variables values for the rest of the simulation. - 4. Define local names for the total population *N* and fixed - parameters. - 5. Proceed to implement your model anyway you see fit. - 6. - - Feed some site level variables (*incidence*,) with the result of the simulation. - - : - *incidence*: list of new cases per time step. - - *infected*: Boolean stating if the site has been - infected, i.e., it has had an autoctonous case. - - *epipath*: This variable is at the graph level and - contains the path of spread of the simulation. - - *migInf*: Number of infectious individuals in this - site per time-step. - - 7. Finally, this function must return a list/tuple with the - values of the state variables in the same order as received - in vars. - -> ::: {.warning} -> ::: {.admonition-title} -> Warning -> ::: -> -> The strings in self.parentSite.vnames must be valid *SQL* variable -> names, or else you will have a insert error at the end of the -> simulation. -> ::: - -After defining this function with all its required features, you can -continue to develop you custom model, writing other functions classes, -etc. Note however, that only the *Model* function will be called by -Epigrass, so any other code you add to your program must be called from -within that function. - -::: {.note} -::: {.admonition-title} -Note -::: - -Since `CustomModel`{.interpreted-text role="file"} is imported from -within Epigrass, any global code (unindented) in it is also executed. So -you may add imports and other initialization code. -::: - -::: {.warning} -::: {.admonition-title} -Warning -::: - -The name CustomModel.py is case-sensitive and cannot be changed. The -same is true for the *Model* function. -::: - -The Environment ---------------- - - - -From quickly going through the example Custom model above it probably -became clear, to the Python-initiated, that Yous can access variables at -the node and graph levels. This is possible because *Model* becomes a -method in a node object which in is turn is contained into a graph -object (see figure). - -Besides being nested within the *graph* object, *node* and *edge* -contain references to their containers. This means that using the -introspective abilities of Python the user can access any information at -any level of the full *graph* model and use it in the custom model. In -order to help you do this, Let\'s establish an API for developing custom -models. - -### Model Development API - -All attributes and methods (functions) from all around the simulation -must be references from the model\'s perspective, denoted by *self*. The -parent objects can be accessed through the following notation: - -- - - *self.parentSite* - - : Is the Site (node) containing the model. - -- - - *self.parentSite.parentGraph* - - : Is the Graph containing the parent site of the model. - -The following attributes and methods can be accessed by appending them -to one one the objects above. For example: - - self.parentSite.parentGraph.simstep - -#### Site Attributes and Methods - -Not all attributes and methods are listed, only the most useful. For a -complete reference, look at the source code documentation. - -::: {.Site} -self.parentSite. Actually named *siteobj* in the source code. - -::: {.attribute} -bi - -Dictionary with initial values for all of the model\'s state variables. -Keys are the variable names. -::: - -::: {.attribute} -bp - -Dictionary with initial values for all of the model\'s parameters. Keys -are the parameter names. -::: - -::: {.attribute} -totpop - -Initial total population -::: - -::: {.attribute} -ts - -List containing the model output time series (variables in the same -order of the model) -::: - -::: {.attribute} -incidence - -Incidence time series -::: - -::: {.attribute} -infected - -Has the site been already infected? (logical variable) -::: - -::: {.attribute} -sitename - -Site\'s name (provided in the .csv) -::: - -::: {.attribute} -values - -Tuple containing extra-variables provided by .csv file -::: - -::: {.attribute} -parentGraph - -Graph to which Site belongs (see class Graph) -::: - -::: {.attribute} -edges - -List containing all edge objects connected to Site -::: - -::: {.attribute} -inedges - -List containing all inbound edges -::: - -::: {.attribute} -outedges - -List containing all outbound edges -::: - -::: {.attribute} -geocode - -Site\'s geocode -::: - -::: {.attribute} -modtype - -Type of dynamic model running in Site -::: - -::: {.attribute} -vaccination - -Time and coverage of vaccination event. Format as in .epg -::: - -::: {.attribute} -vaccineNow - -Flag indicating that it is vaccine day (0 or 1) -::: - -::: {.attribute} -vaccov - -Current vaccination coverage -::: - -::: {.method} -vaccinate(cov) - -At time t, the population is vaccinated with coverage cov -::: - -::: {.method} -getOutEdges() - -Returns list of outbound edges -::: - -::: {.method} -getInEdges() - -Returns list of inbound edges -::: - -::: {.method} -getNeighbors() - -Returns a dictionary of neighbor sites as keys and distances as values -::: - -::: {.method} -getDistanceFromNeighbor(site) - -Returns the distance in km from a given neighbor -::: - -::: {.method} -getDegree(site) - -Returns degree of this site, that is, the number of sites connected to -it -::: -::: - -#### Graph Attributes and Methods - -Not all attributes and methods are listed, only the most useful. For a -complete reference, look at the source code documentation. - -::: {.Graph} -self.parentSite.parentGraph - -::: {.attribute} -simstep - -Time-step of the simulation. Use it to keep track of the simulation -progress. -::: - -::: {.attribute} -speed - -The speed of the transportation system -::: - -::: {.attribute} -maxstep - -Final time-step of the simulation -::: - -::: {.attribute} -episize - -Current size of the epidemic, graph-wise. -::: - -::: {.attribute} -site\_list - -Full list of nodes in the graph. Each element in this list is a real -node object. -::: - -::: {.attribute} -edge\_list - -Full list of nodes in the graph. Each element in this list is a real -node object. -::: - -::: {.method} -getSite(name) - -Returns an site object named *name* -::: -::: diff --git a/requirements.txt b/requirements.txt index e49bcc6..5a74a7c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,4 +15,5 @@ dbfread pweave pymysql fiona -shapely \ No newline at end of file +shapely +altair \ No newline at end of file