Skip to content

Commit 2c0259b

Browse files
committed
??? last changes ...
1 parent b8eeb64 commit 2c0259b

7 files changed

Lines changed: 440 additions & 108 deletions

File tree

OMPython/ModelicaSystem.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,18 @@
2222
import numpy as np
2323

2424
from OMPython.OMCSession import (
25-
ModelExecutionData,
2625
ModelExecutionException,
27-
28-
OMCSessionException,
29-
OMCSessionLocal,
30-
26+
ModelExecutionData,
27+
OMPathABC,
3128
OMSessionABC,
3229
OMSessionRunner,
33-
OMPathABC,
30+
OMCSessionLocal,
31+
OMCSessionException,
3432
)
3533

34+
# check OMPathABC usage
35+
# check OMSessionABC usage
36+
3637
# define logger using the current module name as ID
3738
logger = logging.getLogger(__name__)
3839

@@ -2228,6 +2229,12 @@ def get_session(self) -> OMSessionABC:
22282229
"""
22292230
return self._mod.get_session()
22302231

2232+
def get_resultpath(self) -> OMPathABC:
2233+
"""
2234+
Get the path the the result data is saved.
2235+
"""
2236+
return self._resultpath
2237+
22312238
def prepare(self) -> int:
22322239
"""
22332240
Prepare the DoE by evaluating the parameters. Each structural parameter requires a new instance of
@@ -2669,5 +2676,8 @@ def _prepare_structure_parameters(
26692676
pc_structure: Tuple,
26702677
param_structure: dict[str, list[str] | list[int] | list[float]],
26712678
) -> dict[str, str | int | float]:
2672-
raise ModelicaSystemError(f"{self.__class__.__name__} can not handle structure parameters as it uses a "
2673-
"pre-compiled binary of model.")
2679+
if len(param_structure.keys()) > 0:
2680+
raise ModelicaSystemError(f"{self.__class__.__name__} can not handle structure parameters as it uses a "
2681+
"pre-compiled binary of model.")
2682+
2683+
return {}

0 commit comments

Comments
 (0)