{ "format": "bedit-document", "version": 1, "metadata": { "name": "Current Document" }, "roots": [ { "id": "4aefc7e3-ac23-4b31-9087-bbad16156be0", "name": "New Graph Block 1", "position": { "x": 0.0, "y": 0.0 }, "rotation": 0.0, "interface": { "ports": [] }, "parameters": [], "icon": { "shape": "rectangle", "fill": "#f4f4f4", "border": "#303030", "text": "Graph", "size": { "width": 128.0, "height": 128.0 }, "elements": [ { "type": "rectangle", "x": 32.0, "y": 32.0, "width": 64.0, "height": 64.0, "fill": "#f4f4f4", "stroke": "#303030", "lineWidth": 1.5, "lineStyle": "solid", "cornerRadius": 5.0 }, { "type": "text", "x": 40.0, "y": 40.0, "width": 48.0, "height": 48.0, "text": "Graph", "color": "#202020", "fontSize": 12.0 } ] }, "properties": {}, "library": { "showSubtree": true }, "implementation": { "kind": "graph", "graph": { "blocks": [ { "id": "c6169e52-e993-4293-8fc8-5b97e8ad59be", "name": "C", "position": { "x": -96.0, "y": -288.0 }, "rotation": 0.0, "interface": { "ports": [ { "id": "port-2e1d884f", "name": "p", "position": { "x": 0.0, "y": 0.0 }, "properties": { "iconPosition": { "x": 64.0, "y": 64.0 } }, "type": "power", "multipleConnections": false, "valueType": "real", "quantity": "", "unit": "", "dimensions": { "rows": 1, "columns": 1 }, "description": "", "orientation": "input", "domain": "power", "causality": "preferred effort out" }, { "id": "port-ca7716d5", "name": "state", "position": { "x": 0.0, "y": 0.0 }, "properties": { "iconPosition": { "x": 88.0, "y": 40.0 } }, "type": "signal", "multipleConnections": false, "valueType": "real", "quantity": "", "unit": "", "dimensions": { "rows": 1, "columns": 1 }, "description": "", "orientation": "output", "domain": "power", "causality": "indifferent" } ] }, "parameters": [ { "id": "parameter-d056bc27", "name": "c", "type": "real", "value": "1", "quantity": "", "unit": "", "dimensions": { "rows": 1, "columns": 1 }, "description": "" } ], "icon": { "shape": "rectangle", "fill": "#f4f4f4", "border": "#303030", "text": "Text", "size": { "width": 128.0, "height": 128.0 }, "elements": [ { "type": "text", "x": 40.0, "y": 40.0, "width": 48.0, "height": 48.0, "text": "C", "color": "#303030", "fontSize": 32.0, "lineStyle": "solid", "lineWidth": 1.5, "stroke": "#303030", "fill": "#ffffff" } ] }, "properties": { "showName": false }, "library": { "showSubtree": true }, "implementation": { "kind": "text", "source": { "equations": "der(state) = p.f;\np.e = state/c;", "declarations": "", "initialEquations": "" } } }, { "id": "bfa506d8-ee41-4bab-ae19-a97fd67bfcf6", "name": "1", "position": { "x": -96.0, "y": -160.0 }, "rotation": 0.0, "interface": { "ports": [ { "id": "port-3e53bf80", "name": "p", "position": { "x": 0.0, "y": 0.0 }, "properties": { "iconPosition": { "x": 64.0, "y": 64.0 } }, "type": "power", "multipleConnections": true, "valueType": "real", "quantity": "", "unit": "", "dimensions": { "rows": 1, "columns": 1 }, "description": "", "orientation": "indifferent", "domain": "power", "causality": "indifferent" } ] }, "parameters": [], "icon": { "shape": "rectangle", "fill": "#f4f4f4", "border": "#303030", "text": "Text", "size": { "width": 128.0, "height": 128.0 }, "elements": [ { "type": "text", "x": 40.0, "y": 40.0, "width": 48.0, "height": 48.0, "text": "1", "color": "#303030", "fontSize": 32.0, "lineStyle": "solid", "lineWidth": 1.5, "stroke": "#303030", "fill": "#ffffff" } ] }, "properties": { "showName": false }, "library": { "showSubtree": true }, "implementation": { "kind": "text", "source": { "equations": "flow = p[1].f;\nsum(p[i].e for i in 1:$p_N$) = 0;\nfor i in 2:$p_N$ loop\n p[i].f = p[i-1].f;\nend for;", "declarations": "Real flow;", "initialEquations": "" } } }, { "id": "ea95e8ee-7f2d-4e14-a65d-d56bec5b4eb2", "name": "R", "position": { "x": 32.0, "y": -160.0 }, "rotation": 0.0, "interface": { "ports": [ { "id": "port-2e1d884f", "name": "p", "position": { "x": 0.0, "y": 0.0 }, "properties": { "iconPosition": { "x": 64.0, "y": 64.0 } }, "type": "power", "multipleConnections": false, "valueType": "real", "quantity": "", "unit": "", "dimensions": { "rows": 1, "columns": 1 }, "description": "", "orientation": "input", "domain": "power", "causality": "indifferent" } ] }, "parameters": [ { "id": "parameter-d056bc27", "name": "r", "type": "real", "value": "1", "quantity": "", "unit": "", "dimensions": { "rows": 1, "columns": 1 }, "description": "" } ], "icon": { "shape": "rectangle", "fill": "#f4f4f4", "border": "#303030", "text": "Text", "size": { "width": 128.0, "height": 128.0 }, "elements": [ { "type": "text", "x": 40.0, "y": 40.0, "width": 48.0, "height": 48.0, "text": "R", "color": "#303030", "fontSize": 32.0, "lineStyle": "solid", "lineWidth": 1.5, "stroke": "#303030", "fill": "#ffffff" } ] }, "properties": { "showName": false }, "library": { "showSubtree": true }, "implementation": { "kind": "text", "source": { "equations": "p.e = r*p.f;", "declarations": "", "initialEquations": "" } } }, { "id": "063a6341-cb18-4bfe-a1e4-00957a88a874", "name": "Se", "position": { "x": -224.0, "y": -160.0 }, "rotation": 0.0, "interface": { "ports": [ { "id": "port-2e1d884f", "name": "p", "position": { "x": 0.0, "y": 0.0 }, "properties": { "iconPosition": { "x": 64.0, "y": 64.0 } }, "type": "power", "multipleConnections": false, "valueType": "real", "quantity": "", "unit": "", "dimensions": { "rows": 1, "columns": 1 }, "description": "", "orientation": "output", "domain": "power", "causality": "fixed effort out" } ] }, "parameters": [ { "id": "parameter-d056bc27", "name": "effort", "type": "real", "value": "1", "quantity": "", "unit": "", "dimensions": { "rows": 1, "columns": 1 }, "description": "" } ], "icon": { "shape": "rectangle", "fill": "#f4f4f4", "border": "#303030", "text": "Text", "size": { "width": 128.0, "height": 128.0 }, "elements": [ { "type": "text", "x": 32.0, "y": 32.0, "width": 64.0, "height": 64.0, "text": "Se", "color": "#303030", "fontSize": 32.0, "lineStyle": "solid", "lineWidth": 1.5, "stroke": "#303030", "fill": "#ffffff" } ] }, "properties": { "showName": false }, "library": { "showSubtree": true }, "implementation": { "kind": "text", "source": { "equations": "p.e = effort;\nflow = p.f;", "declarations": "Real flow;", "initialEquations": "" } } } ], "connections": [ { "id": "4b09ba21-baa0-4db7-9431-4c919478bce4", "source": { "block": "063a6341-cb18-4bfe-a1e4-00957a88a874", "port": "port-2e1d884f" }, "target": { "block": "bfa506d8-ee41-4bab-ae19-a97fd67bfcf6", "port": "port-3e53bf80" }, "name": "", "properties": { "waypoints": [] }, "type": "power", "causality": "none" }, { "id": "a73a99a1-54e2-461d-a9a7-2d6d11d500f4", "source": { "block": "bfa506d8-ee41-4bab-ae19-a97fd67bfcf6", "port": "port-3e53bf80" }, "target": { "block": "ea95e8ee-7f2d-4e14-a65d-d56bec5b4eb2", "port": "port-2e1d884f" }, "name": "", "properties": { "waypoints": [] }, "type": "power", "causality": "none" }, { "id": "dd5fb1e2-b125-4b5f-a792-dac89dd89ad3", "source": { "block": "bfa506d8-ee41-4bab-ae19-a97fd67bfcf6", "port": "port-3e53bf80" }, "target": { "block": "c6169e52-e993-4293-8fc8-5b97e8ad59be", "port": "port-2e1d884f" }, "name": "", "properties": { "waypoints": [] }, "type": "power", "causality": "none" } ], "annotations": [], "junctions": [], "simulation": {} } } } ] }