mg-pso-gui 0.1.110__tar.gz → 0.1.112__tar.gz
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.110 → mg-pso-gui-0.1.112}/PKG-INFO +1 -1
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mg_pso_gui.egg-info/PKG-INFO +1 -1
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/HomePage.py +3 -3
- mg-pso-gui-0.1.112/mgpsogui/util/debug.py +559 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/setup.py +1 -1
- mg-pso-gui-0.1.110/mgpsogui/util/debug.py +0 -126
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mg_pso_gui.egg-info/SOURCES.txt +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mg_pso_gui.egg-info/dependency_links.txt +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mg_pso_gui.egg-info/entry_points.txt +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mg_pso_gui.egg-info/requires.txt +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mg_pso_gui.egg-info/top_level.txt +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/__init__.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/OptionManager.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/PlatformTab/PlatformTab.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/PlatformTab/__init__.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/RunTab/RunTab.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/RunTab/__init__.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/SetupTab/BoundsEditorWindow.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/SetupTab/BoundsList.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/SetupTab/CalibrationParametersView.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/SetupTab/FunctionsList.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/SetupTab/ListParametersView.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/SetupTab/OptimalParameterView.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/SetupTab/SetupTab.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/SetupTab/StaticParameterView.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/SetupTab/StepView.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/SetupTab/__init__.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/VisualizeTab/SideBar.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/VisualizeTab/VisualizeTab.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/VisualizeTab/__init__.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/__init__.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/images/IGOW 4 Logo.png +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/images/collapse.png +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/images/down.png +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/images/expand.png +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/images/play.png +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/images/refresh.png +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/images/refresh_hd.png +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/images/stop.png +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/images/test.png +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/images/trash.png +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/images/up.png +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/mgpsogui.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/start.yaml +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/util/CTkToolTip/__init__.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/util/CTkToolTip/ctk_tooltip.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/util/GraphGenerator.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/util/PSORunner.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/util/__init__.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/util/recosu/__init__.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/util/recosu/pso/__init__.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/util/recosu/pso/csip_access.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/util/recosu/pso/pso.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/util/recosu/utils/__init__.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/util/recosu/utils/plot/__init__.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/util/recosu/utils/plot/cost_steps.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/util/recosu/utils/trace_writer.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/util/recosu/utils/utils.py +0 -0
- {mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/setup.cfg +0 -0
|
@@ -327,14 +327,14 @@ class App(customtkinter.CTk):
|
|
|
327
327
|
|
|
328
328
|
self.calib_param_frame.clear()
|
|
329
329
|
self.calib_param_frame.render()
|
|
330
|
-
|
|
330
|
+
|
|
331
331
|
self.optimal_param_frame.clear()
|
|
332
332
|
self.optimal_param_frame.render()
|
|
333
333
|
|
|
334
334
|
self.load_button.configure(text="Loaded!")
|
|
335
335
|
self.after(3000, lambda: self.load_button.configure(text="Load"))
|
|
336
|
-
|
|
337
|
-
|
|
336
|
+
|
|
337
|
+
self.load()
|
|
338
338
|
|
|
339
339
|
except Exception as e:
|
|
340
340
|
print(e)
|
|
@@ -0,0 +1,559 @@
|
|
|
1
|
+
from recosu.pso import global_best
|
|
2
|
+
|
|
3
|
+
# 1) COSU steps, definition of parameters to calibrate
|
|
4
|
+
steps = [
|
|
5
|
+
{ # step 1
|
|
6
|
+
"param": [
|
|
7
|
+
{"name": "soilOutLPS", "bounds": (0.0, 2.0)},
|
|
8
|
+
{"name": "lagInterflow", "bounds": (10.0, 80.0)},
|
|
9
|
+
],
|
|
10
|
+
"objfunc": [
|
|
11
|
+
{
|
|
12
|
+
"name": "ns", # Name (Must be unique)
|
|
13
|
+
"of": "ns", # Objective Function
|
|
14
|
+
"data": (
|
|
15
|
+
"obs_data02_14.csv/obs/orun[1]",
|
|
16
|
+
"output/csip_run/out/Outlet.csv/output/catchmentSimRunoff",
|
|
17
|
+
)
|
|
18
|
+
# Optional Weight parameter. If not specified it is 1 or evenly distributed between all objective functions
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
{ # step 2
|
|
23
|
+
"param": [
|
|
24
|
+
{"name": "flowRouteTA", "bounds": (0.4, 5.0)},
|
|
25
|
+
{"name": "soilMaxDPS", "bounds": (0.0, 5.0)},
|
|
26
|
+
],
|
|
27
|
+
"objfunc": [
|
|
28
|
+
{
|
|
29
|
+
"name": "ns",
|
|
30
|
+
"of": "ns",
|
|
31
|
+
"data": (
|
|
32
|
+
"obs_data02_14.csv/obs/orun[1]",
|
|
33
|
+
"output/csip_run/out/Outlet.csv/output/catchmentSimRunoff",
|
|
34
|
+
),
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
steps = [
|
|
41
|
+
{
|
|
42
|
+
"param": [
|
|
43
|
+
{
|
|
44
|
+
"name": "soilOutLPS",
|
|
45
|
+
"bounds": (0.0, 2.0),
|
|
46
|
+
"default_value": 1.0,
|
|
47
|
+
"optimal_value": 0.0,
|
|
48
|
+
"type": "float",
|
|
49
|
+
"calibration_strategy": "none",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "lagInterflow",
|
|
53
|
+
"bounds": (10.0, 80.0),
|
|
54
|
+
"default_value": 1.0,
|
|
55
|
+
"optimal_value": 0.0,
|
|
56
|
+
"type": "float",
|
|
57
|
+
"calibration_strategy": "none",
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
"objfunc": [
|
|
61
|
+
{
|
|
62
|
+
"name": "ns",
|
|
63
|
+
"of": "ns",
|
|
64
|
+
"weight": 1.0,
|
|
65
|
+
"data": (
|
|
66
|
+
"obs_data02_14.csv/obs/orun[1]",
|
|
67
|
+
"output/csip_run/out/Outlet.csv/output/catchmentSimRunoff",
|
|
68
|
+
),
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"param": [
|
|
74
|
+
{
|
|
75
|
+
"name": "flowRouteTA",
|
|
76
|
+
"bounds": (0.4, 5.0),
|
|
77
|
+
"default_value": 1.0,
|
|
78
|
+
"optimal_value": 0.0,
|
|
79
|
+
"type": "float",
|
|
80
|
+
"calibration_strategy": "none",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "soilMaxDPS",
|
|
84
|
+
"bounds": (0.0, 5.0),
|
|
85
|
+
"default_value": 1.0,
|
|
86
|
+
"optimal_value": 0.0,
|
|
87
|
+
"type": "float",
|
|
88
|
+
"calibration_strategy": "none",
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
"objfunc": [
|
|
92
|
+
{
|
|
93
|
+
"name": "ns",
|
|
94
|
+
"of": "ns",
|
|
95
|
+
"weight": 1.0,
|
|
96
|
+
"data": (
|
|
97
|
+
"obs_data02_14.csv/obs/orun[1]",
|
|
98
|
+
"output/csip_run/out/Outlet.csv/output/catchmentSimRunoff",
|
|
99
|
+
),
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
]
|
|
104
|
+
|
|
105
|
+
# 2) static ages parameters
|
|
106
|
+
args = {
|
|
107
|
+
"param": [
|
|
108
|
+
{"name": "startTime", "value": "2002-01-01"},
|
|
109
|
+
{"name": "endTime", "value": "2006-12-31"},
|
|
110
|
+
{"name": "dataStartTime", "value": "2002-01-01"},
|
|
111
|
+
{"name": "dataEndTime", "value": "2006-12-31"},
|
|
112
|
+
{"name": "cal_startTime", "value": "2003-01-01"},
|
|
113
|
+
{"name": "cal_endTime", "value": "2006-12-31"},
|
|
114
|
+
{"name": "parallelismThreads", "value": "2"},
|
|
115
|
+
{"name": "flagLoadState", "value": "True"},
|
|
116
|
+
{"name": "payload", "value": "false"},
|
|
117
|
+
{"name": "project", "value": "SFIR3"},
|
|
118
|
+
],
|
|
119
|
+
# the service url
|
|
120
|
+
"url": "http://csip.engr.colostate.edu:8087/csip-oms/m/ages/0.3.0",
|
|
121
|
+
# the files to attach for each run
|
|
122
|
+
"files": {},
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
args = {
|
|
126
|
+
"param": [
|
|
127
|
+
{"name": "startTime", "value": "2002-01-01"},
|
|
128
|
+
{"name": "endTime", "value": "2006-12-31"},
|
|
129
|
+
{"name": "dataStartTime", "value": "2002-01-01"},
|
|
130
|
+
{"name": "dataEndTime", "value": "2006-12-31"},
|
|
131
|
+
{"name": "cal_startTime", "value": "2003-01-01"},
|
|
132
|
+
{"name": "cal_endTime", "value": "2006-12-31"},
|
|
133
|
+
{"name": "parallelismThreads", "value": "2"},
|
|
134
|
+
{"name": "flagLoadState", "value": "True"},
|
|
135
|
+
{"name": "payload", "value": "false"},
|
|
136
|
+
{"name": "project", "value": "SFIR3"},
|
|
137
|
+
],
|
|
138
|
+
"url": "http://csip.engr.colostate.edu:8087/csip-oms/m/ages/0.3.0",
|
|
139
|
+
"mode": "PSO",
|
|
140
|
+
"files": {},
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if "mode" in args:
|
|
144
|
+
del args["mode"]
|
|
145
|
+
|
|
146
|
+
# 3. perform optimization
|
|
147
|
+
optimizer, trace = global_best(
|
|
148
|
+
steps, # step definition
|
|
149
|
+
rounds=(1, 2), # min/max number of rounds
|
|
150
|
+
args=args, # static arguments
|
|
151
|
+
n_particles=10, # number of particle candidates for each param
|
|
152
|
+
iters=20, # max # of iterations
|
|
153
|
+
n_threads=10, # number of threads to use
|
|
154
|
+
# ftol=0.00000001, # min cost function delta for convergence
|
|
155
|
+
options={"c1": 2, "c2": 2, "w": 0.8}, # hyperparameter
|
|
156
|
+
oh_strategy={
|
|
157
|
+
"w": "adaptive",
|
|
158
|
+
"c1": "adaptive",
|
|
159
|
+
"c2": "adaptive",
|
|
160
|
+
}, # adaptive hyperparameter adjustments based on current and max # of iterations
|
|
161
|
+
conf={
|
|
162
|
+
"service_timeout": 400.0,
|
|
163
|
+
"http_retry": 5,
|
|
164
|
+
"http_allow_redirects": True,
|
|
165
|
+
"async_call": False,
|
|
166
|
+
"http_conn_timeout": 10,
|
|
167
|
+
"http_read_timeout": 400,
|
|
168
|
+
"particles_fail": 5,
|
|
169
|
+
"step_trace": "./step_trace.json",
|
|
170
|
+
},
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
step_trace = {
|
|
174
|
+
"dir": "/Users/robertcordingly/Library/Python/3.8/lib/python/site-packages/mgpsogui/gui",
|
|
175
|
+
"start": "2024-05-28 14:25:53.793407",
|
|
176
|
+
"min_rounds": 1,
|
|
177
|
+
"max_rounds": 2,
|
|
178
|
+
"iters": 20,
|
|
179
|
+
"ftol": "-inf",
|
|
180
|
+
"ftol_iter": 1,
|
|
181
|
+
"rtol": 0.001,
|
|
182
|
+
"rtol_iter": 1,
|
|
183
|
+
"n_threads": 10,
|
|
184
|
+
"n_particles": 10,
|
|
185
|
+
"n_steps": 2,
|
|
186
|
+
"steps": [
|
|
187
|
+
{
|
|
188
|
+
"param": [
|
|
189
|
+
{
|
|
190
|
+
"name": "soilOutLPS",
|
|
191
|
+
"bounds": (0.0, 2.0),
|
|
192
|
+
"default_value": 1.0,
|
|
193
|
+
"optimal_value": 0.0,
|
|
194
|
+
"type": "float",
|
|
195
|
+
"calibration_strategy": "none",
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "lagInterflow",
|
|
199
|
+
"bounds": (10.0, 80.0),
|
|
200
|
+
"default_value": 1.0,
|
|
201
|
+
"optimal_value": 0.0,
|
|
202
|
+
"type": "float",
|
|
203
|
+
"calibration_strategy": "none",
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
"objfunc": [
|
|
207
|
+
{
|
|
208
|
+
"name": "ns",
|
|
209
|
+
"of": "ns",
|
|
210
|
+
"weight": 1.0,
|
|
211
|
+
"data": (
|
|
212
|
+
"obs_data02_14.csv/obs/orun[1]",
|
|
213
|
+
"output/csip_run/out/Outlet.csv/output/catchmentSimRunoff",
|
|
214
|
+
),
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"param": [
|
|
220
|
+
{
|
|
221
|
+
"name": "flowRouteTA",
|
|
222
|
+
"bounds": (0.4, 5.0),
|
|
223
|
+
"default_value": 1.0,
|
|
224
|
+
"optimal_value": 0.0,
|
|
225
|
+
"type": "float",
|
|
226
|
+
"calibration_strategy": "none",
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"name": "soilMaxDPS",
|
|
230
|
+
"bounds": (0.0, 5.0),
|
|
231
|
+
"default_value": 1.0,
|
|
232
|
+
"optimal_value": 0.0,
|
|
233
|
+
"type": "float",
|
|
234
|
+
"calibration_strategy": "none",
|
|
235
|
+
},
|
|
236
|
+
],
|
|
237
|
+
"objfunc": [
|
|
238
|
+
{
|
|
239
|
+
"name": "ns",
|
|
240
|
+
"of": "ns",
|
|
241
|
+
"weight": 1.0,
|
|
242
|
+
"data": (
|
|
243
|
+
"obs_data02_14.csv/obs/orun[1]",
|
|
244
|
+
"output/csip_run/out/Outlet.csv/output/catchmentSimRunoff",
|
|
245
|
+
),
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
"args": "{'param': [{'name': 'startTime', 'value': '2002-01-01'}, {'name': 'endTime', 'value': '2006-12-31'}, {'name': 'dataStartTime', 'value': '2002-01-01'}, {'name': 'dataEndTime', 'value': '2006-12-31'}, {'name': 'cal_startTime', 'value': '2003-01-01'}, {'name': 'cal_endTime', 'value': '2006-12-31'}, {'name': 'parallelismThreads', 'value': '2'}, {'name': 'flagLoadState', 'value': 'True'}, {'name': 'payload', 'value': 'false'}, {'name': 'project', 'value': 'SFIR3'}], 'url': 'http://csip.engr.colostate.edu:8087/csip-oms/m/ages/0.3.0', 'files': {}}",
|
|
251
|
+
"r1s1": {
|
|
252
|
+
"time": "2024-05-28 14:28:27.648143",
|
|
253
|
+
"best_costs": [0.4962544759194877, "inf"],
|
|
254
|
+
"steps": [
|
|
255
|
+
{
|
|
256
|
+
"param": [
|
|
257
|
+
{
|
|
258
|
+
"name": "soilOutLPS",
|
|
259
|
+
"bounds": (0.0, 2.0),
|
|
260
|
+
"default_value": 1.0,
|
|
261
|
+
"optimal_value": 0.0,
|
|
262
|
+
"type": "float",
|
|
263
|
+
"calibration_strategy": "none",
|
|
264
|
+
"value": 1.4277364777450963,
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"name": "lagInterflow",
|
|
268
|
+
"bounds": (10.0, 80.0),
|
|
269
|
+
"default_value": 1.0,
|
|
270
|
+
"optimal_value": 0.0,
|
|
271
|
+
"type": "float",
|
|
272
|
+
"calibration_strategy": "none",
|
|
273
|
+
"value": 65.31198215742819,
|
|
274
|
+
},
|
|
275
|
+
],
|
|
276
|
+
"objfunc": [
|
|
277
|
+
{
|
|
278
|
+
"name": "ns",
|
|
279
|
+
"of": "ns",
|
|
280
|
+
"weight": 1.0,
|
|
281
|
+
"data": (
|
|
282
|
+
"obs_data02_14.csv/obs/orun[1]",
|
|
283
|
+
"output/csip_run/out/Outlet.csv/output/catchmentSimRunoff",
|
|
284
|
+
),
|
|
285
|
+
}
|
|
286
|
+
],
|
|
287
|
+
"cost": 0.4962544759194877,
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"param": [
|
|
291
|
+
{
|
|
292
|
+
"name": "flowRouteTA",
|
|
293
|
+
"bounds": (0.4, 5.0),
|
|
294
|
+
"default_value": 1.0,
|
|
295
|
+
"optimal_value": 0.0,
|
|
296
|
+
"type": "float",
|
|
297
|
+
"calibration_strategy": "none",
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"name": "soilMaxDPS",
|
|
301
|
+
"bounds": (0.0, 5.0),
|
|
302
|
+
"default_value": 1.0,
|
|
303
|
+
"optimal_value": 0.0,
|
|
304
|
+
"type": "float",
|
|
305
|
+
"calibration_strategy": "none",
|
|
306
|
+
},
|
|
307
|
+
],
|
|
308
|
+
"objfunc": [
|
|
309
|
+
{
|
|
310
|
+
"name": "ns",
|
|
311
|
+
"of": "ns",
|
|
312
|
+
"weight": 1.0,
|
|
313
|
+
"data": (
|
|
314
|
+
"obs_data02_14.csv/obs/orun[1]",
|
|
315
|
+
"output/csip_run/out/Outlet.csv/output/catchmentSimRunoff",
|
|
316
|
+
),
|
|
317
|
+
}
|
|
318
|
+
],
|
|
319
|
+
},
|
|
320
|
+
],
|
|
321
|
+
},
|
|
322
|
+
"r1s2": {
|
|
323
|
+
"time": "2024-05-28 14:30:53.464613",
|
|
324
|
+
"best_costs": [0.4962544759194877, 0.4159144385219078],
|
|
325
|
+
"steps": [
|
|
326
|
+
{
|
|
327
|
+
"param": [
|
|
328
|
+
{
|
|
329
|
+
"name": "soilOutLPS",
|
|
330
|
+
"bounds": (0.0, 2.0),
|
|
331
|
+
"default_value": 1.0,
|
|
332
|
+
"optimal_value": 0.0,
|
|
333
|
+
"type": "float",
|
|
334
|
+
"calibration_strategy": "none",
|
|
335
|
+
"value": 1.4277364777450963,
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"name": "lagInterflow",
|
|
339
|
+
"bounds": (10.0, 80.0),
|
|
340
|
+
"default_value": 1.0,
|
|
341
|
+
"optimal_value": 0.0,
|
|
342
|
+
"type": "float",
|
|
343
|
+
"calibration_strategy": "none",
|
|
344
|
+
"value": 65.31198215742819,
|
|
345
|
+
},
|
|
346
|
+
],
|
|
347
|
+
"objfunc": [
|
|
348
|
+
{
|
|
349
|
+
"name": "ns",
|
|
350
|
+
"of": "ns",
|
|
351
|
+
"weight": 1.0,
|
|
352
|
+
"data": (
|
|
353
|
+
"obs_data02_14.csv/obs/orun[1]",
|
|
354
|
+
"output/csip_run/out/Outlet.csv/output/catchmentSimRunoff",
|
|
355
|
+
),
|
|
356
|
+
}
|
|
357
|
+
],
|
|
358
|
+
"cost": 0.4962544759194877,
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"param": [
|
|
362
|
+
{
|
|
363
|
+
"name": "flowRouteTA",
|
|
364
|
+
"bounds": (0.4, 5.0),
|
|
365
|
+
"default_value": 1.0,
|
|
366
|
+
"optimal_value": 0.0,
|
|
367
|
+
"type": "float",
|
|
368
|
+
"calibration_strategy": "none",
|
|
369
|
+
"value": 1.9846472555222765,
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"name": "soilMaxDPS",
|
|
373
|
+
"bounds": (0.0, 5.0),
|
|
374
|
+
"default_value": 1.0,
|
|
375
|
+
"optimal_value": 0.0,
|
|
376
|
+
"type": "float",
|
|
377
|
+
"calibration_strategy": "none",
|
|
378
|
+
"value": 4.619363774024649,
|
|
379
|
+
},
|
|
380
|
+
],
|
|
381
|
+
"objfunc": [
|
|
382
|
+
{
|
|
383
|
+
"name": "ns",
|
|
384
|
+
"of": "ns",
|
|
385
|
+
"weight": 1.0,
|
|
386
|
+
"data": (
|
|
387
|
+
"obs_data02_14.csv/obs/orun[1]",
|
|
388
|
+
"output/csip_run/out/Outlet.csv/output/catchmentSimRunoff",
|
|
389
|
+
),
|
|
390
|
+
}
|
|
391
|
+
],
|
|
392
|
+
"cost": 0.4159144385219078,
|
|
393
|
+
},
|
|
394
|
+
],
|
|
395
|
+
},
|
|
396
|
+
"r1": {
|
|
397
|
+
"time": "2024-05-28 14:30:53.465478",
|
|
398
|
+
"round_cost": 0.9121689144413955,
|
|
399
|
+
"best_costs": [0.4962544759194877, 0.4159144385219078],
|
|
400
|
+
"improvements": [False, False],
|
|
401
|
+
},
|
|
402
|
+
"r2s1": {
|
|
403
|
+
"time": "2024-05-28 14:33:23.457742",
|
|
404
|
+
"best_costs": [0.41218845540212334, 0.4159144385219078],
|
|
405
|
+
"steps": [
|
|
406
|
+
{
|
|
407
|
+
"param": [
|
|
408
|
+
{
|
|
409
|
+
"name": "soilOutLPS",
|
|
410
|
+
"bounds": (0.0, 2.0),
|
|
411
|
+
"default_value": 1.0,
|
|
412
|
+
"optimal_value": 0.0,
|
|
413
|
+
"type": "float",
|
|
414
|
+
"calibration_strategy": "none",
|
|
415
|
+
"value": 1.3832527609622032,
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"name": "lagInterflow",
|
|
419
|
+
"bounds": (10.0, 80.0),
|
|
420
|
+
"default_value": 1.0,
|
|
421
|
+
"optimal_value": 0.0,
|
|
422
|
+
"type": "float",
|
|
423
|
+
"calibration_strategy": "none",
|
|
424
|
+
"value": 71.21736822883048,
|
|
425
|
+
},
|
|
426
|
+
],
|
|
427
|
+
"objfunc": [
|
|
428
|
+
{
|
|
429
|
+
"name": "ns",
|
|
430
|
+
"of": "ns",
|
|
431
|
+
"weight": 1.0,
|
|
432
|
+
"data": (
|
|
433
|
+
"obs_data02_14.csv/obs/orun[1]",
|
|
434
|
+
"output/csip_run/out/Outlet.csv/output/catchmentSimRunoff",
|
|
435
|
+
),
|
|
436
|
+
}
|
|
437
|
+
],
|
|
438
|
+
"cost": 0.41218845540212334,
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"param": [
|
|
442
|
+
{
|
|
443
|
+
"name": "flowRouteTA",
|
|
444
|
+
"bounds": (0.4, 5.0),
|
|
445
|
+
"default_value": 1.0,
|
|
446
|
+
"optimal_value": 0.0,
|
|
447
|
+
"type": "float",
|
|
448
|
+
"calibration_strategy": "none",
|
|
449
|
+
"value": 1.9846472555222765,
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
"name": "soilMaxDPS",
|
|
453
|
+
"bounds": (0.0, 5.0),
|
|
454
|
+
"default_value": 1.0,
|
|
455
|
+
"optimal_value": 0.0,
|
|
456
|
+
"type": "float",
|
|
457
|
+
"calibration_strategy": "none",
|
|
458
|
+
"value": 4.619363774024649,
|
|
459
|
+
},
|
|
460
|
+
],
|
|
461
|
+
"objfunc": [
|
|
462
|
+
{
|
|
463
|
+
"name": "ns",
|
|
464
|
+
"of": "ns",
|
|
465
|
+
"weight": 1.0,
|
|
466
|
+
"data": (
|
|
467
|
+
"obs_data02_14.csv/obs/orun[1]",
|
|
468
|
+
"output/csip_run/out/Outlet.csv/output/catchmentSimRunoff",
|
|
469
|
+
),
|
|
470
|
+
}
|
|
471
|
+
],
|
|
472
|
+
"cost": 0.4159144385219078,
|
|
473
|
+
},
|
|
474
|
+
],
|
|
475
|
+
},
|
|
476
|
+
"r2s2": {
|
|
477
|
+
"time": "2024-05-28 14:35:50.514486",
|
|
478
|
+
"best_costs": [0.41218845540212334, 0.4121061580572347],
|
|
479
|
+
"steps": [
|
|
480
|
+
{
|
|
481
|
+
"param": [
|
|
482
|
+
{
|
|
483
|
+
"name": "soilOutLPS",
|
|
484
|
+
"bounds": (0.0, 2.0),
|
|
485
|
+
"default_value": 1.0,
|
|
486
|
+
"optimal_value": 0.0,
|
|
487
|
+
"type": "float",
|
|
488
|
+
"calibration_strategy": "none",
|
|
489
|
+
"value": 1.3832527609622032,
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"name": "lagInterflow",
|
|
493
|
+
"bounds": (10.0, 80.0),
|
|
494
|
+
"default_value": 1.0,
|
|
495
|
+
"optimal_value": 0.0,
|
|
496
|
+
"type": "float",
|
|
497
|
+
"calibration_strategy": "none",
|
|
498
|
+
"value": 71.21736822883048,
|
|
499
|
+
},
|
|
500
|
+
],
|
|
501
|
+
"objfunc": [
|
|
502
|
+
{
|
|
503
|
+
"name": "ns",
|
|
504
|
+
"of": "ns",
|
|
505
|
+
"weight": 1.0,
|
|
506
|
+
"data": (
|
|
507
|
+
"obs_data02_14.csv/obs/orun[1]",
|
|
508
|
+
"output/csip_run/out/Outlet.csv/output/catchmentSimRunoff",
|
|
509
|
+
),
|
|
510
|
+
}
|
|
511
|
+
],
|
|
512
|
+
"cost": 0.41218845540212334,
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
"param": [
|
|
516
|
+
{
|
|
517
|
+
"name": "flowRouteTA",
|
|
518
|
+
"bounds": (0.4, 5.0),
|
|
519
|
+
"default_value": 1.0,
|
|
520
|
+
"optimal_value": 0.0,
|
|
521
|
+
"type": "float",
|
|
522
|
+
"calibration_strategy": "none",
|
|
523
|
+
"value": 1.9461260670740506,
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"name": "soilMaxDPS",
|
|
527
|
+
"bounds": (0.0, 5.0),
|
|
528
|
+
"default_value": 1.0,
|
|
529
|
+
"optimal_value": 0.0,
|
|
530
|
+
"type": "float",
|
|
531
|
+
"calibration_strategy": "none",
|
|
532
|
+
"value": 3.7734465992198514,
|
|
533
|
+
},
|
|
534
|
+
],
|
|
535
|
+
"objfunc": [
|
|
536
|
+
{
|
|
537
|
+
"name": "ns",
|
|
538
|
+
"of": "ns",
|
|
539
|
+
"weight": 1.0,
|
|
540
|
+
"data": (
|
|
541
|
+
"obs_data02_14.csv/obs/orun[1]",
|
|
542
|
+
"output/csip_run/out/Outlet.csv/output/catchmentSimRunoff",
|
|
543
|
+
),
|
|
544
|
+
}
|
|
545
|
+
],
|
|
546
|
+
"cost": 0.4121061580572347,
|
|
547
|
+
},
|
|
548
|
+
],
|
|
549
|
+
},
|
|
550
|
+
"r2": {
|
|
551
|
+
"time": "2024-05-28 14:35:50.521162",
|
|
552
|
+
"round_cost": 0.8242946134593581,
|
|
553
|
+
"best_costs": [0.41218845540212334, 0.4121061580572347],
|
|
554
|
+
"improvements": [False, False],
|
|
555
|
+
},
|
|
556
|
+
"rounds": 2,
|
|
557
|
+
"end": "2024-05-28 14:35:51.017597",
|
|
558
|
+
"time": "0:09:56.726582",
|
|
559
|
+
}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
from recosu.pso import global_best
|
|
2
|
-
|
|
3
|
-
# 1) COSU steps, definition of parameters to calibrate
|
|
4
|
-
steps = [
|
|
5
|
-
{ # step 1
|
|
6
|
-
'param': [
|
|
7
|
-
{
|
|
8
|
-
'name': 'soilOutLPS',
|
|
9
|
-
'bounds': (0.0, 2.0)
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
'name': 'lagInterflow',
|
|
13
|
-
'bounds': (10.0, 80.0)
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
'objfunc': [
|
|
17
|
-
{
|
|
18
|
-
'name': 'ns', # Name (Must be unique)
|
|
19
|
-
'of':'ns', # Objective Function
|
|
20
|
-
'data': ('obs_data02_14.csv/obs/orun[1]',
|
|
21
|
-
'output/csip_run/out/Outlet.csv/output/catchmentSimRunoff')
|
|
22
|
-
# Optional Weight parameter. If not specified it is 1 or evenly distributed between all objective functions
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
},
|
|
26
|
-
{ # step 2
|
|
27
|
-
'param': [
|
|
28
|
-
{
|
|
29
|
-
'name': 'flowRouteTA',
|
|
30
|
-
'bounds': (0.4, 5.0)
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
'name': 'soilMaxDPS',
|
|
34
|
-
'bounds': (0.0, 5.0)
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
'objfunc': [
|
|
38
|
-
{
|
|
39
|
-
'name': 'ns',
|
|
40
|
-
'of':'ns',
|
|
41
|
-
'data': ('obs_data02_14.csv/obs/orun[1]',
|
|
42
|
-
'output/csip_run/out/Outlet.csv/output/catchmentSimRunoff')
|
|
43
|
-
}
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
]
|
|
47
|
-
|
|
48
|
-
steps = [{'param': [{'name': 'soilOutLPS', 'bounds': (0.0, 2.0), 'default_value': 1.0, 'optimal_value': 0.0, 'type': 'float', 'calibration_strategy': 'none'}, {'name': 'lagInterflow', 'bounds': (10.0, 80.0), 'default_value': 1.0, 'optimal_value': 0.0, 'type': 'float', 'calibration_strategy': 'none'}], 'objfunc': [{'name': 'ns', 'of': 'ns', 'weight': 1.0, 'data': ('obs_data02_14.csv/obs/orun[1]', 'output/csip_run/out/Outlet.csv/output/catchmentSimRunoff')}]}, {'param': [{'name': 'flowRouteTA', 'bounds': (0.4, 5.0), 'default_value': 1.0, 'optimal_value': 0.0, 'type': 'float', 'calibration_strategy': 'none'}, {'name': 'soilMaxDPS', 'bounds': (0.0, 5.0), 'default_value': 1.0, 'optimal_value': 0.0, 'type': 'float', 'calibration_strategy': 'none'}], 'objfunc': [{'name': 'ns', 'of': 'ns', 'weight': 1.0, 'data': ('obs_data02_14.csv/obs/orun[1]', 'output/csip_run/out/Outlet.csv/output/catchmentSimRunoff')}]}]
|
|
49
|
-
|
|
50
|
-
# 2) static ages parameters
|
|
51
|
-
args = {
|
|
52
|
-
'param': [
|
|
53
|
-
{
|
|
54
|
-
"name": "startTime",
|
|
55
|
-
"value": "2002-01-01"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"name": "endTime",
|
|
59
|
-
"value": "2006-12-31"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"name": "dataStartTime",
|
|
63
|
-
"value": "2002-01-01"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"name": "dataEndTime",
|
|
67
|
-
"value": "2006-12-31"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"name": "cal_startTime",
|
|
71
|
-
"value": "2003-01-01"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"name": "cal_endTime",
|
|
75
|
-
"value": "2006-12-31"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"name": "parallelismThreads",
|
|
79
|
-
"value": "2"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"name": "flagLoadState",
|
|
83
|
-
"value": "True"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"name": "payload",
|
|
87
|
-
"value": "false"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"name": "project",
|
|
91
|
-
"value": "SFIR3"
|
|
92
|
-
}
|
|
93
|
-
],
|
|
94
|
-
# the service url
|
|
95
|
-
'url': 'http://csip.engr.colostate.edu:8087/csip-oms/m/ages/0.3.0',
|
|
96
|
-
|
|
97
|
-
# the files to attach for each run
|
|
98
|
-
'files': {}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
args = {'param': [{'name': 'startTime', 'value': '2002-01-01'}, {'name': 'endTime', 'value': '2006-12-31'}, {'name': 'dataStartTime', 'value': '2002-01-01'}, {'name': 'dataEndTime', 'value': '2006-12-31'}, {'name': 'cal_startTime', 'value': '2003-01-01'}, {'name': 'cal_endTime', 'value': '2006-12-31'}, {'name': 'parallelismThreads', 'value': '2'}, {'name': 'flagLoadState', 'value': 'True'}, {'name': 'payload', 'value': 'false'}, {'name': 'project', 'value': 'SFIR3'}], 'url': 'http://csip.engr.colostate.edu:8087/csip-oms/m/ages/0.3.0', 'mode': 'PSO', 'files': {}}
|
|
102
|
-
|
|
103
|
-
if "mode" in args:
|
|
104
|
-
del args["mode"]
|
|
105
|
-
|
|
106
|
-
# 3. perform optimization
|
|
107
|
-
optimizer, trace = global_best(steps, # step definition
|
|
108
|
-
rounds=(1, 2), # min/max number of rounds
|
|
109
|
-
args=args, # static arguments
|
|
110
|
-
n_particles=10, # number of particle candidates for each param
|
|
111
|
-
iters=20, # max # of iterations
|
|
112
|
-
n_threads=10, # number of threads to use
|
|
113
|
-
# ftol=0.00000001, # min cost function delta for convergence
|
|
114
|
-
options={'c1': 2, 'c2': 2, 'w': 0.8}, # hyperparameter
|
|
115
|
-
oh_strategy={ "w":'adaptive', "c1":'adaptive',"c2":'adaptive'}, # adaptive hyperparameter adjustments based on current and max # of iterations
|
|
116
|
-
conf={
|
|
117
|
-
'service_timeout': 400.0,
|
|
118
|
-
'http_retry': 5,
|
|
119
|
-
'http_allow_redirects': True,
|
|
120
|
-
'async_call': False,
|
|
121
|
-
'http_conn_timeout': 10,
|
|
122
|
-
'http_read_timeout': 400,
|
|
123
|
-
'particles_fail': 5,
|
|
124
|
-
'step_trace': './step_trace.json'
|
|
125
|
-
}
|
|
126
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mg-pso-gui-0.1.110 → mg-pso-gui-0.1.112}/mgpsogui/gui/SetupTab/CalibrationParametersView.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|