pyfemtet 0.6.1__py3-none-any.whl → 0.6.3__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.
Potentially problematic release.
This version of pyfemtet might be problematic. Click here for more details.
- pyfemtet/__init__.py +1 -1
- pyfemtet/_femtet_config_util/__init__.py +0 -0
- pyfemtet/_femtet_config_util/autosave.py +38 -0
- pyfemtet/_femtet_config_util/exit.py +58 -0
- pyfemtet/_message/1. make_pot.bat +2 -3
- pyfemtet/_message/2. make_mo.bat +1 -1
- pyfemtet/_message/babel.cfg +1 -1
- pyfemtet/_message/locales/ja/LC_MESSAGES/messages.po +136 -124
- pyfemtet/_message/locales/messages.pot +136 -124
- pyfemtet/_message/messages.py +3 -0
- pyfemtet/_warning.py +59 -3
- pyfemtet/opt/_femopt.py +62 -42
- pyfemtet/opt/_test_utils/record_history.py +50 -0
- pyfemtet/opt/interface/_base.py +10 -1
- pyfemtet/opt/interface/_excel_interface.py +437 -0
- pyfemtet/opt/interface/_femtet.py +4 -75
- pyfemtet/opt/interface/_femtet_with_sldworks.py +1 -1
- pyfemtet/opt/optimizer/_base.py +11 -9
- pyfemtet/opt/visualization/_complex_components/main_figure_creator.py +82 -21
- {pyfemtet-0.6.1.dist-info → pyfemtet-0.6.3.dist-info}/METADATA +1 -1
- {pyfemtet-0.6.1.dist-info → pyfemtet-0.6.3.dist-info}/RECORD +24 -20
- {pyfemtet-0.6.1.dist-info → pyfemtet-0.6.3.dist-info}/LICENSE +0 -0
- {pyfemtet-0.6.1.dist-info → pyfemtet-0.6.3.dist-info}/WHEEL +0 -0
- {pyfemtet-0.6.1.dist-info → pyfemtet-0.6.3.dist-info}/entry_points.txt +0 -0
|
@@ -103,35 +103,96 @@ def _get_single_objective_plot(history, df):
|
|
|
103
103
|
df.columns = [c.replace(' / ', '<BR>/ ') for c in df.columns]
|
|
104
104
|
obj_name = obj_name.replace(' / ', '<BR>/ ')
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
x='trial',
|
|
109
|
-
y=obj_name,
|
|
110
|
-
symbol=_ls.feasible['label'],
|
|
111
|
-
symbol_map={
|
|
112
|
-
_ls.feasible[True]: _ss.feasible[True],
|
|
113
|
-
_ls.feasible[False]: _ss.feasible[False],
|
|
114
|
-
},
|
|
115
|
-
hover_data={
|
|
116
|
-
_ls.feasible['label']: False,
|
|
117
|
-
'trial': True,
|
|
118
|
-
},
|
|
119
|
-
custom_data=['trial'],
|
|
120
|
-
)
|
|
106
|
+
# ===== base figure =====
|
|
107
|
+
fig = go.Figure()
|
|
121
108
|
|
|
109
|
+
# ===== i 番目が、その時点までで最適かどうか =====
|
|
110
|
+
# その時点までの最適な点 index
|
|
111
|
+
indices = []
|
|
112
|
+
anti_indices = []
|
|
113
|
+
objectives = df[obj_name].values
|
|
114
|
+
objective_directions = df[f'{obj_name}_direction'].values
|
|
115
|
+
for i, (obj, direction) in enumerate(zip(objectives, objective_directions)):
|
|
116
|
+
# DESCRIPTION: 最適化中に direction は変化しない前提
|
|
117
|
+
if direction == 'maximize':
|
|
118
|
+
if obj == max(objectives[:i+1]):
|
|
119
|
+
indices.append(i)
|
|
120
|
+
else:
|
|
121
|
+
anti_indices.append(i)
|
|
122
|
+
elif direction == 'minimize':
|
|
123
|
+
if obj == min(objectives[:i+1]):
|
|
124
|
+
indices.append(i)
|
|
125
|
+
else:
|
|
126
|
+
anti_indices.append(i)
|
|
127
|
+
else:
|
|
128
|
+
residuals = (objectives - objective_directions) ** 2
|
|
129
|
+
residual = residuals[i]
|
|
130
|
+
if residual == min(residuals[:i+1]):
|
|
131
|
+
indices.append(i)
|
|
132
|
+
else:
|
|
133
|
+
anti_indices.append(i)
|
|
134
|
+
|
|
135
|
+
# ===== 最適でない点を灰色で打つ =====
|
|
122
136
|
fig.add_trace(
|
|
123
137
|
go.Scatter(
|
|
124
138
|
x=df['trial'],
|
|
125
139
|
y=df[obj_name],
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
140
|
+
customdata=df['trial'].values.reshape((-1, 1)),
|
|
141
|
+
# x=df['trial'][anti_indices],
|
|
142
|
+
# y=df[obj_name][anti_indices],
|
|
143
|
+
# customdata=df['trial'][anti_indices].values.reshape((-1, 1)),
|
|
144
|
+
mode="markers",
|
|
145
|
+
marker=dict(color='#6c757d', size=6),
|
|
146
|
+
name=Msg.LEGEND_LABEL_ALL_SOLUTIONS,
|
|
132
147
|
)
|
|
133
148
|
)
|
|
134
149
|
|
|
150
|
+
# ===== その時点までの最小の点を青で打つ =====
|
|
151
|
+
fig.add_trace(
|
|
152
|
+
go.Scatter(
|
|
153
|
+
x=df['trial'][indices],
|
|
154
|
+
y=df[obj_name][indices],
|
|
155
|
+
mode="markers+lines",
|
|
156
|
+
marker=dict(color='#007bff', size=9),
|
|
157
|
+
name=Msg.LEGEND_LABEL_OPTIMAL_SOLUTIONS,
|
|
158
|
+
line=dict(width=1, color='#6c757d',),
|
|
159
|
+
customdata=df['trial'][indices].values.reshape((-1, 1)),
|
|
160
|
+
legendgroup='optimal',
|
|
161
|
+
)
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
# ===== その時点までの最小の点から現在までの平行点線を引く =====
|
|
165
|
+
if len(indices) > 1:
|
|
166
|
+
x = [df['trial'][indices].iloc[-1], df['trial'].iloc[-1]]
|
|
167
|
+
y = [df[obj_name][indices].iloc[-1]] * 2
|
|
168
|
+
fig.add_trace(
|
|
169
|
+
go.Scatter(
|
|
170
|
+
x=x,
|
|
171
|
+
y=y,
|
|
172
|
+
mode="lines",
|
|
173
|
+
line=dict(width=0.5, color='#6c757d', dash='dash'),
|
|
174
|
+
showlegend=False,
|
|
175
|
+
legendgroup='optimal',
|
|
176
|
+
)
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
# ===== direction が float の場合、目標値を描く =====
|
|
180
|
+
if len(df) > 1:
|
|
181
|
+
if isinstance(objective_directions[0], float):
|
|
182
|
+
x = [df['trial'].iloc[0], df['trial'].iloc[-1]]
|
|
183
|
+
y = [objective_directions[0]] * 2
|
|
184
|
+
fig.add_trace(
|
|
185
|
+
go.Scatter(
|
|
186
|
+
x=x,
|
|
187
|
+
y=y,
|
|
188
|
+
mode="lines",
|
|
189
|
+
line=dict(width=0.5, color='#FF2400', dash='dash'),
|
|
190
|
+
name=Msg.LEGEND_LABEL_OBJECTIVE_TARGET,
|
|
191
|
+
)
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
# ===== layout =====
|
|
135
196
|
fig.update_layout(
|
|
136
197
|
dict(
|
|
137
198
|
title_text=Msg.GRAPH_TITLE_SINGLE_OBJECTIVE,
|
|
@@ -1,34 +1,38 @@
|
|
|
1
|
-
pyfemtet/__init__.py,sha256=
|
|
2
|
-
pyfemtet/
|
|
3
|
-
pyfemtet/
|
|
1
|
+
pyfemtet/__init__.py,sha256=_SsQ0ZcyZbUqlFFT370nQxs8UER9D0oW_EmCr4Q-hx4,21
|
|
2
|
+
pyfemtet/_femtet_config_util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
pyfemtet/_femtet_config_util/autosave.py,sha256=e-_GJdiJ5un7iuTet3bK5vwwq4Aqh7B_YVTANDJfZl8,1383
|
|
4
|
+
pyfemtet/_femtet_config_util/exit.py,sha256=sx8Wcepgi-lL5qJpJl6WvlzbeVheU9_Dtf1f38mmoTo,1822
|
|
5
|
+
pyfemtet/_message/1. make_pot.bat,sha256=wrTA0YaL7nUfNB0cS8zljOmwq2qgyG6RMwHQbrwjvY4,476
|
|
6
|
+
pyfemtet/_message/2. make_mo.bat,sha256=6shJ3Yn4BXjDc0hhv_kiGUtVTq4oSRz8-iS4vW29rNE,155
|
|
4
7
|
pyfemtet/_message/__init__.py,sha256=gE1-XX_PzHj9BbhqPaK5VcIHuv6_Tec5qlPMC3IRiBg,100
|
|
5
|
-
pyfemtet/_message/babel.cfg,sha256=
|
|
6
|
-
pyfemtet/_message/locales/ja/LC_MESSAGES/messages.po,sha256
|
|
7
|
-
pyfemtet/_message/locales/messages.pot,sha256=
|
|
8
|
-
pyfemtet/_message/messages.py,sha256=
|
|
9
|
-
pyfemtet/_warning.py,sha256=
|
|
8
|
+
pyfemtet/_message/babel.cfg,sha256=AQIFCQ7NlAA84PhV0gowHhbIXH41zA55mzhgyROniJk,73
|
|
9
|
+
pyfemtet/_message/locales/ja/LC_MESSAGES/messages.po,sha256=F2bJGHVMtk086pekjVwY2dluCSl7qeYPgJe1A9CSrxA,24526
|
|
10
|
+
pyfemtet/_message/locales/messages.pot,sha256=8Yjf462pJdEtxBLySKT34zMG5CH5uLB_8VaJQll_QsY,14493
|
|
11
|
+
pyfemtet/_message/messages.py,sha256=F8ENLZKoHq5irn-Ag7rqA3aSDsTmRWDyNHvOLY76ROI,13368
|
|
12
|
+
pyfemtet/_warning.py,sha256=FaWDmGJVgIF4oDTDSRZNvEEDt3-N5HD9WrHshLSA0zc,2052
|
|
10
13
|
pyfemtet/core.py,sha256=3lqfBGJ5IuKz2Nqj5pRo7YQqKwx_0ZDL72u95Ur_1p0,1386
|
|
11
14
|
pyfemtet/dispatch_extensions/__init__.py,sha256=MI9b6oIS2IXnTNHy8jvZ4QURdTHQd9PN-gifYxqVvk4,272
|
|
12
15
|
pyfemtet/dispatch_extensions/_impl.py,sha256=HU7rKRAzEe5yYukWrKtdi1aIbUas_kLyaa_KZZGCELE,16244
|
|
13
16
|
pyfemtet/logger/__init__.py,sha256=DZNTD9BboiFU9LOiyPKi_Y6gWAga5f1lWkVoq7LV_y0,71
|
|
14
17
|
pyfemtet/logger/_impl.py,sha256=ZN5Rj3kb9UEGFt5KSLlzwfrLF_SAoOxgPBkadwh2Y8w,2825
|
|
15
18
|
pyfemtet/opt/__init__.py,sha256=wRR8LbEhb5I6MUgmnCgjB6-tqHlOVxDIo7yPkq0QbBs,758
|
|
16
|
-
pyfemtet/opt/_femopt.py,sha256=
|
|
19
|
+
pyfemtet/opt/_femopt.py,sha256=h3DQpwdNyPDU9jxc52DEsHaDWO1mVnA4hOT5_omXglo,37377
|
|
17
20
|
pyfemtet/opt/_femopt_core.py,sha256=Sn13SI1r5OvSu6C9XjkqTrFz2IgO_vMszIAgA-gx-TU,34348
|
|
18
21
|
pyfemtet/opt/_test_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
22
|
pyfemtet/opt/_test_utils/control_femtet.py,sha256=Oy2MmNS-LhUXF9rKLa8AXAfJhppIQI8Nha8LmEZflmk,1169
|
|
20
23
|
pyfemtet/opt/_test_utils/hyper_sphere.py,sha256=nQhw8EIY0DwvcTqrbKhkxiITLZifr4-nG77E-_6ggmA,700
|
|
21
|
-
pyfemtet/opt/_test_utils/record_history.py,sha256=
|
|
24
|
+
pyfemtet/opt/_test_utils/record_history.py,sha256=JCNJLZMCNTpJ6VT7iwEt2DIbwmsuQmgC0ClQSfcatj4,3915
|
|
22
25
|
pyfemtet/opt/interface/__init__.py,sha256=5hel-mP6tuxzIEJFMZJZWUEWEbFSsskzCWlQ3HORTYI,466
|
|
23
|
-
pyfemtet/opt/interface/_base.py,sha256=
|
|
24
|
-
pyfemtet/opt/interface/
|
|
26
|
+
pyfemtet/opt/interface/_base.py,sha256=aPJ55dTp4-Q4KMkUZVRlquuBBWWOIOdC6yQsYZR4Jy0,2626
|
|
27
|
+
pyfemtet/opt/interface/_excel_interface.py,sha256=ms-o31hZ6dM_gUqlXWoeodRvwZwNMnRuVuM-x6JJh9E,16483
|
|
28
|
+
pyfemtet/opt/interface/_femtet.py,sha256=dmKyRG8sWuX2JHjcXpvJ2q632oZh4I94iVo4u7Z7w_M,34742
|
|
25
29
|
pyfemtet/opt/interface/_femtet_parametric.py,sha256=KDG8SB43AgwuhpCStjvx10G0RzyHhga6k4dfvp0gvYU,2175
|
|
26
30
|
pyfemtet/opt/interface/_femtet_with_nx/__init__.py,sha256=-6W2g2FDEcKzGHmI5KAKQe-4U5jDpMj0CXuma-GZca0,83
|
|
27
31
|
pyfemtet/opt/interface/_femtet_with_nx/_interface.py,sha256=BXWdzIFcId1EovpbRD5DmkW0BwqhpDvOuGBv9kdCGy8,5994
|
|
28
32
|
pyfemtet/opt/interface/_femtet_with_nx/update_model.py,sha256=P7VH0i_o-X9OUe6AGaLF1fACPeHNrMjcrOBCA3MMrI4,3092
|
|
29
|
-
pyfemtet/opt/interface/_femtet_with_sldworks.py,sha256=
|
|
33
|
+
pyfemtet/opt/interface/_femtet_with_sldworks.py,sha256=4QvwcHP_L4QMHcwKf_vnuWIV-68uIqmtDh0NNaavJjg,6853
|
|
30
34
|
pyfemtet/opt/optimizer/__init__.py,sha256=Ia6viowECkG0IFXtFef0tJ4jDKsoDzJLqMJ9xLFH2LQ,543
|
|
31
|
-
pyfemtet/opt/optimizer/_base.py,sha256
|
|
35
|
+
pyfemtet/opt/optimizer/_base.py,sha256=0jX68VEfLI08Qr01BvfPCHKKlr3Bj6gWQ0T81qpX0y4,12507
|
|
32
36
|
pyfemtet/opt/optimizer/_optuna/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
37
|
pyfemtet/opt/optimizer/_optuna/_botorch_patch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
34
38
|
pyfemtet/opt/optimizer/_optuna/_botorch_patch/enable_nonlinear_constraint.py,sha256=2hUP2c8mokkRaSQ8nXxgCCmz8e0JKvEz8R2qIGnTGm0,8863
|
|
@@ -95,7 +99,7 @@ pyfemtet/opt/visualization/_base.py,sha256=k0PDvqNKn7sFYIgajWykOTgFztlu5_1bc-xfQ
|
|
|
95
99
|
pyfemtet/opt/visualization/_complex_components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
96
100
|
pyfemtet/opt/visualization/_complex_components/alert_region.py,sha256=sX8xqT4NqhACagK4YgumF4ResrTqhOKQ8dN4q58shI8,2106
|
|
97
101
|
pyfemtet/opt/visualization/_complex_components/control_femtet.py,sha256=LcMoh_MQQ1-hiz7nMGOmxSSoJLOX8viVxZB6uIggg_g,6243
|
|
98
|
-
pyfemtet/opt/visualization/_complex_components/main_figure_creator.py,sha256=
|
|
102
|
+
pyfemtet/opt/visualization/_complex_components/main_figure_creator.py,sha256=YRV3SK_N6f8FbWTxCcbibkPKyIbgA7CPyCcGBdaKBpU,9455
|
|
99
103
|
pyfemtet/opt/visualization/_complex_components/main_graph.py,sha256=Med4fVTHPhmQXyyMjGcjdCacwOMp4JblAaLKdz_6gVQ,21533
|
|
100
104
|
pyfemtet/opt/visualization/_complex_components/pm_graph.py,sha256=hX0OoJIUqqO4W1bqP1zaQUU2EjRzCg-pMhixkhJEAoA,24926
|
|
101
105
|
pyfemtet/opt/visualization/_complex_components/pm_graph_creator.py,sha256=f-ikYAPChazqyRQ0Y-tKrYrMBHzFHJJ4uV6QXBEBRKI,7304
|
|
@@ -112,8 +116,8 @@ pyfemtet/opt/visualization/result_viewer/.gitignore,sha256=ryvb4aqbbsHireHWlPQfx
|
|
|
112
116
|
pyfemtet/opt/visualization/result_viewer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
113
117
|
pyfemtet/opt/visualization/result_viewer/application.py,sha256=WcHBx_J5eNLKSaprpk9BGifwhO04oN8FiNGYTWorrXA,1691
|
|
114
118
|
pyfemtet/opt/visualization/result_viewer/pages.py,sha256=laEAKHAtdshCAHxgXo-zMNg3RP6lCxfszO3XwLnF1dU,32156
|
|
115
|
-
pyfemtet-0.6.
|
|
116
|
-
pyfemtet-0.6.
|
|
117
|
-
pyfemtet-0.6.
|
|
118
|
-
pyfemtet-0.6.
|
|
119
|
-
pyfemtet-0.6.
|
|
119
|
+
pyfemtet-0.6.3.dist-info/LICENSE,sha256=sVQBhyoglGJUu65-BP3iR6ujORI6YgEU2Qm-V4fGlOA,1485
|
|
120
|
+
pyfemtet-0.6.3.dist-info/METADATA,sha256=l89gTkV_ub72Kqh496W02gf0nmGVwcYC-8w2-Us9zNk,3287
|
|
121
|
+
pyfemtet-0.6.3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
122
|
+
pyfemtet-0.6.3.dist-info/entry_points.txt,sha256=ZfYqRaoiPtuWqFi2_msccyrVF0LurMn-IHlYamAegZo,104
|
|
123
|
+
pyfemtet-0.6.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|