Skip to content

Commit

Permalink
PHASE PORTRAIT
Browse files Browse the repository at this point in the history
FINALLY
  • Loading branch information
viktorashi committed Jan 2, 2025
1 parent 1431a91 commit 7a54373
Show file tree
Hide file tree
Showing 6 changed files with 387 additions and 129 deletions.
50 changes: 50 additions & 0 deletions notebookuri/phase-portr.ipynb

Large diffs are not rendered by default.

87 changes: 87 additions & 0 deletions open_control/templates/phase_portrait.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<!doctype html>
<html>
<title>Chemical Reaction Network(CRN)</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="../static/results.css">
<link rel="icon" href="../static/favicon.ico"/>
<script src="../static/load-mathjax.js" async></script>


<body>
<!--Sidebar-->
<nav class="w3-sidebar w3-black w3-animate-top w3-xxlarge" style="display:none;padding-top:150px" id="mySidebar">
<a href="javascript:void(0)" onclick="w3_close()"
class="w3-button w3-black w3-xxlarge w3-padding w3-display-topright" style="padding:6px 24px">
<i class="fa fa-remove"></i>
</a>
<div class="w3-bar-block w3-center">
<a href="/" class="w3-bar-item w3-button w3-text-grey w3-hover-black">Home</a>
</div>
</nav>
<!--Page Content-->
<div class="w3-content" style="max-width:1500px">
<div class="w3-opacity">
<span class="w3-button w3-xxlarge w3-white w3-right" onclick="w3_open()">
<i class="fa fa-bars"></i>
</span>
<div class="w3-clear"></div>
<header class="w31-center w3-margin-bottom">
<h1 style="text-align:center;">
<b>{{ pageName }}</b>
</h1>
<div id='chart' class='chart' ></div>
<div style="text-align: center;">
<img src="/static/phase_portrait.svg" alt="my diagram" width="50%" height="50%">
</div>
<div class="gen_graph" style="margin-top:0%">
<p class="w3-padding-16">
<button id="buton" class="w3-button w3-black" onclick="window.location='time_graph_input';">Generate
new Graph
</button>
</p>
<br>
<br>
<div>
<table>
<tr>
<th>Chemical Reaction Network</th>
<th>Stoichiometric Matrix</th>
</tr>
<tr>
<td style="vertical-align: top;">
{% for e in listaEcuatii %}
{% autoescape false %}
{{ e | replace(" ","&nbsp;") }} <br>
{% endautoescape %}
{% endfor %}
</td>
<td style="vertical-align: top;">
{{ stoichMatrix }}
</td>
</tr>
<!-- <tr> -->
<!-- <td>Test</td> -->
<!-- <td>Test</td> -->
<!-- </tr> -->
<!-- <tr> -->
<!-- <td>{{ message }}</td> -->
<!-- <td>Test</td> -->
<!-- </tr> -->
</table>
</div>
</div>
</header>
</div>
</div>
<!--Footer-->
<footer class="w3-container w3-padding-54 w3-light-grey w3-center w3-opacity w3-xlarge"
style="/*!margin-top:128px; margin-left:-2px;*/ bottom:0.7%; width:100%; padding-top:2%; padding-bottom:2%">
<p class="w3-medium">2024@
</p>
</footer>
</body>
</html>
61 changes: 13 additions & 48 deletions open_control/templates/phase_portrait_input.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ <h1 style="text-align:center;">
<div class="form-group">
<br>
<p style="display:inline; padding-right:10%">Title of the Graph</p>
<input value="Time " placeholder="Time dependency graph" type="text"
<input value="Phase portrait" placeholder="Time dependency graph" type="text"
class="w3-input w3-hover-blue"
style="width:80%; display:inline; text-align:center" name="titlu">
<div class="form-group">
Expand All @@ -92,37 +92,6 @@ <h1 style="text-align:center;">
</div>
</div>
</div>
<div class="input-group">
<div class="form-group">
<p style="display:inline; padding-right:10%">x_title</p>
<input value="time" placeholder="time" type="text"
class="w3-input w3-hover-blue"
style="width:80%; display:inline; text-align:center" name="x_titlu">
<div class="form-group">
<div class="input-group">
<br>
<div></div>
</div>
<div></div>
</div>
</div>
</div>
<div class="input-group">
<div class="form-group">
<p style="display:inline; padding-right:10%">y_title</p>
<input value="concentration" placeholder="concentration" type="text"
class="w3-input w3-hover-blue"
style="width:80%; display:inline; text-align:center" name="y_titlu">
<div class="form-group">
<div class="input-group">
<br>
<div></div>
</div>
<div></div>
</div>
</div>
</div>
<!--Pana aici -->
</div>
</div>
<div class="content">
Expand All @@ -136,7 +105,7 @@ <h1 style="text-align:center;">
<p style="display:inline;padding-right:10%">A</p>
<input class="w3-input w3-hover-blue"
style="width:60%; display:inline; text-align:center" type="text"
name="valinit">
name="valinit0">
<br>
</div>
</div>
Expand All @@ -145,7 +114,7 @@ <h1 style="text-align:center;">
<p style="display:inline;padding-right:10%">B</p>
<input class="w3-input w3-hover-blue"
style="width:60%; display:inline; text-align:center" type="text"
name="valinit2">
name="valinit1">
<br>
</div>
</div>
Expand All @@ -154,29 +123,25 @@ <h1 style="text-align:center;">
<p style="display:inline;padding-right:10%">C</p>
<input class="w3-input w3-hover-blue"
style="width:60%;display: inline;text-align:center" type="text"
name="valinit3">
name="valinit2">
<br>
</div>
</div>
</div>

<p style="padding-bottom: 10px;">Select Species to Display</p>
<div class="form-group" style="margin-top: 20px;" id="checkboxes">
<input type="checkbox" id="species1" name="species1"
value="species1">
<input type="checkbox" id="check" name="check0"
value="A">
<label for="species1">species 1</label><br>

<input type="checkbox" id="species2" name="species2"
value="species2">
<input type="checkbox" id="check" name="check1"
value="B">
<label for="species2">species 2</label><br>

<input type="checkbox" id="species3" name="species3"
value="species3">
<input type="checkbox" id="check" name="check2"
value="C">
<label for="species3">species 3</label><br>

<input type="checkbox" id="species4" name="species4"
value="species4">
<label for="species4">species 4</label>
</div>

</div>
Expand All @@ -191,7 +156,7 @@ <h1 style="text-align:center;">
<p style="display:inline; padding-right:10%">k1</p>
<input class="w3-input w3-hover-blue"
style="width:60%; display:inline;text-align:center; margin-top:8%"
type="text" name="valk">
type="text" name="valk0">
<br>
</div>
</div>
Expand All @@ -200,7 +165,7 @@ <h1 style="text-align:center;">
<p style="display:inline; padding-right:10%">k2</p>
<input class="w3-input w3-hover-blue"
style="width:60%; display:inline;text-align:center; margin-top:8%"
type="text" name="valk2">
type="text" name="valk1">
<br>
</div>
</div>
Expand All @@ -209,7 +174,7 @@ <h1 style="text-align:center;">
<p style="display:inline; padding-right:10%">k3</p>
<input class="w3-input w3-hover-blue"
style="width:60%; display:inline;text-align:center; margin-top:8%"
type="text" name="valk3">
type="text" name="valk2">
<br>
</div>
</div>
Expand Down
Loading

0 comments on commit 7a54373

Please sign in to comment.