pyfemtet 0.8.18__py3-none-any.whl → 0.9.0__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/opt/interface/__init__.py +1 -1
- pyfemtet/opt/interface/_excel_interface.py +21 -0
- {pyfemtet-0.8.18.dist-info → pyfemtet-0.9.0.dist-info}/METADATA +1 -1
- {pyfemtet-0.8.18.dist-info → pyfemtet-0.9.0.dist-info}/RECORD +9 -9
- {pyfemtet-0.8.18.dist-info → pyfemtet-0.9.0.dist-info}/WHEEL +1 -1
- {pyfemtet-0.8.18.dist-info → pyfemtet-0.9.0.dist-info}/LICENSE +0 -0
- {pyfemtet-0.8.18.dist-info → pyfemtet-0.9.0.dist-info}/LICENSE_THIRD_PARTY.txt +0 -0
- {pyfemtet-0.8.18.dist-info → pyfemtet-0.9.0.dist-info}/entry_points.txt +0 -0
pyfemtet/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.
|
|
1
|
+
__version__ = "0.9.0"
|
|
@@ -19,7 +19,7 @@ else:
|
|
|
19
19
|
FemtetInterface = type('FemtetInterface', (NotAvailableForWindows,), {})
|
|
20
20
|
FemtetWithSolidworksInterface = type('FemtetWithSolidworksInterface', (FemtetInterface,), {})
|
|
21
21
|
FemtetWithNXInterface = type('FemtetWithNXInterface', (FemtetInterface,), {})
|
|
22
|
-
ExcelInterface = type('
|
|
22
|
+
ExcelInterface = type('ExcelInterface', (NotAvailableForWindows,), {})
|
|
23
23
|
|
|
24
24
|
from pyfemtet.opt.interface._surrogate._base import SurrogateModelInterfaceBase
|
|
25
25
|
from pyfemtet.opt.interface._surrogate._singletaskgp import PoFBoTorchInterface
|
|
@@ -222,6 +222,8 @@ class ExcelInterface(FEMInterface):
|
|
|
222
222
|
|
|
223
223
|
use_named_range: bool # input を定義したシートにおいて input の値を名前付き範囲で指定するかどうか。
|
|
224
224
|
|
|
225
|
+
force_override_when_load: bool = False # .py で add_... されている変数などを Excel の内容で上書きするかどうか。
|
|
226
|
+
|
|
225
227
|
def __init__(
|
|
226
228
|
self,
|
|
227
229
|
input_xlsm_path: str or Path,
|
|
@@ -751,6 +753,13 @@ class ExcelInterface(FEMInterface):
|
|
|
751
753
|
# name
|
|
752
754
|
name = str(row[ParseAsParameter.name])
|
|
753
755
|
|
|
756
|
+
# if the variable is already added by
|
|
757
|
+
# add_parameter or add_expression,
|
|
758
|
+
# use it.
|
|
759
|
+
if not self.force_override_when_load:
|
|
760
|
+
if name in opt.variables.get_variables():
|
|
761
|
+
continue
|
|
762
|
+
|
|
754
763
|
# value
|
|
755
764
|
value = float(row[ParseAsParameter.value])
|
|
756
765
|
|
|
@@ -821,6 +830,12 @@ class ExcelInterface(FEMInterface):
|
|
|
821
830
|
# name
|
|
822
831
|
name = str(row[ParseAsObjective.name])
|
|
823
832
|
|
|
833
|
+
# if the objective is already added by
|
|
834
|
+
# add_objective, use it.
|
|
835
|
+
if not self.force_override_when_load:
|
|
836
|
+
if name in opt.objectives.keys():
|
|
837
|
+
continue
|
|
838
|
+
|
|
824
839
|
# direction
|
|
825
840
|
direction = row[ParseAsObjective.direction]
|
|
826
841
|
assert not is_cell_value_empty(direction), 'direction is empty.'
|
|
@@ -865,6 +880,12 @@ class ExcelInterface(FEMInterface):
|
|
|
865
880
|
# name
|
|
866
881
|
name = str(row[ParseAsConstraint.name])
|
|
867
882
|
|
|
883
|
+
# if the constraint is already added by
|
|
884
|
+
# add_constraint, use it.
|
|
885
|
+
if not self.force_override_when_load:
|
|
886
|
+
if name in opt.constraints.keys():
|
|
887
|
+
continue
|
|
888
|
+
|
|
868
889
|
# lb (optional)
|
|
869
890
|
lb = None
|
|
870
891
|
if ParseAsConstraint.lb in df.columns:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
pyfemtet/__init__.py,sha256=
|
|
1
|
+
pyfemtet/__init__.py,sha256=7NrzGOSBvO9S73thMlxEh5aNYKS5SYKLgTxC1YIIPRk,21
|
|
2
2
|
pyfemtet/_femtet_config_util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
pyfemtet/_femtet_config_util/autosave.py,sha256=dNirA9XGuFehas8_Jkj2BW9GOzMbPyhnt1WHcH_ObSU,2070
|
|
4
4
|
pyfemtet/_femtet_config_util/exit.py,sha256=0BWID-tjOkmZwmgPFkcJMkWW39voccz5ARIBWvZbHaw,1877
|
|
@@ -42,9 +42,9 @@ pyfemtet/opt/advanced_samples/surrogate_model/gal_ex13_create_training_data_jp.p
|
|
|
42
42
|
pyfemtet/opt/advanced_samples/surrogate_model/gal_ex13_optimize_with_surrogate.py,sha256=s0b31wuN3iXjb78dt0ro0ZjxHa8uLIH94jRfEuj1EVY,3090
|
|
43
43
|
pyfemtet/opt/advanced_samples/surrogate_model/gal_ex13_optimize_with_surrogate_jp.py,sha256=OAOpHKyMMo1StSqNMqx4saYDn4hiGOKDypyK6uhTILQ,3215
|
|
44
44
|
pyfemtet/opt/advanced_samples/surrogate_model/gal_ex13_parametric.femprj,sha256=iIHH1X-wWBqEYj4cFJXco73LCJXSrYBsSKOD0HxYu60,87599
|
|
45
|
-
pyfemtet/opt/interface/__init__.py,sha256=
|
|
45
|
+
pyfemtet/opt/interface/__init__.py,sha256=Bb4ifydHpclE_jwbmXm_DC6AYCN2rdWucN2raBITJPY,1349
|
|
46
46
|
pyfemtet/opt/interface/_base.py,sha256=hDv4C8LQpKaeZJR8iEfTSVd4Na2fQblFBv0Yw78xcRY,2856
|
|
47
|
-
pyfemtet/opt/interface/_excel_interface.py,sha256=
|
|
47
|
+
pyfemtet/opt/interface/_excel_interface.py,sha256=l4t6uM64-E7E5EvTKhPh0kSdUW-boyXy72VqcjlgRNs,41009
|
|
48
48
|
pyfemtet/opt/interface/_femtet.py,sha256=Y1t_GY_W0ivR6obv8eiMx1_-OoJFTjQAvhnoUkIMaaQ,38657
|
|
49
49
|
pyfemtet/opt/interface/_femtet_excel.py,sha256=dWPQguKNOVdJ4jTfwLykCeM9iwA2S1KOLynw8UGzmvk,5968
|
|
50
50
|
pyfemtet/opt/interface/_femtet_parametric.py,sha256=hxNiZfhR1IPtrMXg39TZutXTcOXdoxTKiRTTcYRGgVs,10181
|
|
@@ -150,9 +150,9 @@ pyfemtet/opt/visualization/result_viewer/.gitignore,sha256=ryvb4aqbbsHireHWlPQfx
|
|
|
150
150
|
pyfemtet/opt/visualization/result_viewer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
151
151
|
pyfemtet/opt/visualization/result_viewer/application.py,sha256=WcHBx_J5eNLKSaprpk9BGifwhO04oN8FiNGYTWorrXA,1691
|
|
152
152
|
pyfemtet/opt/visualization/result_viewer/pages.py,sha256=MZAjzbuq0toZrR-iJhElM3A12_jHVCTt65gz1kdNPbw,32193
|
|
153
|
-
pyfemtet-0.
|
|
154
|
-
pyfemtet-0.
|
|
155
|
-
pyfemtet-0.
|
|
156
|
-
pyfemtet-0.
|
|
157
|
-
pyfemtet-0.
|
|
158
|
-
pyfemtet-0.
|
|
153
|
+
pyfemtet-0.9.0.dist-info/LICENSE,sha256=LWUL5LlMGjSRTvsalS8_fFuwS4VMw18fJSNWFwDK8pc,1060
|
|
154
|
+
pyfemtet-0.9.0.dist-info/LICENSE_THIRD_PARTY.txt,sha256=8_9-cgzTpmeuCqItPZb9-lyAZcH2Qp9sZTU_hYuOZIQ,191
|
|
155
|
+
pyfemtet-0.9.0.dist-info/METADATA,sha256=Wmxnr5QxZxQ5mTORj72DH1qJLuXlvUWTifbqYRWoZ4M,3559
|
|
156
|
+
pyfemtet-0.9.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
157
|
+
pyfemtet-0.9.0.dist-info/entry_points.txt,sha256=ZfYqRaoiPtuWqFi2_msccyrVF0LurMn-IHlYamAegZo,104
|
|
158
|
+
pyfemtet-0.9.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|