-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add JSON examples of DecaExpr and Decapode of composite model
- Loading branch information
Showing
4 changed files
with
379 additions
and
0 deletions.
There are no files selected for viewing
79 changes: 79 additions & 0 deletions
79
mira/examples/decapodes/decapodes_vs_decaexpr_composite/d1_oscillator_decapode.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"Var": [ | ||
{ | ||
"_id": 1, | ||
"type": "Form0", | ||
"name": "X" | ||
}, | ||
{ | ||
"_id": 2, | ||
"type": "Form0", | ||
"name": "V" | ||
}, | ||
{ | ||
"_id": 3, | ||
"type": "Constant", | ||
"name": "k" | ||
}, | ||
{ | ||
"_id": 4, | ||
"type": "infer", | ||
"name": "mult_1" | ||
}, | ||
{ | ||
"_id": 5, | ||
"type": "infer", | ||
"name": "V̇" | ||
}, | ||
{ | ||
"_id": 6, | ||
"type": "Literal", | ||
"name": "-1" | ||
} | ||
], | ||
"TVar": [ | ||
{ | ||
"_id": 1, | ||
"incl": 2 | ||
}, | ||
{ | ||
"_id": 2, | ||
"incl": 5 | ||
} | ||
], | ||
"Op1": [ | ||
{ | ||
"_id": 1, | ||
"src": 1, | ||
"tgt": 2, | ||
"op1": "∂ₜ" | ||
}, | ||
{ | ||
"_id": 2, | ||
"src": 2, | ||
"tgt": 5, | ||
"op1": "∂ₜ" | ||
} | ||
], | ||
"Op2": [ | ||
{ | ||
"_id": 1, | ||
"proj1": 6, | ||
"proj2": 3, | ||
"res": 4, | ||
"op2": "*" | ||
}, | ||
{ | ||
"_id": 2, | ||
"proj1": 4, | ||
"proj2": 1, | ||
"res": 5, | ||
"op2": "*" | ||
} | ||
], | ||
"Σ": [], | ||
"Summand": [], | ||
"Type": [], | ||
"Operator": [], | ||
"Name": [] | ||
} |
106 changes: 106 additions & 0 deletions
106
mira/examples/decapodes/decapodes_vs_decaexpr_composite/d2_friction_decapode.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
{ | ||
"Var": [ | ||
{ | ||
"_id": 1, | ||
"type": "Form0", | ||
"name": "V" | ||
}, | ||
{ | ||
"_id": 2, | ||
"type": "Form0", | ||
"name": "Q" | ||
}, | ||
{ | ||
"_id": 3, | ||
"type": "Constant", | ||
"name": "κ" | ||
}, | ||
{ | ||
"_id": 4, | ||
"type": "Constant", | ||
"name": "λ" | ||
}, | ||
{ | ||
"_id": 5, | ||
"type": "Parameter", | ||
"name": "Q₀" | ||
}, | ||
{ | ||
"_id": 6, | ||
"type": "infer", | ||
"name": "Q̇" | ||
}, | ||
{ | ||
"_id": 7, | ||
"type": "infer", | ||
"name": "•2" | ||
}, | ||
{ | ||
"_id": 8, | ||
"type": "infer", | ||
"name": "•3" | ||
}, | ||
{ | ||
"_id": 9, | ||
"type": "infer", | ||
"name": "•4" | ||
} | ||
], | ||
"TVar": [ | ||
{ | ||
"_id": 1, | ||
"incl": 6 | ||
} | ||
], | ||
"Op1": [ | ||
{ | ||
"_id": 1, | ||
"src": 2, | ||
"tgt": 6, | ||
"op1": "∂ₜ" | ||
}, | ||
{ | ||
"_id": 2, | ||
"src": 9, | ||
"tgt": 8, | ||
"op1": "λ" | ||
} | ||
], | ||
"Op2": [ | ||
{ | ||
"_id": 1, | ||
"proj1": 3, | ||
"proj2": 1, | ||
"res": 7, | ||
"op2": "*" | ||
}, | ||
{ | ||
"_id": 2, | ||
"proj1": 2, | ||
"proj2": 5, | ||
"res": 9, | ||
"op2": "-" | ||
} | ||
], | ||
"Σ": [ | ||
{ | ||
"_id": 1, | ||
"sum": 6 | ||
} | ||
], | ||
"Summand": [ | ||
{ | ||
"_id": 1, | ||
"summand": 7, | ||
"summation": 1 | ||
}, | ||
{ | ||
"_id": 2, | ||
"summand": 8, | ||
"summation": 1 | ||
} | ||
], | ||
"Type": [], | ||
"Operator": [], | ||
"Name": [] | ||
} |
107 changes: 107 additions & 0 deletions
107
mira/examples/decapodes/decapodes_vs_decaexpr_composite/friction_decaexpr.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
{ | ||
"annotations": [], | ||
"header": { | ||
"description": "Velocity makes it get hot, but you dissipate heat away from Q\u2080", | ||
"name": "fricative_heating", | ||
"_type": "Header", | ||
"model_version": "v1.0", | ||
"schema": "modelreps.io/SummationDecapode", | ||
"schema_name": "SummationDecapode" | ||
}, | ||
"_type": "ASKEMDecaExpr", | ||
"model": { | ||
"context": [ | ||
{ | ||
"dim": "Form0", | ||
"var": { | ||
"name": "V", | ||
"_type": "Var" | ||
}, | ||
"space": "Point", | ||
"_type": "Judgement" | ||
}, | ||
{ | ||
"dim": "Form0", | ||
"var": { | ||
"name": "Q", | ||
"_type": "Var" | ||
}, | ||
"space": "Point", | ||
"_type": "Judgement" | ||
}, | ||
{ | ||
"dim": "Constant", | ||
"var": { | ||
"name": "\u03ba", | ||
"_type": "Var" | ||
}, | ||
"space": "Point", | ||
"_type": "Judgement" | ||
}, | ||
{ | ||
"dim": "Constant", | ||
"var": { | ||
"name": "\u03bb", | ||
"_type": "Var" | ||
}, | ||
"space": "Point", | ||
"_type": "Judgement" | ||
}, | ||
{ | ||
"dim": "Parameter", | ||
"var": { | ||
"name": "Q\u2080", | ||
"_type": "Var" | ||
}, | ||
"space": "Point", | ||
"_type": "Judgement" | ||
} | ||
], | ||
"_type": "DecaExpr", | ||
"equations": [ | ||
{ | ||
"rhs": { | ||
"args": [ | ||
{ | ||
"f": "*", | ||
"arg1": { | ||
"name": "\u03ba", | ||
"_type": "Var" | ||
}, | ||
"_type": "App2", | ||
"arg2": { | ||
"name": "V", | ||
"_type": "Var" | ||
} | ||
}, | ||
{ | ||
"f": "\u03bb", | ||
"arg": { | ||
"f": "-", | ||
"arg1": { | ||
"name": "Q", | ||
"_type": "Var" | ||
}, | ||
"_type": "App2", | ||
"arg2": { | ||
"name": "Q\u2080", | ||
"_type": "Var" | ||
} | ||
}, | ||
"_type": "App1" | ||
} | ||
], | ||
"_type": "Plus" | ||
}, | ||
"lhs": { | ||
"var": { | ||
"name": "Q", | ||
"_type": "Var" | ||
}, | ||
"_type": "Tan" | ||
}, | ||
"_type": "Eq" | ||
} | ||
] | ||
} | ||
} |
87 changes: 87 additions & 0 deletions
87
mira/examples/decapodes/decapodes_vs_decaexpr_composite/oscillator_decaexpr.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
{ | ||
"annotations": [], | ||
"header": { | ||
"description": "A Simple Harmonic Oscillator as a Diagrammatic Equation", | ||
"name": "harmonic_oscillator", | ||
"_type": "Header", | ||
"model_version": "v1.0", | ||
"schema": "modelreps.io/DecaExpr", | ||
"schema_name": "DecaExpr" | ||
}, | ||
"_type": "ASKEMDecaExpr", | ||
"model": { | ||
"context": [ | ||
{ | ||
"dim": "Form0", | ||
"var": { | ||
"name": "X", | ||
"_type": "Var" | ||
}, | ||
"space": "Point", | ||
"_type": "Judgement" | ||
}, | ||
{ | ||
"dim": "Form0", | ||
"var": { | ||
"name": "V", | ||
"_type": "Var" | ||
}, | ||
"space": "Point", | ||
"_type": "Judgement" | ||
}, | ||
{ | ||
"dim": "Constant", | ||
"var": { | ||
"name": "k", | ||
"_type": "Var" | ||
}, | ||
"space": "Point", | ||
"_type": "Judgement" | ||
} | ||
], | ||
"_type": "DecaExpr", | ||
"equations": [ | ||
{ | ||
"rhs": { | ||
"name": "V", | ||
"_type": "Var" | ||
}, | ||
"lhs": { | ||
"var": { | ||
"name": "X", | ||
"_type": "Var" | ||
}, | ||
"_type": "Tan" | ||
}, | ||
"_type": "Eq" | ||
}, | ||
{ | ||
"rhs": { | ||
"args": [ | ||
{ | ||
"name": "-1", | ||
"_type": "Lit" | ||
}, | ||
{ | ||
"name": "k", | ||
"_type": "Var" | ||
}, | ||
{ | ||
"name": "X", | ||
"_type": "Var" | ||
} | ||
], | ||
"_type": "Mult" | ||
}, | ||
"lhs": { | ||
"var": { | ||
"name": "V", | ||
"_type": "Var" | ||
}, | ||
"_type": "Tan" | ||
}, | ||
"_type": "Eq" | ||
} | ||
] | ||
} | ||
} |