Skip to content

Commit

Permalink
Merge pull request #323 from gyorilab/streamline
Browse files Browse the repository at this point in the history
Evaluation scenario 2
  • Loading branch information
bgyori authored Apr 9, 2024
2 parents 3fe9902 + afc6278 commit ab2f58f
Show file tree
Hide file tree
Showing 6 changed files with 29,955 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mira/metamodel/template_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ def generate_model_graph(self, use_display_name: bool = False) -> nx.DiGraph:
f"{context_str}"
)
else:
label = f"{name}\n(ungrounded){context_str}"
label = f"{name}{context_str}" if context_str else name
graph.add_node(
concept_key,
label=label,
Expand Down
546 changes: 546 additions & 0 deletions notebooks/evaluation_2024.03/epi_scenario2/scenario2.ipynb

Large diffs are not rendered by default.

317 changes: 317 additions & 0 deletions notebooks/evaluation_2024.03/epi_scenario2/scenario2_q1_petrinet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,317 @@
{
"header": {
"name": "Model",
"schema": "https://raw.githubusercontent.com/DARPA-ASKEM/Model-Representations/petrinet_v0.6/petrinet/petrinet_schema.json",
"schema_name": "petrinet",
"description": "Model",
"model_version": "0.1"
},
"properties": {},
"model": {
"states": [
{
"id": "S",
"name": "S",
"grounding": {
"identifiers": {},
"modifiers": {}
},
"units": {
"expression": "person",
"expression_mathml": "<ci>person</ci>"
}
},
{
"id": "I",
"name": "I",
"grounding": {
"identifiers": {},
"modifiers": {}
},
"units": {
"expression": "person",
"expression_mathml": "<ci>person</ci>"
}
},
{
"id": "R",
"name": "R",
"grounding": {
"identifiers": {},
"modifiers": {}
},
"units": {
"expression": "person",
"expression_mathml": "<ci>person</ci>"
}
},
{
"id": "H",
"name": "H",
"grounding": {
"identifiers": {},
"modifiers": {}
},
"units": {
"expression": "person",
"expression_mathml": "<ci>person</ci>"
}
},
{
"id": "D",
"name": "D",
"grounding": {
"identifiers": {},
"modifiers": {}
},
"units": {
"expression": "person",
"expression_mathml": "<ci>person</ci>"
}
}
],
"transitions": [
{
"id": "t1",
"input": [
"I",
"S"
],
"output": [
"I",
"I"
],
"properties": {
"name": "t1"
}
},
{
"id": "t2",
"input": [
"I"
],
"output": [
"R"
],
"properties": {
"name": "t2"
}
},
{
"id": "t3",
"input": [
"I"
],
"output": [
"H"
],
"properties": {
"name": "t3"
}
},
{
"id": "t4",
"input": [
"H"
],
"output": [
"D"
],
"properties": {
"name": "t4"
}
},
{
"id": "t5",
"input": [
"H"
],
"output": [
"R"
],
"properties": {
"name": "t5"
}
}
]
},
"semantics": {
"ode": {
"rates": [
{
"target": "t1",
"expression": "I*S*beta/N",
"expression_mathml": "<apply><divide/><apply><times/><ci>I</ci><ci>S</ci><ci>beta</ci></apply><ci>N</ci></apply>"
},
{
"target": "t2",
"expression": "I*pir*rir",
"expression_mathml": "<apply><times/><ci>I</ci><ci>pir</ci><ci>rir</ci></apply>"
},
{
"target": "t3",
"expression": "I*pih*rih",
"expression_mathml": "<apply><times/><ci>I</ci><ci>pih</ci><ci>rih</ci></apply>"
},
{
"target": "t4",
"expression": "H*phd*rhd",
"expression_mathml": "<apply><times/><ci>H</ci><ci>phd</ci><ci>rhd</ci></apply>"
},
{
"target": "t5",
"expression": "H*phr*rhr",
"expression_mathml": "<apply><times/><ci>H</ci><ci>phr</ci><ci>rhr</ci></apply>"
}
],
"initials": [
{
"target": "S",
"expression": "-D0 - H0 - I0 + N - R0",
"expression_mathml": "<apply><plus/><apply><minus/><apply><minus/><apply><minus/><ci>D0</ci></apply><ci>H0</ci></apply><ci>I0</ci></apply><apply><minus/><ci>N</ci><ci>R0</ci></apply></apply>"
},
{
"target": "I",
"expression": "I0",
"expression_mathml": "<ci>I0</ci>"
},
{
"target": "R",
"expression": "R0",
"expression_mathml": "<ci>R0</ci>"
},
{
"target": "H",
"expression": "H0",
"expression_mathml": "<ci>H0</ci>"
},
{
"target": "D",
"expression": "D0",
"expression_mathml": "<ci>D0</ci>"
}
],
"parameters": [
{
"id": "N",
"value": 150000000.0,
"units": {
"expression": "person",
"expression_mathml": "<ci>person</ci>"
}
},
{
"id": "beta",
"value": 0.18,
"units": {
"expression": "person/day",
"expression_mathml": "<apply><divide/><ci>person</ci><ci>day</ci></apply>"
}
},
{
"id": "pir",
"value": 0.9,
"units": {
"expression": "1",
"expression_mathml": "<cn>1</cn>"
}
},
{
"id": "pih",
"value": 0.1,
"units": {
"expression": "1",
"expression_mathml": "<cn>1</cn>"
}
},
{
"id": "rih",
"value": 0.07,
"units": {
"expression": "1/day",
"expression_mathml": "<apply><power/><ci>day</ci><cn>-1</cn></apply>"
}
},
{
"id": "phd",
"value": 0.13,
"units": {
"expression": "1",
"expression_mathml": "<cn>1</cn>"
}
},
{
"id": "rhd",
"value": 0.3,
"units": {
"expression": "1/day",
"expression_mathml": "<apply><power/><ci>day</ci><cn>-1</cn></apply>"
}
},
{
"id": "phr",
"value": 0.87,
"units": {
"expression": "1",
"expression_mathml": "<cn>1</cn>"
}
},
{
"id": "rhr",
"value": 0.07,
"units": {
"expression": "1/day",
"expression_mathml": "<apply><power/><ci>day</ci><cn>-1</cn></apply>"
}
},
{
"id": "rhi",
"value": 0.07,
"units": {
"expression": "1/day",
"expression_mathml": "<apply><power/><ci>day</ci><cn>-1</cn></apply>"
}
},
{
"id": "I0",
"value": 1000.0,
"units": {
"expression": "person",
"expression_mathml": "<ci>person</ci>"
}
},
{
"id": "R0",
"value": 0.0,
"units": {
"expression": "person",
"expression_mathml": "<ci>person</ci>"
}
},
{
"id": "H0",
"value": 0.0,
"units": {
"expression": "person",
"expression_mathml": "<ci>person</ci>"
}
},
{
"id": "D0",
"value": 781454.0,
"units": {
"expression": "person",
"expression_mathml": "<ci>person</ci>"
}
}
],
"observables": [],
"time": {
"id": "t"
}
}
},
"metadata": {
"annotations": {}
}
}
Loading

0 comments on commit ab2f58f

Please sign in to comment.