Struct graph JSON input and constructors. #130
joaquinffernandez
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
JSON input definition (Version 1)
Components:
using these components we can represent a model in the following way:
Finally, given a model$M$ we can define an algorithm that constructs a dependency graph:
Example
Given this Modelica model:
We can define the following variables:
and from the
equationsection we can define the following expressions:From: a1[1]=((10-x1[1])^3)/R:
From a1[i+1]=((x1[i]-x1[i+1])^3)/R;:
From: der(x1[i])=((a1[i]-a1[i+1])^3)/C:
lhs} : \{ U_1\}$
From: der(x1[N])=(a1[N]-x2[1])/C:
From der(x2[1])=x1[N]/L:
The model can then be defined as:
The final goal of this initial stage is to be able to build a dependency graph from an input JSON file obtained from a Modelica model like one described before:
As an example, a possible output of the final algorithm used in the construction of a communication graph could be:
where all the algebraic variables are removed.
Beta Was this translation helpful? Give feedback.
All reactions