mg-pso-gui 0.1.203__py3-none-any.whl → 0.1.205__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.203.dist-info → mg_pso_gui-0.1.205.dist-info}/METADATA +1 -1
- {mg_pso_gui-0.1.203.dist-info → mg_pso_gui-0.1.205.dist-info}/RECORD +9 -9
- mgpsogui/gui/HomePage.py +3 -0
- mgpsogui/gui/VisualizeTab/VisualizeTab.py +12 -2
- mgpsogui/util/GraphGenerator.py +105 -52
- mgpsogui/util/PSORunner.py +23 -2
- {mg_pso_gui-0.1.203.dist-info → mg_pso_gui-0.1.205.dist-info}/WHEEL +0 -0
- {mg_pso_gui-0.1.203.dist-info → mg_pso_gui-0.1.205.dist-info}/entry_points.txt +0 -0
- {mg_pso_gui-0.1.203.dist-info → mg_pso_gui-0.1.205.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=L2Vj2B6BzdXvoi6CkLWgxvtrzRMPJlF2sfbB8VpCVyc,22925
|
5
5
|
mgpsogui/gui/OptionManager.py,sha256=dtWY5jzNAaL6t3q7SLHiwoKQOYrAsMGE5UqwYdmPzF4,14829
|
6
6
|
mgpsogui/gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
7
|
mgpsogui/gui/PlatformTab/PlatformTab.py,sha256=q8x_tvVgSoyGINuQbivXRThF3gaSSfg8X_dsLSPv4F0,10492
|
@@ -21,7 +21,7 @@ mgpsogui/gui/SetupTab/StepView.py,sha256=C6DDinU9AgaUM1EOAHetFI4bE89ANJ247F0doks
|
|
21
21
|
mgpsogui/gui/SetupTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
22
|
mgpsogui/gui/VisualizeTab/MatrixEditor.py,sha256=JPQmfljdddIwHtTKpFqUdk7hRzVdX-IKl4neOk3DsjM,3132
|
23
23
|
mgpsogui/gui/VisualizeTab/SideBar.py,sha256=MtZfDScNFN0fQ8DyPm6bZGJSrFRgT14fZeUq-qc61O8,21936
|
24
|
-
mgpsogui/gui/VisualizeTab/VisualizeTab.py,sha256=
|
24
|
+
mgpsogui/gui/VisualizeTab/VisualizeTab.py,sha256=gLDuI6rS21rYZ9v-77qffmtTp3NS9DdohrMQgo_JZvY,3953
|
25
25
|
mgpsogui/gui/VisualizeTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
26
26
|
mgpsogui/gui/images/IGOW 4 Logo.png,sha256=JixNXz5gOEj898VF-_PHthAlGU-6W-y9ucb4EVNPtjs,433752
|
27
27
|
mgpsogui/gui/images/collapse.png,sha256=yicb16LaY7Nl5q9V8HHlht-Fbg5xU-l4_LJ_Arfmu1c,2989
|
@@ -34,8 +34,8 @@ mgpsogui/gui/images/stop.png,sha256=JPuxXQerCGpLikcp7cAj3iLCOjULMYYZ2sZe0lArh68,
|
|
34
34
|
mgpsogui/gui/images/test.png,sha256=MUnVpRK-isxhEHzx4Q6Yh0M6FRZD1qvgCHH2XmiSBbk,3642
|
35
35
|
mgpsogui/gui/images/trash.png,sha256=j8cf0kWbJd-4Jp20lUVV1o1NSeQ4v1Ej4gfcIA3DVRQ,2958
|
36
36
|
mgpsogui/gui/images/up.png,sha256=AQvFWCUqSQNaQ1E6LKZ9zNfSvW6t4mgy8uswdg9T2Hg,2457
|
37
|
-
mgpsogui/util/GraphGenerator.py,sha256=
|
38
|
-
mgpsogui/util/PSORunner.py,sha256=
|
37
|
+
mgpsogui/util/GraphGenerator.py,sha256=lIVhG2G8T8vEws8RJD6kU9c2qaIaZpEBwjrwxEjp7KM,24375
|
38
|
+
mgpsogui/util/PSORunner.py,sha256=ELpRgEpUiLV4hW-A-y4yzfkFN1BXgH7LZ0qlwWBRz3s,11012
|
39
39
|
mgpsogui/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
40
40
|
mgpsogui/util/debug.py,sha256=Swzny9_1S-CCONWGssj9iDoSpbwu5Vr4f95g_9L8bec,19759
|
41
41
|
mgpsogui/util/helpers.py,sha256=Ht2rge_4pGO7halz6KoLsL2eukB0k2tlkx68lBBmBA8,2669
|
@@ -60,8 +60,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
|
|
60
60
|
mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
|
61
61
|
mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
|
62
62
|
mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
|
63
|
-
mg_pso_gui-0.1.
|
64
|
-
mg_pso_gui-0.1.
|
65
|
-
mg_pso_gui-0.1.
|
66
|
-
mg_pso_gui-0.1.
|
67
|
-
mg_pso_gui-0.1.
|
63
|
+
mg_pso_gui-0.1.205.dist-info/METADATA,sha256=tqGJn1XWRwA32FSi-8GhC-mG4cjWl-EXc799-LgE2E4,9456
|
64
|
+
mg_pso_gui-0.1.205.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
|
65
|
+
mg_pso_gui-0.1.205.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
|
66
|
+
mg_pso_gui-0.1.205.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
|
67
|
+
mg_pso_gui-0.1.205.dist-info/RECORD,,
|
mgpsogui/gui/HomePage.py
CHANGED
@@ -66,6 +66,9 @@ class App(customtkinter.CTk):
|
|
66
66
|
self.graph_selector_value = tk.StringVar()
|
67
67
|
self.graph_selector_value.set("Best Cost Stacked")
|
68
68
|
|
69
|
+
self.graph_theme_value = tk.StringVar()
|
70
|
+
self.graph_theme_value.set("Dark")
|
71
|
+
|
69
72
|
self.selected_csv = tk.StringVar()
|
70
73
|
self.selected_csv.set("No files found...")
|
71
74
|
self.open_file = "None"
|
@@ -25,6 +25,9 @@ def create_tab(self, tab):
|
|
25
25
|
subprocess.Popen(["open", file_path])
|
26
26
|
else:
|
27
27
|
subprocess.Popen(["xdg-open", file_path])
|
28
|
+
|
29
|
+
def export_graph():
|
30
|
+
pass
|
28
31
|
|
29
32
|
def _resize_image(event):
|
30
33
|
self.graph_label.update_idletasks()
|
@@ -66,10 +69,17 @@ def create_tab(self, tab):
|
|
66
69
|
|
67
70
|
# Create SideBar
|
68
71
|
self.vis_sidebar = SideBar.SideBar(self.graph_sidebar, option_manager=self.option_manager, home_page=self, fg_color="transparent")
|
69
|
-
self.vis_sidebar.grid(row=1, column=0, rowspan=
|
72
|
+
self.vis_sidebar.grid(row=1, column=0, rowspan=6, padx=(0, 0), pady=(0, 0), sticky="nsew")
|
70
73
|
|
74
|
+
|
75
|
+
self.graph_theme = customtkinter.CTkOptionMenu(self.graph_sidebar, values=["Dark", "Light", "Publication"], variable=self.graph_theme_value, command=self.update_graph)
|
76
|
+
self.graph_theme.grid(row=7, column=0, padx=(20, 20), pady=(20, 20), sticky="nsew")
|
77
|
+
|
78
|
+
self.graph_export = customtkinter.CTkButton(self.graph_sidebar, text="Export", command=export_graph)
|
79
|
+
self.graph_export.grid(row=8, column=0, padx=(20, 20), pady=(20, 20), sticky="nsew")
|
80
|
+
|
71
81
|
# Add a button to call open_graph_in_browser
|
72
|
-
self.graph_button = customtkinter.CTkButton(self.graph_sidebar, text="
|
82
|
+
self.graph_button = customtkinter.CTkButton(self.graph_sidebar, text="Preview", command=open_graph_in_browser)
|
73
83
|
self.graph_button.grid(row=9, column=0, padx=(20, 20), pady=(20, 20), sticky="nsew")
|
74
84
|
|
75
85
|
self.graph_image_obj = Image.open(os.path.join("./images", "refresh_hd.png"))
|
mgpsogui/util/GraphGenerator.py
CHANGED
@@ -8,7 +8,44 @@ from PIL import Image, ImageTk
|
|
8
8
|
import customtkinter
|
9
9
|
import traceback
|
10
10
|
|
11
|
+
theme_background_color = {
|
12
|
+
"Dark": 'rgba(42, 42, 42, 0)',
|
13
|
+
"Light": 'rgba(255, 255, 255, 0)',
|
14
|
+
"Publication": 'rgba(255, 255, 255, 0)'
|
15
|
+
}
|
16
|
+
|
17
|
+
theme_background_color_html = {
|
18
|
+
"Dark": '#2a2a2a',
|
19
|
+
"Light": '#ffffff',
|
20
|
+
"Publication": '#ffffff'
|
21
|
+
}
|
22
|
+
|
23
|
+
theme_plot_color = {
|
24
|
+
"Dark": 'rgb(62, 62, 62)',
|
25
|
+
"Light": 'rgb(242, 242, 242)',
|
26
|
+
"Publication": 'rgb(242, 242, 242)'
|
27
|
+
}
|
28
|
+
|
29
|
+
theme_grid_color = {
|
30
|
+
"Dark": 'rgb(72, 72, 72)',
|
31
|
+
"Light": 'rgb(242, 242, 242)',
|
32
|
+
"Publication": 'rgb(242, 242, 242)'
|
33
|
+
}
|
34
|
+
|
35
|
+
theme_line_color = {
|
36
|
+
"Dark": 'rgb(102, 102, 102)',
|
37
|
+
"Light": 'rgb(102, 102, 102)',
|
38
|
+
"Publication": 'rgb(102, 102, 102)'
|
39
|
+
}
|
40
|
+
|
41
|
+
theme_font_color = {
|
42
|
+
"Dark": 'white',
|
43
|
+
"Light": 'black',
|
44
|
+
"Publication": 'black'
|
45
|
+
}
|
46
|
+
|
11
47
|
def generate_graphs(HomePage):
|
48
|
+
|
12
49
|
try:
|
13
50
|
selected_graph = HomePage.graph_selector_value.get()
|
14
51
|
info = HomePage.option_manager.get_project_data()
|
@@ -18,16 +55,16 @@ def generate_graphs(HomePage):
|
|
18
55
|
|
19
56
|
if (selected_graph == "Best Cost Stacked"):
|
20
57
|
HomePage.selected_graph_name = "best_cost_stacked"
|
21
|
-
best_cost_stacked(HomePage.running_config['steps'], HomePage.progress_data, HomePage.option_manager)
|
58
|
+
best_cost_stacked(HomePage, HomePage.running_config['steps'], HomePage.progress_data, HomePage.option_manager)
|
22
59
|
elif (selected_graph == "Best Cost by Round"):
|
23
60
|
HomePage.selected_graph_name = "best_cost_by_round"
|
24
|
-
best_cost_by_round(HomePage.running_config['steps'], HomePage.progress_data, HomePage.option_manager)
|
61
|
+
best_cost_by_round(HomePage, HomePage.running_config['steps'], HomePage.progress_data, HomePage.option_manager)
|
25
62
|
elif (selected_graph == "Iteration Table"):
|
26
63
|
HomePage.selected_graph_name = "table"
|
27
|
-
table(HomePage.running_config['steps'], HomePage.progress_data, HomePage.option_manager)
|
64
|
+
table(HomePage, HomePage.running_config['steps'], HomePage.progress_data, HomePage.option_manager)
|
28
65
|
elif (selected_graph == "Calibrated Parameters"):
|
29
66
|
HomePage.selected_graph_name = "calibrated_params_by_round"
|
30
|
-
calibrated_params_by_round(HomePage.running_config['steps'], HomePage.calibration_data, HomePage.option_manager)
|
67
|
+
calibrated_params_by_round(HomePage, HomePage.running_config['steps'], HomePage.calibration_data, HomePage.option_manager)
|
31
68
|
elif (selected_graph == "Custom CSV"):
|
32
69
|
HomePage.selected_graph_name = "custom_csv"
|
33
70
|
custom_csv(HomePage, HomePage.option_manager)
|
@@ -56,7 +93,9 @@ def generate_graphs(HomePage):
|
|
56
93
|
print("Traceback:")
|
57
94
|
traceback.print_exc()
|
58
95
|
|
59
|
-
def best_cost_stacked(config, data, option_manager):
|
96
|
+
def best_cost_stacked(homepage, config, data, option_manager):
|
97
|
+
theme = homepage.graph_theme_value.get()
|
98
|
+
|
60
99
|
fig = go.Figure()
|
61
100
|
|
62
101
|
total_steps = len(config)
|
@@ -69,17 +108,17 @@ def best_cost_stacked(config, data, option_manager):
|
|
69
108
|
title="",
|
70
109
|
xaxis_title="Progress (% through Group)",
|
71
110
|
yaxis_title="Best Cost",
|
72
|
-
font=dict(color=
|
73
|
-
paper_bgcolor=
|
74
|
-
plot_bgcolor=
|
111
|
+
font=dict(color=theme_font_color[theme]),
|
112
|
+
paper_bgcolor=theme_background_color[theme],
|
113
|
+
plot_bgcolor=theme_plot_color[theme],
|
75
114
|
xaxis=dict(
|
76
|
-
gridcolor=
|
115
|
+
gridcolor=theme_grid_color[theme],
|
77
116
|
gridwidth=1
|
78
117
|
),
|
79
118
|
yaxis=dict(
|
80
119
|
range=[0, 0.6],
|
81
120
|
autorange=True,
|
82
|
-
gridcolor=
|
121
|
+
gridcolor=theme_grid_color[theme],
|
83
122
|
gridwidth=0.1
|
84
123
|
)
|
85
124
|
)
|
@@ -101,7 +140,9 @@ def best_cost_stacked(config, data, option_manager):
|
|
101
140
|
|
102
141
|
return fig
|
103
142
|
|
104
|
-
def table(config, dataframe, option_manager):
|
143
|
+
def table(homepage, config, dataframe, option_manager):
|
144
|
+
theme = homepage.graph_theme_value.get()
|
145
|
+
|
105
146
|
# Create a plotly table with the values in the dataframe
|
106
147
|
fig = go.Figure(data=[go.Table(
|
107
148
|
header=dict(
|
@@ -119,17 +160,17 @@ def table(config, dataframe, option_manager):
|
|
119
160
|
title="",
|
120
161
|
xaxis_title="Iteration",
|
121
162
|
yaxis_title="Best Cost",
|
122
|
-
font=dict(color=
|
123
|
-
paper_bgcolor=
|
124
|
-
plot_bgcolor=
|
163
|
+
font=dict(color=theme_font_color[theme]),
|
164
|
+
paper_bgcolor=theme_background_color[theme],
|
165
|
+
plot_bgcolor=theme_plot_color[theme],
|
125
166
|
xaxis=dict(
|
126
|
-
gridcolor=
|
167
|
+
gridcolor=theme_grid_color[theme],
|
127
168
|
gridwidth=1
|
128
169
|
),
|
129
170
|
yaxis=dict(
|
130
171
|
range=[0, 0.6],
|
131
172
|
autorange=True,
|
132
|
-
gridcolor=
|
173
|
+
gridcolor=theme_grid_color[theme],
|
133
174
|
gridwidth=0.1
|
134
175
|
)
|
135
176
|
)
|
@@ -150,7 +191,9 @@ def table(config, dataframe, option_manager):
|
|
150
191
|
|
151
192
|
return fig
|
152
193
|
|
153
|
-
def best_cost_by_round(config, data, option_manager):
|
194
|
+
def best_cost_by_round(homepage, config, data, option_manager):
|
195
|
+
theme = homepage.graph_theme_value.get()
|
196
|
+
|
154
197
|
fig = go.Figure()
|
155
198
|
|
156
199
|
total_steps = len(config)
|
@@ -181,7 +224,7 @@ def best_cost_by_round(config, data, option_manager):
|
|
181
224
|
y1=1,
|
182
225
|
yref='paper',
|
183
226
|
line=dict(
|
184
|
-
color=
|
227
|
+
color=theme_line_color[theme],
|
185
228
|
width=2
|
186
229
|
)
|
187
230
|
)
|
@@ -199,17 +242,17 @@ def best_cost_by_round(config, data, option_manager):
|
|
199
242
|
title="",
|
200
243
|
xaxis_title="Progress (%)",
|
201
244
|
yaxis_title="Best Cost",
|
202
|
-
font=dict(color=
|
203
|
-
paper_bgcolor=
|
204
|
-
plot_bgcolor=
|
245
|
+
font=dict(color=theme_font_color[theme]),
|
246
|
+
paper_bgcolor=theme_background_color[theme],
|
247
|
+
plot_bgcolor=theme_plot_color[theme],
|
205
248
|
xaxis=dict(
|
206
|
-
gridcolor=
|
249
|
+
gridcolor=theme_grid_color[theme],
|
207
250
|
gridwidth=1
|
208
251
|
),
|
209
252
|
yaxis=dict(
|
210
253
|
range=[0, 0.6],
|
211
254
|
autorange=True,
|
212
|
-
gridcolor=
|
255
|
+
gridcolor=theme_grid_color[theme],
|
213
256
|
gridwidth=0.1
|
214
257
|
)
|
215
258
|
)
|
@@ -230,7 +273,9 @@ def best_cost_by_round(config, data, option_manager):
|
|
230
273
|
|
231
274
|
return fig
|
232
275
|
|
233
|
-
def calibrated_params_by_round(config, list_of_objs, option_manager):
|
276
|
+
def calibrated_params_by_round(homepage, config, list_of_objs, option_manager):
|
277
|
+
theme = homepage.graph_theme_value.get()
|
278
|
+
|
234
279
|
fig = go.Figure()
|
235
280
|
|
236
281
|
total_steps = len(config)
|
@@ -264,15 +309,15 @@ def calibrated_params_by_round(config, list_of_objs, option_manager):
|
|
264
309
|
title="",
|
265
310
|
xaxis_title="Round",
|
266
311
|
yaxis_title="Particle Parameters",
|
267
|
-
font=dict(color=
|
268
|
-
paper_bgcolor=
|
269
|
-
plot_bgcolor=
|
312
|
+
font=dict(color=theme_font_color[theme]),
|
313
|
+
paper_bgcolor=theme_background_color[theme],
|
314
|
+
plot_bgcolor=theme_plot_color[theme],
|
270
315
|
xaxis=dict(
|
271
|
-
gridcolor=
|
316
|
+
gridcolor=theme_grid_color[theme],
|
272
317
|
gridwidth=1
|
273
318
|
),
|
274
319
|
yaxis=dict(
|
275
|
-
gridcolor=
|
320
|
+
gridcolor=theme_grid_color[theme],
|
276
321
|
gridwidth=0.1
|
277
322
|
)
|
278
323
|
)
|
@@ -294,6 +339,8 @@ def calibrated_params_by_round(config, list_of_objs, option_manager):
|
|
294
339
|
return fig
|
295
340
|
|
296
341
|
def custom_csv(homepage, option_manager):
|
342
|
+
theme = homepage.graph_theme_value.get()
|
343
|
+
|
297
344
|
fig = go.Figure()
|
298
345
|
|
299
346
|
data = homepage.csv_data["data"]
|
@@ -329,17 +376,17 @@ def custom_csv(homepage, option_manager):
|
|
329
376
|
title="",
|
330
377
|
xaxis_title=x,
|
331
378
|
yaxis_title=val,
|
332
|
-
font=dict(color=
|
333
|
-
paper_bgcolor=
|
334
|
-
plot_bgcolor=
|
379
|
+
font=dict(color=theme_font_color[theme]),
|
380
|
+
paper_bgcolor=theme_background_color[theme],
|
381
|
+
plot_bgcolor=theme_plot_color[theme],
|
335
382
|
xaxis=dict(
|
336
|
-
gridcolor=
|
383
|
+
gridcolor=theme_grid_color[theme],
|
337
384
|
gridwidth=1
|
338
385
|
),
|
339
386
|
yaxis=dict(
|
340
387
|
title=val + " (" + str(yy_unit) + ")",
|
341
388
|
autorange=True,
|
342
|
-
gridcolor=
|
389
|
+
gridcolor=theme_grid_color[theme],
|
343
390
|
gridwidth=0.1
|
344
391
|
),
|
345
392
|
yaxis2=dict(
|
@@ -366,6 +413,8 @@ def custom_csv(homepage, option_manager):
|
|
366
413
|
return fig
|
367
414
|
|
368
415
|
def compare_csv(homepage, option_manager):
|
416
|
+
theme = homepage.graph_theme_value.get()
|
417
|
+
|
369
418
|
fig = go.Figure()
|
370
419
|
|
371
420
|
data = homepage.csv_data["data"]
|
@@ -410,17 +459,17 @@ def compare_csv(homepage, option_manager):
|
|
410
459
|
title="",
|
411
460
|
xaxis_title=x,
|
412
461
|
yaxis_title=val,
|
413
|
-
font=dict(color=
|
414
|
-
paper_bgcolor=
|
415
|
-
plot_bgcolor=
|
462
|
+
font=dict(color=theme_font_color[theme]),
|
463
|
+
paper_bgcolor=theme_background_color[theme],
|
464
|
+
plot_bgcolor=theme_plot_color[theme],
|
416
465
|
xaxis=dict(
|
417
|
-
gridcolor=
|
466
|
+
gridcolor=theme_grid_color[theme],
|
418
467
|
gridwidth=1
|
419
468
|
),
|
420
469
|
yaxis=dict(
|
421
470
|
title=val + " (" + str(yy_unit) + ")",
|
422
471
|
autorange=True,
|
423
|
-
gridcolor=
|
472
|
+
gridcolor=theme_grid_color[theme],
|
424
473
|
gridwidth=0.1
|
425
474
|
),
|
426
475
|
yaxis2=dict(
|
@@ -447,6 +496,8 @@ def compare_csv(homepage, option_manager):
|
|
447
496
|
return fig
|
448
497
|
|
449
498
|
def sampling_csv(homepage, option_manager):
|
499
|
+
theme = homepage.graph_theme_value.get()
|
500
|
+
|
450
501
|
fig = go.Figure()
|
451
502
|
|
452
503
|
style = homepage.figure_style.get()
|
@@ -493,17 +544,17 @@ def sampling_csv(homepage, option_manager):
|
|
493
544
|
title="",
|
494
545
|
xaxis_title=x,
|
495
546
|
yaxis_title=val,
|
496
|
-
font=dict(color=
|
497
|
-
paper_bgcolor=
|
498
|
-
plot_bgcolor=
|
547
|
+
font=dict(color=theme_font_color[theme]),
|
548
|
+
paper_bgcolor=theme_background_color[theme],
|
549
|
+
plot_bgcolor=theme_plot_color[theme],
|
499
550
|
xaxis=dict(
|
500
|
-
gridcolor=
|
551
|
+
gridcolor=theme_grid_color[theme],
|
501
552
|
gridwidth=1
|
502
553
|
),
|
503
554
|
yaxis=dict(
|
504
555
|
title=val,
|
505
556
|
autorange=True,
|
506
|
-
gridcolor=
|
557
|
+
gridcolor=theme_grid_color[theme],
|
507
558
|
gridwidth=0.1
|
508
559
|
),
|
509
560
|
yaxis2=dict(
|
@@ -530,6 +581,8 @@ def sampling_csv(homepage, option_manager):
|
|
530
581
|
return fig
|
531
582
|
|
532
583
|
def matrix_editor(homepage, option_manager):
|
584
|
+
theme = homepage.graph_theme_value.get()
|
585
|
+
|
533
586
|
style = homepage.figure_style.get()
|
534
587
|
data = homepage.csv_data
|
535
588
|
x = homepage.csv_x_selector.get()
|
@@ -600,17 +653,17 @@ def matrix_editor(homepage, option_manager):
|
|
600
653
|
title="",
|
601
654
|
xaxis_title=x,
|
602
655
|
yaxis_title=val,
|
603
|
-
font=dict(color=
|
604
|
-
paper_bgcolor=
|
605
|
-
plot_bgcolor=
|
656
|
+
font=dict(color=theme_font_color[theme]),
|
657
|
+
paper_bgcolor=theme_background_color[theme],
|
658
|
+
plot_bgcolor=theme_plot_color[theme],
|
606
659
|
xaxis=dict(
|
607
|
-
gridcolor=
|
660
|
+
gridcolor=theme_grid_color[theme],
|
608
661
|
gridwidth=1
|
609
662
|
),
|
610
663
|
yaxis=dict(
|
611
664
|
title=val,
|
612
665
|
autorange=True,
|
613
|
-
gridcolor=
|
666
|
+
gridcolor=theme_grid_color[theme],
|
614
667
|
gridwidth=0.1
|
615
668
|
)
|
616
669
|
)
|
@@ -650,9 +703,9 @@ def matrix_editor(homepage, option_manager):
|
|
650
703
|
fig = fig_combined
|
651
704
|
fig.update_layout(
|
652
705
|
title="",
|
653
|
-
font=dict(color=
|
654
|
-
paper_bgcolor=
|
655
|
-
plot_bgcolor=
|
706
|
+
font=dict(color=theme_font_color[theme]),
|
707
|
+
paper_bgcolor=theme_background_color[theme],
|
708
|
+
plot_bgcolor=theme_plot_color[theme]
|
656
709
|
)
|
657
710
|
|
658
711
|
if not os.path.exists(folder):
|
mgpsogui/util/PSORunner.py
CHANGED
@@ -124,6 +124,7 @@ def run_process(stdout_queue, stderr_queue, results_queue, data, folder):
|
|
124
124
|
offset=int(calibration_map['offset']))
|
125
125
|
results_queue.put(trace)
|
126
126
|
print(trace, flush=True)
|
127
|
+
print("\n", flush=True)
|
127
128
|
|
128
129
|
elif my_mode == "Sampling: Random":
|
129
130
|
print("Running Random Sampling...\n", flush=True)
|
@@ -136,7 +137,12 @@ def run_process(stdout_queue, stderr_queue, results_queue, data, folder):
|
|
136
137
|
trace_file=os.path.join(folder, 'results', 'random_trace.csv'))
|
137
138
|
results_queue.put(trace)
|
138
139
|
print(trace, flush=True)
|
140
|
+
print("\n", flush=True)
|
141
|
+
|
139
142
|
elif my_mode == "Sensitivity: Halton":
|
143
|
+
|
144
|
+
print("Running Halton Sensitivity Analysis", flush=True)
|
145
|
+
|
140
146
|
shutil.copyfile(os.path.join(folder, 'results', 'halton_trace.csv'), os.path.join(folder, 'results', 'trace.csv'))
|
141
147
|
trace_path = os.path.join(folder, 'results', 'trace.csv')
|
142
148
|
|
@@ -173,8 +179,17 @@ def run_process(stdout_queue, stderr_queue, results_queue, data, folder):
|
|
173
179
|
|
174
180
|
request_path = os.path.join(folder, 'results', 'request.json')
|
175
181
|
|
176
|
-
|
182
|
+
output_directory = os.path.join(folder, 'results')
|
183
|
+
|
184
|
+
print("Starting ", args['url'], request_path, trace_path, output_directory, flush=True)
|
185
|
+
|
186
|
+
sensitivity_analysis(args['url'], request_path, trace_path, output_directory)
|
187
|
+
|
188
|
+
print("Finished Sensitivity Analysis", flush=True)
|
177
189
|
elif my_mode == "Sensitivity: Random":
|
190
|
+
|
191
|
+
print("Running Random Sensitivity Analysis", flush=True)
|
192
|
+
|
178
193
|
shutil.copyfile(os.path.join(folder, 'results', 'random_trace.csv'), os.path.join(folder, 'results', 'trace.csv'))
|
179
194
|
trace_path = os.path.join(folder, 'results', 'trace.csv')
|
180
195
|
|
@@ -211,7 +226,13 @@ def run_process(stdout_queue, stderr_queue, results_queue, data, folder):
|
|
211
226
|
|
212
227
|
request_path = os.path.join(folder, 'results', 'request.json')
|
213
228
|
|
214
|
-
|
229
|
+
output_directory = os.path.join(folder, 'results')
|
230
|
+
|
231
|
+
print("Starting ", args['url'], request_path, trace_path, output_directory, flush=True)
|
232
|
+
|
233
|
+
sensitivity_analysis(args['url'], request_path, trace_path, output_directory)
|
234
|
+
|
235
|
+
print("Finished Sensitivity Analysis", flush=True)
|
215
236
|
else:
|
216
237
|
print("Running MG-PSO Optimization...\n", flush=True)
|
217
238
|
optimizer, trace = global_best(steps,
|
File without changes
|
File without changes
|
File without changes
|