Skip to content

Commit 6dea276

Browse files
committed
[ModelicaSystemDoE] rename simple => non_structural
1 parent 6b44870 commit 6dea276

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

OMPython/ModelicaSystem.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1885,7 +1885,7 @@ def run_doe():
18851885
# structural
18861886
'p': [1, 2],
18871887
'q': [3, 4],
1888-
# simple
1888+
# non-structural
18891889
'a': [5, 6],
18901890
'b': [7, 8],
18911891
}
@@ -2008,7 +2008,7 @@ def prepare(self) -> int:
20082008
param_structure[param_name] = self._parameters[param_name]
20092009

20102010
param_structure_combinations = list(itertools.product(*param_structure.values()))
2011-
param_simple_combinations = list(itertools.product(*param_non_structure.values()))
2011+
param_non_structural_combinations = list(itertools.product(*param_non_structure.values()))
20122012

20132013
for idx_pc_structure, pc_structure in enumerate(param_structure_combinations):
20142014

@@ -2036,15 +2036,15 @@ def prepare(self) -> int:
20362036

20372037
self._mod.buildModel()
20382038

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

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

20502050
df_data = (
@@ -2053,15 +2053,15 @@ def prepare(self) -> int:
20532053
}
20542054
| sim_param_structure
20552055
| {
2056-
self.DICT_ID_NON_STRUCTURE: idx_pc_simple,
2056+
self.DICT_ID_NON_STRUCTURE: idx_non_structural,
20572057
}
2058-
| sim_param_simple
2058+
| sim_param_non_structural
20592059
| {
20602060
self.DICT_RESULT_AVAILABLE: False,
20612061
}
20622062
)
20632063

2064-
self._mod.setParameters(sim_param_simple)
2064+
self._mod.setParameters(sim_param_non_structural)
20652065
mscmd = self._mod.simulate_cmd(
20662066
result_file=resultfile,
20672067
timeout=self._timeout,

0 commit comments

Comments
 (0)