Skip to content

Commit

Permalink
Merge branch 'siftech:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mwdchang authored Mar 28, 2024
2 parents 281404c + 3d36931 commit 1d61ca6
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ def __init__(self, env=None):
r"(==)", InfixOpAdapter(self.mgr.Equals, 60), False
), # eq
Rule(
r"(-?\d+e\+?\d+)", self.real_constant, True
), # decimals scientific
Rule(
r"(-?\d+?e-?\d+)", self.real_constant, True
), # decimals scientific
Rule(
r"(-?\d+\.\d+e\+?\d+)", self.real_constant, True
), # decimals scientific
Rule(
Expand All @@ -121,7 +127,7 @@ def __init__(self, env=None):
True,
), # unicode identifiers
]
+ self.rules[-2:-1]
+ self.rules[-1:]
)
self.compile()

Expand Down
79 changes: 65 additions & 14 deletions resources/amr/petrinet/terrarium-tests/eval_scenario2_norm.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@
"rates": [
{
"target": "t0",
"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>"
"expression": "I*S*β/N",
"expression_mathml": "<apply><divide/><apply><times/><ci>I</ci><ci>S</ci><ci>β</ci></apply><ci>N</ci></apply>"
},
{
"target": "t1",
Expand Down Expand Up @@ -189,7 +189,7 @@
}
},
{
"id": "beta",
"id": "β",
"name": "β",
"description": "Number of infections per infected person per day",
"value": 1,
Expand Down Expand Up @@ -329,18 +329,62 @@
},
"request": {
"constraints": [
{
"name": "c1",
"additive_bounds": {
"ub": 0,
"closed_upper_bound": true,
"original_width": 99999999999
},
"variables": [
"S"
],
"weights": [
1
],
"derivative": true
},
{
"name": "c2",
"additive_bounds": {
"ub": 0,
"closed_upper_bound": true,
"original_width": 99999999999
},
"variables": [
"R"
],
"weights": [
-1
],
"derivative": true
},
{
"name": "c3",
"additive_bounds": {
"ub": 0,
"closed_upper_bound": true,
"original_width": 99999999999
},
"variables": [
"D"
],
"weights": [
-1
],
"derivative": true
},
{
"name": "I bound",
"timepoints": {
"lb": 0,
"ub": 100,
"lb": 50,
"ub": 50,
"closed_upper_bound": true,
"original_width": 100
},
"variable": "I",
"interval": {
"lb": 0,
"ub": 15000000,
"lb": 9000000,
"original_width": 15000000
}
}
Expand All @@ -350,15 +394,15 @@
"name": "N",
"interval": {
"lb": 150000000,
"ub": 150000100,
"ub": 150000000,
"original_width": 100
}
},
{
"name": "beta",
"name": "β",
"interval": {
"lb": 0.01,
"ub": 0.25,
"ub": 1,
"original_width": 0.24000000000000002
},
"label": "all"
Expand All @@ -385,7 +429,8 @@
"lb": 0.07,
"ub": 0.33,
"original_width": 0.26
}
},
"label": "any"
},
{
"name": "f",
Expand All @@ -401,7 +446,8 @@
"lb": 0.07,
"ub": 0.1,
"original_width": 0.03
}
},
"label": "any"
},
{
"name": "e",
Expand Down Expand Up @@ -429,7 +475,7 @@
}
],
"config": {
"tolerance": 0.05,
"tolerance": 0.01,
"normalization_constant": 150000000,
"use_compartmental_constraints": true
},
Expand All @@ -444,7 +490,12 @@
20,
30,
40,
50
50,
60,
70,
80,
90,
100
]
}
]
Expand Down

0 comments on commit 1d61ca6

Please sign in to comment.