-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
121 lines (87 loc) · 5.17 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Signal Flow Graph Solver</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel='stylesheet' href="css/style.css" />
<script src="js/lib/cytoscape.min.js"></script>
<script src="js/lib/graphlib.min.js"></script>
</head>
<body onLoad="checkFileAPI();">
<div class="container">
<!-- about -->
<div class="jumbotron">
<h1 class="display-4"><img src="assets/logo.png" class="rounded" alt="logo">SFG Solver
<a class="github-button" href="https://github.com/MahmoudTarek97/Signal-Flow-Graph-Solver" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star ntkme/github-buttons on GitHub">Star</a></h1>
<hr class="my-4">
<p>A signal-flow graph (SFG), often called a Mason graph, is a specialized flow graph, a directed graph in which nodes represent system variables, and branches (edges, arcs, or arrows) represent functional connections between pairs of nodes. SFG's are most commonly used to represent signal flow in a physical system and its controller(s), forming a cyber-physical system.</p>
<a class="btn btn-primary" href="https://en.wikipedia.org/wiki/Signal-flow_graph" role="button">Learn more</a>
<a href="" id="sfg" download="sfg.jpg"></a>
</div>
<div class="jumbotron">
<!-- Tab panes -->
<div class="tab-pane active container" id="dragdrop"><br>
<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
<div class="btn-group mr-2" role="group" aria-label="First group">
<input type="file" class="btn button btn-outline-primary" onchange='readText(this)' />
<button type="button" class="btn button btn-outline-primary" onclick="saveAsJSON('graph.json')">Save as JSON</button>
</div>
<div class="btn-group mr-2" role="group" aria-label="Second group">
<button type="button" class="btn button button btn-outline-primary" onclick="resizeGraph()">Fit</button>
<button type="button" class="btn button button btn-outline-primary" onclick="snapShot()"><img src="assets/SnapshotIcon.png" width="20" /></button>
</div>
</div>
<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
<div class="btn-group mr-2" role="group" aria-label="Third group">
<button type="button" class="btn button btn-outline-primary" onclick="addNode()">Add Node</button>
<button type="button" class="btn button btn-outline-primary" id="addBranch" onclick="addBranch()">Add Branch</button>
<button type="button" class="btn button btn-outline-primary" id="editLabel" onclick="editLabel()">Edit Label</button>
<button type="button" class="btn button btn-outline-primary" id="remove" onclick="activateRemove()">Remove</button>
<button type="button" class="btn btn-outline-danger" onclick="clearAll()">Clear All</button>
</div>
<div class="btn-group" role="group" aria-label="Fourth group">
<button type="button" class="btn button btn-outline-primary" id="start" onclick="setStart()">Set Source</button>
<button type="button" class="btn button btn-outline-primary" id="end" onclick="setEnd()">Set End</button>
<button type="button" class="btn btn-outline-success" onclick="solve()">Solve</button>
</div>
</div>
<div id="cy">
</div>
</div>
</div>
<!-- output -->
<div class="jumbotron">
<h3>Output</h3>
<p id="result">overall gain = ? </p>
<details open>
<summary>Forward Paths</summary>
<p id="forwardPaths"></p>
</details>
<details open>
<summary>Individual Loops</summary>
<p id="cycles"></p>
</details>
<details open>
<summary>Non Touching Loops</summary>
<p id="nonTouchingLoops"></p>
</details>
<details open>
<summary>Deltas</summary>
<p id="deltas"></p>
</details>
</div>
<hr>
<footer>
<p>© All Credits goes to Mahmoud Tarek & Mostafa Labib</p>
</footer>
</div>
<script src="js/lib/jquery-3.3.1.slim.min.js"></script>
<script src="js/lib/popper.min.js"></script>
<script src="js/lib/bootstrap.min.js"></script>
<script async defer src="https://buttons.github.io/buttons.js"></script>
<script src="js/SignalFlowGraph.js"></script>
<script src="js/guiUtilities.js"></script>
<script src="js/gui.js"></script>
</body>
</html>