Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'sifttech/hackathon_fall_2023'
Browse files Browse the repository at this point in the history
  • Loading branch information
mwdchang committed Nov 1, 2023
2 parents da91b1f + cca8210 commit 6b3bdc2
Show file tree
Hide file tree
Showing 24 changed files with 1,269 additions and 101 deletions.
4 changes: 2 additions & 2 deletions auxiliary_packages/funman_dreal/src/funman_dreal/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def rewrite_dreal_formula(self, formula: dreal.Formula) -> str:
# str_formula = str_formula.replace("pow(beta, 2.0)", "beta^2.0")

str_formula = re.sub(
r"pow\([a-z]+\, [0-9.]+\)",
lambda x: x.group().split(",")[0].split("(")[1]
r"pow\([\(\)\-a-z0-9\_ ]+\, [0-9.]+\)",
lambda x: x.group().split(",")[0].split("(", 1)[1]
+ "^"
+ x.group().split(",")[1].split(")")[0].strip(),
str_formula,
Expand Down
393 changes: 393 additions & 0 deletions notebooks/funman_results.ipynb

Large diffs are not rendered by default.

Large diffs are not rendered by default.

258 changes: 258 additions & 0 deletions resources/amr/halfar/halfar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
{
"header": {
"name": "Halfar Model",
"schema": "https://raw.githubusercontent.com/DARPA-ASKEM/Model-Representations/petrinet_v0.1/petrinet/petrinet_schema.json",
"schema_name": "petrinet",
"description": "Halfar as Petrinet model created by Dan",
"model_version": "0.1"
},
"model": {
"states": [
{
"id": "h_0",
"name": "h_0",
"description": "height"
},
{
"id": "h_1",
"name": "h_1",
"description": "height"
},
{
"id": "h_2",
"name": "h_2",
"description": "height"
},
{
"id": "h_3",
"name": "h_3",
"description": "height"
},
{
"id": "h_4",
"name": "h_4",
"description": "height"
}
],
"transitions": [
{
"id": "w_n_0",
"input": [
"h_1",
"h_0"
],
"output": [
"h_0"
],
"properties": {
"name": "w_n_0"
}
},
{
"id": "w_p_0",
"input": [
"h_2",
"h_1"
],
"output": [
"h_0"
],
"properties": {
"name": "w_p_0"
}
},
{
"id": "w_n_1",
"input": [
"h_2",
"h_1"
],
"output": [
"h_1"
],
"properties": {
"name": "w_n_1"
}
},
{
"id": "w_p_1",
"input": [
"h_3",
"h_2"
],
"output": [
"h_1"
],
"properties": {
"name": "w_p_1"
}
},
{
"id": "w_n_2",
"input": [
"h_3",
"h_2"
],
"output": [
"h_2"
],
"properties": {
"name": "w_n_2"
}
},
{
"id": "w_p_2",
"input": [
"h_4",
"h_3"
],
"output": [
"h_2"
],
"properties": {
"name": "w_p_2"
}
},
{
"id": "w_n_3",
"input": [
"h_2",
"h_3"
],
"output": [
"h_3"
],
"properties": {
"name": "w_n_3"
}
},
{
"id": "w_p_3",
"input": [
"h_4",
"h_3"
],
"output": [
"h_3"
],
"properties": {
"name": "w_p_3"
}
},
{
"id": "w_n_4",
"input": [
"h_2",
"h_3"
],
"output": [
"h_4"
],
"properties": {
"name": "w_n_4"
}
},
{
"id": "w_p_4",
"input": [
"h_3",
"h_4"
],
"output": [
"h_4"
],
"properties": {
"name": "w_p_4"
}
}
]
},
"semantics": {
"ode": {
"rates": [
{
"target": "w_n_0",
"expression": "-1*gamma*(h_1-h_0)^3*h_0^5"
},
{
"target": "w_p_0",
"expression": "gamma*(h_2-h_1)^3*h_1^5"
},
{
"target": "w_n_1",
"expression": "-1*gamma*(h_2-h_1)^3*h_1^5"
},
{
"target": "w_p_1",
"expression": "gamma*(h_3-h_2)^3*h_2^5"
},
{
"target": "w_n_2",
"expression": "-1*gamma*(h_3-h_2)^3*h_2^5"
},
{
"target": "w_p_2",
"expression": "gamma*(h_4-h_3)^3*h_3^5"
},
{
"target": "w_n_3",
"expression": "-1*gamma*(h_3-h_2)^3*h_2^5"
},
{
"target": "w_p_3",
"expression": "gamma*(h_4-h_3)^3*h_3^5"
},
{
"target": "w_n_4",
"expression": "-1*gamma*(h_3-h_2)^3*h_2^5"
},
{
"target": "w_p_4",
"expression": "gamma*(h_4-h_3)^3*h_3^5"
}
],
"initials": [
{
"target": "h_0",
"expression": "0.1"
},
{
"target": "h_1",
"expression": "10.0"
},
{
"target": "h_2",
"expression": "10.0"
},
{
"target": "h_3",
"expression": "10.0"
},
{
"target": "h_4",
"expression": "0.1"
}
],
"parameters": [
{
"id": "gamma",
"value": 1.0,
"distribution": {
"type": "StandardUniform1",
"parameters": {
"minimum": 0.0,
"maximum": 1.0
}
}
}
],
"time": {
"id": "t",
"units": {
"expression": "day",
"expression_mathml": "<ci>day</ci>"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,111 @@
"lb": 0.008799999999999999,
"ub": 0.0132
}
},
{
"name": "gamma",
"interval": {
"lb": 0.3648,
"ub": 0.5472
}
},
{
"name": "delta",
"interval": {
"lb": 0.008799999999999999,
"ub": 0.0132
}
},
{
"name": "alpha",
"interval": {
"lb": 0.45599999999999996,
"ub": 0.6839999999999999
}
},
{
"name": "epsilon",
"interval": {
"lb": 0.1368,
"ub": 0.20520000000000002
}
},
{
"name": "zeta",
"interval": {
"lb": 0.1,
"ub": 0.15
}
},
{
"name": "lambda",
"interval": {
"lb": 0.027200000000000002,
"ub": 0.0408
}
},
{
"name": "eta",
"interval": {
"lb": 0.1,
"ub": 0.15
}
},
{
"name": "rho",
"interval": {
"lb": 0.027200000000000002,
"ub": 0.0408
}
},
{
"name": "theta",
"interval": {
"lb": 0.2968,
"ub": 0.4452
}
},
{
"name": "kappa",
"interval": {
"lb": 0.013600000000000001,
"ub": 0.0204
}
},
{
"name": "mu",
"interval": {
"lb": 0.013600000000000001,
"ub": 0.0204
}
},
{
"name": "nu",
"interval": {
"lb": 0.0216,
"ub": 0.0324
}
},
{
"name": "xi",
"interval": {
"lb": 0.013600000000000001,
"ub": 0.0204
}
},
{
"name": "tau",
"interval": {
"lb": 0.008,
"ub": 0.012
}
},
{
"name": "sigma",
"interval": {
"lb": 0.013600000000000001,
"ub": 0.0204
}
}
],
"structure_parameters": [
Expand Down
Loading

0 comments on commit 6b3bdc2

Please sign in to comment.