{ "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": "single flow in" } ] }, "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": "" } } }, { "id": "140ae14b-9dbb-4756-aa25-29101ef2a99e", "name": "0", "position": { "x": -96.0, "y": -32.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": "single effort in" } ] }, "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": "0", "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": "effort = p[1].e;\nsum(p[i].f for i in 1:$p_N$) = 0;\nfor i in 2:$p_N$ loop\n p[i].e = p[i-1].e;\nend for;", "declarations": "Real effort;", "initialEquations": "" } } }, { "id": "6a6fbadd-28ec-4d10-b854-876752a6b287", "name": "C0", "position": { "x": -96.0, "y": 96.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": "9c1aa152-f9fb-459a-9911-e90dd5a9beb3", "name": "R0", "position": { "x": 32.0, "y": -32.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": "f37555f8-8a8b-455a-bd6d-a71343a23002", "name": "I", "position": { "x": -224.0, "y": -32.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 flow 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": "i", "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": "I", "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.e;\np.f = state/i;", "declarations": "", "initialEquations": "" } } } ], "connections": [ { "id": "55c04603-2ae5-44d2-b3f3-493a73e88d73", "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": "target" }, { "id": "5e7f801a-eb4a-46d2-9279-b4e81e1e011b", "source": { "block": "140ae14b-9dbb-4756-aa25-29101ef2a99e", "port": "port-3e53bf80" }, "target": { "block": "9c1aa152-f9fb-459a-9911-e90dd5a9beb3", "port": "port-2e1d884f" }, "name": "", "properties": { "waypoints": [] }, "type": "power", "causality": "target" }, { "id": "ae95fbfc-c771-47f2-8f9e-1c823daaf6b8", "source": { "block": "140ae14b-9dbb-4756-aa25-29101ef2a99e", "port": "port-3e53bf80" }, "target": { "block": "6a6fbadd-28ec-4d10-b854-876752a6b287", "port": "port-2e1d884f" }, "name": "", "properties": { "waypoints": [] }, "type": "power", "causality": "source" }, { "id": "45886c5b-8dec-4212-b13d-1f2996710a6b", "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": "source" }, { "id": "476a20b4-ff02-4186-ac09-53f91ed06fcd", "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": "target" }, { "id": "48b58a43-4d83-43ec-b502-1ff038445696", "source": { "block": "140ae14b-9dbb-4756-aa25-29101ef2a99e", "port": "port-3e53bf80" }, "target": { "block": "f37555f8-8a8b-455a-bd6d-a71343a23002", "port": "port-2e1d884f" }, "name": "", "properties": { "waypoints": [] }, "type": "power", "causality": "target" }, { "id": "d6940de3-5b4c-42be-a247-639b3803d85e", "source": { "block": "bfa506d8-ee41-4bab-ae19-a97fd67bfcf6", "port": "port-3e53bf80" }, "target": { "block": "140ae14b-9dbb-4756-aa25-29101ef2a99e", "port": "port-3e53bf80" }, "name": "", "properties": { "waypoints": [] }, "type": "power", "causality": "source" } ], "annotations": [], "junctions": [], "simulation": {} } } } ] }