mg-pso-gui 0.1.22__py3-none-any.whl → 0.1.24__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mg_pso_gui-0.1.22.dist-info → mg_pso_gui-0.1.24.dist-info}/METADATA +1 -1
- {mg_pso_gui-0.1.22.dist-info → mg_pso_gui-0.1.24.dist-info}/RECORD +7 -7
- mgpsogui/gui/HomePage.py +6 -4
- mgpsogui/util/GraphGenerator.py +29 -23
- {mg_pso_gui-0.1.22.dist-info → mg_pso_gui-0.1.24.dist-info}/WHEEL +0 -0
- {mg_pso_gui-0.1.22.dist-info → mg_pso_gui-0.1.24.dist-info}/entry_points.txt +0 -0
- {mg_pso_gui-0.1.22.dist-info → mg_pso_gui-0.1.24.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
mgpsogui/__init__.py,sha256=q7AfBjeJABnFtbsZnsObpUwaXKPDVYtz46G6MKXLF74,42
|
|
2
2
|
mgpsogui/mgpsogui.py,sha256=NIZmyNcbwC8EgSwf1ubdMUSJscrIEgoD4jLYziqHQ-k,148
|
|
3
3
|
mgpsogui/start.yaml,sha256=ZjCVLb-MLqAxrGRm9kA7_SDpa-45EuKIELNQ2QqCAiU,4713
|
|
4
|
-
mgpsogui/gui/HomePage.py,sha256=
|
|
4
|
+
mgpsogui/gui/HomePage.py,sha256=oqvAucocKZ6deIh_QqhnGI5LYSC7U3K61FCsWnG7j9M,22577
|
|
5
5
|
mgpsogui/gui/OptionManager.py,sha256=bFN2jWJbx1Din3waOFLmbWGt0BXD_KthGJ8Mgue_FEE,11712
|
|
6
6
|
mgpsogui/gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
mgpsogui/gui/PlatformTab/PlatformTab.py,sha256=KyIoHlMKD9nfQqHeGJwRDA4RCoe4UykjB2l6xMTKK_M,10486
|
|
@@ -30,7 +30,7 @@ mgpsogui/gui/images/stop.png,sha256=JPuxXQerCGpLikcp7cAj3iLCOjULMYYZ2sZe0lArh68,
|
|
|
30
30
|
mgpsogui/gui/images/test.png,sha256=MUnVpRK-isxhEHzx4Q6Yh0M6FRZD1qvgCHH2XmiSBbk,3642
|
|
31
31
|
mgpsogui/gui/images/trash.png,sha256=j8cf0kWbJd-4Jp20lUVV1o1NSeQ4v1Ej4gfcIA3DVRQ,2958
|
|
32
32
|
mgpsogui/gui/images/up.png,sha256=AQvFWCUqSQNaQ1E6LKZ9zNfSvW6t4mgy8uswdg9T2Hg,2457
|
|
33
|
-
mgpsogui/util/GraphGenerator.py,sha256=
|
|
33
|
+
mgpsogui/util/GraphGenerator.py,sha256=pVEUEhg6xi7pSprWCX4kpCws26ioHh3j_8j1fjKCtqY,9683
|
|
34
34
|
mgpsogui/util/PSORunner.py,sha256=wfkrZLysgSS_5BrdFEm8U-0S7DHYpxmHPau_Ec5W8ak,4510
|
|
35
35
|
mgpsogui/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
36
|
mgpsogui/util/CTkToolTip/__init__.py,sha256=G1jxV55hGtGgwyC1sR-uUUdasDdh0XZgcI-aILgGYA0,225
|
|
@@ -44,8 +44,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
|
|
|
44
44
|
mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
|
|
45
45
|
mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
|
|
46
46
|
mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
|
|
47
|
-
mg_pso_gui-0.1.
|
|
48
|
-
mg_pso_gui-0.1.
|
|
49
|
-
mg_pso_gui-0.1.
|
|
50
|
-
mg_pso_gui-0.1.
|
|
51
|
-
mg_pso_gui-0.1.
|
|
47
|
+
mg_pso_gui-0.1.24.dist-info/METADATA,sha256=oeMT70ZFoXA0_owiIc5hDAFPiFr0ATB5ekYuUFNnBdo,9458
|
|
48
|
+
mg_pso_gui-0.1.24.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
|
|
49
|
+
mg_pso_gui-0.1.24.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
|
|
50
|
+
mg_pso_gui-0.1.24.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
|
|
51
|
+
mg_pso_gui-0.1.24.dist-info/RECORD,,
|
mgpsogui/gui/HomePage.py
CHANGED
|
@@ -177,6 +177,9 @@ class App(customtkinter.CTk):
|
|
|
177
177
|
|
|
178
178
|
self.after(1000, self.running_loop)
|
|
179
179
|
|
|
180
|
+
def update_graph(self):
|
|
181
|
+
GraphGenerator.generate_graphs(self)
|
|
182
|
+
|
|
180
183
|
'''def _resize_image(self, event):
|
|
181
184
|
self.graph_label.update_idletasks()
|
|
182
185
|
new_width = self.graph_label.winfo_width()
|
|
@@ -195,8 +198,9 @@ class App(customtkinter.CTk):
|
|
|
195
198
|
|
|
196
199
|
self.graph_image = customtkinter.CTkImage(self.graph_image_obj, size=(new_width, new_height))
|
|
197
200
|
self.graph_label.configure(image=self.graph_image)
|
|
198
|
-
self.graph_label.update_idletasks()
|
|
201
|
+
self.graph_label.update_idletasks()
|
|
199
202
|
|
|
203
|
+
|
|
200
204
|
def update_graph(self, value):
|
|
201
205
|
selected_graph = self.graph_selector_value.get()
|
|
202
206
|
info = self.option_manager.get_project_data()
|
|
@@ -219,7 +223,7 @@ class App(customtkinter.CTk):
|
|
|
219
223
|
image_path = os.path.join("./images", "up.png")
|
|
220
224
|
self.graph_image_obj = Image.open(image_path)
|
|
221
225
|
self.graph_image = customtkinter.CTkImage(self.graph_image_obj, size=(self.image_width * self.image_scale, self.image_height * self.image_scale))
|
|
222
|
-
self.graph_label.configure(image=self.graph_image)
|
|
226
|
+
self.graph_label.configure(image=self.graph_image)'''
|
|
223
227
|
|
|
224
228
|
def save_project(self):
|
|
225
229
|
metrics = self.option_manager.get_metrics()
|
|
@@ -439,8 +443,6 @@ class App(customtkinter.CTk):
|
|
|
439
443
|
active_tab = self.tabview.get()
|
|
440
444
|
if (active_tab == "Results"):
|
|
441
445
|
GraphGenerator.generate_graphs(self)
|
|
442
|
-
else:
|
|
443
|
-
print(active_tab)
|
|
444
446
|
finally:
|
|
445
447
|
self.after(1000, self.running_loop)
|
|
446
448
|
|
mgpsogui/util/GraphGenerator.py
CHANGED
|
@@ -4,33 +4,39 @@ import pandas as pd
|
|
|
4
4
|
import numpy as np
|
|
5
5
|
import os
|
|
6
6
|
from PIL import Image, ImageTk
|
|
7
|
+
import customtkinter
|
|
7
8
|
|
|
8
9
|
def generate_graphs(HomePage):
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
os.
|
|
10
|
+
try:
|
|
11
|
+
selected_graph = HomePage.graph_selector_value.get()
|
|
12
|
+
info = HomePage.option_manager.get_project_data()
|
|
13
|
+
folder = os.path.join(info['path'], info['name'])
|
|
14
|
+
if not os.path.exists(folder):
|
|
15
|
+
os.makedirs(folder)
|
|
16
|
+
|
|
17
|
+
if (selected_graph == "Best Cost Stacked"):
|
|
18
|
+
HomePage.selected_graph_name = "best_cost_stacked"
|
|
19
|
+
best_cost_stacked(HomePage.running_config['steps'], HomePage.progress_data, HomePage.option_manager)
|
|
20
|
+
elif (selected_graph == "Best Cost by Round"):
|
|
21
|
+
HomePage.selected_graph_name = "best_cost_by_round"
|
|
22
|
+
best_cost_by_round(HomePage.running_config['steps'], HomePage.progress_data, HomePage.option_manager)
|
|
23
|
+
elif (selected_graph == "Iteration Table"):
|
|
24
|
+
HomePage.selected_graph_name = "table"
|
|
25
|
+
table(HomePage.running_config['steps'], HomePage.progress_data, HomePage.option_manager)
|
|
26
|
+
elif (selected_graph == "Calibrated Parameters"):
|
|
27
|
+
HomePage.selected_graph_name = "calibrated_params_by_round"
|
|
28
|
+
calibrated_params_by_round(HomePage.running_config['steps'], HomePage.calibration_data, HomePage.option_manager)
|
|
29
|
+
|
|
30
|
+
image_path = os.path.join(folder, HomePage.selected_graph_name + ".png")
|
|
14
31
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
best_cost_stacked(HomePage.running_config['steps'], HomePage.progress_data, HomePage.option_manager)
|
|
18
|
-
elif (selected_graph == "Best Cost by Round"):
|
|
19
|
-
HomePage.selected_graph_name = "best_cost_by_round"
|
|
20
|
-
best_cost_by_round(HomePage.running_config['steps'], HomePage.progress_data, HomePage.option_manager)
|
|
21
|
-
elif (selected_graph == "Iteration Table"):
|
|
22
|
-
HomePage.selected_graph_name = "table"
|
|
23
|
-
table(HomePage.running_config['steps'], HomePage.progress_data, HomePage.option_manager)
|
|
24
|
-
elif (selected_graph == "Calibrated Parameters"):
|
|
25
|
-
HomePage.selected_graph_name = "calibrated_params_by_round"
|
|
26
|
-
calibrated_params_by_round(HomePage.running_config['steps'], HomePage.calibration_data, HomePage.option_manager)
|
|
32
|
+
if not os.path.exists(image_path):
|
|
33
|
+
image_path = os.path.join("./images", "up.png")
|
|
27
34
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
HomePage.graph_image_obj = Image.open(image_path)
|
|
35
|
+
HomePage.graph_image_obj = Image.open(image_path)
|
|
36
|
+
HomePage.graph_image = customtkinter.CTkImage(HomePage.graph_image_obj, size=(HomePage.image_width * HomePage.image_scale, HomePage.image_height * HomePage.image_scale))
|
|
37
|
+
HomePage.graph_label.configure(image=HomePage.graph_image)
|
|
38
|
+
except Exception as e:
|
|
39
|
+
pass
|
|
34
40
|
|
|
35
41
|
def best_cost_stacked(config, dataframe, option_manager):
|
|
36
42
|
fig = go.Figure()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|