mg-pso-gui 0.2.63__py3-none-any.whl → 0.2.65__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.63.dist-info → mg_pso_gui-0.2.65.dist-info}/METADATA +1 -1
- {mg_pso_gui-0.2.63.dist-info → mg_pso_gui-0.2.65.dist-info}/RECORD +8 -8
- mgpsogui/gui/SetupTab/BoundsList.py +46 -23
- mgpsogui/gui/SetupTab/StepView.py +1 -1
- mgpsogui/util/PSORunner.py +1 -2
- {mg_pso_gui-0.2.63.dist-info → mg_pso_gui-0.2.65.dist-info}/WHEEL +0 -0
- {mg_pso_gui-0.2.63.dist-info → mg_pso_gui-0.2.65.dist-info}/entry_points.txt +0 -0
- {mg_pso_gui-0.2.63.dist-info → mg_pso_gui-0.2.65.dist-info}/top_level.txt +0 -0
@@ -13,7 +13,7 @@ mgpsogui/gui/RunTab/OptimalParameterView.py,sha256=nliUEWA840cPBQt7wjiZ-L7uBOp_o
|
|
13
13
|
mgpsogui/gui/RunTab/RunTab.py,sha256=47_r8K-e7f8zs93_2iPYnNBzHDHZejtedk7iSElkubU,5608
|
14
14
|
mgpsogui/gui/RunTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
15
|
mgpsogui/gui/SetupTab/BoundsEditorWindow.py,sha256=U64oaiDIOaimjbqKMz5rQNq2o1SrQtrRHDdTYQ9ux1s,2870
|
16
|
-
mgpsogui/gui/SetupTab/BoundsList.py,sha256=
|
16
|
+
mgpsogui/gui/SetupTab/BoundsList.py,sha256=zJRndYY53HGwLCHG7SrLKJ2ywb7oI3tvgjL9HtezxCM,14029
|
17
17
|
mgpsogui/gui/SetupTab/CustomFunctionEditorWindow.py,sha256=yx0dHSNa7fGy99Q6qFcI6j9r8p0DlV3iOBgyPMGd8pM,2884
|
18
18
|
mgpsogui/gui/SetupTab/CustomFunctionMetrics.py,sha256=vOJpElbTgz043m6JYwe9xz_2MBHg985S6KdbJkJERW4,5923
|
19
19
|
mgpsogui/gui/SetupTab/FunctionsList.py,sha256=ntbIUs8q2Tm3KfBLleT7uL0gynwYuVycwvXv8vude3c,6611
|
@@ -22,7 +22,7 @@ mgpsogui/gui/SetupTab/ListParametersView.py,sha256=mkGaC5cXhEOy5oD0MbTyK9z7VGZp0
|
|
22
22
|
mgpsogui/gui/SetupTab/OverrideParameterMetrics.py,sha256=rBfaSitYDOajbHvyi2TfoXAHYlz1cCt028UVpIJ_Dc0,3369
|
23
23
|
mgpsogui/gui/SetupTab/OverrideParameterWindow.py,sha256=UpZDxTaFxee0BeviUYXeiIlMNYNy00qz3zlMlM5VcXE,1291
|
24
24
|
mgpsogui/gui/SetupTab/SetupTab.py,sha256=3V8LYvg5ulTll1hhguB_XpSoOR-w72vHh_Z3gw3nCxc,2758
|
25
|
-
mgpsogui/gui/SetupTab/StepView.py,sha256=
|
25
|
+
mgpsogui/gui/SetupTab/StepView.py,sha256=SfkEu8rOTtuqxPTOt19ECjSwgUA2h5S18HAJKCbjPjg,9011
|
26
26
|
mgpsogui/gui/SetupTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
27
27
|
mgpsogui/gui/VisualizeTab/MatrixEditor.py,sha256=Gzyl2hRgjIfO5n0bCZZoXp_vOFvfsJPaGXDUMeRQg10,3171
|
28
28
|
mgpsogui/gui/VisualizeTab/SideBar.py,sha256=wPjzA8ZZsCTxBKN0_6-_ABtU5BeHqytNAWfKCWAPoe8,22106
|
@@ -44,7 +44,7 @@ mgpsogui/gui/images/test.png,sha256=MUnVpRK-isxhEHzx4Q6Yh0M6FRZD1qvgCHH2XmiSBbk,
|
|
44
44
|
mgpsogui/gui/images/trash.png,sha256=j8cf0kWbJd-4Jp20lUVV1o1NSeQ4v1Ej4gfcIA3DVRQ,2958
|
45
45
|
mgpsogui/gui/images/up.png,sha256=AQvFWCUqSQNaQ1E6LKZ9zNfSvW6t4mgy8uswdg9T2Hg,2457
|
46
46
|
mgpsogui/util/GraphGenerator.py,sha256=dKzDPMK-0S6j1yIp5xoQIgN9GTKMhGpboAXjofCpmIk,31973
|
47
|
-
mgpsogui/util/PSORunner.py,sha256=
|
47
|
+
mgpsogui/util/PSORunner.py,sha256=tTe2sF9MRk48dpsNwSn_CbSSNq1laXWMxSZFh_v5FIQ,23115
|
48
48
|
mgpsogui/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
49
49
|
mgpsogui/util/debug.py,sha256=Swzny9_1S-CCONWGssj9iDoSpbwu5Vr4f95g_9L8bec,19759
|
50
50
|
mgpsogui/util/helpers.py,sha256=Ht2rge_4pGO7halz6KoLsL2eukB0k2tlkx68lBBmBA8,2669
|
@@ -69,8 +69,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
|
|
69
69
|
mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
|
70
70
|
mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
|
71
71
|
mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
|
72
|
-
mg_pso_gui-0.2.
|
73
|
-
mg_pso_gui-0.2.
|
74
|
-
mg_pso_gui-0.2.
|
75
|
-
mg_pso_gui-0.2.
|
76
|
-
mg_pso_gui-0.2.
|
72
|
+
mg_pso_gui-0.2.65.dist-info/METADATA,sha256=ZsB0hAO4dT_wsN7G0FE5-0FukQe_ZCUifvdn53aqW9o,9455
|
73
|
+
mg_pso_gui-0.2.65.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
74
|
+
mg_pso_gui-0.2.65.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
|
75
|
+
mg_pso_gui-0.2.65.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
|
76
|
+
mg_pso_gui-0.2.65.dist-info/RECORD,,
|
@@ -13,6 +13,7 @@ import json
|
|
13
13
|
import PIL
|
14
14
|
from PIL import Image
|
15
15
|
import os
|
16
|
+
import pandas as pd
|
16
17
|
|
17
18
|
class BoundsList(CTkFrame):
|
18
19
|
def __init__(self, *args,
|
@@ -21,20 +22,8 @@ class BoundsList(CTkFrame):
|
|
21
22
|
**kwargs):
|
22
23
|
super().__init__(*args, **kwargs)
|
23
24
|
|
24
|
-
self.optParams = []
|
25
25
|
self.option_manager = option_manager
|
26
26
|
|
27
|
-
details = self.option_manager.serialize_data(self.option_manager.get("service_request_data"))
|
28
|
-
self.paramMap = {}
|
29
|
-
if "parameter" in details:
|
30
|
-
for param in details["parameter"]:
|
31
|
-
self.paramMap[param["name"]] = param
|
32
|
-
if "min" in param:
|
33
|
-
self.optParams.append(param["name"])
|
34
|
-
|
35
|
-
self.optParams.sort()
|
36
|
-
|
37
|
-
|
38
27
|
self.edit_mode = False
|
39
28
|
self.tooltip_list = []
|
40
29
|
|
@@ -64,6 +53,32 @@ class BoundsList(CTkFrame):
|
|
64
53
|
self.tooltip_list = []
|
65
54
|
|
66
55
|
mode = self.option_manager.get_mode()
|
56
|
+
|
57
|
+
# Load bound parameters depending on the mode
|
58
|
+
self.optParams = []
|
59
|
+
if mode == "Optimization" or mode == "Sampling: Halton" or mode == "Sampling: Random":
|
60
|
+
details = self.option_manager.serialize_data(self.option_manager.get("service_request_data"))
|
61
|
+
self.paramMap = {}
|
62
|
+
if "parameter" in details:
|
63
|
+
for param in details["parameter"]:
|
64
|
+
self.paramMap[param["name"]] = param
|
65
|
+
if "min" in param:
|
66
|
+
self.optParams.append(param["name"])
|
67
|
+
|
68
|
+
self.optParams.sort()
|
69
|
+
elif mode == "Sensitivity Analysis":
|
70
|
+
file_path = self.option_manager.get("sensitivity_analysis_path").get()
|
71
|
+
folder = self.option_manager.get_project_folder()
|
72
|
+
file_path = os.path.join(folder, "results", file_path)
|
73
|
+
if os.path.exists(file_path):
|
74
|
+
try:
|
75
|
+
df = pd.read_csv(file_path)
|
76
|
+
self.optParams = df.columns.tolist()
|
77
|
+
except Exception as e:
|
78
|
+
print(f"Error loading CSV file: {e}")
|
79
|
+
else:
|
80
|
+
print(f"File does not exist: {file_path}")
|
81
|
+
|
67
82
|
|
68
83
|
self.containerFrame = CTkFrame(self, fg_color="transparent")
|
69
84
|
self.containerFrame.grid(row=0, column=0, padx=(5, 5), pady=(5, 5), sticky="nsew")
|
@@ -137,26 +152,34 @@ class BoundsList(CTkFrame):
|
|
137
152
|
self.validate_number(bounds_max.get(), cc, bounds_max)
|
138
153
|
tt2 = ctt(bounds_max, delay=0.1, alpha=0.95, message="...")
|
139
154
|
|
140
|
-
if mode == "Sampling: Random" or mode == "Sampling: Halton":
|
141
|
-
row += 1
|
142
|
-
index += 1
|
143
|
-
continue
|
144
|
-
|
145
|
-
default_value = CTkEntry(self.containerFrame)
|
146
|
-
default_value.grid(row=row, column=4, padx=(5, 5), pady=(5, 5), sticky="new")
|
147
|
-
default_value.configure(textvariable=bound["default_value"])
|
148
|
-
|
149
|
-
|
150
155
|
if (bound_type == "list"):
|
151
156
|
def button_click_event(bound_index):
|
152
157
|
BEW(title="Edit List Bound", step_index=self.step_index, bound_index=bound_index, option_manager=self.option_manager)
|
153
|
-
#print("Number:", dialog.get_input())
|
154
158
|
|
155
159
|
open_window = lambda event=None, bound_index=index: (button_click_event(bound_index))
|
156
160
|
expand_image = CTkImage(Image.open(os.path.join("./images", "expand.png")), size=(20, 20))
|
157
161
|
button = CTkButton(self.containerFrame, width=30, text=None, image=expand_image, command=open_window)
|
158
162
|
button.grid(row=row, column=6, padx=(5, 5), pady=(5, 5), sticky="new")
|
159
163
|
|
164
|
+
if mode == "Sampling: Random" or mode == "Sampling: Halton":
|
165
|
+
|
166
|
+
tt1 = ctt(bounds_min, delay=0.1, alpha=0.95, message="...")
|
167
|
+
tt2 = ctt(bounds_max, delay=0.1, alpha=0.95, message="...")
|
168
|
+
if cc is not None:
|
169
|
+
tt3 = ctt(cc, delay=0.1, alpha=0.95, message="...")
|
170
|
+
|
171
|
+
self.tooltip_list.append([tt3, tt1, tt2])
|
172
|
+
|
173
|
+
self.update_tooltips(index)
|
174
|
+
|
175
|
+
row += 1
|
176
|
+
index += 1
|
177
|
+
continue
|
178
|
+
|
179
|
+
default_value = CTkEntry(self.containerFrame)
|
180
|
+
default_value.grid(row=row, column=4, padx=(5, 5), pady=(5, 5), sticky="new")
|
181
|
+
default_value.configure(textvariable=bound["default_value"])
|
182
|
+
|
160
183
|
calibration_strat = CTkOptionMenu(self.containerFrame, dynamic_resizing=False, values=['none', 'mean', 'single'], variable=bound["calibration_strategy"])
|
161
184
|
calibration_strat.grid(row=row, column=5, padx=(5, 5), pady=(5, 5), sticky="new")
|
162
185
|
|
@@ -105,7 +105,7 @@ class StepView(CTkScrollableFrame):
|
|
105
105
|
self.logo_label = CTkLabel(self.file_selector_frame, text="Select File:")
|
106
106
|
self.logo_label.grid(row=0, column=0, padx=(10, 10), pady=header_padding_y)
|
107
107
|
|
108
|
-
self.file_selector = CTkOptionMenu(self.file_selector_frame, values=files, width=50, variable=self.option_manager.get("sensitivity_analysis_path"))
|
108
|
+
self.file_selector = CTkOptionMenu(self.file_selector_frame, values=files, width=50, variable=self.option_manager.get("sensitivity_analysis_path"), command=self.refresh)
|
109
109
|
self.file_selector.grid(row=0, column=1, padx=(10, 10), pady=header_padding_y)
|
110
110
|
|
111
111
|
row += 1
|
mgpsogui/util/PSORunner.py
CHANGED
@@ -237,8 +237,7 @@ def run_sampling(data, mode, folder, results_queue):
|
|
237
237
|
if os.path.exists(trace_file):
|
238
238
|
shutil.copyfile(trace_file, trace_file + ".bak")
|
239
239
|
|
240
|
-
|
241
|
-
config['step_trace'] = os.path.join(folder, 'pso_step_trace.json') # Do we need this?
|
240
|
+
#config['step_trace'] = os.path.join(folder, 'pso_step_trace.json') # Do we need this?
|
242
241
|
|
243
242
|
print("Parsing Parameters...\n", flush=True)
|
244
243
|
print("steps: ", flush=True)
|
File without changes
|
File without changes
|
File without changes
|