mg-pso-gui 0.1.57__py3-none-any.whl → 0.1.59__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mg-pso-gui
3
- Version: 0.1.57
3
+ Version: 0.1.59
4
4
  Summary: GUI for MG-PSO
5
5
  Author: Robert Cordingly
6
6
  Author-email: <rcording@uw.ed>
@@ -2,7 +2,7 @@ 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
4
  mgpsogui/gui/HomePage.py,sha256=JF4bSw84lfUgjGT3jLY2WcJHix4NccL6vIgEqNENxkY,23403
5
- mgpsogui/gui/OptionManager.py,sha256=bFN2jWJbx1Din3waOFLmbWGt0BXD_KthGJ8Mgue_FEE,11712
5
+ mgpsogui/gui/OptionManager.py,sha256=u-mXq4ouGJ-oBa71u5GffHwSXHg3Xs32P8RtSgcTmUE,12332
6
6
  mgpsogui/gui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  mgpsogui/gui/PlatformTab/PlatformTab.py,sha256=KyIoHlMKD9nfQqHeGJwRDA4RCoe4UykjB2l6xMTKK_M,10486
8
8
  mgpsogui/gui/PlatformTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -13,7 +13,8 @@ mgpsogui/gui/SetupTab/BoundsList.py,sha256=L77UEaUJNiUE-ZsYIl44tWRb1zBfxaEQ-bAG1
13
13
  mgpsogui/gui/SetupTab/CalibrationParametersView.py,sha256=ppVBHG3nphku9-P6Z8az-HTpgk8vHxnj-A5m80BZTgA,2784
14
14
  mgpsogui/gui/SetupTab/FunctionsList.py,sha256=tUqW43VWpxFpdo9UHaPvFQ0CtCo9mFI3mri52ikntrE,4092
15
15
  mgpsogui/gui/SetupTab/ListParametersView.py,sha256=wYcDcaooYkw-y7XW6dJUwhTWxLuUUOK5tGUFVHBf3ck,7352
16
- mgpsogui/gui/SetupTab/SetupTab.py,sha256=Doy_6xLq1BjhLTFHRQm7CAbpQzUnNJW4KkBcdfrxWoE,1881
16
+ mgpsogui/gui/SetupTab/OptimalParameterView.py,sha256=wHW4qOe93v4NaLdtSfFLw6HnQ6YhPzrCz6wdYQ02e7w,1520
17
+ mgpsogui/gui/SetupTab/SetupTab.py,sha256=t4iXUoO5ZwdDf3j9rsKtOTgbYXhTTHLWQ3kyF8Jy_IM,2443
17
18
  mgpsogui/gui/SetupTab/StaticParameterView.py,sha256=iEG-UpBBlAJabZo3MG768oLqOROjUPc23tKOSd47IUc,2739
18
19
  mgpsogui/gui/SetupTab/StepView.py,sha256=oG5Q-3xpTRP1f_PbNvohKctrbpD63zLAJzHD00bN44k,5531
19
20
  mgpsogui/gui/SetupTab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -45,8 +46,8 @@ mgpsogui/util/recosu/utils/trace_writer.py,sha256=V9BJlOjCbNYGoXGEk3CF5wjifBxvar
45
46
  mgpsogui/util/recosu/utils/utils.py,sha256=QB8vftq3142ekG0ORjz0ZBHU5YknXbR0oTsrxrPAsF0,3951
46
47
  mgpsogui/util/recosu/utils/plot/__init__.py,sha256=h1KjM7_tNDv351pcwt8A6Ibb1jhwWyx5Gbu-zj-sI3Q,71
47
48
  mgpsogui/util/recosu/utils/plot/cost_steps.py,sha256=1Ce11AJyweWkmvjXPxEygzS-h8yVLmQEDLS53yjPLqQ,3779
48
- mg_pso_gui-0.1.57.dist-info/METADATA,sha256=Gpz6vlzpYBV0yVkgof4VzFNBl4MnHAxJwT8LXhfLMYM,9458
49
- mg_pso_gui-0.1.57.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
50
- mg_pso_gui-0.1.57.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
51
- mg_pso_gui-0.1.57.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
52
- mg_pso_gui-0.1.57.dist-info/RECORD,,
49
+ mg_pso_gui-0.1.59.dist-info/METADATA,sha256=EmedeEcNO8_AD_os4hhffDVDLty0jIl1o4ZDvAxxjW8,9458
50
+ mg_pso_gui-0.1.59.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
51
+ mg_pso_gui-0.1.59.dist-info/entry_points.txt,sha256=jg82VOFjR1XDGrchs1wJSCqKYE4Ozv12aBcCSp--koA,117
52
+ mg_pso_gui-0.1.59.dist-info/top_level.txt,sha256=y7JuS9xJN5YdxUsQ3PSVjN8MzQAnR146bP3ZN3PYWdE,9
53
+ mg_pso_gui-0.1.59.dist-info/RECORD,,
@@ -65,6 +65,7 @@ class OptionManager():
65
65
  "name": sv(),
66
66
  "bounds": (sv(), sv()),
67
67
  "default_value": sv(),
68
+ "optimal_value": sv(),
68
69
  "type": sv(),
69
70
  "calibration_strategy": sv()
70
71
  }
@@ -75,18 +76,27 @@ class OptionManager():
75
76
  else:
76
77
  param_obj["bounds"][0].set(0)
77
78
  param_obj["bounds"][1].set(1)
79
+
78
80
  if "type" in param:
79
81
  param_obj["type"].set(param["type"])
80
82
  else:
81
83
  param_obj["type"].set("float")
84
+
82
85
  if "default_value" in param:
83
86
  param_obj["default_value"].set(param["default_value"])
84
87
  else:
85
88
  param_obj["default_value"].set(1)
89
+
90
+ if "optimal_value" in param:
91
+ param_obj["optimal_value"].set(param["optimal_value"])
92
+ else:
93
+ param_obj["optimal_value"].set(0)
94
+
86
95
  if "calibration_strategy" in param:
87
96
  param_obj["calibration_strategy"].set(param["calibration_strategy"])
88
97
  else:
89
98
  param_obj["calibration_strategy"].set("none")
99
+
90
100
  obj["param"].append(param_obj)
91
101
 
92
102
  for objfunc in step["objfunc"]:
@@ -135,17 +145,20 @@ class OptionManager():
135
145
  max=1,
136
146
  type="float",
137
147
  default_value=1,
148
+ optimal_value=0,
138
149
  calibration_strategy="none"):
139
150
  obj = {
140
151
  "name": sv(),
141
152
  "bounds": (sv(), sv()),
142
153
  "default_value": sv(),
154
+ "optimal_value": sv(),
143
155
  "type": sv(),
144
156
  "calibration_strategy": sv()
145
157
  }
146
158
  obj["name"].set(name)
147
159
  obj["type"].set(type)
148
160
  obj["default_value"].set(default_value)
161
+ obj["optimal_value"].set(optimal_value)
149
162
  obj["calibration_strategy"].set(calibration_strategy)
150
163
  obj["bounds"][0].set(min)
151
164
  obj["bounds"][1].set(max)
@@ -257,6 +270,7 @@ class OptionManager():
257
270
  'bounds': (float(param['bounds'][0].get()),
258
271
  float(param['bounds'][1].get())),
259
272
  'default_value': float(param['default_value'].get()),
273
+ 'optimal_value': float(param['optimal_value'].get()),
260
274
  'type': 'float',
261
275
  'calibration_strategy': param['calibration_strategy'].get()
262
276
  }
@@ -268,6 +282,7 @@ class OptionManager():
268
282
  'bounds': (float(param['bounds'][0].get()),
269
283
  float(param['bounds'][1].get())),
270
284
  'default_value': param['default_value'].get(),
285
+ 'optimal_value': param['optimal_value'].get(),
271
286
  'type': 'list',
272
287
  'calibration_strategy': param['calibration_strategy'].get()
273
288
  }
@@ -0,0 +1,43 @@
1
+ from customtkinter import CTkScrollableFrame
2
+ from customtkinter import CTkFrame
3
+ from customtkinter import CTkLabel
4
+ from customtkinter import CTkButton
5
+ from customtkinter import CTkEntry
6
+ import tkinter as tk
7
+
8
+ global option_manager
9
+
10
+ class OptimalParameterView(CTkScrollableFrame):
11
+ def __init__(self, *args,
12
+ option_manager: None,
13
+ **kwargs):
14
+ super().__init__(*args, **kwargs)
15
+
16
+ self.option_manager = option_manager
17
+
18
+ self.render()
19
+
20
+ def clear(self):
21
+ self.containerFrame.destroy()
22
+
23
+ def render(self):
24
+ row = 0
25
+
26
+ self.containerFrame = CTkFrame(self)
27
+ self.containerFrame.grid(row=0, column=0, padx=(5, 5), pady=(5, 5), sticky="nsew")
28
+ self.containerFrame.grid_columnconfigure((0, 1), weight=1)
29
+
30
+ self.steps = self.option_manager.get_steps()
31
+
32
+ for step in self.steps:
33
+ name = step['name'].get()
34
+ CTkLabel(self.containerFrame, text=name).grid(row=row, column=0, columnspan=1, padx=5, pady=5, sticky="")
35
+ row += 1
36
+
37
+ for param in step['param']:
38
+ CTkEntry(self.containerFrame, textvariable=param['name']).grid(row=row, column=0, padx=(5, 5), pady=(5, 5), sticky="ew")
39
+
40
+ bb = CTkEntry(self.containerFrame)
41
+ bb.grid(row=row, column=1, padx=(5, 5), pady=(5, 5), sticky="ew")
42
+ bb.configure(textvariable=param['optimal_value'])
43
+ row += 1
@@ -3,6 +3,7 @@
3
3
  from . import StepView as sv
4
4
  from . import StaticParameterView as spv
5
5
  from . import CalibrationParametersView as cpv
6
+ from . import OptimalParameterView as opv
6
7
 
7
8
  import customtkinter
8
9
 
@@ -15,10 +16,12 @@ def create_tab(self, tab):
15
16
  self.paramtabview = customtkinter.CTkTabview(tab, bg_color="transparent", fg_color="transparent")
16
17
  self.paramtabview.grid(row=0, column=1, padx=(0, 0), pady=(10, 10), sticky="nsew")
17
18
 
18
- tab1 = "Static Parameters"
19
- tab2 = "Calibration Parameters"
19
+ tab1 = "Static"
20
+ tab2 = "Calibration"
21
+ tab3 = "Optimal Parameters"
20
22
  self.paramtabview.add(tab1)
21
23
  self.paramtabview.add(tab2)
24
+ self.paramtabview.add(tab3)
22
25
 
23
26
  self.paramtabview.tab(tab1).grid_columnconfigure(0, weight=1)
24
27
  self.paramtabview.tab(tab1).grid_rowconfigure(0, weight=1)
@@ -26,12 +29,20 @@ def create_tab(self, tab):
26
29
  self.paramtabview.tab(tab2).grid_columnconfigure(0, weight=1)
27
30
  self.paramtabview.tab(tab2).grid_rowconfigure(0, weight=1)
28
31
 
32
+ self.paramtabview.tab(tab3).grid_columnconfigure(0, weight=1)
33
+ self.paramtabview.tab(tab3).grid_rowconfigure(0, weight=1)
34
+
29
35
  self.static_param_frame = spv.StaticParameterView(self.paramtabview.tab(tab1), option_manager=self.option_manager)
30
36
  self.static_param_frame.grid(row=0, column=0, padx=(10, 10), pady=(10, 0), sticky="nsew")
31
37
  self.static_param_frame.grid_columnconfigure(0, weight=1)
32
38
  self.static_param_frame.grid_rowconfigure(0, weight=1)
33
39
 
34
- self.calib_param_frame = cpv.CalibrationParametersView(self.paramtabview.tab(tab2), option_manager=self.option_manager)
40
+ self.optimal_param_frame = cpv.CalibrationParametersView(self.paramtabview.tab(tab2), option_manager=self.option_manager)
41
+ self.optimal_param_frame.grid(row=0, column=0, padx=(10, 10), pady=(10, 0), sticky="nsew")
42
+ self.optimal_param_frame.grid_columnconfigure(0, weight=1)
43
+ self.optimal_param_frame.grid_rowconfigure(0, weight=1)
44
+
45
+ self.calib_param_frame = opv.OptimalParameterView(self.paramtabview.tab(tab3), option_manager=self.option_manager)
35
46
  self.calib_param_frame.grid(row=0, column=0, padx=(10, 10), pady=(10, 0), sticky="nsew")
36
47
  self.calib_param_frame.grid_columnconfigure(0, weight=1)
37
48
  self.calib_param_frame.grid_rowconfigure(0, weight=1)