pyfemtet 0.8.9__tar.gz → 0.8.11__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.8.9 → pyfemtet-0.8.11}/PKG-INFO +2 -1
- pyfemtet-0.8.11/pyfemtet/__init__.py +1 -0
- pyfemtet-0.8.11/pyfemtet/_message/locales/ja/LC_MESSAGES/messages.mo +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/_message/locales/ja/LC_MESSAGES/messages.po +10 -2
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/_message/locales/messages.pot +10 -2
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/_message/messages.py +2 -1
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/_util/excel_parse_util.py +33 -15
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/_femopt.py +2 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/_femopt_core.py +3 -3
- pyfemtet-0.8.11/pyfemtet/opt/advanced_samples/excel_ui/femtet-macro.xlsm +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/interface/__init__.py +1 -1
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/interface/_base.py +13 -4
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/interface/_excel_interface.py +57 -45
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/interface/_femtet.py +6 -2
- pyfemtet-0.8.11/pyfemtet/opt/interface/_femtet_excel.py +141 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/interface/_femtet_parametric.py +2 -1
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/interface/_surrogate/_base.py +43 -0
- pyfemtet-0.8.11/pyfemtet/opt/interface/_surrogate_excel.py +102 -0
- pyfemtet-0.8.11/pyfemtet/opt/meta_script/YAML_Generator.xlsm +0 -0
- pyfemtet-0.8.11/pyfemtet/opt/meta_script/__main__.py +213 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/visualization/_process_monitor/pages.py +13 -0
- pyfemtet-0.8.11/pyfemtet/opt/visualization/result_viewer/__init__.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyproject.toml +2 -1
- pyfemtet-0.8.9/pyfemtet/__init__.py +0 -1
- pyfemtet-0.8.9/pyfemtet/_message/locales/ja/LC_MESSAGES/messages.mo +0 -0
- pyfemtet-0.8.9/pyfemtet/opt/advanced_samples/excel_ui/femtet-macro.xlsm +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/LICENSE +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/README.md +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/_femtet_config_util/__init__.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/_femtet_config_util/autosave.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/_femtet_config_util/exit.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/_message/1. make_pot.bat +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/_message/2. make_mo.bat +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/_message/__init__.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/_message/babel.cfg +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/_util/__init__.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/_util/dask_util.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/_util/excel_macro_util.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/_util/sample.xlsx +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/_warning.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/brep/__init__.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/brep/_impl.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/core.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/dispatch_extensions/__init__.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/dispatch_extensions/_impl.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/logger/__init__.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/logger/_impl.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/__init__.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/_test_utils/__init__.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/_test_utils/control_femtet.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/_test_utils/hyper_sphere.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/_test_utils/record_history.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/advanced_samples/excel_ui/(ref) original_project.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/advanced_samples/excel_ui/pyfemtet-core.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/advanced_samples/excel_ui/test-pyfemtet-core.cmd +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/advanced_samples/restart/gal_ex13_parametric.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/advanced_samples/restart/gal_ex13_parametric_restart.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/advanced_samples/restart/gal_ex13_parametric_restart_jp.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/advanced_samples/surrogate_model/gal_ex13_create_training_data.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/advanced_samples/surrogate_model/gal_ex13_create_training_data_jp.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/advanced_samples/surrogate_model/gal_ex13_optimize_with_surrogate.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/advanced_samples/surrogate_model/gal_ex13_optimize_with_surrogate_jp.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/advanced_samples/surrogate_model/gal_ex13_parametric.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/interface/_femtet_with_nx/__init__.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/interface/_femtet_with_nx/_interface.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/interface/_femtet_with_nx/update_model.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/interface/_femtet_with_sldworks.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/interface/_surrogate/__init__.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/interface/_surrogate/_chaospy.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/interface/_surrogate/_singletaskgp.py +0 -0
- {pyfemtet-0.8.9/pyfemtet/opt/optimizer/_optuna → pyfemtet-0.8.11/pyfemtet/opt/meta_script}/__init__.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/optimizer/__init__.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/optimizer/_base.py +0 -0
- {pyfemtet-0.8.9/pyfemtet/opt/optimizer/_optuna/_botorch_patch → pyfemtet-0.8.11/pyfemtet/opt/optimizer/_optuna}/__init__.py +0 -0
- {pyfemtet-0.8.9/pyfemtet/opt/prediction → pyfemtet-0.8.11/pyfemtet/opt/optimizer/_optuna/_botorch_patch}/__init__.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/optimizer/_optuna/_botorch_patch/enable_nonlinear_constraint.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/optimizer/_optuna/_optuna.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/optimizer/_optuna/_pof_botorch.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/optimizer/_scipy.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/optimizer/_scipy_scalar.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/optimizer/parameter.py +0 -0
- {pyfemtet-0.8.9/pyfemtet/opt/visualization → pyfemtet-0.8.11/pyfemtet/opt/prediction}/__init__.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/prediction/_base.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/prediction/single_task_gp.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/ParametricIF.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/ParametricIF.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/ParametricIF_test_result.reccsv +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/cad_ex01_NX.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/cad_ex01_NX.prt +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/cad_ex01_NX.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/cad_ex01_NX_test_result.reccsv +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/cad_ex01_SW.SLDPRT +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/cad_ex01_SW.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/cad_ex01_SW.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/cad_ex01_SW_test_result.reccsv +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/constrained_pipe.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/constrained_pipe.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/constrained_pipe_test_result.reccsv +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/gal_ex58_parametric.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/gal_ex58_parametric.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/gal_ex58_parametric_test_result.reccsv +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/gau_ex08_parametric.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/gau_ex08_parametric.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/gau_ex08_parametric_test_result.reccsv +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/gau_ex12_parametric.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/gau_ex12_parametric.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/her_ex40_parametric.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/her_ex40_parametric.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/her_ex40_parametric_test_result.reccsv +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/paswat_ex1_parametric.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/paswat_ex1_parametric.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/paswat_ex1_parametric_parallel.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/paswat_ex1_parametric_test_result.reccsv +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/wat_ex14_parametric.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/wat_ex14_parametric.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/wat_ex14_parametric_parallel.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample/wat_ex14_parametric_test_result.reccsv +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/ParametricIF_jp.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/ParametricIF_jp.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/cad_ex01_NX_jp.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/cad_ex01_NX_jp.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/cad_ex01_SW_jp.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/cad_ex01_SW_jp.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/constrained_pipe_jp.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/gal_ex58_parametric_jp.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/gal_ex58_parametric_jp.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/gau_ex08_parametric_jp.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/gau_ex08_parametric_jp.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/gau_ex12_parametric_jp.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/her_ex40_parametric_jp.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/her_ex40_parametric_jp.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/paswat_ex1_parametric_jp.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/paswat_ex1_parametric_jp.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/paswat_ex1_parametric_parallel_jp.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/wat_ex14_parametric_jp.femprj +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/wat_ex14_parametric_jp.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/samples/femprj_sample_jp/wat_ex14_parametric_parallel_jp.py +0 -0
- {pyfemtet-0.8.9/pyfemtet/opt/visualization/_complex_components → pyfemtet-0.8.11/pyfemtet/opt/visualization}/__init__.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/visualization/_base.py +0 -0
- {pyfemtet-0.8.9/pyfemtet/opt/visualization/_process_monitor → pyfemtet-0.8.11/pyfemtet/opt/visualization/_complex_components}/__init__.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/visualization/_complex_components/alert_region.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/visualization/_complex_components/control_femtet.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/visualization/_complex_components/main_figure_creator.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/visualization/_complex_components/main_graph.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/visualization/_complex_components/pm_graph.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/visualization/_complex_components/pm_graph_creator.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/visualization/_create_wrapped_components.py +0 -0
- {pyfemtet-0.8.9/pyfemtet/opt/visualization/_wrapped_components → pyfemtet-0.8.11/pyfemtet/opt/visualization/_process_monitor}/__init__.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/visualization/_process_monitor/application.py +0 -0
- {pyfemtet-0.8.9/pyfemtet/opt/visualization/result_viewer → pyfemtet-0.8.11/pyfemtet/opt/visualization/_wrapped_components}/__init__.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/visualization/_wrapped_components/dbc.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/visualization/_wrapped_components/dcc.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/visualization/_wrapped_components/html.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/visualization/_wrapped_components/str_enum.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/visualization/result_viewer/.gitignore +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/visualization/result_viewer/application.py +0 -0
- {pyfemtet-0.8.9 → pyfemtet-0.8.11}/pyfemtet/opt/visualization/result_viewer/pages.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: pyfemtet
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.11
|
|
4
4
|
Summary: Design parameter optimization using Femtet.
|
|
5
5
|
License: BSD-3-Clause
|
|
6
6
|
Author: kazuma.naito
|
|
@@ -30,6 +30,7 @@ Requires-Dist: pandas (>=2.2.3,<3.0.0)
|
|
|
30
30
|
Requires-Dist: plotly (>=5.22.0,<6.0.0)
|
|
31
31
|
Requires-Dist: psutil (>=5.9.6,<6.0.0)
|
|
32
32
|
Requires-Dist: pywin32 (>=306,<307) ; sys_platform == "win32"
|
|
33
|
+
Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
|
|
33
34
|
Requires-Dist: scipy (>=1.11.4,<2.0.0)
|
|
34
35
|
Requires-Dist: torch (>=2.5.1,<2.6.0) ; sys_platform != "linux"
|
|
35
36
|
Requires-Dist: torch (>=2.5.1,<2.6.0) ; sys_platform == "linux"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.8.11"
|
|
Binary file
|
|
@@ -7,7 +7,7 @@ msgid ""
|
|
|
7
7
|
msgstr ""
|
|
8
8
|
"Project-Id-Version: PROJECT VERSION\n"
|
|
9
9
|
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
|
10
|
-
"POT-Creation-Date: 2025-
|
|
10
|
+
"POT-Creation-Date: 2025-02-19 13:47+0900\n"
|
|
11
11
|
"PO-Revision-Date: 2024-07-22 14:05+0900\n"
|
|
12
12
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
13
13
|
"Language: ja\n"
|
|
@@ -16,7 +16,7 @@ msgstr ""
|
|
|
16
16
|
"MIME-Version: 1.0\n"
|
|
17
17
|
"Content-Type: text/plain; charset=utf-8\n"
|
|
18
18
|
"Content-Transfer-Encoding: 8bit\n"
|
|
19
|
-
"Generated-By: Babel 2.
|
|
19
|
+
"Generated-By: Babel 2.17.0\n"
|
|
20
20
|
|
|
21
21
|
#: pyfemtet/_message/messages.py:30
|
|
22
22
|
msgid "hello!"
|
|
@@ -542,6 +542,14 @@ msgstr "ひとつの設計変数に対する目的関数の変化"
|
|
|
542
542
|
msgid "The vertical axis is objective, and the horizontal axis is parameter."
|
|
543
543
|
msgstr "縦軸は目的関数、横軸は設計変数です。"
|
|
544
544
|
|
|
545
|
+
#: pyfemtet/_message/messages.py:201
|
|
546
|
+
msgid "The importance of parameters evaluated by fANOVA"
|
|
547
|
+
msgstr "fANOVA に基づくパラメータ重要度"
|
|
548
|
+
|
|
549
|
+
#: pyfemtet/_message/messages.py:202
|
|
550
|
+
msgid "The normalized relative importance of parameters. Please note that the importance is calculated from the overall relationship of the input-output response, rather than from a specific solution."
|
|
551
|
+
msgstr "相対的なパラメータの重要度です。この重要度は特定の解におけるものではなく、入力-出力応答全体の関係から計算されていることに注意してください。"
|
|
552
|
+
|
|
545
553
|
#~ msgid "The magnitude relationship is incorrect. "
|
|
546
554
|
#~ msgstr ""
|
|
547
555
|
|
|
@@ -8,14 +8,14 @@ msgid ""
|
|
|
8
8
|
msgstr ""
|
|
9
9
|
"Project-Id-Version: PROJECT VERSION\n"
|
|
10
10
|
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
|
11
|
-
"POT-Creation-Date: 2025-
|
|
11
|
+
"POT-Creation-Date: 2025-02-19 13:47+0900\n"
|
|
12
12
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
|
13
13
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
14
14
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
15
15
|
"MIME-Version: 1.0\n"
|
|
16
16
|
"Content-Type: text/plain; charset=utf-8\n"
|
|
17
17
|
"Content-Transfer-Encoding: 8bit\n"
|
|
18
|
-
"Generated-By: Babel 2.
|
|
18
|
+
"Generated-By: Babel 2.17.0\n"
|
|
19
19
|
|
|
20
20
|
#: pyfemtet/_message/messages.py:30
|
|
21
21
|
msgid "hello!"
|
|
@@ -541,3 +541,11 @@ msgstr ""
|
|
|
541
541
|
msgid "The vertical axis is objective, and the horizontal axis is parameter."
|
|
542
542
|
msgstr ""
|
|
543
543
|
|
|
544
|
+
#: pyfemtet/_message/messages.py:201
|
|
545
|
+
msgid "The importance of parameters evaluated by fANOVA"
|
|
546
|
+
msgstr ""
|
|
547
|
+
|
|
548
|
+
#: pyfemtet/_message/messages.py:202
|
|
549
|
+
msgid "The normalized relative importance of parameters. Please note that the importance is calculated from the overall relationship of the input-output response, rather than from a specific solution."
|
|
550
|
+
msgstr ""
|
|
551
|
+
|
|
@@ -198,4 +198,5 @@ class Message:
|
|
|
198
198
|
DETAIL_PAGE_CONTOUR_DESCRIPTION = _('The axes are parameters, and the color shows objective value.')
|
|
199
199
|
DETAIL_PAGE_SLICE_HEADER = _('The response of an objective versus one parameter')
|
|
200
200
|
DETAIL_PAGE_SLICE_DESCRIPTION = _('The vertical axis is objective, and the horizontal axis is parameter.')
|
|
201
|
-
|
|
201
|
+
DETAIL_PAGE_IMPORTANCE_HEADER = _('The importance of parameters evaluated by fANOVA')
|
|
202
|
+
DETAIL_PAGE_IMPORTANCE_DESCRIPTION = _('The normalized relative importance of parameters. Please note that the importance is calculated from the overall relationship of the input-output response, rather than from a specific solution.')
|
|
@@ -13,15 +13,15 @@ __all__ = [
|
|
|
13
13
|
]
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
def parse_excel(book_path, sheet_name, keyword, required, optional) -> pd.DataFrame:
|
|
16
|
+
def parse_excel(book_path, sheet_name, keyword, required, optional, raise_if_no_keyword=True) -> pd.DataFrame:
|
|
17
17
|
"""Excel シートからパラメータを取得します。
|
|
18
18
|
|
|
19
19
|
シートのパースプロセスは以下の通りです。
|
|
20
20
|
|
|
21
21
|
1. シート全体 (A1 セルから、値が入力されている最終セルまで) をデータに取り込みます。
|
|
22
|
-
2.
|
|
23
|
-
3.
|
|
24
|
-
4.
|
|
22
|
+
2. 最も左上(上が優先)にある keyword に一致するセルより上および左の行・列をデータから除きます。
|
|
23
|
+
3. その時点のデータの上から順に見てすべてのセルが空白である行以下の行をデータから除きます。
|
|
24
|
+
4. すべてのセルが空白である列をデータから除きます。
|
|
25
25
|
|
|
26
26
|
Args:
|
|
27
27
|
book_path: Excel book のパス。
|
|
@@ -29,6 +29,7 @@ def parse_excel(book_path, sheet_name, keyword, required, optional) -> pd.DataFr
|
|
|
29
29
|
keyword (str): 必ず含まれるべき、表データの最初の列名として使う文字列。
|
|
30
30
|
required (list[str]): 必ず含まれるべき、表データの列名として使う文字列のリスト。
|
|
31
31
|
optional (list[str]): 表データの列名として使ってよい文字列のリスト。
|
|
32
|
+
raise_if_no_keyword (bool, optional): 指定されたシートに keyword が含まれない場合エラーにするかどうか。
|
|
32
33
|
|
|
33
34
|
Returns:
|
|
34
35
|
|
|
@@ -41,21 +42,31 @@ def parse_excel(book_path, sheet_name, keyword, required, optional) -> pd.DataFr
|
|
|
41
42
|
# 読み込み
|
|
42
43
|
df = pd.read_excel(book_path, sheet_name, header=None)
|
|
43
44
|
|
|
44
|
-
# NaN のみからなる列を削除する
|
|
45
|
-
valid_columns = [col for col in df.columns if df[col].notna().sum()]
|
|
46
|
-
df = df[valid_columns]
|
|
47
|
-
|
|
48
|
-
# NaN のみからなる行を削除する
|
|
49
|
-
valid_rows = [row for row in df.index if df.loc[row].notna().sum()]
|
|
50
|
-
df = df.loc[valid_rows]
|
|
51
|
-
|
|
52
45
|
# 「変数名」を左上とする表にする
|
|
53
|
-
df: pd.DataFrame
|
|
54
46
|
idx = np.where(df.values == keyword)
|
|
47
|
+
if len(idx[0]) == 0:
|
|
48
|
+
if raise_if_no_keyword:
|
|
49
|
+
raise RuntimeError(f'keyword "{keyword}" is lacked in {sheet_name}. ')
|
|
50
|
+
else:
|
|
51
|
+
return pd.DataFrame()
|
|
52
|
+
|
|
55
53
|
r = idx[0][0]
|
|
56
54
|
c = idx[1][0]
|
|
57
55
|
df = pd.DataFrame(df.iloc[1+r:, c:].values, columns=df.iloc[r, c:].values)
|
|
58
56
|
|
|
57
|
+
# NaN のみからなる行を最初に見つけるまでデータに追加する
|
|
58
|
+
valid_rows = []
|
|
59
|
+
for row in df.index:
|
|
60
|
+
if df.loc[row].notna().sum():
|
|
61
|
+
valid_rows.append(row)
|
|
62
|
+
else:
|
|
63
|
+
break
|
|
64
|
+
df = df.loc[valid_rows]
|
|
65
|
+
|
|
66
|
+
# NaN のみからなる列を削除する
|
|
67
|
+
valid_columns = [col for i, col in enumerate(df.columns) if df.iloc[:, i].notna().sum()]
|
|
68
|
+
df = df[valid_columns]
|
|
69
|
+
|
|
59
70
|
# パースが成功しているかチェックする
|
|
60
71
|
lack = True
|
|
61
72
|
for col in df.columns:
|
|
@@ -76,8 +87,15 @@ class ParseBase:
|
|
|
76
87
|
OPTIONAL_COLUMNS = []
|
|
77
88
|
|
|
78
89
|
@classmethod
|
|
79
|
-
def parse(cls, book_path, sheet_name) -> pd.DataFrame:
|
|
80
|
-
return parse_excel(
|
|
90
|
+
def parse(cls, book_path, sheet_name, raise_if_no_keyword=True) -> pd.DataFrame:
|
|
91
|
+
return parse_excel(
|
|
92
|
+
book_path,
|
|
93
|
+
sheet_name,
|
|
94
|
+
cls.KEYWORD,
|
|
95
|
+
cls.REQUIRED_COLUMNS,
|
|
96
|
+
cls.OPTIONAL_COLUMNS,
|
|
97
|
+
raise_if_no_keyword,
|
|
98
|
+
)
|
|
81
99
|
|
|
82
100
|
|
|
83
101
|
class ParseAsParameter(ParseBase):
|
|
@@ -139,6 +139,7 @@ class FEMOpt:
|
|
|
139
139
|
self.monitor_host_record = None
|
|
140
140
|
self._hv_reference = None
|
|
141
141
|
self._extra_space_dir = None
|
|
142
|
+
self._opt_exceptions = []
|
|
142
143
|
|
|
143
144
|
# multiprocess 時に pickle できないオブジェクト参照の削除
|
|
144
145
|
def __getstate__(self):
|
|
@@ -925,6 +926,7 @@ class FEMOpt:
|
|
|
925
926
|
sleep(1) # monitor が terminated 状態で少なくとも一度更新されなければ running のまま固まる
|
|
926
927
|
|
|
927
928
|
# 全ての Exception を再表示
|
|
929
|
+
self._opt_exceptions = opt_exceptions
|
|
928
930
|
for i, opt_exception in enumerate(opt_exceptions):
|
|
929
931
|
if opt_exception is not None:
|
|
930
932
|
print()
|
|
@@ -306,7 +306,7 @@ class Function:
|
|
|
306
306
|
fun.__globals__[varname] = _Scapegoat()
|
|
307
307
|
|
|
308
308
|
self.fun = fun
|
|
309
|
-
self.name = name
|
|
309
|
+
self.name: str = name
|
|
310
310
|
self.args = args
|
|
311
311
|
self.kwargs = kwargs
|
|
312
312
|
|
|
@@ -325,7 +325,7 @@ class Function:
|
|
|
325
325
|
args = self.args
|
|
326
326
|
# Femtet 特有の処理
|
|
327
327
|
if isinstance(fem, FemtetInterface):
|
|
328
|
-
args = (fem.
|
|
328
|
+
args = (fem.object_passed_to_functions, *args)
|
|
329
329
|
return float(self.fun(*args, **self.kwargs))
|
|
330
330
|
|
|
331
331
|
def _restore_constants(self):
|
|
@@ -853,7 +853,7 @@ class History:
|
|
|
853
853
|
|
|
854
854
|
# 最小化問題に変換された objective values を取得
|
|
855
855
|
raw_objective_values = df[self.obj_names].values
|
|
856
|
-
objective_values = np.full_like(raw_objective_values, np.nan)
|
|
856
|
+
objective_values = np.full_like(raw_objective_values, np.nan, dtype=float)
|
|
857
857
|
for n_trial in range(len(raw_objective_values)):
|
|
858
858
|
for obj_idx, (_, objective) in enumerate(objectives.items()):
|
|
859
859
|
objective_values[n_trial, obj_idx] = objective.convert(raw_objective_values[n_trial, obj_idx])
|
|
Binary file
|
|
@@ -24,18 +24,27 @@ class FEMInterface(ABC):
|
|
|
24
24
|
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
|
+
kwargs = None
|
|
28
|
+
|
|
27
29
|
def __init__(
|
|
28
30
|
self,
|
|
29
31
|
**kwargs
|
|
30
32
|
):
|
|
31
33
|
# restore のための情報保管
|
|
32
|
-
self.kwargs
|
|
34
|
+
if self.kwargs is None:
|
|
35
|
+
self.kwargs = kwargs
|
|
36
|
+
else:
|
|
37
|
+
self.kwargs.update(kwargs)
|
|
33
38
|
|
|
34
39
|
@abstractmethod
|
|
35
40
|
def update(self, parameters: pd.DataFrame) -> None:
|
|
36
41
|
"""Updates the FEM analysis based on the proposed parameters."""
|
|
37
42
|
raise NotImplementedError('update() must be implemented.')
|
|
38
43
|
|
|
44
|
+
@property
|
|
45
|
+
def object_passed_to_functions(self):
|
|
46
|
+
return self
|
|
47
|
+
|
|
39
48
|
def check_param_value(self, param_name) -> float or None:
|
|
40
49
|
"""Checks the value of a parameter in the FEM model (if implemented in concrete class)."""
|
|
41
50
|
pass
|
|
@@ -50,13 +59,13 @@ class FEMInterface(ABC):
|
|
|
50
59
|
pass
|
|
51
60
|
|
|
52
61
|
def load_parameter(self, opt) -> None: # opt: AbstractOptimizer
|
|
53
|
-
|
|
62
|
+
pass
|
|
54
63
|
|
|
55
64
|
def load_objective(self, opt) -> None: # opt: AbstractOptimizer
|
|
56
|
-
|
|
65
|
+
pass
|
|
57
66
|
|
|
58
67
|
def load_constraint(self, opt) -> None: # opt: AbstractOptimizer
|
|
59
|
-
|
|
68
|
+
pass
|
|
60
69
|
|
|
61
70
|
def _setup_before_parallel(self, client) -> None:
|
|
62
71
|
"""Preprocessing before launching a dask worker (if implemented in concrete class).
|
|
@@ -55,36 +55,36 @@ class ExcelInterface(FEMInterface):
|
|
|
55
55
|
input_xlsm_path (str or Path):
|
|
56
56
|
設計変数の定義を含む Excel ファイルのパスを指定
|
|
57
57
|
します。
|
|
58
|
-
|
|
58
|
+
|
|
59
59
|
input_sheet_name (str):
|
|
60
60
|
設計変数の定義を含むシートの名前を指定します。
|
|
61
|
-
|
|
61
|
+
|
|
62
62
|
output_xlsm_path (str or Path, optional):
|
|
63
63
|
目的関数の定義を含む Excel ファイルのパスを指定
|
|
64
64
|
します。指定しない場合は ``input_xlsm_path`` と
|
|
65
65
|
同じと見做します。
|
|
66
|
-
|
|
66
|
+
|
|
67
67
|
output_sheet_name (str, optional):
|
|
68
68
|
目的関数の定義を含む含むシートの名前を指定します。
|
|
69
69
|
指定しない場合は ``input_sheet_name`` と同じと見
|
|
70
70
|
做します。
|
|
71
|
-
|
|
71
|
+
|
|
72
72
|
procedure_name (str, optional):
|
|
73
73
|
Excel マクロ関数名を指定します。指定しない場合は
|
|
74
74
|
``FemtetMacro.FemtetMain`` と見做します。
|
|
75
|
-
|
|
75
|
+
|
|
76
76
|
procedure_args (list or tuple, optional):
|
|
77
77
|
Excel マクロ関数に渡す引数をリストまたはタプルで
|
|
78
78
|
指定します。
|
|
79
|
-
|
|
79
|
+
|
|
80
80
|
connect_method (str, optional):
|
|
81
81
|
Excel との接続方法を指定します。 'auto' または
|
|
82
|
-
'new' が利用可能です。デフォルトは '
|
|
83
|
-
|
|
82
|
+
'new' が利用可能です。デフォルトは 'new' です。
|
|
83
|
+
|
|
84
84
|
procedure_timeout (float or None, optional):
|
|
85
85
|
Excel マクロ関数のタイムアウト時間を秒単位で指定
|
|
86
86
|
します。 None の場合はタイムアウトなしとなります。
|
|
87
|
-
|
|
87
|
+
|
|
88
88
|
setup_xlsm_path (str or Path, optional):
|
|
89
89
|
セットアップ時に呼ぶ関数を含む xlsm のパスです。
|
|
90
90
|
指定しない場合は ``input_xlsm_path`` と
|
|
@@ -135,7 +135,7 @@ class ExcelInterface(FEMInterface):
|
|
|
135
135
|
Attributes:
|
|
136
136
|
input_xlsm_path (Path):
|
|
137
137
|
設計変数の定義を含む Excel ファイルのパス。
|
|
138
|
-
|
|
138
|
+
|
|
139
139
|
input_sheet_name (str):
|
|
140
140
|
設計変数の定義を含むシートの名前。
|
|
141
141
|
|
|
@@ -232,7 +232,7 @@ class ExcelInterface(FEMInterface):
|
|
|
232
232
|
constraint_sheet_name: str = None,
|
|
233
233
|
procedure_name: str = None,
|
|
234
234
|
procedure_args: list or tuple = None,
|
|
235
|
-
connect_method: str = '
|
|
235
|
+
connect_method: str = 'new', # or 'auto'
|
|
236
236
|
procedure_timeout: float or None = None,
|
|
237
237
|
setup_xlsm_path: str or Path = None,
|
|
238
238
|
setup_procedure_name: str = None,
|
|
@@ -257,7 +257,7 @@ class ExcelInterface(FEMInterface):
|
|
|
257
257
|
self.output_sheet_name = output_sheet_name if output_sheet_name is not None else input_sheet_name
|
|
258
258
|
self.constraint_xlsm_path = str(input_xlsm_path) if constraint_xlsm_path is None else str(constraint_xlsm_path)
|
|
259
259
|
self.constraint_sheet_name = constraint_sheet_name or self.input_sheet_name
|
|
260
|
-
self.procedure_name = procedure_name
|
|
260
|
+
self.procedure_name = procedure_name
|
|
261
261
|
self.procedure_args = procedure_args or []
|
|
262
262
|
assert connect_method in ['new', 'auto']
|
|
263
263
|
self.connect_method = connect_method
|
|
@@ -271,7 +271,8 @@ class ExcelInterface(FEMInterface):
|
|
|
271
271
|
self.setup_procedure_name = setup_procedure_name
|
|
272
272
|
self.setup_procedure_args = setup_procedure_args or []
|
|
273
273
|
|
|
274
|
-
self.teardown_xlsm_path = str(input_xlsm_path) if teardown_xlsm_path is None else str(
|
|
274
|
+
self.teardown_xlsm_path = str(input_xlsm_path) if teardown_xlsm_path is None else str(
|
|
275
|
+
teardown_xlsm_path) # あとで取得する
|
|
275
276
|
self.teardown_procedure_name = teardown_procedure_name
|
|
276
277
|
self.teardown_procedure_args = teardown_procedure_args or []
|
|
277
278
|
|
|
@@ -442,7 +443,7 @@ class ExcelInterface(FEMInterface):
|
|
|
442
443
|
self.excel = DispatchEx('Excel.Application')
|
|
443
444
|
|
|
444
445
|
# FemtetRef を追加する
|
|
445
|
-
self.open_femtet_ref_xla()
|
|
446
|
+
self.open_femtet_ref_xla()
|
|
446
447
|
sleep(0.5)
|
|
447
448
|
|
|
448
449
|
# 起動した excel の pid を記憶する
|
|
@@ -516,7 +517,8 @@ class ExcelInterface(FEMInterface):
|
|
|
516
517
|
self.sh_constraint = sh
|
|
517
518
|
break
|
|
518
519
|
else:
|
|
519
|
-
raise RuntimeError(
|
|
520
|
+
raise RuntimeError(
|
|
521
|
+
f'Sheet {self.constraint_sheet_name} does not exist in the book {self.wb_constraint.Name}.')
|
|
520
522
|
|
|
521
523
|
# ===== setup =====
|
|
522
524
|
# 開く (setup)
|
|
@@ -618,18 +620,19 @@ class ExcelInterface(FEMInterface):
|
|
|
618
620
|
self.update_parameter(parameters)
|
|
619
621
|
|
|
620
622
|
# マクロ実行
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
self.excel.
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
623
|
+
if self.procedure_name is not None:
|
|
624
|
+
try:
|
|
625
|
+
with watch_excel_macro_error(self.excel, timeout=self.procedure_timeout):
|
|
626
|
+
self.excel.Run(
|
|
627
|
+
f'{self.procedure_name}',
|
|
628
|
+
*self.procedure_args
|
|
629
|
+
)
|
|
627
630
|
|
|
628
|
-
|
|
629
|
-
|
|
631
|
+
# 再計算
|
|
632
|
+
self.excel.CalculateFull()
|
|
630
633
|
|
|
631
|
-
|
|
632
|
-
|
|
634
|
+
except com_error as e:
|
|
635
|
+
raise SolveError(f'Failed to run macro {self.procedure_name}. The original message is: {e}')
|
|
633
636
|
|
|
634
637
|
def quit(self):
|
|
635
638
|
if self.terminate_excel_when_quit:
|
|
@@ -655,7 +658,8 @@ class ExcelInterface(FEMInterface):
|
|
|
655
658
|
self.excel.CalculateFull()
|
|
656
659
|
|
|
657
660
|
except com_error as e:
|
|
658
|
-
raise RuntimeError(
|
|
661
|
+
raise RuntimeError(
|
|
662
|
+
f'Failed to run macro {self.teardown_procedure_args}. The original message is: {e}')
|
|
659
663
|
|
|
660
664
|
# 不具合の原因になる場合があるので参照設定は解除しないこと
|
|
661
665
|
# self.remove_femtet_ref_xla(self.wb_input)
|
|
@@ -726,11 +730,15 @@ class ExcelInterface(FEMInterface):
|
|
|
726
730
|
def input_workbook(self) -> CDispatch:
|
|
727
731
|
return self.wb_input
|
|
728
732
|
|
|
729
|
-
def load_parameter(self, opt) -> None:
|
|
733
|
+
def load_parameter(self, opt, raise_if_no_keyword=True) -> None:
|
|
730
734
|
from pyfemtet.opt.optimizer import AbstractOptimizer, logger
|
|
731
735
|
opt: AbstractOptimizer
|
|
732
736
|
|
|
733
|
-
df = ParseAsParameter.parse(
|
|
737
|
+
df = ParseAsParameter.parse(
|
|
738
|
+
self.input_xlsm_path,
|
|
739
|
+
self.input_sheet_name,
|
|
740
|
+
raise_if_no_keyword,
|
|
741
|
+
)
|
|
734
742
|
|
|
735
743
|
for i, row in df.iterrows():
|
|
736
744
|
|
|
@@ -777,6 +785,7 @@ class ExcelInterface(FEMInterface):
|
|
|
777
785
|
opt.variables.add_parameter(prm)
|
|
778
786
|
|
|
779
787
|
else:
|
|
788
|
+
# noinspection PyTypeChecker
|
|
780
789
|
fixed_prm = Expression(
|
|
781
790
|
name=name,
|
|
782
791
|
fun=lambda: value,
|
|
@@ -790,12 +799,16 @@ class ExcelInterface(FEMInterface):
|
|
|
790
799
|
)
|
|
791
800
|
opt.variables.add_expression(fixed_prm)
|
|
792
801
|
|
|
793
|
-
def load_objective(self, opt):
|
|
794
|
-
from pyfemtet.opt.optimizer import AbstractOptimizer
|
|
802
|
+
def load_objective(self, opt, raise_if_no_keyword=True):
|
|
803
|
+
from pyfemtet.opt.optimizer import AbstractOptimizer
|
|
795
804
|
from pyfemtet.opt._femopt_core import Objective
|
|
796
805
|
opt: AbstractOptimizer
|
|
797
806
|
|
|
798
|
-
df = ParseAsObjective.parse(
|
|
807
|
+
df = ParseAsObjective.parse(
|
|
808
|
+
self.output_xlsm_path,
|
|
809
|
+
self.output_sheet_name,
|
|
810
|
+
raise_if_no_keyword,
|
|
811
|
+
)
|
|
799
812
|
|
|
800
813
|
for i, row in df.iterrows():
|
|
801
814
|
|
|
@@ -827,22 +840,19 @@ class ExcelInterface(FEMInterface):
|
|
|
827
840
|
kwargs=dict(),
|
|
828
841
|
)
|
|
829
842
|
|
|
830
|
-
def load_constraint(self, opt):
|
|
831
|
-
from pyfemtet.opt.optimizer import AbstractOptimizer
|
|
843
|
+
def load_constraint(self, opt, raise_if_no_keyword=False):
|
|
844
|
+
from pyfemtet.opt.optimizer import AbstractOptimizer
|
|
832
845
|
from pyfemtet.opt._femopt_core import Constraint
|
|
833
846
|
opt: AbstractOptimizer
|
|
834
847
|
|
|
835
|
-
#
|
|
836
|
-
#
|
|
837
|
-
#
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
return
|
|
844
|
-
|
|
845
|
-
df = ParseAsConstraint.parse(self.constraint_xlsm_path, self.constraint_sheet_name)
|
|
848
|
+
# constraint は optional であるが
|
|
849
|
+
# __init__ で input_sheet_name を入れられるので
|
|
850
|
+
# ここで constraint が実際に与えられているか判断する
|
|
851
|
+
df = ParseAsConstraint.parse(
|
|
852
|
+
self.constraint_xlsm_path,
|
|
853
|
+
self.constraint_sheet_name,
|
|
854
|
+
raise_if_no_keyword=raise_if_no_keyword,
|
|
855
|
+
)
|
|
846
856
|
|
|
847
857
|
for i, row in df.iterrows():
|
|
848
858
|
|
|
@@ -877,7 +887,8 @@ class ExcelInterface(FEMInterface):
|
|
|
877
887
|
calc_before_solve = True
|
|
878
888
|
if ParseAsConstraint.calc_before_solve in df.columns:
|
|
879
889
|
_calc_before_solve = row[ParseAsConstraint.calc_before_solve]
|
|
880
|
-
calc_before_solve = True if is_cell_value_empty(_calc_before_solve) else bool(
|
|
890
|
+
calc_before_solve = True if is_cell_value_empty(_calc_before_solve) else bool(
|
|
891
|
+
_calc_before_solve) # bool or NaN
|
|
881
892
|
|
|
882
893
|
if use:
|
|
883
894
|
# constraint を作る
|
|
@@ -892,6 +903,7 @@ class ExcelInterface(FEMInterface):
|
|
|
892
903
|
using_fem=not calc_before_solve,
|
|
893
904
|
)
|
|
894
905
|
|
|
906
|
+
# TODO: femopt_core.Function の仕様を変えたらここも変える
|
|
895
907
|
def objective_from_excel(self, name: str):
|
|
896
908
|
r = 1 + search_r(self.output_xlsm_path, self.output_sheet_name, name)
|
|
897
909
|
c = 1 + search_c(self.output_xlsm_path, self.output_sheet_name, ParseAsObjective.value)
|
|
@@ -192,7 +192,8 @@ class FemtetInterface(FEMInterface):
|
|
|
192
192
|
# subprocess で restore するための情報保管
|
|
193
193
|
# パスなどは connect_and_open_femtet での処理結果を反映し
|
|
194
194
|
# メインで開いた解析モデルが確実に開かれるようにする
|
|
195
|
-
|
|
195
|
+
FEMInterface.__init__(
|
|
196
|
+
self,
|
|
196
197
|
femprj_path=self.femprj_path,
|
|
197
198
|
model_name=self.model_name,
|
|
198
199
|
open_result_with_gui=self.open_result_with_gui,
|
|
@@ -201,6 +202,10 @@ class FemtetInterface(FEMInterface):
|
|
|
201
202
|
**kwargs
|
|
202
203
|
)
|
|
203
204
|
|
|
205
|
+
@property
|
|
206
|
+
def object_passed_to_functions(self):
|
|
207
|
+
return self.Femtet
|
|
208
|
+
|
|
204
209
|
def use_parametric_output_as_objective(self, number: int, direction: str | float = 'minimize') -> None:
|
|
205
210
|
"""Use output setting of Femtet parametric analysis as an objective function.
|
|
206
211
|
|
|
@@ -234,7 +239,6 @@ class FemtetInterface(FEMInterface):
|
|
|
234
239
|
self.kwargs['parametric_output_indexes_use_as_objective'] = self.parametric_output_indexes_use_as_objective
|
|
235
240
|
|
|
236
241
|
|
|
237
|
-
|
|
238
242
|
def __del__(self):
|
|
239
243
|
self.quit()
|
|
240
244
|
# CoUninitialize() # Win32 exception occurred releasing IUnknown at 0x0000022427692748
|