Skip to content

Commit f2337dc

Browse files
committed
Merge branch 'ModelicaSystemDoE_simple' into v4.1.0-syntron5
2 parents 6d484fd + 6dea276 commit f2337dc

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
@@ -1889,7 +1889,7 @@ def run_doe():
18891889
# structural
18901890
'p': [1, 2],
18911891
'q': [3, 4],
1892-
# simple
1892+
# non-structural
18931893
'a': [5, 6],
18941894
'b': [7, 8],
18951895
}
@@ -2012,7 +2012,7 @@ def prepare(self) -> int:
20122012
param_structure[param_name] = self._parameters[param_name]
20132013

20142014
param_structure_combinations = list(itertools.product(*param_structure.values()))
2015-
param_simple_combinations = list(itertools.product(*param_non_structure.values()))
2015+
param_non_structural_combinations = list(itertools.product(*param_non_structure.values()))
20162016

20172017
for idx_pc_structure, pc_structure in enumerate(param_structure_combinations):
20182018

@@ -2040,15 +2040,15 @@ def prepare(self) -> int:
20402040

20412041
self._mod.buildModel()
20422042

2043-
for idx_pc_simple, pc_simple in enumerate(param_simple_combinations):
2044-
sim_param_simple = {}
2045-
for idx_simple, pk_simple in enumerate(param_non_structure.keys()):
2046-
sim_param_simple[pk_simple] = cast(Any, pc_simple[idx_simple])
2043+
for idx_non_structural, pk_non_structural in enumerate(param_non_structural_combinations):
2044+
sim_param_non_structural = {}
2045+
for idx, pk in enumerate(param_non_structure.keys()):
2046+
sim_param_non_structural[pk] = cast(Any, pk_non_structural[idx])
20472047

2048-
resfilename = f"DOE_{idx_pc_structure:09d}_{idx_pc_simple:09d}.mat"
2048+
resfilename = f"DOE_{idx_pc_structure:09d}_{idx_non_structural:09d}.mat"
20492049
logger.info(f"use result file {repr(resfilename)} "
20502050
f"for structural parameters: {sim_param_structure} "
2051-
f"and simple parameters: {sim_param_simple}")
2051+
f"and non-structural parameters: {sim_param_non_structural}")
20522052
resultfile = self._resultpath / resfilename
20532053

20542054
df_data = (
@@ -2057,15 +2057,15 @@ def prepare(self) -> int:
20572057
}
20582058
| sim_param_structure
20592059
| {
2060-
self.DICT_ID_NON_STRUCTURE: idx_pc_simple,
2060+
self.DICT_ID_NON_STRUCTURE: idx_non_structural,
20612061
}
2062-
| sim_param_simple
2062+
| sim_param_non_structural
20632063
| {
20642064
self.DICT_RESULT_AVAILABLE: False,
20652065
}
20662066
)
20672067

2068-
self._mod.setParameters(sim_param_simple)
2068+
self._mod.setParameters(sim_param_non_structural)
20692069
mscmd = self._mod.simulate_cmd(
20702070
result_file=resultfile,
20712071
timeout=self._timeout,

0 commit comments

Comments
 (0)