Skip to content

Commit

Permalink
Fill in missing parameter declarations and values
Browse files Browse the repository at this point in the history
  • Loading branch information
bgyori committed Jul 7, 2023
1 parent 5c854e0 commit 313429a
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 7 deletions.
14 changes: 8 additions & 6 deletions notebooks/hackathon_2023.07/scenario1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
" # D=11, gamma = 1/D, R_0 = 5 and\n",
" # beta = R_0 * gamma * mask(t) so kappa = 5/11\n",
" 'kappa': Parameter(name='kappa', value=5/11),\n",
" 'k': Parameter(name='k')\n",
" 'k': Parameter(name='k', value=5.0)\n",
"}\n",
"\n",
"initials = {\n",
Expand Down Expand Up @@ -136,10 +136,11 @@
"outputs": [],
"source": [
"k_1, k_2, t_1, beta_nc = sympy.symbols('k_1 k_2 t_1 beta_nc')\n",
"parameters['k_1'] = Parameter(name='k_1')\n",
"parameters['k_2'] = Parameter(name='k_2')\n",
"parameters['k_1'] = Parameter(name='k_1', value=5.0)\n",
"parameters['k_2'] = Parameter(name='k_2', value=1.0)\n",
"parameters['t_1'] = Parameter(name='t_1', value=154, units=day_units)\n",
"parameters['beta_nc'] = Parameter(name='beta_nc', value=0.5)\n",
"tm.parameters = parameters\n",
"m_2 = (beta_s - beta_c) / (1 + sympy.exp(-k_1*(t_0-t))) + (beta_c - beta_nc) / (1 + sympy.exp(-k_2*(t_1-t))) + beta_nc"
]
},
Expand Down Expand Up @@ -179,7 +180,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 9,
"id": "b1c1abab",
"metadata": {},
"outputs": [],
Expand All @@ -198,21 +199,22 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 10,
"id": "6fab9358",
"metadata": {},
"outputs": [],
"source": [
"epsilon = sympy.Symbol('epsilon')\n",
"parameters['epsilon'] = Parameter(name='epsilon', value=1/90)\n",
"tm.parameters = parameters\n",
"t5 = NaturalConversion(subject=c['R'],\n",
" outcome=c['S'],\n",
" rate_law=epsilon*R)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 11,
"id": "00c70176",
"metadata": {},
"outputs": [],
Expand Down
3 changes: 2 additions & 1 deletion notebooks/hackathon_2023.07/scenario1_a.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@
"value": 1.0
},
{
"id": "k"
"id": "k",
"value": 5.0
},
{
"id": "kappa",
Expand Down
20 changes: 20 additions & 0 deletions notebooks/hackathon_2023.07/scenario1_c.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,22 @@
"id": "beta_c",
"value": 0.4
},
{
"id": "beta_nc",
"value": 0.5
},
{
"id": "beta_s",
"value": 1.0
},
{
"id": "k_1",
"value": 5.0
},
{
"id": "k_2",
"value": 1.0
},
{
"id": "kappa",
"value": 0.45454545454545453
Expand All @@ -189,6 +201,14 @@
"id": "t_0",
"value": 89.0
},
{
"id": "t_1",
"value": 154.0,
"units": {
"expression": "day",
"expression_mathml": "<ci>day</ci>"
}
},
{
"id": "delta",
"value": 0.2,
Expand Down
20 changes: 20 additions & 0 deletions notebooks/hackathon_2023.07/scenario1_d.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,22 @@
"id": "beta_c",
"value": 0.4
},
{
"id": "beta_nc",
"value": 0.5
},
{
"id": "beta_s",
"value": 1.0
},
{
"id": "k_1",
"value": 5.0
},
{
"id": "k_2",
"value": 1.0
},
{
"id": "kappa",
"value": 0.45454545454545453
Expand All @@ -189,6 +201,14 @@
"id": "t_0",
"value": 89.0
},
{
"id": "t_1",
"value": 154.0,
"units": {
"expression": "day",
"expression_mathml": "<ci>day</ci>"
}
},
{
"id": "delta",
"value": 0.2,
Expand Down

0 comments on commit 313429a

Please sign in to comment.