pyfemtet 0.3.11__tar.gz → 0.4.1__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.
Potentially problematic release.
This version of pyfemtet might be problematic. Click here for more details.
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/PKG-INFO +4 -4
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/pyfemtet/FemtetPJTSample/NX_ex01/NX_ex01.py +1 -1
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/pyfemtet/FemtetPJTSample/Sldworks_ex01/Sldworks_ex01.py +1 -1
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/pyfemtet/FemtetPJTSample/gau_ex08_parametric.py +1 -1
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/pyfemtet/FemtetPJTSample/her_ex40_parametric.femprj +0 -0
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/pyfemtet/FemtetPJTSample/her_ex40_parametric.py +2 -2
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/pyfemtet/FemtetPJTSample/wat_ex14_parallel_parametric.py +2 -2
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/pyfemtet/FemtetPJTSample/wat_ex14_parametric.femprj +0 -0
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/pyfemtet/FemtetPJTSample/wat_ex14_parametric.py +2 -2
- pyfemtet-0.4.1/pyfemtet/__init__.py +1 -0
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/pyfemtet/core.py +14 -0
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/pyfemtet/dispatch_extensions.py +5 -0
- pyfemtet-0.4.1/pyfemtet/opt/__init__.py +22 -0
- pyfemtet-0.4.1/pyfemtet/opt/_femopt.py +544 -0
- pyfemtet-0.4.1/pyfemtet/opt/_femopt_core.py +730 -0
- pyfemtet-0.4.1/pyfemtet/opt/interface/__init__.py +15 -0
- pyfemtet-0.4.1/pyfemtet/opt/interface/_base.py +71 -0
- pyfemtet-0.3.11/pyfemtet/opt/interface.py → pyfemtet-0.4.1/pyfemtet/opt/interface/_femtet.py +120 -413
- pyfemtet-0.4.1/pyfemtet/opt/interface/_femtet_with_nx/__init__.py +3 -0
- pyfemtet-0.4.1/pyfemtet/opt/interface/_femtet_with_nx/_interface.py +128 -0
- pyfemtet-0.4.1/pyfemtet/opt/interface/_femtet_with_sldworks.py +174 -0
- pyfemtet-0.4.1/pyfemtet/opt/opt/__init__.py +8 -0
- pyfemtet-0.4.1/pyfemtet/opt/opt/_base.py +202 -0
- pyfemtet-0.4.1/pyfemtet/opt/opt/_optuna.py +240 -0
- pyfemtet-0.4.1/pyfemtet/opt/visualization/__init__.py +7 -0
- pyfemtet-0.4.1/pyfemtet/opt/visualization/_graphs.py +222 -0
- pyfemtet-0.4.1/pyfemtet/opt/visualization/_monitor.py +1149 -0
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/pyproject.toml +7 -3
- pyfemtet-0.3.11/pyfemtet/__init__.py +0 -1
- pyfemtet-0.3.11/pyfemtet/opt/__init__.py +0 -2
- pyfemtet-0.3.11/pyfemtet/opt/base.py +0 -1490
- pyfemtet-0.3.11/pyfemtet/opt/monitor.py +0 -474
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/LICENSE +0 -0
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/README.md +0 -0
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/pyfemtet/FemtetPJTSample/NX_ex01/NX_ex01.femprj +0 -0
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/pyfemtet/FemtetPJTSample/NX_ex01/NX_ex01.prt +0 -0
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/pyfemtet/FemtetPJTSample/Sldworks_ex01/Sldworks_ex01.SLDPRT +0 -0
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/pyfemtet/FemtetPJTSample/Sldworks_ex01/Sldworks_ex01.femprj +0 -0
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/pyfemtet/FemtetPJTSample/gau_ex08_parametric.femprj +0 -0
- {pyfemtet-0.3.11 → pyfemtet-0.4.1}/pyfemtet/logger.py +0 -0
- {pyfemtet-0.3.11/pyfemtet/opt/_FemtetWithNX → pyfemtet-0.4.1/pyfemtet/opt/interface/_femtet_with_nx}/update_model.py +0 -0
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyfemtet
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: Design parameter optimization using Femtet.
|
|
5
5
|
Home-page: https://github.com/pyfemtet/pyfemtet
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
Author: kazuma.naito
|
|
8
8
|
Author-email: kazuma.naito@murata.com
|
|
9
|
-
Requires-Python: >=3.9,<3.13
|
|
9
|
+
Requires-Python: >=3.9.3,<3.13
|
|
10
10
|
Classifier: License :: OSI Approved :: BSD License
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.10
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
-
Requires-Dist: botorch (>=0.9.5,<0.10.0)
|
|
15
|
+
Requires-Dist: botorch (>=0.9.5,<0.10.0) ; python_version < "3.12"
|
|
17
16
|
Requires-Dist: colorlog (>=6.8.0,<7.0.0)
|
|
18
17
|
Requires-Dist: dash (>=2.14.2,<3.0.0)
|
|
19
18
|
Requires-Dist: dash-bootstrap-components (>=1.5.0,<2.0.0)
|
|
@@ -23,6 +22,7 @@ Requires-Dist: femtetutils (>=1.0.0,<2.0.0)
|
|
|
23
22
|
Requires-Dist: numpy (>=1.26.2,<2.0.0)
|
|
24
23
|
Requires-Dist: openpyxl (>=3.1.2,<4.0.0)
|
|
25
24
|
Requires-Dist: optuna (>=3.4.0,<4.0.0)
|
|
25
|
+
Requires-Dist: optuna-integration (>=3.6.0,<4.0.0)
|
|
26
26
|
Requires-Dist: pandas (>=2.1.3,<3.0.0)
|
|
27
27
|
Requires-Dist: plotly (>=5.18.0,<6.0.0)
|
|
28
28
|
Requires-Dist: psutil (>=5.9.6,<6.0.0)
|
|
Binary file
|
|
@@ -110,7 +110,7 @@ if __name__ == '__main__':
|
|
|
110
110
|
opt = OptunaOptimizer(
|
|
111
111
|
sampler_class=BoTorchSampler,
|
|
112
112
|
sampler_kwargs=dict(
|
|
113
|
-
n_startup_trials=
|
|
113
|
+
n_startup_trials=10,
|
|
114
114
|
)
|
|
115
115
|
)
|
|
116
116
|
|
|
@@ -132,5 +132,5 @@ if __name__ == '__main__':
|
|
|
132
132
|
femopt.add_objective(s.get_resonance_frequency, '第一共振周波数(GHz)', direction=3.0)
|
|
133
133
|
|
|
134
134
|
femopt.set_random_seed(42)
|
|
135
|
-
femopt.
|
|
135
|
+
femopt.optimize(n_trials=20)
|
|
136
136
|
femopt.terminate_all()
|
|
@@ -32,7 +32,7 @@ def substrate_size(Femtet):
|
|
|
32
32
|
Femtet : マクロを使用するためのインスタンスです。詳しくは "Femtet マクロヘルプ / CFemtet クラス" をご覧ください。
|
|
33
33
|
目的関数は第一引数に Femtet インスタンスを取る必要があります。
|
|
34
34
|
|
|
35
|
-
subs_w * subs_d : XY
|
|
35
|
+
subs_w * subs_d : XY 平面における基板の占有面積です。
|
|
36
36
|
目的関数は単一の float を返す必要があります。
|
|
37
37
|
|
|
38
38
|
"""
|
|
@@ -59,5 +59,5 @@ if __name__ == '__main__':
|
|
|
59
59
|
# 最適化の実行
|
|
60
60
|
femopt.set_random_seed(42)
|
|
61
61
|
# femopt.main(n_trials=20)
|
|
62
|
-
femopt.
|
|
62
|
+
femopt.optimize(n_trials=20, n_parallel=3) # ここのみ wat_ex14_parametric.py から変更しました。
|
|
63
63
|
femopt.terminate_all()
|
|
Binary file
|
|
@@ -32,7 +32,7 @@ def substrate_size(Femtet):
|
|
|
32
32
|
Femtet : マクロを使用するためのインスタンスです。詳しくは "Femtet マクロヘルプ / CFemtet クラス" をご覧ください。
|
|
33
33
|
目的関数は第一引数に Femtet インスタンスを取る必要があります。
|
|
34
34
|
|
|
35
|
-
subs_w * subs_d : XY
|
|
35
|
+
subs_w * subs_d : XY 平面における基板の占有面積です。
|
|
36
36
|
目的関数は単一の float を返す必要があります。
|
|
37
37
|
|
|
38
38
|
"""
|
|
@@ -58,5 +58,5 @@ if __name__ == '__main__':
|
|
|
58
58
|
|
|
59
59
|
# 最適化の実行
|
|
60
60
|
femopt.set_random_seed(42)
|
|
61
|
-
femopt.
|
|
61
|
+
femopt.optimize(n_trials=20)
|
|
62
62
|
femopt.terminate_all()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.1"
|
|
@@ -36,3 +36,17 @@ class SolveError(Exception):
|
|
|
36
36
|
class FemtetAutomationError(Exception):
|
|
37
37
|
"""Exception raised for errors in automating Femtet."""
|
|
38
38
|
pass
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def _version(
|
|
42
|
+
main=None,
|
|
43
|
+
major=None,
|
|
44
|
+
minor=None,
|
|
45
|
+
Femtet=None,
|
|
46
|
+
):
|
|
47
|
+
if Femtet is not None:
|
|
48
|
+
assert (main is None) and (major is None) and (minor is None), 'バージョンを指定しないでください'
|
|
49
|
+
main, major, minor = [int(v) for v in Femtet.Version.split('.')[:3]]
|
|
50
|
+
else:
|
|
51
|
+
assert (main is not None) and (major is not None) and (minor is not None), 'バージョンを指定してください'
|
|
52
|
+
return main*10000 + major*100 + minor
|
|
@@ -186,6 +186,7 @@ def dispatch_femtet(timeout=DISPATCH_TIMEOUT, subprocess_log_prefix='') -> Tuple
|
|
|
186
186
|
|
|
187
187
|
Args:
|
|
188
188
|
timeout (int or float, optional): Seconds to wait for connection. Defaults to DISPATCH_TIMEOUT.
|
|
189
|
+
subprocess_log_prefix (str, optional): The prefix of log message.
|
|
189
190
|
|
|
190
191
|
Raises:
|
|
191
192
|
FemtetConnectionTimeoutError: Couldn't connect Femtet process for some reason (i.e. Femtet.exe is not launched).
|
|
@@ -461,6 +462,10 @@ def dispatch_specific_femtet_core(pid, timeout=DISPATCH_TIMEOUT) -> Tuple[IFemte
|
|
|
461
462
|
return Femtet, my_pid
|
|
462
463
|
|
|
463
464
|
|
|
465
|
+
def _debug():
|
|
466
|
+
launch_and_dispatch_femtet(5)
|
|
467
|
+
|
|
468
|
+
|
|
464
469
|
if __name__ == '__main__':
|
|
465
470
|
_Femtet, _my_pid = launch_and_dispatch_femtet(5)
|
|
466
471
|
# _Femtet, _my_pid = dispatch_specific_femtet(pid=26124)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from pyfemtet.opt.interface import FEMInterface
|
|
2
|
+
from pyfemtet.opt.interface import NoFEM
|
|
3
|
+
from pyfemtet.opt.interface import FemtetInterface
|
|
4
|
+
from pyfemtet.opt.interface import FemtetWithNXInterface
|
|
5
|
+
from pyfemtet.opt.interface import FemtetWithSolidworksInterface
|
|
6
|
+
|
|
7
|
+
from pyfemtet.opt.opt import OptunaOptimizer
|
|
8
|
+
from pyfemtet.opt.opt import AbstractOptimizer
|
|
9
|
+
|
|
10
|
+
from pyfemtet.opt._femopt import FEMOpt
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
__all__ = [
|
|
14
|
+
'FEMOpt',
|
|
15
|
+
'FEMInterface',
|
|
16
|
+
'NoFEM',
|
|
17
|
+
'FemtetInterface',
|
|
18
|
+
'FemtetWithNXInterface',
|
|
19
|
+
'FemtetWithSolidworksInterface',
|
|
20
|
+
'AbstractOptimizer',
|
|
21
|
+
'OptunaOptimizer',
|
|
22
|
+
]
|