Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add real template blocks #2508

Merged
merged 28 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
38b0fd6
edges partially work
shawnyama Jan 8, 2024
1571ef9
merge
shawnyama Jan 9, 2024
faef898
Merge branch 'main' into model-template-edges
shawnyama Jan 9, 2024
f9b1795
edges start and end on proper positions and naming works
shawnyama Jan 9, 2024
091b385
cardRef name
shawnyama Jan 9, 2024
fdd0623
Merge branch 'main' into model-template-edges
shawnyama Jan 9, 2024
427ec6f
comments
shawnyama Jan 10, 2024
64ee37f
Merge branch 'main' into model-template-edges
shawnyama Jan 10, 2024
8428af4
incorporate real building blocks
shawnyama Jan 10, 2024
5abf753
resolve conflicts
shawnyama Jan 10, 2024
ad0747e
real variables
shawnyama Jan 10, 2024
0003a26
Merge branch 'main' into add-templates
shawnyama Jan 11, 2024
5b02f18
is editable prop
shawnyama Jan 11, 2024
2f1850a
draggable area, model diagram and textarea input for name
shawnyama Jan 11, 2024
91cc2d2
Merge branch 'main' into add-templates
shawnyama Jan 11, 2024
49e0f1c
avoid lint issue
shawnyama Jan 11, 2024
d21182f
avoid lint issue
shawnyama Jan 11, 2024
7d51637
petrinet templates lack params
shawnyama Jan 11, 2024
3fb310e
better sidepanel usability
shawnyama Jan 11, 2024
a9e305b
Merge branch 'main' into add-templates
shawnyama Jan 12, 2024
d85d2a8
amrs with params
shawnyama Jan 12, 2024
24aa9c1
clearer diagram behavior
shawnyama Jan 12, 2024
c00ef51
Merge branch 'main' into add-templates
shawnyama Jan 12, 2024
ef74b23
rm class
shawnyama Jan 12, 2024
ae1ef0d
template update again
shawnyama Jan 12, 2024
85686a7
Merge branch 'main' into add-templates
shawnyama Jan 12, 2024
d7d7e13
variable name change
shawnyama Jan 12, 2024
098c07a
variable name change
shawnyama Jan 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"header": {
"name": "Controlled conversion",
"schema": "https://raw.githubusercontent.com/DARPA-ASKEM/Model-Representations/petrinet_v0.6/petrinet/petrinet_schema.json",
"schema_name": "petrinet",
"description": "ControlledConversionTemplateModel",
"model_version": "0.1"
},
"properties": {},
"model": {
"states": [
{
"id": "A",
"name": "A",
"grounding": {
"identifiers": {},
"modifiers": {}
}
},
{
"id": "C",
"name": "C",
"grounding": {
"identifiers": {},
"modifiers": {}
}
},
{
"id": "B",
"name": "B",
"grounding": {
"identifiers": {},
"modifiers": {}
}
}
],
"transitions": [
{
"id": "ControlledConversion",
"input": [
"C",
"A"
],
"output": [
"C",
"B"
],
"properties": {
"name": "ControlledConversion"
}
}
]
},
"semantics": {
"ode": {
"rates": [
{
"target": "ControlledConversion",
"expression": "A*B*p",
"expression_mathml": "<apply><times/><ci>A</ci><ci>B</ci><ci>p</ci></apply>"
}
],
"initials": [
{
"target": "A",
"expression": "1.0",
"expression_mathml": "<cn>1.0</cn>"
},
{
"target": "C",
"expression": "1.0",
"expression_mathml": "<cn>1.0</cn>"
},
{
"target": "B",
"expression": "1.0",
"expression_mathml": "<cn>1.0</cn>"
}
],
"parameters": [
{
"id": "p",
"description": "Parameter named 'p'",
"value": 1.0,
"units": {
"expression": "1/day",
"expression_mathml": "<apply><power/><ci>day</ci><cn>-1</cn></apply>"
}
}
],
"observables": [],
"time": {
"id": "t",
"units": {
"expression": "day",
"expression_mathml": "<ci>day</ci>"
}
}
}
},
"metadata": {
"annotations": {
"license": null,
"authors": [],
"references": [],
"time_scale": null,
"time_start": null,
"time_end": null,
"locations": [],
"pathogens": [],
"diseases": [],
"hosts": [],
"model_types": []
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"header": {
"name": "Controlled degradation",
"schema": "https://raw.githubusercontent.com/DARPA-ASKEM/Model-Representations/petrinet_v0.6/petrinet/petrinet_schema.json",
"schema_name": "petrinet",
"description": "ControlledDegradationTemplateModel",
"model_version": "0.1"
},
"properties": {},
"model": {
"states": [
{
"id": "A",
"name": "A",
"grounding": {
"identifiers": {},
"modifiers": {}
}
},
{
"id": "C",
"name": "C",
"grounding": {
"identifiers": {},
"modifiers": {}
}
}
],
"transitions": [
{
"id": "ControlledDegradation",
"input": [
"C",
"A"
],
"output": [
"C"
],
"properties": {
"name": "ControlledDegradation"
}
}
]
},
"semantics": {
"ode": {
"rates": [
{
"target": "ControlledDegradation",
"expression": "A*C*p",
"expression_mathml": "<apply><times/><ci>A</ci><ci>C</ci><ci>p</ci></apply>"
}
],
"initials": [
{
"target": "A",
"expression": "1.0",
"expression_mathml": "<cn>1.0</cn>"
},
{
"target": "C",
"expression": "1.0",
"expression_mathml": "<cn>1.0</cn>"
}
],
"parameters": [
{
"id": "p",
"description": "Parameter named 'p'",
"value": 1.0,
"units": {
"expression": "1/day",
"expression_mathml": "<apply><power/><ci>day</ci><cn>-1</cn></apply>"
}
}
],
"observables": [],
"time": {
"id": "t",
"units": {
"expression": "day",
"expression_mathml": "<ci>day</ci>"
}
}
}
},
"metadata": {
"annotations": {
"license": null,
"authors": [],
"references": [],
"time_scale": null,
"time_start": null,
"time_end": null,
"locations": [],
"pathogens": [],
"diseases": [],
"hosts": [],
"model_types": []
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"header": {
"name": "Controlled production",
"schema": "https://raw.githubusercontent.com/DARPA-ASKEM/Model-Representations/petrinet_v0.6/petrinet/petrinet_schema.json",
"schema_name": "petrinet",
"description": "ControlledProductionTemplateModel",
"model_version": "0.1"
},
"properties": {},
"model": {
"states": [
{
"id": "C",
"name": "C",
"grounding": {
"identifiers": {},
"modifiers": {}
}
},
{
"id": "A",
"name": "A",
"grounding": {
"identifiers": {},
"modifiers": {}
}
}
],
"transitions": [
{
"id": "ControlledProduction",
"input": [
"C"
],
"output": [
"C",
"A"
],
"properties": {
"name": "ControlledProduction"
}
}
]
},
"semantics": {
"ode": {
"rates": [
{
"target": "ControlledProduction",
"expression": "C*p",
"expression_mathml": "<apply><times/><ci>C</ci><ci>p</ci></apply>"
}
],
"initials": [
{
"target": "C",
"expression": "1.0",
"expression_mathml": "<cn>1.0</cn>"
},
{
"target": "A",
"expression": "1.0",
"expression_mathml": "<cn>1.0</cn>"
}
],
"parameters": [
{
"id": "p",
"description": "Parameter named 'p'",
"value": 1.0,
"units": {
"expression": "1/day",
"expression_mathml": "<apply><power/><ci>day</ci><cn>-1</cn></apply>"
}
}
],
"observables": [],
"time": {
"id": "t",
"units": {
"expression": "day",
"expression_mathml": "<ci>day</ci>"
}
}
}
},
"metadata": {
"annotations": {
"license": null,
"authors": [],
"references": [],
"time_scale": null,
"time_start": null,
"time_end": null,
"locations": [],
"pathogens": [],
"diseases": [],
"hosts": [],
"model_types": []
}
}
}
Loading
Loading