mg-pso-gui 0.2.124__py3-none-any.whl → 0.2.126__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.2.124.dist-info → mg_pso_gui-0.2.126.dist-info}/METADATA +1 -1
- {mg_pso_gui-0.2.124.dist-info → mg_pso_gui-0.2.126.dist-info}/RECORD +10 -8
- mgpsogui/gui/HomePage.py +33 -4
- mgpsogui/gui/SetupTab/ListParametersView.py +1 -1
- mgpsogui/util/recosu/pso/pso modified.py +585 -0
- mgpsogui/util/recosu/pso/pso.py +48 -292
- mgpsogui/util/recosu/pso/pso_new.py +627 -0
- {mg_pso_gui-0.2.124.dist-info → mg_pso_gui-0.2.126.dist-info}/WHEEL +0 -0
- {mg_pso_gui-0.2.124.dist-info → mg_pso_gui-0.2.126.dist-info}/entry_points.txt +0 -0
- {mg_pso_gui-0.2.124.dist-info → mg_pso_gui-0.2.126.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=fTGAuCUBWaydSe0t7HO95snJ1B6j2xa5GJcEJSLymBA,25974
|
5
5
|
mgpsogui/gui/OptionManager.py,sha256=t0aXOeBo48qQ-P8OykpP2v_3KJoaJtUPSkYtacjloCc,22844
|
6
6
|
mgpsogui/gui/OptionManager_backup.py,sha256=TCWfPnHL2foN5id47jsi267lamRG6yGU6y_M29eOOJk,18530
|
7
7
|
mgpsogui/gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -19,7 +19,7 @@ mgpsogui/gui/SetupTab/CustomFunctionEditorWindow.py,sha256=lZ9a20YucwhCDiUN3eGA6
|
|
19
19
|
mgpsogui/gui/SetupTab/CustomFunctionMetrics.py,sha256=vOJpElbTgz043m6JYwe9xz_2MBHg985S6KdbJkJERW4,5923
|
20
20
|
mgpsogui/gui/SetupTab/FunctionsList.py,sha256=wmYmppyB5y8QADe3X_FQ5mAYVDC0HAPQgqtkegNwmLA,7007
|
21
21
|
mgpsogui/gui/SetupTab/ListEditor.py,sha256=nin7Pl8z7d_yfKoAxM-yVS34uhj-LnprJ2mNRSB7Z0A,3197
|
22
|
-
mgpsogui/gui/SetupTab/ListParametersView.py,sha256=
|
22
|
+
mgpsogui/gui/SetupTab/ListParametersView.py,sha256=CdK7OVdccwk0_OLgrwwNFTHuV2hMvETsocQIKndZoV4,7459
|
23
23
|
mgpsogui/gui/SetupTab/OverrideParameterMetrics.py,sha256=rBfaSitYDOajbHvyi2TfoXAHYlz1cCt028UVpIJ_Dc0,3369
|
24
24
|
mgpsogui/gui/SetupTab/OverrideParameterWindow.py,sha256=1UJHel0BH4sYa5WQnuSaFd3cdpRwAIwOpFIbhDS30IY,1824
|
25
25
|
mgpsogui/gui/SetupTab/SamplingListView.py,sha256=DhZBAhDcrqZn1XioCs1gTe_v-8W10C0UfPm0fLAbeXM,5260
|
@@ -58,7 +58,9 @@ mgpsogui/util/CTkToolTip/ctk_tooltip.py,sha256=SZMovpQIGvdpDRbqCKl9SHs92DrFCO2MO
|
|
58
58
|
mgpsogui/util/recosu/__init__.py,sha256=pPR0lB6clIi6q73H1W8eT5u0dd3bIemwa9-XFmOaVVk,279
|
59
59
|
mgpsogui/util/recosu/pso/__init__.py,sha256=PQ548aEKVOk6MMzxxDg7yMO_1hHfoEoYLLkGLeij73Y,247
|
60
60
|
mgpsogui/util/recosu/pso/csip_access.py,sha256=_oA71d6CSwhKSa3pgywIW7mXRJtgJTNu1X2DiBkQkuA,4152
|
61
|
-
mgpsogui/util/recosu/pso/pso.py,sha256=
|
61
|
+
mgpsogui/util/recosu/pso/pso modified.py,sha256=sFY1csASu5Os5SSheWWdpVcjpPwJeBqZKsv89DLXdxk,21648
|
62
|
+
mgpsogui/util/recosu/pso/pso.py,sha256=iPqT6aI1vi8LYuWmtxuHkLEM9sQwhUznPInBgps7ANI,13708
|
63
|
+
mgpsogui/util/recosu/pso/pso_new.py,sha256=qUwpp6gjhCTXA6twKGAda84HIeQebKGB6MJ4K9GfcdM,23181
|
62
64
|
mgpsogui/util/recosu/sampling/__init__.py,sha256=dWs1MPx0o2UFmOmUfFaomQWBTIZAwALsVJzZQNZePZU,252
|
63
65
|
mgpsogui/util/recosu/sampling/sample_trace_writer.py,sha256=M9w-POLlZgjL5a7J7yxr73OG6mCsS2aUuP9d3HKfkbA,1966
|
64
66
|
mgpsogui/util/recosu/sampling/sampler_task.py,sha256=uZobpR83u6xEaUzIknvW9FbB84c2AL7T-5T8O8QIhzY,2776
|
@@ -73,8 +75,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
|
|
73
75
|
mgpsogui/util/recosu/utils/utils.py,sha256=6MIoJb0nhIa4tNv7qhBfZi-AtL3L95CgJf6eAf12NQs,4140
|
74
76
|
mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
|
75
77
|
mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
|
76
|
-
mg_pso_gui-0.2.
|
77
|
-
mg_pso_gui-0.2.
|
78
|
-
mg_pso_gui-0.2.
|
79
|
-
mg_pso_gui-0.2.
|
80
|
-
mg_pso_gui-0.2.
|
78
|
+
mg_pso_gui-0.2.126.dist-info/METADATA,sha256=WoBCQFVK_l0TIamnui7_FpcDK8hr6Tc0-a5kYKXAQV0,9542
|
79
|
+
mg_pso_gui-0.2.126.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
80
|
+
mg_pso_gui-0.2.126.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
|
81
|
+
mg_pso_gui-0.2.126.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
|
82
|
+
mg_pso_gui-0.2.126.dist-info/RECORD,,
|
mgpsogui/gui/HomePage.py
CHANGED
@@ -113,6 +113,8 @@ class App(customtkinter.CTk):
|
|
113
113
|
self.calibration_data = None
|
114
114
|
self.testing = False
|
115
115
|
|
116
|
+
self.running_loop_ticks = 1
|
117
|
+
|
116
118
|
# Configure window
|
117
119
|
version = "v0.2.120"
|
118
120
|
self.title("COSU Manager (" + version + ")")
|
@@ -143,7 +145,7 @@ class App(customtkinter.CTk):
|
|
143
145
|
self.sidebar_frame.grid_columnconfigure(4, weight=1)
|
144
146
|
self.logo_label = customtkinter.CTkLabel(self.sidebar_frame, text="COSU Manager (" + version + ")", font=customtkinter.CTkFont(size=20, weight="bold"))
|
145
147
|
self.logo_label.grid(row=0, column=0, padx=(20, 10), pady=header_padding_y)
|
146
|
-
self.save_button = customtkinter.CTkButton(self.sidebar_frame, text="Save", width=60, command=self.save_project)
|
148
|
+
self.save_button = customtkinter.CTkButton(self.sidebar_frame, text="Save As", width=60, command=self.save_project)
|
147
149
|
self.save_button.grid(row=0, column=1, padx=header_padding_x, pady=header_padding_y)
|
148
150
|
self.load_button = customtkinter.CTkButton(self.sidebar_frame, text="Load", width=60, command=self.load_project)
|
149
151
|
self.load_button.grid(row=0, column=2, padx=header_padding_x, pady=header_padding_y)
|
@@ -241,7 +243,8 @@ class App(customtkinter.CTk):
|
|
241
243
|
GraphGenerator.generate_graphs(self)
|
242
244
|
|
243
245
|
def save_project(self):
|
244
|
-
|
246
|
+
name = self.option_manager.get_project_data()['name']
|
247
|
+
filename = asksaveasfilename(filetypes=[("JSON", "*.json")], initialfile=name, defaultextension="json", title="Save Project")
|
245
248
|
|
246
249
|
try:
|
247
250
|
self.option_manager.set_path(filename)
|
@@ -255,11 +258,32 @@ class App(customtkinter.CTk):
|
|
255
258
|
os.makedirs(os.path.join(folder, "results"))
|
256
259
|
|
257
260
|
self.save_button.configure(text="Saved!")
|
258
|
-
self.after(3000, lambda: self.save_button.configure(text="Save"))
|
261
|
+
self.after(3000, lambda: self.save_button.configure(text="Save As"))
|
259
262
|
except Exception as e:
|
260
263
|
self.save_button.configure(text="Error!")
|
261
264
|
print(e)
|
262
|
-
self.after(3000, lambda: self.save_button.configure(text="Save"))
|
265
|
+
self.after(3000, lambda: self.save_button.configure(text="Save As"))
|
266
|
+
|
267
|
+
def auto_save_project(self):
|
268
|
+
data = self.option_manager.get_project_data()
|
269
|
+
|
270
|
+
if (data['path'] != "/tmp"):
|
271
|
+
filename = os.path.join(data['path'], data['name'] + ".json")
|
272
|
+
|
273
|
+
try:
|
274
|
+
self.option_manager.set_path(filename)
|
275
|
+
self.option_manager.save_project(filename)
|
276
|
+
|
277
|
+
folder = self.option_manager.get_project_folder()
|
278
|
+
if not os.path.exists(folder):
|
279
|
+
os.makedirs(folder)
|
280
|
+
|
281
|
+
if not os.path.exists(os.path.join(folder, "results")):
|
282
|
+
os.makedirs(os.path.join(folder, "results"))
|
283
|
+
|
284
|
+
except Exception as e:
|
285
|
+
self.save_button.configure(text="Error!")
|
286
|
+
print(e)
|
263
287
|
|
264
288
|
def refresh_step_view(self, value):
|
265
289
|
mode = self.option_manager.get_mode()
|
@@ -419,6 +443,8 @@ class App(customtkinter.CTk):
|
|
419
443
|
NW(title="Error", message="A process is already running!", x = 400, y = 200)
|
420
444
|
return 0
|
421
445
|
|
446
|
+
self.auto_save_project()
|
447
|
+
|
422
448
|
data = self.option_manager.get_all_data()
|
423
449
|
mode = self.option_manager.get_mode()
|
424
450
|
data = data[mode]
|
@@ -528,8 +554,11 @@ class App(customtkinter.CTk):
|
|
528
554
|
active_tab = self.tabview.get()
|
529
555
|
if (active_tab == "Results"):
|
530
556
|
GraphGenerator.generate_graphs(self)
|
557
|
+
if (self.running_loop_ticks % 10 == 0):
|
558
|
+
self.auto_save_project()
|
531
559
|
finally:
|
532
560
|
self.after(1000, self.running_loop)
|
561
|
+
self.running_loop_ticks += 1
|
533
562
|
|
534
563
|
def watch_loop(self):
|
535
564
|
print("Watch loop running...")
|
@@ -138,7 +138,7 @@ class ListParametersView(CTkScrollableFrame):
|
|
138
138
|
row += 1
|
139
139
|
|
140
140
|
CTkButton(self.containerFrame, text="Open", command=self.open_csv).grid(row=row, column=0, padx=(5, 5), pady=(5, 5), sticky="ew")
|
141
|
-
CTkButton(self.containerFrame, text="
|
141
|
+
CTkButton(self.containerFrame, text="Paste", command=self.import_csv).grid(row=row, column=1, padx=(5, 5), pady=(5, 5), sticky="ew")
|
142
142
|
row += 1
|
143
143
|
|
144
144
|
|