Skip to content

Instantly share code, notes, and snippets.

@emvolz
Created April 3, 2020 15:26
Show Gist options
  • Save emvolz/bd12ebedcea390cf7b6d735a1124ba24 to your computer and use it in GitHub Desktop.
Save emvolz/bd12ebedcea390cf7b6d735a1124ba24 to your computer and use it in GitHub Desktop.
<!--
transmission
-->
<matrixeq id="MatrixEquation.2" spec="phydyn.model.MatrixEquation" destination="E" origin="Il" type="birth">beta*Il*S / ( S + E + Il + Ih +R )</matrixeq>
<matrixeq id="MatrixEquation.3" spec="phydyn.model.MatrixEquation" destination="E" origin="Ih" type="birth">beta*Ih*tau * S / (S + E + Il + Ih +R)</matrixeq>
<!--
stage progression
-->
<matrixeq id="MatrixEquation.0" spec="phydyn.model.MatrixEquation" destination="Il" origin="E" type="migration">if ( t &gt; SEIR_START ) then gamma0*E*(1-p_h) else 0.0</matrixeq>
<matrixeq id="MatrixEquation.1" spec="phydyn.model.MatrixEquation" destination="Ih" origin="E" type="migration">if ( t &gt; SEIR_START ) then gamma0*E*p_h else 0.0</matrixeq>
<!--
recovery/death
-->
<matrixeq id="MatrixEquation.8" spec="phydyn.model.MatrixEquation" origin="Il" type="death">gamma1*Il</matrixeq>
<matrixeq id="MatrixEquation.9" spec="phydyn.model.MatrixEquation" origin="Ih" type="death">gamma1*Ih</matrixeq>
<!--
dynamic variables that aren't demes
-->
<matrixeq id="MatrixEquation.10" spec="phydyn.model.MatrixEquation" origin="R" type="nondeme">gamma1*(Il + Ih)</matrixeq>
<matrixeq id="MatrixEquation.11" spec="phydyn.model.MatrixEquation" origin="S" type="nondeme">-beta*(Ih*tau+Il) * S / (S + E + Il + Ih + R)</matrixeq>
<matrixeq id="MatrixEquation.12" spec="phydyn.model.MatrixEquation" origin="infections" type="nondeme">beta*(Ih*tau+Il) * S / (S + E + Il + Ih + R)</matrixeq>
<!--
migration between region and exog, driven by size in region
-->
<matrixeq id="MatrixEquation.13" spec="phydyn.model.MatrixEquation" destination="Il" origin="IlExog" type="migration">importRate * Il</matrixeq>
<matrixeq id="MatrixEquation.14" spec="phydyn.model.MatrixEquation" destination="IlExog" origin="Il" type="migration">importRate * Il</matrixeq>
<matrixeq id="MatrixEquation.15" spec="phydyn.model.MatrixEquation" destination="Ih" origin="IhExog" type="migration">importRate * Ih</matrixeq>
<matrixeq id="MatrixEquation.16" spec="phydyn.model.MatrixEquation" destination="IhExog" origin="Ih" type="migration">importRate * Ih</matrixeq>
<matrixeq id="MatrixEquation.17" spec="phydyn.model.MatrixEquation" destination="E" origin="exog" type="migration">importRate * E</matrixeq>
<matrixeq id="MatrixEquation.18" spec="phydyn.model.MatrixEquation" destination="exog" origin="E" type="migration">importRate * E</matrixeq>
<!--
exog deme: same E->Ih/Il structure, but no limiting susceptibles
-->
<matrixeq id="MatrixEquation.6" spec="phydyn.model.MatrixEquation" destination="exog" origin="IlExog" type="birth">betaExog*IlExog</matrixeq>
<matrixeq id="MatrixEquation.7" spec="phydyn.model.MatrixEquation" destination="exog" origin="IhExog" type="birth">betaExog*IhExog*tau </matrixeq>
<matrixeq id="MatrixEquation.4" spec="phydyn.model.MatrixEquation" destination="IlExog" origin="exog" type="migration"> gamma0*exog*(1-p_h)</matrixeq>
<matrixeq id="MatrixEquation.5" spec="phydyn.model.MatrixEquation" destination="IhExog" origin="exog" type="migration"> gamma0*exog*p_h</matrixeq>
<matrixeq id="MatrixEquation.21" spec="phydyn.model.MatrixEquation" origin="IlExog" type="death">gamma1 * IlExog</matrixeq>
<matrixeq id="MatrixEquation.22" spec="phydyn.model.MatrixEquation" origin="IhExog" type="death">gamma1 * IhExog</matrixeq>
<matrixeq id="MatrixEquation.20" spec="phydyn.model.MatrixEquation" destination="IhExog" origin="exog" type="birth">betaExog * IhExog</matrixeq>-->
<definition id="Definition.0" spec="phydyn.model.Definition" value=" beta = if (t &gt; SEIR_START) then max(0.0, b) else 0.0 "/>
<!--
TODO Make betaExog an estimated parameter, get rid of exog growth rate
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment