Skip to content
Snippets Groups Projects
Commit 84bbcad4 authored by Nour's avatar Nour
Browse files

Merge branch 'main' of git-ce.rwth-aachen.de:optis/optis_app into nour2

parents 8b406c58 78c2c20b
No related branches found
No related tags found
No related merge requests found
Frontend/export/fish.png

245 KiB

Frontend/export/net.png

46.2 KiB | W: | H:

Frontend/export/net.png

50.8 KiB | W: | H:

Frontend/export/net.png
Frontend/export/net.png
Frontend/export/net.png
Frontend/export/net.png
  • 2-up
  • Swipe
  • Onion skin
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 8.0.5 (20230430.1635)
-->
<!-- Title: imdf_net_1688399861.0251665 Pages: 1 -->
<svg width="1356pt" height="260pt"
viewBox="0.00 0.00 1356.00 260.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 256)">
<title>imdf_net_1688399861.0251665</title>
<polygon fill="white" stroke="none" points="-4,4 -4,-256 1352,-256 1352,4 -4,4"/>
<!-- 2737767459088 -->
<g id="node1" class="node">
<title>2737767459088</title>
<polygon fill="green" stroke="black" points="1250,-144 1159,-144 1159,-108 1250,-108 1250,-144"/>
<text text-anchor="middle" x="1204.5" y="-121.72" font-family="Times New Roman,serif" font-size="12.00">order completed</text>
</g>
<!-- 2737762629520 -->
<g id="node23" class="node">
<title>2737762629520</title>
<ellipse fill="white" stroke="black" cx="1317" cy="-126" rx="27" ry="27"/>
<ellipse fill="none" stroke="black" cx="1317" cy="-126" rx="31" ry="31"/>
<text text-anchor="start" x="1307.25" y="-113.97" font-family="Times New Roman,serif" font-size="32.00"></text>
</g>
<!-- 2737767459088&#45;&gt;2737762629520 -->
<g id="edge5" class="edge">
<title>2737767459088&#45;&gt;2737762629520</title>
<path fill="none" stroke="black" d="M1250.44,-126C1258.49,-126 1266.83,-126 1274.76,-126"/>
<polygon fill="black" stroke="black" points="1274.62,-129.5 1284.62,-126 1274.62,-122.5 1274.62,-129.5"/>
</g>
<!-- 2737767463696 -->
<g id="node2" class="node">
<title>2737767463696</title>
<polygon fill="blue" stroke="black" points="1033,-198 933.75,-198 933.75,-162 1033,-162 1033,-198"/>
<text text-anchor="middle" x="983.38" y="-175.72" font-family="Times New Roman,serif" font-size="12.00">attempt delivery C</text>
</g>
<!-- 2737767891344 -->
<g id="node22" class="node">
<title>2737767891344</title>
<ellipse fill="white" stroke="black" cx="1096" cy="-126" rx="27" ry="27"/>
</g>
<!-- 2737767463696&#45;&gt;2737767891344 -->
<g id="edge4" class="edge">
<title>2737767463696&#45;&gt;2737767891344</title>
<path fill="none" stroke="black" d="M1022.14,-161.57C1034.98,-155.3 1049.23,-148.34 1061.69,-142.26"/>
<polygon fill="black" stroke="black" points="1062.8,-145.13 1070.25,-137.59 1059.73,-138.84 1062.8,-145.13"/>
</g>
<!-- 2737767461776 -->
<g id="node3" class="node">
<title>2737767461776</title>
<polygon fill="white" stroke="black" points="1032.62,-144 934.12,-144 934.12,-108 1032.62,-108 1032.62,-144"/>
<text text-anchor="middle" x="983.38" y="-121.72" font-family="Times New Roman,serif" font-size="12.00">attempt delivery B</text>
</g>
<!-- 2737767461776&#45;&gt;2737767891344 -->
<g id="edge6" class="edge">
<title>2737767461776&#45;&gt;2737767891344</title>
<path fill="none" stroke="black" d="M1032.9,-126C1041.26,-126 1049.84,-126 1057.84,-126"/>
<polygon fill="black" stroke="black" points="1057.7,-129.5 1067.7,-126 1057.7,-122.5 1057.7,-129.5"/>
</g>
<!-- 2737768338832 -->
<g id="node4" class="node">
<title>2737768338832</title>
<polygon fill="blue" stroke="black" points="157.75,-126 90,-126 90,-90 157.75,-90 157.75,-126"/>
<text text-anchor="middle" x="123.88" y="-103.72" font-family="Times New Roman,serif" font-size="12.00">place order</text>
</g>
<!-- 2737767049232 -->
<g id="node17" class="node">
<title>2737767049232</title>
<ellipse fill="white" stroke="black" cx="220.75" cy="-108" rx="27" ry="27"/>
</g>
<!-- 2737768338832&#45;&gt;2737767049232 -->
<g id="edge3" class="edge">
<title>2737768338832&#45;&gt;2737767049232</title>
<path fill="none" stroke="black" d="M158.06,-108C165.9,-108 174.32,-108 182.34,-108"/>
<polygon fill="black" stroke="black" points="182.31,-111.5 192.31,-108 182.31,-104.5 182.31,-111.5"/>
</g>
<!-- 2737768216144 -->
<g id="node5" class="node">
<title>2737768216144</title>
<polygon fill="white" stroke="black" points="627.75,-252 529.25,-252 529.25,-216 627.75,-216 627.75,-252"/>
<text text-anchor="middle" x="578.5" y="-229.72" font-family="Times New Roman,serif" font-size="12.00">pick from stock C</text>
</g>
<!-- 2737768343312 -->
<g id="node18" class="node">
<title>2737768343312</title>
<ellipse fill="white" stroke="black" cx="690.75" cy="-126" rx="27" ry="27"/>
</g>
<!-- 2737768216144&#45;&gt;2737768343312 -->
<g id="edge2" class="edge">
<title>2737768216144&#45;&gt;2737768343312</title>
<path fill="none" stroke="black" d="M616.15,-215.63C620.23,-212.97 624.19,-210.08 627.75,-207 643.97,-192.95 658.73,-174.04 669.78,-158.03"/>
<polygon fill="black" stroke="black" points="673.17,-160.25 675.84,-150 667.36,-156.35 673.17,-160.25"/>
</g>
<!-- 2737768208528 -->
<g id="node6" class="node">
<title>2737768208528</title>
<polygon fill="white" stroke="black" points="627.75,-198 529.25,-198 529.25,-162 627.75,-162 627.75,-198"/>
<text text-anchor="middle" x="578.5" y="-175.72" font-family="Times New Roman,serif" font-size="12.00">pick from stock A</text>
</g>
<!-- 2737768208528&#45;&gt;2737768343312 -->
<g id="edge8" class="edge">
<title>2737768208528&#45;&gt;2737768343312</title>
<path fill="none" stroke="black" d="M617.13,-161.57C629.93,-155.3 644.13,-148.34 656.56,-142.26"/>
<polygon fill="black" stroke="black" points="657.64,-145.14 665.08,-137.59 654.56,-138.85 657.64,-145.14"/>
</g>
<!-- 2737768338576 -->
<g id="node7" class="node">
<title>2737768338576</title>
<polygon fill="white" stroke="black" points="403.25,-166 283.75,-166 283.75,-130 403.25,-130 403.25,-166"/>
<text text-anchor="middle" x="343.5" y="-143.72" font-family="Times New Roman,serif" font-size="12.00">arrange standard order</text>
</g>
<!-- 2737768334864 -->
<g id="node19" class="node">
<title>2737768334864</title>
<ellipse fill="white" stroke="black" cx="466.25" cy="-162" rx="27" ry="27"/>
</g>
<!-- 2737768338576&#45;&gt;2737768334864 -->
<g id="edge15" class="edge">
<title>2737768338576&#45;&gt;2737768334864</title>
<path fill="none" stroke="black" d="M403.46,-154.84C411.83,-155.81 420.23,-156.78 428.02,-157.68"/>
<polygon fill="black" stroke="black" points="427.6,-161.27 437.94,-158.95 428.41,-154.32 427.6,-161.27"/>
</g>
<!-- 2737768213712 -->
<g id="node8" class="node">
<title>2737768213712</title>
<polygon fill="white" stroke="black" points="627.38,-144 529.62,-144 529.62,-108 627.38,-108 627.38,-144"/>
<text text-anchor="middle" x="578.5" y="-121.72" font-family="Times New Roman,serif" font-size="12.00">pick from stock B</text>
</g>
<!-- 2737768213712&#45;&gt;2737768343312 -->
<g id="edge7" class="edge">
<title>2737768213712&#45;&gt;2737768343312</title>
<path fill="none" stroke="black" d="M627.86,-126C636.19,-126 644.74,-126 652.72,-126"/>
<polygon fill="black" stroke="black" points="652.54,-129.5 662.54,-126 652.54,-122.5 652.54,-129.5"/>
</g>
<!-- 2737763727120 -->
<g id="node9" class="node">
<title>2737763727120</title>
<polygon fill="blue" stroke="black" points="399.88,-99 287.12,-99 287.12,-63 399.88,-63 399.88,-99"/>
<text text-anchor="middle" x="343.5" y="-76.72" font-family="Times New Roman,serif" font-size="12.00">arrange custom order</text>
</g>
<!-- 2737768216400 -->
<g id="node20" class="node">
<title>2737768216400</title>
<ellipse fill="white" stroke="black" cx="466.25" cy="-72" rx="27" ry="27"/>
</g>
<!-- 2737763727120&#45;&gt;2737768216400 -->
<g id="edge14" class="edge">
<title>2737763727120&#45;&gt;2737768216400</title>
<path fill="none" stroke="black" d="M400.28,-76.84C409.75,-76.14 419.38,-75.42 428.21,-74.76"/>
<polygon fill="black" stroke="black" points="428.2,-78.2 437.91,-73.96 427.68,-71.22 428.2,-78.2"/>
</g>
<!-- 2737763717648 -->
<g id="node10" class="node">
<title>2737763717648</title>
<polygon fill="blue" stroke="black" points="619.5,-90 537.5,-90 537.5,-54 619.5,-54 619.5,-90"/>
<text text-anchor="middle" x="578.5" y="-67.72" font-family="Times New Roman,serif" font-size="12.00">manufacture A</text>
</g>
<!-- 2737763717648&#45;&gt;2737768343312 -->
<g id="edge13" class="edge">
<title>2737763717648&#45;&gt;2737768343312</title>
<path fill="none" stroke="black" d="M617.13,-90.43C629.93,-96.7 644.13,-103.66 656.56,-109.74"/>
<polygon fill="black" stroke="black" points="654.56,-113.15 665.08,-114.41 657.64,-106.86 654.56,-113.15"/>
</g>
<!-- 2737767905424 -->
<g id="node11" class="node">
<title>2737767905424</title>
<polygon fill="white" stroke="black" points="619.12,-36 537.88,-36 537.88,0 619.12,0 619.12,-36"/>
<text text-anchor="middle" x="578.5" y="-13.72" font-family="Times New Roman,serif" font-size="12.00">manufacture B</text>
</g>
<!-- 2737767905424&#45;&gt;2737768343312 -->
<g id="edge11" class="edge">
<title>2737767905424&#45;&gt;2737768343312</title>
<path fill="none" stroke="black" d="M616.15,-36.37C620.23,-39.03 624.19,-41.92 627.75,-45 643.97,-59.05 658.73,-77.96 669.78,-93.97"/>
<polygon fill="black" stroke="black" points="667.36,-95.65 675.84,-102 673.17,-91.75 667.36,-95.65"/>
</g>
<!-- 2737767894736 -->
<g id="node12" class="node">
<title>2737767894736</title>
<polygon fill="white" stroke="black" points="807.75,-198 753.75,-198 753.75,-162 807.75,-162 807.75,-198"/>
<text text-anchor="middle" x="780.75" y="-175.72" font-family="Times New Roman,serif" font-size="12.00">pack A</text>
</g>
<!-- 2737767895376 -->
<g id="node21" class="node">
<title>2737767895376</title>
<ellipse fill="white" stroke="black" cx="870.75" cy="-126" rx="27" ry="27"/>
</g>
<!-- 2737767894736&#45;&gt;2737767895376 -->
<g id="edge1" class="edge">
<title>2737767894736&#45;&gt;2737767895376</title>
<path fill="none" stroke="black" d="M808.15,-163.8C817.59,-158.01 828.32,-151.42 838.15,-145.39"/>
<polygon fill="black" stroke="black" points="839.54,-148.03 846.23,-139.82 835.88,-142.06 839.54,-148.03"/>
</g>
<!-- 2737767897936 -->
<g id="node13" class="node">
<title>2737767897936</title>
<polygon fill="blue" stroke="black" points="807.75,-144 753.75,-144 753.75,-108 807.75,-108 807.75,-144"/>
<text text-anchor="middle" x="780.75" y="-121.72" font-family="Times New Roman,serif" font-size="12.00">pack C</text>
</g>
<!-- 2737767897936&#45;&gt;2737767895376 -->
<g id="edge9" class="edge">
<title>2737767897936&#45;&gt;2737767895376</title>
<path fill="none" stroke="black" d="M808.15,-126C815.81,-126 824.32,-126 832.51,-126"/>
<polygon fill="black" stroke="black" points="832.37,-129.5 842.37,-126 832.37,-122.5 832.37,-129.5"/>
</g>
<!-- 2737767903376 -->
<g id="node14" class="node">
<title>2737767903376</title>
<polygon fill="white" stroke="black" points="1033,-90 933.75,-90 933.75,-54 1033,-54 1033,-90"/>
<text text-anchor="middle" x="983.38" y="-67.72" font-family="Times New Roman,serif" font-size="12.00">attempt delivery A</text>
</g>
<!-- 2737767903376&#45;&gt;2737767891344 -->
<g id="edge10" class="edge">
<title>2737767903376&#45;&gt;2737767891344</title>
<path fill="none" stroke="black" d="M1022.14,-90.43C1034.98,-96.7 1049.23,-103.66 1061.69,-109.74"/>
<polygon fill="black" stroke="black" points="1059.73,-113.16 1070.25,-114.41 1062.8,-106.87 1059.73,-113.16"/>
</g>
<!-- 2737767902672 -->
<g id="node15" class="node">
<title>2737767902672</title>
<polygon fill="white" stroke="black" points="807.75,-90 753.75,-90 753.75,-54 807.75,-54 807.75,-90"/>
<text text-anchor="middle" x="780.75" y="-67.72" font-family="Times New Roman,serif" font-size="12.00">pack B</text>
</g>
<!-- 2737767902672&#45;&gt;2737767895376 -->
<g id="edge12" class="edge">
<title>2737767902672&#45;&gt;2737767895376</title>
<path fill="none" stroke="black" d="M808.15,-88.2C817.59,-93.99 828.32,-100.58 838.15,-106.61"/>
<polygon fill="black" stroke="black" points="835.88,-109.94 846.23,-112.18 839.54,-103.97 835.88,-109.94"/>
</g>
<!-- 2737765562576 -->
<g id="node16" class="node">
<title>2737765562576</title>
<ellipse fill="white" stroke="black" cx="27" cy="-108" rx="27" ry="27"/>
<text text-anchor="start" x="16.5" y="-95.2" font-family="Times New Roman,serif" font-size="34.00"></text>
</g>
<!-- 2737765562576&#45;&gt;2737768338832 -->
<g id="edge30" class="edge">
<title>2737765562576&#45;&gt;2737768338832</title>
<path fill="none" stroke="black" d="M54.43,-108C62.05,-108 70.58,-108 78.97,-108"/>
<polygon fill="black" stroke="black" points="78.82,-111.5 88.82,-108 78.82,-104.5 78.82,-111.5"/>
</g>
<!-- 2737767049232&#45;&gt;2737768338576 -->
<g id="edge17" class="edge">
<title>2737767049232&#45;&gt;2737768338576</title>
<path fill="none" stroke="black" d="M246.77,-116.29C255.67,-119.24 266.15,-122.71 276.85,-126.25"/>
<polygon fill="black" stroke="black" points="275.55,-129.84 286.14,-129.66 277.75,-123.19 275.55,-129.84"/>
</g>
<!-- 2737767049232&#45;&gt;2737763727120 -->
<g id="edge16" class="edge">
<title>2737767049232&#45;&gt;2737763727120</title>
<path fill="none" stroke="black" d="M247.36,-102.27C256.08,-100.32 266.27,-98.04 276.68,-95.72"/>
<polygon fill="black" stroke="black" points="277.12,-98.98 286.12,-93.38 275.59,-92.15 277.12,-98.98"/>
</g>
<!-- 2737768343312&#45;&gt;2737767894736 -->
<g id="edge18" class="edge">
<title>2737768343312&#45;&gt;2737767894736</title>
<path fill="none" stroke="black" d="M714.41,-139.91C723.44,-145.45 734.06,-151.96 744.07,-158.11"/>
<polygon fill="black" stroke="black" points="742.07,-161.6 752.42,-163.84 745.73,-155.63 742.07,-161.6"/>
</g>
<!-- 2737768343312&#45;&gt;2737767897936 -->
<g id="edge19" class="edge">
<title>2737768343312&#45;&gt;2737767897936</title>
<path fill="none" stroke="black" d="M718.15,-126C725.81,-126 734.32,-126 742.51,-126"/>
<polygon fill="black" stroke="black" points="742.37,-129.5 752.37,-126 742.37,-122.5 742.37,-129.5"/>
</g>
<!-- 2737768343312&#45;&gt;2737767902672 -->
<g id="edge20" class="edge">
<title>2737768343312&#45;&gt;2737767902672</title>
<path fill="none" stroke="black" d="M714.41,-112.09C723.44,-106.55 734.06,-100.04 744.07,-93.89"/>
<polygon fill="black" stroke="black" points="745.73,-96.37 752.42,-88.16 742.07,-90.4 745.73,-96.37"/>
</g>
<!-- 2737768334864&#45;&gt;2737768216144 -->
<g id="edge21" class="edge">
<title>2737768334864&#45;&gt;2737768216144</title>
<path fill="none" stroke="black" d="M488.34,-178.25C500.13,-187.1 515.24,-198.04 529.25,-207 530.81,-208 532.4,-208.99 534.02,-209.99"/>
<polygon fill="black" stroke="black" points="532.08,-213.5 542.46,-215.61 535.66,-207.49 532.08,-213.5"/>
</g>
<!-- 2737768334864&#45;&gt;2737768208528 -->
<g id="edge23" class="edge">
<title>2737768334864&#45;&gt;2737768208528</title>
<path fill="none" stroke="black" d="M493.38,-166.27C500.98,-167.51 509.62,-168.92 518.39,-170.35"/>
<polygon fill="black" stroke="black" points="517.66,-173.94 528.09,-172.1 518.79,-167.03 517.66,-173.94"/>
</g>
<!-- 2737768334864&#45;&gt;2737768213712 -->
<g id="edge22" class="edge">
<title>2737768334864&#45;&gt;2737768213712</title>
<path fill="none" stroke="black" d="M492.27,-153.83C500.39,-151.18 509.76,-148.12 519.26,-145.02"/>
<polygon fill="black" stroke="black" points="520.14,-148.08 528.56,-141.65 517.97,-141.43 520.14,-148.08"/>
</g>
<!-- 2737768216400&#45;&gt;2737763717648 -->
<g id="edge25" class="edge">
<title>2737768216400&#45;&gt;2737763717648</title>
<path fill="none" stroke="black" d="M493.66,-72C503.51,-72 515.05,-72 526.37,-72"/>
<polygon fill="black" stroke="black" points="526.09,-75.5 536.09,-72 526.09,-68.5 526.09,-75.5"/>
</g>
<!-- 2737768216400&#45;&gt;2737767905424 -->
<g id="edge24" class="edge">
<title>2737768216400&#45;&gt;2737767905424</title>
<path fill="none" stroke="black" d="M490.9,-60.42C502.41,-54.78 516.67,-47.8 530.27,-41.13"/>
<polygon fill="black" stroke="black" points="531.57,-43.9 539.01,-36.36 528.49,-37.62 531.57,-43.9"/>
</g>
<!-- 2737767895376&#45;&gt;2737767463696 -->
<g id="edge26" class="edge">
<title>2737767895376&#45;&gt;2737767463696</title>
<path fill="none" stroke="black" d="M895.48,-137.58C907.03,-143.22 921.33,-150.2 934.98,-156.87"/>
<polygon fill="black" stroke="black" points="933.24,-160.4 943.76,-161.64 936.31,-154.11 933.24,-160.4"/>
</g>
<!-- 2737767895376&#45;&gt;2737767461776 -->
<g id="edge27" class="edge">
<title>2737767895376&#45;&gt;2737767461776</title>
<path fill="none" stroke="black" d="M898.25,-126C905.8,-126 914.34,-126 923.02,-126"/>
<polygon fill="black" stroke="black" points="923.02,-129.5 933.02,-126 923.02,-122.5 923.02,-129.5"/>
</g>
<!-- 2737767895376&#45;&gt;2737767903376 -->
<g id="edge28" class="edge">
<title>2737767895376&#45;&gt;2737767903376</title>
<path fill="none" stroke="black" d="M895.48,-114.42C907.03,-108.78 921.33,-101.8 934.98,-95.13"/>
<polygon fill="black" stroke="black" points="936.31,-97.89 943.76,-90.36 933.24,-91.6 936.31,-97.89"/>
</g>
<!-- 2737767891344&#45;&gt;2737767459088 -->
<g id="edge29" class="edge">
<title>2737767891344&#45;&gt;2737767459088</title>
<path fill="none" stroke="black" d="M1123.33,-126C1130.86,-126 1139.37,-126 1147.97,-126"/>
<polygon fill="black" stroke="black" points="1147.82,-129.5 1157.82,-126 1147.82,-122.5 1147.82,-129.5"/>
</g>
</g>
</svg>
Frontend/static/fish.png

245 KiB

Frontend/static/net.png

51 KiB

...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
{%block body%} {%block body%}
<div style="text-align: center;" class="custom-select"> <div style="text-align: center;" class="custom-select">
<!--This is the form for directly sending case ID to be processed by the agent.--> <!--This is the form for directly sending case ID to be processed by the agent.-->
<form action="{{ url_for('send_caseid') }}" id="selectcaseid" method="post" name="selectresult"> <form id="selectcaseid" method="post" name="selectresult">
<select name="selectresult" id="selectcaseid" method="get" action="{{ url_for('case_id') }} form="selectcaseid" > <select name="selectresult" id="selectcaseid" method="get" form="selectcaseid" >
{% for id in selection %} {% for id in selection %}
<!--case dropdown menu--> <!--case dropdown menu-->
<option value= "{{id}}"> {{id}} </option> <option value= "{{id}}"> {{id}} </option>
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
Preview it before optimizing! Preview it before optimizing!
<!--The preview functionality. The dropdown menu is separate to avoid mixing the http requests between both button because I have skill issue and am incapable of coding this cleanly.--> <!--The preview functionality. The dropdown menu is separate to avoid mixing the http requests between both button because I have skill issue and am incapable of coding this cleanly.-->
<form action="{{ url_for('case_id') }}" id="previewCase" method="get" name="previewCase"> <form id="previewCase" method="get" name="previewCase">
<select name="selectpreview" id="selectcaseid" method="get" action="{{ url_for('case_id') }} form="selectcaseid"> <select name="selectpreview" id="selectcaseid" method="get" form="selectcaseid">
{% for id in selection %} {% for id in selection %}
<!--Dropdown selection--> <!--Dropdown selection-->
<option value= "{{id}}"> {{id}} </option> <option value= "{{id}}"> {{id}} </option>
...@@ -45,4 +45,9 @@ ...@@ -45,4 +45,9 @@
</div> </div>
</form> </form>
</div> </div>
{%endblock%} {%endblock%}\
\ No newline at end of file
<!--
action="{{ url_for('case_id') }}"
action="{{ url_for('send_caseid') }}"
-->
\ No newline at end of file
...@@ -13,10 +13,13 @@ ...@@ -13,10 +13,13 @@
<h1>Here are the results of the optimization!</h1> <h1>Here are the results of the optimization!</h1>
<h2>We recommend you to do the following activity for this specific case:</h2> <h2>We recommend you to do the following activity for this specific case:</h2>
<!--res is the result--> <!--res is the result-->
<h3>Placeholder result: {{ res }}</h3>
<!-- currently a placeholder image to display result--> <!-- currently a placeholder image to display result-->
<img src="{{url_for('static',filename='moyai.jpg')}}" alt="Placeholder"> <br> <img src="/static/net.png" alt="Placeholder"> <br>
<!--button to go back to home page--> <!--button to go back to home page-->
<button onclick="window.location.href='/'" class="button"> Optimize your next case NOW!</button> <button onclick="window.location.href='/'" class="button"> Optimize your next case NOW!</button>
</div> </div>
{%endblock%} {%endblock%}
<!--
{{url_for('export',filename='net.png')}}
-->
\ No newline at end of file
Source diff could not be displayed: it is too large. Options to address this: view the blob.
...@@ -32,7 +32,7 @@ def train(space, activities): ...@@ -32,7 +32,7 @@ def train(space, activities):
def deploy(state): def deploy(state):
model = DQN.load(r"models\1687531146\1250000.zip") model = DQN.load(r"..\models\1687176631\2000000")
action, _ = model.predict(state, deterministic=True) action, _ = model.predict(state, deterministic=True)
return action return action
......
...@@ -69,7 +69,7 @@ def export_to_xes(process, file_path): ...@@ -69,7 +69,7 @@ def export_to_xes(process, file_path):
def convert_to_dataframe(name): def convert_to_dataframe(name):
file_path = r"Frontend/upload/" + name file_path = r"upload/" + name
# print(path) # print(path)
file_extension = os.path.splitext(file_path)[1].lower() file_extension = os.path.splitext(file_path)[1].lower()
......
...@@ -6,7 +6,7 @@ import eventlog ...@@ -6,7 +6,7 @@ import eventlog
from collections import OrderedDict from collections import OrderedDict
def generate_petri_net(): def generate_petri_net():
dataframe = pd.read_csv(r'Frontend\export\eventlog.csv', sep=',') dataframe = pd.read_csv(r'export\eventlog.csv', sep=',')
dataframe['StartTimestamp'] = pd.to_datetime(dataframe['StartTimestamp']) dataframe['StartTimestamp'] = pd.to_datetime(dataframe['StartTimestamp'])
# Sort the event log by case ID and start timestamp # Sort the event log by case ID and start timestamp
dataframe.sort_values(by=['CaseID', 'StartTimestamp'], inplace=True) dataframe.sort_values(by=['CaseID', 'StartTimestamp'], inplace=True)
...@@ -24,7 +24,48 @@ def generate_petri_net(): ...@@ -24,7 +24,48 @@ def generate_petri_net():
return net, initial_marking, final_marking return net, initial_marking, final_marking
def decorate_petri_net(case, rec, name): def decorate_petri_net(case, name):
activity_mapping = {
1: 'place order',
2: 'arrange standard order',
3: 'arrange custom order',
4: 'pick from stock A',
5: 'pick from stock B',
6: 'pick from stock C',
7: 'manufacture A',
8: 'manufacture B',
9: 'pack A',
10: 'pack B',
11: 'pack C',
12: 'attempt delivery A',
13: 'attempt delivery B',
14: 'attempt delivery C',
15: 'order completed',
}
net, initial_marking, final_marking = generate_petri_net()
state = eventlog.get_state(case, name)
events = state['case']
event_names = []
for i in range(len(events)):
if events[i] == 1:
event_names.append(activity_mapping[i+1])
decoration = {}
for t in net.transitions:
print(str(t.label))
if str(t.label) in event_names:
decoration.update({t: {}})
decoration[t].update({"color":"blue"})
decoration[t].update({"label":t.label})
pm4py.view_petri_net(net, initial_marking, final_marking, decorations = decoration)
pm4py.save_vis_petri_net(net, initial_marking, final_marking, decorations = decoration, file_path = r"static\preview_net.png")
def decorate_petri_net_with_rec(case, rec, name):
activity_mapping = { activity_mapping = {
1: 'place order', 1: 'place order',
2: 'arrange standard order', 2: 'arrange standard order',
...@@ -67,8 +108,8 @@ def decorate_petri_net(case, rec, name): ...@@ -67,8 +108,8 @@ def decorate_petri_net(case, rec, name):
decoration[t].update({"label":t.label}) decoration[t].update({"label":t.label})
pm4py.view_petri_net(net, initial_marking, final_marking, decorations = decoration) # pm4py.view_petri_net(net, initial_marking, final_marking, decorations = decoration)
pm4py.save_vis_petri_net(net, initial_marking, final_marking, r"Frontend\export\net.png") pm4py.save_vis_petri_net(net, initial_marking, final_marking, decorations = decoration, file_path = r"static\net.png")
# decorate_petri_net(646, 7, "eventlog.csv") # decorate_petri_net(646, 7, "eventlog.csv")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment