pyfemtet 1.0.2__py3-none-any.whl → 1.0.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/_util/df_util.py +3 -0
- pyfemtet/opt/history/_history.py +1 -3
- pyfemtet/opt/interface/_base_interface.py +3 -3
- pyfemtet/opt/interface/_excel_interface/excel_interface.py +6 -6
- pyfemtet/opt/interface/_femtet_interface/femtet_interface.py +8 -8
- pyfemtet/opt/interface/_femtet_with_nx_interface/femtet_with_nx_interface.py +10 -3
- pyfemtet/opt/interface/_femtet_with_solidworks/femtet_with_solidworks_interface.py +2 -2
- pyfemtet/opt/interface/_solidworks_interface/solidworks_interface.py +3 -3
- pyfemtet/opt/interface/_surrogate_model_interface/botorch_interface.py +2 -2
- pyfemtet/opt/interface/_with_excel_settings/with_excel_settings.py +2 -2
- pyfemtet/opt/optimizer/_base_optimizer.py +6 -4
- pyfemtet/opt/optimizer/optuna_optimizer/_optuna_optimizer.py +2 -3
- pyfemtet/opt/optimizer/optuna_optimizer/_pof_botorch/enable_nonlinear_constraint.py +3 -1
- pyfemtet/opt/optimizer/scipy_optimizer/_scipy_optimizer.py +4 -4
- pyfemtet/opt/visualization/history_viewer/result_viewer/_pages.py +8 -2
- {pyfemtet-1.0.2.dist-info → pyfemtet-1.0.3.dist-info}/METADATA +1 -1
- {pyfemtet-1.0.2.dist-info → pyfemtet-1.0.3.dist-info}/RECORD +21 -21
- {pyfemtet-1.0.2.dist-info → pyfemtet-1.0.3.dist-info}/LICENSE +0 -0
- {pyfemtet-1.0.2.dist-info → pyfemtet-1.0.3.dist-info}/LICENSE_THIRD_PARTY.txt +0 -0
- {pyfemtet-1.0.2.dist-info → pyfemtet-1.0.3.dist-info}/WHEEL +0 -0
- {pyfemtet-1.0.2.dist-info → pyfemtet-1.0.3.dist-info}/entry_points.txt +0 -0
pyfemtet/_util/df_util.py
CHANGED
pyfemtet/opt/history/_history.py
CHANGED
|
@@ -1115,8 +1115,6 @@ class History:
|
|
|
1115
1115
|
when the optimization process starts.
|
|
1116
1116
|
"""
|
|
1117
1117
|
|
|
1118
|
-
MAIN_FILTER = MAIN_FILTER
|
|
1119
|
-
|
|
1120
1118
|
def __init__(self):
|
|
1121
1119
|
self._records = Records()
|
|
1122
1120
|
self.path: str | None = None
|
|
@@ -1275,7 +1273,7 @@ class History:
|
|
|
1275
1273
|
# フィデリティの話は現在解析を実行している opt が
|
|
1276
1274
|
# 必要なので、recording メソッドの引数に
|
|
1277
1275
|
# それを追加する
|
|
1278
|
-
df = self.get_df(equality_filters=
|
|
1276
|
+
df = self.get_df(equality_filters=MAIN_FILTER)
|
|
1279
1277
|
|
|
1280
1278
|
if client is not None:
|
|
1281
1279
|
client.run_on_scheduler(
|
|
@@ -22,7 +22,7 @@ except ModuleNotFoundError:
|
|
|
22
22
|
|
|
23
23
|
from pyfemtet._util.dask_util import *
|
|
24
24
|
from pyfemtet.logger import get_module_logger
|
|
25
|
-
from pyfemtet.opt.problem.
|
|
25
|
+
from pyfemtet.opt.problem.problem import *
|
|
26
26
|
|
|
27
27
|
logger = get_module_logger('opt.interface', False)
|
|
28
28
|
|
|
@@ -39,12 +39,12 @@ class AbstractFEMInterface:
|
|
|
39
39
|
|
|
40
40
|
kwargs: dict = {}
|
|
41
41
|
_load_problem_from_fem: bool = False
|
|
42
|
-
current_prm_values:
|
|
42
|
+
current_prm_values: TrialInput
|
|
43
43
|
_tmp_dir: tempfile.TemporaryDirectory
|
|
44
44
|
|
|
45
45
|
# ===== update =====
|
|
46
46
|
|
|
47
|
-
def update_parameter(self, x:
|
|
47
|
+
def update_parameter(self, x: TrialInput) -> None:
|
|
48
48
|
# FEM オブジェクトに与えられた変数を設定する。
|
|
49
49
|
# 目的は Function 内でユーザーが FEM オブジェクト経由で
|
|
50
50
|
# 変数を取得できるようにするためなので、各具象クラスでは
|
|
@@ -26,7 +26,7 @@ from pyfemtet._util.femtet_autosave import *
|
|
|
26
26
|
from pyfemtet._i18n import _
|
|
27
27
|
|
|
28
28
|
from pyfemtet.opt.exceptions import *
|
|
29
|
-
from pyfemtet.opt.problem.
|
|
29
|
+
from pyfemtet.opt.problem.problem import *
|
|
30
30
|
from pyfemtet.opt.interface._base_interface import COMInterface
|
|
31
31
|
|
|
32
32
|
from pyfemtet.logger import get_module_logger
|
|
@@ -797,15 +797,15 @@ class ExcelInterface(COMInterface):
|
|
|
797
797
|
return self._get_wb(self.teardown_xlsm_path)
|
|
798
798
|
|
|
799
799
|
# ===== update =====
|
|
800
|
-
def update_parameter(self, x:
|
|
800
|
+
def update_parameter(self, x: TrialInput) -> None:
|
|
801
801
|
|
|
802
802
|
COMInterface.update_parameter(self, x)
|
|
803
803
|
|
|
804
804
|
# excel シートの変数更新
|
|
805
805
|
if self.use_named_range:
|
|
806
|
-
for key,
|
|
806
|
+
for key, variable in self.current_prm_values.items():
|
|
807
807
|
try:
|
|
808
|
-
self.sh_input.Range(key).value = value
|
|
808
|
+
self.sh_input.Range(key).value = variable.value
|
|
809
809
|
except com_error:
|
|
810
810
|
logger.warning(
|
|
811
811
|
_(
|
|
@@ -819,10 +819,10 @@ class ExcelInterface(COMInterface):
|
|
|
819
819
|
break
|
|
820
820
|
|
|
821
821
|
if not self.use_named_range: # else にしないこと
|
|
822
|
-
for name,
|
|
822
|
+
for name, variable in self.current_prm_values.items():
|
|
823
823
|
r = 1 + search_r(self.input_xlsm_path, self.input_sheet_name, name)
|
|
824
824
|
c = 1 + search_c(self.input_xlsm_path, self.input_sheet_name, ParseAsParameter.value)
|
|
825
|
-
self.sh_input.Cells(r, c).value = value
|
|
825
|
+
self.sh_input.Cells(r, c).value = variable.value
|
|
826
826
|
|
|
827
827
|
# 再計算
|
|
828
828
|
self.excel.CalculateFull()
|
|
@@ -33,7 +33,7 @@ from pyfemtet._util.femtet_access_inspection import *
|
|
|
33
33
|
from pyfemtet.dispatch_extensions import *
|
|
34
34
|
from pyfemtet.opt.interface._base_interface import COMInterface
|
|
35
35
|
from pyfemtet.opt.exceptions import *
|
|
36
|
-
from pyfemtet.opt.problem.
|
|
36
|
+
from pyfemtet.opt.problem.problem import *
|
|
37
37
|
|
|
38
38
|
from ._femtet_parametric import *
|
|
39
39
|
|
|
@@ -803,7 +803,7 @@ class FemtetInterface(COMInterface):
|
|
|
803
803
|
else:
|
|
804
804
|
return None
|
|
805
805
|
|
|
806
|
-
def update_parameter(self, x:
|
|
806
|
+
def update_parameter(self, x: TrialInput, with_warning=False) -> None | list[str]:
|
|
807
807
|
"""Update parameter of femprj."""
|
|
808
808
|
COMInterface.update_parameter(self, x)
|
|
809
809
|
|
|
@@ -844,7 +844,7 @@ class FemtetInterface(COMInterface):
|
|
|
844
844
|
|
|
845
845
|
# 変数を更新
|
|
846
846
|
warning_messages = []
|
|
847
|
-
for name,
|
|
847
|
+
for name, variable in self.current_prm_values.items():
|
|
848
848
|
|
|
849
849
|
# 渡された変数がちゃんと Femtet に定義されている
|
|
850
850
|
if name in existing_variable_names:
|
|
@@ -855,9 +855,9 @@ class FemtetInterface(COMInterface):
|
|
|
855
855
|
return_value_if_failed=False,
|
|
856
856
|
if_error=ModelError, # 生きてるのに失敗した場合
|
|
857
857
|
error_message=Msg.ERR_FAILED_TO_UPDATE_VARIABLE
|
|
858
|
-
+ f"{value} -> {name}",
|
|
858
|
+
+ f"{variable.value} -> {name}",
|
|
859
859
|
is_Gaudi_method=True,
|
|
860
|
-
args=(name, value),
|
|
860
|
+
args=(name, variable.value),
|
|
861
861
|
)
|
|
862
862
|
|
|
863
863
|
# 渡された変数が Femtet で定義されていない
|
|
@@ -875,15 +875,15 @@ class FemtetInterface(COMInterface):
|
|
|
875
875
|
|
|
876
876
|
# update without parameter check
|
|
877
877
|
warning_messages = []
|
|
878
|
-
for name,
|
|
878
|
+
for name, variable in self.current_prm_values.items():
|
|
879
879
|
self._call_femtet_api(
|
|
880
880
|
fun=self.Femtet.UpdateVariable,
|
|
881
881
|
return_value_if_failed=False,
|
|
882
882
|
if_error=ModelError, # 生きてるのに失敗した場合
|
|
883
883
|
error_message=Msg.ERR_FAILED_TO_UPDATE_VARIABLE
|
|
884
|
-
+ f"{value} -> {name}",
|
|
884
|
+
+ f"{variable.value} -> {name}",
|
|
885
885
|
is_Gaudi_method=True,
|
|
886
|
-
args=(name, value),
|
|
886
|
+
args=(name, variable.value),
|
|
887
887
|
)
|
|
888
888
|
|
|
889
889
|
# ここでは ReExecute しない
|
|
@@ -9,10 +9,11 @@ import subprocess
|
|
|
9
9
|
# noinspection PyUnresolvedReferences
|
|
10
10
|
from pywintypes import com_error
|
|
11
11
|
|
|
12
|
-
from pyfemtet._i18n import
|
|
12
|
+
from pyfemtet._i18n import _
|
|
13
13
|
from pyfemtet.opt.interface._base_interface import AbstractFEMInterface
|
|
14
14
|
from pyfemtet.opt.interface._femtet_interface import FemtetInterface
|
|
15
15
|
from pyfemtet.opt.exceptions import *
|
|
16
|
+
from pyfemtet.opt.problem.variable_manager import *
|
|
16
17
|
|
|
17
18
|
if TYPE_CHECKING:
|
|
18
19
|
from pyfemtet.opt.optimizer import AbstractOptimizer
|
|
@@ -78,7 +79,9 @@ class _NXInterface(AbstractFEMInterface):
|
|
|
78
79
|
os.remove(xt_path)
|
|
79
80
|
|
|
80
81
|
# 変数の json 文字列を作る
|
|
81
|
-
str_json = json.dumps(
|
|
82
|
+
str_json = json.dumps(
|
|
83
|
+
{name: variable.value for name, variable
|
|
84
|
+
in self.current_prm_values.items()})
|
|
82
85
|
|
|
83
86
|
# create dumped json of export settings
|
|
84
87
|
tmp_dict = dict(
|
|
@@ -216,13 +219,17 @@ class FemtetWithNXInterface(FemtetInterface, _NXInterface):
|
|
|
216
219
|
|
|
217
220
|
def _debug_1():
|
|
218
221
|
|
|
222
|
+
x = Variable()
|
|
223
|
+
x.name = 'x'
|
|
224
|
+
x.value = 20
|
|
225
|
+
|
|
219
226
|
fem = _NXInterface(
|
|
220
227
|
prt_path=os.path.join(os.path.dirname(__file__), 'model1.prt'),
|
|
221
228
|
export_solids=True,
|
|
222
229
|
)
|
|
223
230
|
fem._setup_before_parallel()
|
|
224
231
|
fem._setup_after_parallel()
|
|
225
|
-
fem.update_parameter(
|
|
232
|
+
fem.update_parameter(dict(x=x))
|
|
226
233
|
fem._export_xt(os.path.join(os.path.dirname(__file__), 'model1.x_t'))
|
|
227
234
|
|
|
228
235
|
|
|
@@ -9,7 +9,7 @@ from pywintypes import com_error
|
|
|
9
9
|
|
|
10
10
|
from pyfemtet._i18n import _
|
|
11
11
|
|
|
12
|
-
from pyfemtet.opt.problem.
|
|
12
|
+
from pyfemtet.opt.problem.problem import *
|
|
13
13
|
from pyfemtet.opt.interface._base_interface import AbstractFEMInterface
|
|
14
14
|
from pyfemtet.opt.interface._femtet_interface import FemtetInterface
|
|
15
15
|
from pyfemtet.opt.interface._solidworks_interface import SolidworksInterface
|
|
@@ -89,7 +89,7 @@ class FemtetWithSolidworksInterface(FemtetInterface, SolidworksInterface, Abstra
|
|
|
89
89
|
SolidworksInterface._setup_after_parallel(self, opt)
|
|
90
90
|
FemtetInterface._setup_after_parallel(self, opt)
|
|
91
91
|
|
|
92
|
-
def update_parameter(self, x:
|
|
92
|
+
def update_parameter(self, x: TrialInput, with_warning=False) -> None:
|
|
93
93
|
SolidworksInterface.update_parameter(self, x)
|
|
94
94
|
FemtetInterface.update_parameter(self, x, with_warning)
|
|
95
95
|
|
|
@@ -14,7 +14,7 @@ from pyfemtet._util.dask_util import *
|
|
|
14
14
|
from pyfemtet.opt.exceptions import *
|
|
15
15
|
from pyfemtet.opt.interface._base_interface import COMInterface
|
|
16
16
|
from pyfemtet._i18n import _
|
|
17
|
-
from pyfemtet.opt.problem.
|
|
17
|
+
from pyfemtet.opt.problem.problem import *
|
|
18
18
|
from pyfemtet.logger import get_module_logger
|
|
19
19
|
|
|
20
20
|
if TYPE_CHECKING:
|
|
@@ -125,7 +125,7 @@ class SolidworksInterface(COMInterface):
|
|
|
125
125
|
def update(self) -> None:
|
|
126
126
|
raise NotImplementedError
|
|
127
127
|
|
|
128
|
-
def update_parameter(self, x:
|
|
128
|
+
def update_parameter(self, x: TrialInput) -> None:
|
|
129
129
|
|
|
130
130
|
COMInterface.update_parameter(self, x)
|
|
131
131
|
|
|
@@ -154,7 +154,7 @@ class SolidworksInterface(COMInterface):
|
|
|
154
154
|
prm_name = _get_name_from_equation(eq)
|
|
155
155
|
# 対象なら処理
|
|
156
156
|
if prm_name in self.current_prm_values:
|
|
157
|
-
new_equation = f'"{prm_name}" = {self.current_prm_values[prm_name]}'
|
|
157
|
+
new_equation = f'"{prm_name}" = {self.current_prm_values[prm_name].value}'
|
|
158
158
|
swEqnMgr.Equation(i, new_equation)
|
|
159
159
|
|
|
160
160
|
# 式の計算
|
|
@@ -62,7 +62,7 @@ class BoTorchInterface(AbstractSurrogateModelInterfaceBase):
|
|
|
62
62
|
|
|
63
63
|
def update(self) -> None:
|
|
64
64
|
# update current objective values
|
|
65
|
-
x = np.array([self.current_prm_values.values()])
|
|
65
|
+
x = np.array([[variable.value for variable in self.current_prm_values.values()]])
|
|
66
66
|
|
|
67
67
|
y, _ = self.pyfemtet_model.predict(x)
|
|
68
68
|
y = y[0]
|
|
@@ -255,7 +255,7 @@ class PoFBoTorchInterface(BoTorchInterface, AbstractSurrogateModelInterfaceBase)
|
|
|
255
255
|
|
|
256
256
|
return
|
|
257
257
|
|
|
258
|
-
x = np.array([self.current_prm_values.values()])
|
|
258
|
+
x = np.array([[variable.value for variable in self.current_prm_values.values()]])
|
|
259
259
|
|
|
260
260
|
f_mean, f_std = self.pyfemtet_model_c.predict(x)
|
|
261
261
|
f_mean, f_std = f_mean[0][0], f_std[0][0]
|
|
@@ -4,7 +4,7 @@ from typing import TYPE_CHECKING
|
|
|
4
4
|
|
|
5
5
|
import re
|
|
6
6
|
|
|
7
|
-
from pyfemtet.opt.problem.problem import
|
|
7
|
+
from pyfemtet.opt.problem.problem import *
|
|
8
8
|
from pyfemtet.opt.interface._base_interface import AbstractFEMInterface
|
|
9
9
|
from pyfemtet.opt.interface._excel_interface import ExcelInterface
|
|
10
10
|
from pyfemtet.opt.interface._femtet_interface import FemtetInterface
|
|
@@ -116,7 +116,7 @@ def _class_factory(FEMClass: type[AbstractFEMInterface]) -> type[AbstractFEMInte
|
|
|
116
116
|
ExcelInterface.load_constraints(self, opt, raise_if_no_keyword)
|
|
117
117
|
FEMClass.load_constraints(self, opt)
|
|
118
118
|
|
|
119
|
-
def update_parameter(self, x:
|
|
119
|
+
def update_parameter(self, x: TrialInput) -> None:
|
|
120
120
|
assert self._excel_initialized, '最初に init_excel() を呼び出してください。'
|
|
121
121
|
ExcelInterface.update_parameter(self, x)
|
|
122
122
|
FEMClass.update_parameter(self, x)
|
|
@@ -458,7 +458,6 @@ class AbstractOptimizer:
|
|
|
458
458
|
self,
|
|
459
459
|
opt_: AbstractOptimizer,
|
|
460
460
|
parameters: TrialInput,
|
|
461
|
-
variables_pass_to_fem: dict[str, SupportedVariableTypes],
|
|
462
461
|
history: History = None,
|
|
463
462
|
datetime_start=None,
|
|
464
463
|
trial_id=None,
|
|
@@ -509,8 +508,12 @@ class AbstractOptimizer:
|
|
|
509
508
|
logger.info(parameters)
|
|
510
509
|
|
|
511
510
|
# ===== update FEM parameter =====
|
|
511
|
+
pass_to_fem = self.opt.variable_manager.get_variables(
|
|
512
|
+
filter='pass_to_fem',
|
|
513
|
+
format='raw',
|
|
514
|
+
)
|
|
512
515
|
logger.info(_('updating variables...'))
|
|
513
|
-
opt_.fem.update_parameter(
|
|
516
|
+
opt_.fem.update_parameter(pass_to_fem)
|
|
514
517
|
opt_._check_and_raise_interruption()
|
|
515
518
|
|
|
516
519
|
# ===== evaluate hard constraint =====
|
|
@@ -632,7 +635,6 @@ class AbstractOptimizer:
|
|
|
632
635
|
def solve(
|
|
633
636
|
self,
|
|
634
637
|
x: TrialInput,
|
|
635
|
-
x_pass_to_fem_: dict[str, SupportedVariableTypes],
|
|
636
638
|
opt_: AbstractOptimizer | None = None,
|
|
637
639
|
trial_id: str =None,
|
|
638
640
|
) -> _FReturnValue | None:
|
|
@@ -669,7 +671,7 @@ class AbstractOptimizer:
|
|
|
669
671
|
datetime_start = datetime.datetime.now()
|
|
670
672
|
try:
|
|
671
673
|
f_return = self._solve_or_raise(
|
|
672
|
-
opt_, x,
|
|
674
|
+
opt_, x, self.opt.history,
|
|
673
675
|
datetime_start, trial_id
|
|
674
676
|
)
|
|
675
677
|
|
|
@@ -228,13 +228,12 @@ class OptunaOptimizer(AbstractOptimizer):
|
|
|
228
228
|
|
|
229
229
|
# construct TrialInput
|
|
230
230
|
x = vm.get_variables(filter='parameter')
|
|
231
|
-
x_pass_to_fem: dict[str, SupportedVariableTypes] = vm.get_variables(filter='pass_to_fem', format='dict')
|
|
232
231
|
|
|
233
232
|
# prepare solve
|
|
234
233
|
solve_set = self._get_solve_set()
|
|
235
234
|
|
|
236
235
|
# process main fidelity model
|
|
237
|
-
f_return = solve_set.solve(x
|
|
236
|
+
f_return = solve_set.solve(x)
|
|
238
237
|
if f_return is None:
|
|
239
238
|
y_internal: None = None
|
|
240
239
|
else:
|
|
@@ -244,7 +243,7 @@ class OptunaOptimizer(AbstractOptimizer):
|
|
|
244
243
|
for sub_fidelity_name, sub_opt in self.sub_fidelity_models.items():
|
|
245
244
|
# _SolveSet に特殊な初期化を入れていないので
|
|
246
245
|
# sub fidelity でも初期化せず使用可能
|
|
247
|
-
solve_set.solve(x,
|
|
246
|
+
solve_set.solve(x, sub_opt)
|
|
248
247
|
|
|
249
248
|
# check interruption
|
|
250
249
|
self._check_and_raise_interruption()
|
|
@@ -75,7 +75,9 @@ def _evaluate_pyfemtet_cns(
|
|
|
75
75
|
'アクセスは著しく時間がかかりますので'
|
|
76
76
|
'ご注意ください。'
|
|
77
77
|
))
|
|
78
|
-
pass_to_fem = opt.variable_manager.get_variables(
|
|
78
|
+
pass_to_fem = opt.variable_manager.get_variables(
|
|
79
|
+
filter='pass_to_fem', format='raw'
|
|
80
|
+
)
|
|
79
81
|
opt.fem.update_parameter(pass_to_fem)
|
|
80
82
|
|
|
81
83
|
# eval
|
|
@@ -195,7 +195,9 @@ class ScipyOptimizer(AbstractOptimizer):
|
|
|
195
195
|
# update fem (very slow!)
|
|
196
196
|
if cns.using_fem:
|
|
197
197
|
logger.warning(Msg.WARN_USING_FEM_IN_NLC)
|
|
198
|
-
pass_to_fem = self.variable_manager.get_variables(
|
|
198
|
+
pass_to_fem = self.variable_manager.get_variables(
|
|
199
|
+
filter='pass_to_fem', format='raw'
|
|
200
|
+
)
|
|
199
201
|
self.fem.update_parameter(pass_to_fem)
|
|
200
202
|
|
|
201
203
|
return cns.eval(self.fem)
|
|
@@ -345,12 +347,10 @@ class ScipyOptimizer(AbstractOptimizer):
|
|
|
345
347
|
|
|
346
348
|
# construct TrialInput
|
|
347
349
|
x = vm.get_variables(filter='parameter')
|
|
348
|
-
x_pass_to_fem: dict[str, SupportedVariableTypes] = vm.get_variables(
|
|
349
|
-
filter='pass_to_fem', format='dict')
|
|
350
350
|
|
|
351
351
|
# process main fidelity model
|
|
352
352
|
solve_set = self._get_solve_set()
|
|
353
|
-
f_return = solve_set.solve(x
|
|
353
|
+
f_return = solve_set.solve(x)
|
|
354
354
|
assert f_return is not None
|
|
355
355
|
dict_y_internal = f_return[1]
|
|
356
356
|
y_internal: float = tuple(dict_y_internal.values())[0] # type: ignore
|
|
@@ -7,6 +7,7 @@ from dash import Output, Input, State, callback_context, no_update
|
|
|
7
7
|
from dash.exceptions import PreventUpdate
|
|
8
8
|
|
|
9
9
|
from pyfemtet.opt.history import History
|
|
10
|
+
from pyfemtet.opt.problem.variable_manager import Variable
|
|
10
11
|
|
|
11
12
|
from pyfemtet.opt.visualization.history_viewer._wrapped_components import dcc, dbc, html
|
|
12
13
|
from pyfemtet.opt.visualization.history_viewer._base_application import *
|
|
@@ -326,9 +327,14 @@ class HomePage(AbstractPage):
|
|
|
326
327
|
row = df[df['trial'] == trial]
|
|
327
328
|
prm_names = self.application.history.prm_names
|
|
328
329
|
prm_values = row[prm_names].values.ravel()
|
|
329
|
-
x = {name: value for name, value in zip(prm_names, prm_values)}
|
|
330
330
|
|
|
331
|
-
|
|
331
|
+
pass_to_fem = {}
|
|
332
|
+
for name, value in zip(prm_names, prm_values):
|
|
333
|
+
v = Variable()
|
|
334
|
+
v.name = name
|
|
335
|
+
v.value = value
|
|
336
|
+
pass_to_fem.update({name: v})
|
|
337
|
+
self.femtet_control.fem.update_parameter(pass_to_fem)
|
|
332
338
|
self.femtet_control.fem.update_model()
|
|
333
339
|
|
|
334
340
|
Femtet.SaveProject(Femtet.Project, True)
|
|
@@ -11,7 +11,7 @@ pyfemtet/_i18n/messages.py,sha256=mzTARnpZPZ-Pmcq8RdOyy5a4XGCCSxwxuoHjN_HJ0TM,17
|
|
|
11
11
|
pyfemtet/_util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
pyfemtet/_util/closing.py,sha256=JPcgHDbW249YF20bMOX6UX-LquWoCWA14KhX-qFouR4,502
|
|
13
13
|
pyfemtet/_util/dask_util.py,sha256=Wm_1p_LR1yhhZNaGgazf-yQ-eialLfmqtgBjxha6qWk,2159
|
|
14
|
-
pyfemtet/_util/df_util.py,sha256=
|
|
14
|
+
pyfemtet/_util/df_util.py,sha256=V38c5avzKEvLiSEDLpdo6eTXxDgasCXn3RB1IUF-bNU,1431
|
|
15
15
|
pyfemtet/_util/excel_macro_util.py,sha256=pUCpENpM1q6AbC7wH7rMXwnQ7nIFnabQ4xlbsli9VzM,8028
|
|
16
16
|
pyfemtet/_util/excel_parse_util.py,sha256=k8Y5EI9r0txwkieKUzlZqQ93b-9SMXldNIfq5ksWg28,5525
|
|
17
17
|
pyfemtet/_util/femtet_access_inspection.py,sha256=91E-7wzQTZum1UIsccW26717GnTM2jxf3HeOOR7-lv0,3999
|
|
@@ -31,49 +31,49 @@ pyfemtet/opt/__init__.py,sha256=1LcwTddtoi8plemxkzmX0YEKiNpAZvKn9OoNQysyDLE,339
|
|
|
31
31
|
pyfemtet/opt/exceptions.py,sha256=M_O7jm20Y4e_QxsKF6tnEl-OrAtErUOj6hNT7eEXCO4,1327
|
|
32
32
|
pyfemtet/opt/femopt.py,sha256=Ufp9qJuJIEtP_lJtR-FeCkGtH_Us8imlJ1c-FVrVyLU,23186
|
|
33
33
|
pyfemtet/opt/history/__init__.py,sha256=pUp3SO4R7RGzmpNDLBg_pQH0X2yzBd-oqsHXWmB33os,201
|
|
34
|
-
pyfemtet/opt/history/_history.py,sha256=
|
|
34
|
+
pyfemtet/opt/history/_history.py,sha256=_8cVEbAwj1C2El8dJ_eDVcFgN_IVPyGXVG28LH0OtMw,49263
|
|
35
35
|
pyfemtet/opt/history/_hypervolume.py,sha256=_IvGH71ZNreWvDQCG815Q2hS1OEvPFPQhUnNXf1UxRQ,4449
|
|
36
36
|
pyfemtet/opt/history/_optimality.py,sha256=6vLySZmrrklr04Qir0hGethTykf8NYFod88NDGrBrG0,2407
|
|
37
37
|
pyfemtet/opt/interface/__init__.py,sha256=D88d0yj-pQNvDij4HI2BG3OPXP5tvc5ZOomd_Jp4UE0,964
|
|
38
|
-
pyfemtet/opt/interface/_base_interface.py,sha256=
|
|
38
|
+
pyfemtet/opt/interface/_base_interface.py,sha256=oz2PeEQHWD59xkRWFau3CpPpR8a_3NZjoY7YyYSr1sM,6464
|
|
39
39
|
pyfemtet/opt/interface/_excel_interface/__init__.py,sha256=bFOmY18-j4RJc_dHQMe62GsxFwQSj7RWdvi6jxWuqyg,74
|
|
40
40
|
pyfemtet/opt/interface/_excel_interface/debug-excel-interface.xlsm,sha256=TM1CEOC5XtU7qYKNnHScO02kdtXT-gc5y29m2hatsm0,114259
|
|
41
|
-
pyfemtet/opt/interface/_excel_interface/excel_interface.py,sha256=
|
|
41
|
+
pyfemtet/opt/interface/_excel_interface/excel_interface.py,sha256=a-wS7JuaSON3OZgMvO3_to08nyvypf32upQIrY1m9Ec,39653
|
|
42
42
|
pyfemtet/opt/interface/_femtet_interface/__init__.py,sha256=snQruC8Rl_5rFeVmiqw9lmzdJ5mL42HpIlHIn5ytd8s,77
|
|
43
43
|
pyfemtet/opt/interface/_femtet_interface/_femtet_parametric.py,sha256=dEe6udq2CBpXAcKCye90sXC0UVKok14LORitobc8DK8,10282
|
|
44
|
-
pyfemtet/opt/interface/_femtet_interface/femtet_interface.py,sha256=
|
|
44
|
+
pyfemtet/opt/interface/_femtet_interface/femtet_interface.py,sha256=ZAQJzsPM8EoRv8uiP0Wg4rmbxDOhNWgI97WwTVoFN0s,44731
|
|
45
45
|
pyfemtet/opt/interface/_femtet_with_nx_interface/__init__.py,sha256=ppeoWVSmVsTmDNKpuFRVTnhjcoefQVEog3-FRiKpEe4,104
|
|
46
|
-
pyfemtet/opt/interface/_femtet_with_nx_interface/femtet_with_nx_interface.py,sha256=
|
|
46
|
+
pyfemtet/opt/interface/_femtet_with_nx_interface/femtet_with_nx_interface.py,sha256=XkWwzx7zAs-XSzvEarKjyzrBxMTXLtXaoqQj6M1BQ3g,8539
|
|
47
47
|
pyfemtet/opt/interface/_femtet_with_nx_interface/model1.prt,sha256=cYVw2izr4_9PCPHOpi46XmDVOuNZ5ksuwKqzBtCZfNA,104833
|
|
48
48
|
pyfemtet/opt/interface/_femtet_with_nx_interface/model1.x_t,sha256=BHZJwc9gCCfleIkPMx7hZmNLZ3y6sJamFv6OSsHWhW0,6804
|
|
49
49
|
pyfemtet/opt/interface/_femtet_with_nx_interface/update_model.py,sha256=2U5SJWnG7Tyu6PP_7mtf6dOguNuub8c_1DBRtF0XuT0,3036
|
|
50
50
|
pyfemtet/opt/interface/_femtet_with_solidworks/__init__.py,sha256=5McSpy2uTmJNBylCrKt4xMSq90hlSpqyXYsjwZT3yGA,128
|
|
51
|
-
pyfemtet/opt/interface/_femtet_with_solidworks/femtet_with_solidworks_interface.py,sha256=
|
|
51
|
+
pyfemtet/opt/interface/_femtet_with_solidworks/femtet_with_solidworks_interface.py,sha256=xbdsFTxRPfGqY_VxWqJA7eG9CnRH0NXD8CZc2on-kb4,5835
|
|
52
52
|
pyfemtet/opt/interface/_solidworks_interface/__init__.py,sha256=2c52Hfme1xdJepewRGVkPT4yhrZMQgzlCuqvHzEZPVk,95
|
|
53
|
-
pyfemtet/opt/interface/_solidworks_interface/solidworks_interface.py,sha256=
|
|
53
|
+
pyfemtet/opt/interface/_solidworks_interface/solidworks_interface.py,sha256=VhhcPI7pS6e8LqS48trrafa16Qf27EG_WZ_Jc5xldyg,8279
|
|
54
54
|
pyfemtet/opt/interface/_surrogate_model_interface/__init__.py,sha256=9sjzQjJsMLdpBSpURyl8x4VQHEO_PGYgAshCHoycAPI,252
|
|
55
55
|
pyfemtet/opt/interface/_surrogate_model_interface/base_surrogate_interface.py,sha256=vdYw8m09e6OCSYPsXUCXqoJcA_lpAOAYuEGmqDNgffM,6276
|
|
56
|
-
pyfemtet/opt/interface/_surrogate_model_interface/botorch_interface.py,sha256=
|
|
56
|
+
pyfemtet/opt/interface/_surrogate_model_interface/botorch_interface.py,sha256=ynaHIM08bnbsUhCdQAzumkDL8BlspZY5-ieVihqFeuo,10345
|
|
57
57
|
pyfemtet/opt/interface/_surrogate_model_interface/debug-pof-botorch.reccsv,sha256=Clv7t2vgSWym8-uMQPtcc8-hyjwuCk-b69PjtqWqphc,1910
|
|
58
58
|
pyfemtet/opt/interface/_with_excel_settings/__init__.py,sha256=B3ZTQDNUDpZBLEVnCh2iHL_bnTJTUaclEfOFztHfl5c,2265
|
|
59
|
-
pyfemtet/opt/interface/_with_excel_settings/with_excel_settings.py,sha256=
|
|
59
|
+
pyfemtet/opt/interface/_with_excel_settings/with_excel_settings.py,sha256=KltFEaJGR_rPi2zFq2gZn2DceQxeGeRBSxTQyAtJ2t4,5420
|
|
60
60
|
pyfemtet/opt/meta_script/YAML_Generator.xlsm,sha256=qSWIoOG4dWKxml1ERf8L3S0d3VpzgKdzHNafiJ1XJXs,100738
|
|
61
61
|
pyfemtet/opt/meta_script/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
62
62
|
pyfemtet/opt/meta_script/__main__.py,sha256=9-QM6eZOLpZ_CxERpRu3RAMqpudorSJdPCiK8gg7hgI,8490
|
|
63
63
|
pyfemtet/opt/meta_script/sample/sample.bas,sha256=2iuSYMgPDyAdiSDVGxRu3avjcZYnULz0l8e25YBa7SQ,27966
|
|
64
64
|
pyfemtet/opt/meta_script/sample/sample.femprj,sha256=6_0ywhgXxZjdzZzQFog8mgMUEjKNCFVNlEgAWoptovk,292885
|
|
65
65
|
pyfemtet/opt/optimizer/__init__.py,sha256=A4QYeF0KHEFdwoxLfkDND7ikDQ186Ryy3oXEGdakFSg,463
|
|
66
|
-
pyfemtet/opt/optimizer/_base_optimizer.py,sha256=
|
|
66
|
+
pyfemtet/opt/optimizer/_base_optimizer.py,sha256=GVE4HKQI-l0WvVM3xmrm3sQ04A9tJKfiA-5SECfG6aM,31683
|
|
67
67
|
pyfemtet/opt/optimizer/optuna_optimizer/__init__.py,sha256=u2Bwc79tkZTU5dMbhzzrPQi0RlFg22UgXc-m9K9G6wQ,242
|
|
68
68
|
pyfemtet/opt/optimizer/optuna_optimizer/_optuna_attribute.py,sha256=7eZsruVCGgMlcnf3a9Vf55FOEE-D7V777MJQajI12Cw,1842
|
|
69
|
-
pyfemtet/opt/optimizer/optuna_optimizer/_optuna_optimizer.py,sha256=
|
|
69
|
+
pyfemtet/opt/optimizer/optuna_optimizer/_optuna_optimizer.py,sha256=UWD2o0pUqsQg8ZGE2J847czmNYmAbXvQpVSsDxWmElI,28772
|
|
70
70
|
pyfemtet/opt/optimizer/optuna_optimizer/_pof_botorch/__init__.py,sha256=BFbMNvdXqV9kl1h340pW2sq0-cwNFV5dfTo6UnNnX2M,179
|
|
71
71
|
pyfemtet/opt/optimizer/optuna_optimizer/_pof_botorch/debug-pof-botorch.reccsv,sha256=K6oI9jPi_5yayhBrI9Tm1RX3PoWWKo74TOdqnaPsIy8,1746
|
|
72
|
-
pyfemtet/opt/optimizer/optuna_optimizer/_pof_botorch/enable_nonlinear_constraint.py,sha256=
|
|
72
|
+
pyfemtet/opt/optimizer/optuna_optimizer/_pof_botorch/enable_nonlinear_constraint.py,sha256=0SXZggZrIDoMMMAwQyHuqjirbEOJUm3CZeeQlUErVIE,9850
|
|
73
73
|
pyfemtet/opt/optimizer/optuna_optimizer/_pof_botorch/pof_botorch_sampler.py,sha256=yVQJAD1yJ-Q2aCRuYCCifejjFS0eZmE2IoDTnKQgMko,46822
|
|
74
74
|
pyfemtet/opt/optimizer/optuna_optimizer/wat_ex14_parametric_jp.femprj,sha256=-M54MTNrV7muZWPm9Tjptd6HDdtgUFBsRroC6ytyqa0,180970
|
|
75
75
|
pyfemtet/opt/optimizer/scipy_optimizer/__init__.py,sha256=oXx2JAVLvgz0WwIXAknuV4p2MupaiutYYvjI8hXcFwc,45
|
|
76
|
-
pyfemtet/opt/optimizer/scipy_optimizer/_scipy_optimizer.py,sha256=
|
|
76
|
+
pyfemtet/opt/optimizer/scipy_optimizer/_scipy_optimizer.py,sha256=sZxpb-qnDn1KmwgvZmFgVwCKpTPTGw7Yrlmq3DNin0Q,12796
|
|
77
77
|
pyfemtet/opt/prediction/__init__.py,sha256=-XYo-l5YFjExMtqMKj1YUAhmGSQq_0YITS0qizj2Xbs,104
|
|
78
78
|
pyfemtet/opt/prediction/_botorch_utils.py,sha256=KhPLY4JAPC6BDw_NA_KejzMYPCtGh-Yx1dc7PY1tYVA,3985
|
|
79
79
|
pyfemtet/opt/prediction/_gpytorch_modules_extension.py,sha256=B_qUtFn06dQENOmUOObbCpkeASUKI5JpXROx8zYeaq0,5224
|
|
@@ -107,7 +107,7 @@ pyfemtet/opt/visualization/history_viewer/result_viewer/.gitignore,sha256=ryvb4a
|
|
|
107
107
|
pyfemtet/opt/visualization/history_viewer/result_viewer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
108
108
|
pyfemtet/opt/visualization/history_viewer/result_viewer/__main__.py,sha256=5bskvqYMxmgktfoakI19zgy08XlKOkuVhID6MNZNIyE,154
|
|
109
109
|
pyfemtet/opt/visualization/history_viewer/result_viewer/_application.py,sha256=bhAi8xraVhOmjjY-RhFGIW8zjCOVJnw3wwdbr8rAOa0,1696
|
|
110
|
-
pyfemtet/opt/visualization/history_viewer/result_viewer/_pages.py,sha256=
|
|
110
|
+
pyfemtet/opt/visualization/history_viewer/result_viewer/_pages.py,sha256=9Z1EAAvBiEC6oTKk4Y_8AEZFMGVwVlCqk_dutIk11WA,33313
|
|
111
111
|
pyfemtet/opt/visualization/history_viewer/result_viewer/tutorial_files/tutorial_gau_ex08.csv,sha256=O-6cGVjr4xMYgpkGUDyfm02ccE42cE9DyLl7ioeGbL0,3319
|
|
112
112
|
pyfemtet/opt/visualization/history_viewer/result_viewer/tutorial_files/tutorial_gau_ex08.db,sha256=4WWrvxgWAFdL36Kk7XxK02RvZbOgGkVMerrRfoF_oJw,122880
|
|
113
113
|
pyfemtet/opt/visualization/history_viewer/result_viewer/tutorial_files/tutorial_gau_ex08_parametric.Results/ex8.jpg,sha256=yC5EAxhDCB2Vm0eKH1Ufjp7vdt1GPQWr9Y3rlay-U2E,49141
|
|
@@ -164,9 +164,9 @@ pyfemtet/opt/visualization/plotter/main_figure_creator.py,sha256=9RXz6Wt52MiSz3H
|
|
|
164
164
|
pyfemtet/opt/visualization/plotter/pm_graph_creator.py,sha256=hUvvYeckMhkE1nH0FAOkXrA5K3A8PbfpxKYaYnBllB4,10864
|
|
165
165
|
pyfemtet/opt/wat_ex14_parametric_jp.femprj,sha256=dMwQMt6yok_PbZLyxPYdmg5wJQwgQDZ4RhS76zdGLGk,177944
|
|
166
166
|
pyfemtet/opt/worker_status.py,sha256=xSVW9lcw5jzYBwnmlVzk-1zCCyvmXVOH6EoRjqVbE9M,3605
|
|
167
|
-
pyfemtet-1.0.
|
|
168
|
-
pyfemtet-1.0.
|
|
169
|
-
pyfemtet-1.0.
|
|
170
|
-
pyfemtet-1.0.
|
|
171
|
-
pyfemtet-1.0.
|
|
172
|
-
pyfemtet-1.0.
|
|
167
|
+
pyfemtet-1.0.3.dist-info/LICENSE,sha256=LWUL5LlMGjSRTvsalS8_fFuwS4VMw18fJSNWFwDK8pc,1060
|
|
168
|
+
pyfemtet-1.0.3.dist-info/LICENSE_THIRD_PARTY.txt,sha256=8_9-cgzTpmeuCqItPZb9-lyAZcH2Qp9sZTU_hYuOZIQ,191
|
|
169
|
+
pyfemtet-1.0.3.dist-info/METADATA,sha256=eK32dGgw9BBtWFj_ea8qGSPp9bg37aTLxy48L-KBn-4,3471
|
|
170
|
+
pyfemtet-1.0.3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
171
|
+
pyfemtet-1.0.3.dist-info/entry_points.txt,sha256=Tsb_l_8Z6pyyq2tRfuKiwfJUV3nq_cHoLS61foALtsg,134
|
|
172
|
+
pyfemtet-1.0.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|