Skip to content

Commit 934f815

Browse files
committed
??? [ModelicaSystemDoE] remove duplicated code
1 parent f52d5a0 commit 934f815

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

OMPython/ModelicaSystem.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,20 +1919,18 @@ def __init__(
19191919
ModelicaSystem.simulate(). Additionally, the path to store the result files is needed (= resultpath) as well as
19201920
a list of parameters to vary for the Doe (= parameters). All possible combinations are considered.
19211921
"""
1922+
if modelName is None:
1923+
raise ModelicaSystemError("No model name provided!")
19221924

19231925
self._mod = ModelicaSystem(
19241926
commandLineOptions=commandLineOptions,
19251927
customBuildDirectory=customBuildDirectory,
19261928
omhome=omhome,
19271929
omc_process=omc_process,
19281930
)
1929-
1930-
if modelName is None:
1931-
raise ModelicaSystemError("No model name provided!")
1932-
19331931
self._mod.model(
1934-
name=modelName,
19351932
file=fileName,
1933+
name=modelName,
19361934
libraries=lmodel,
19371935
variable_filter=variableFilter,
19381936
)

0 commit comments

Comments
 (0)