Skip to content

Commit af73d88

Browse files
committed
Merge branch 'ModelicaSystemDoE_simple' into v4.1.0-syntron2
2 parents e676672 + 75bfd36 commit af73d88

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

OMPython/ModelicaSystem.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1884,7 +1884,7 @@ def run_doe():
18841884
# structural
18851885
'p': [1, 2],
18861886
'q': [3, 4],
1887-
# simple
1887+
# non-structural
18881888
'a': [5, 6],
18891889
'b': [7, 8],
18901890
}
@@ -2005,7 +2005,7 @@ def prepare(self) -> int:
20052005
param_structure[param_name] = self._parameters[param_name]
20062006

20072007
param_structure_combinations = list(itertools.product(*param_structure.values()))
2008-
param_simple_combinations = list(itertools.product(*param_non_structure.values()))
2008+
param_non_structural_combinations = list(itertools.product(*param_non_structure.values()))
20092009

20102010
for idx_pc_structure, pc_structure in enumerate(param_structure_combinations):
20112011

@@ -2033,15 +2033,15 @@ def prepare(self) -> int:
20332033

20342034
self._mod.buildModel()
20352035

2036-
for idx_pc_simple, pc_simple in enumerate(param_simple_combinations):
2037-
sim_param_simple = {}
2038-
for idx_simple, pk_simple in enumerate(param_non_structure.keys()):
2039-
sim_param_simple[pk_simple] = cast(Any, pc_simple[idx_simple])
2036+
for idx_non_structural, pk_non_structural in enumerate(param_non_structural_combinations):
2037+
sim_param_non_structural = {}
2038+
for idx, pk in enumerate(param_non_structure.keys()):
2039+
sim_param_non_structural[pk] = cast(Any, pk_non_structural[idx])
20402040

2041-
resfilename = f"DOE_{idx_pc_structure:09d}_{idx_pc_simple:09d}.mat"
2041+
resfilename = f"DOE_{idx_pc_structure:09d}_{idx_non_structural:09d}.mat"
20422042
logger.info(f"use result file {repr(resfilename)} "
20432043
f"for structural parameters: {sim_param_structure} "
2044-
f"and simple parameters: {sim_param_simple}")
2044+
f"and non-structural parameters: {sim_param_non_structural}")
20452045
resultfile = self._resultpath / resfilename
20462046

20472047
df_data = (
@@ -2050,15 +2050,15 @@ def prepare(self) -> int:
20502050
}
20512051
| sim_param_structure
20522052
| {
2053-
self.DICT_ID_NON_STRUCTURE: idx_pc_simple,
2053+
self.DICT_ID_NON_STRUCTURE: idx_non_structural,
20542054
}
2055-
| sim_param_simple
2055+
| sim_param_non_structural
20562056
| {
20572057
self.DICT_RESULT_AVAILABLE: False,
20582058
}
20592059
)
20602060

2061-
self._mod.setParameters(sim_param_simple)
2061+
self._mod.setParameters(sim_param_non_structural)
20622062
mscmd = self._mod.simulate_cmd(
20632063
result_file=resultfile,
20642064
timeout=self._timeout,

0 commit comments

Comments
 (0)