Skip to content

Commit 51fa6c8

Browse files
committed
[MOdelicaSystem*] rename: command_line => command_line_options
1 parent 3eeb8a4 commit 51fa6c8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

OMPython/ModelicaSystem.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -329,15 +329,15 @@ class ModelicaSystem:
329329

330330
def __init__(
331331
self,
332-
command_line: Optional[list[str]] = None,
332+
command_line_options: Optional[list[str]] = None,
333333
work_directory: Optional[str | os.PathLike] = None,
334334
omhome: Optional[str] = None,
335335
omc_process: Optional[OMCProcess] = None,
336336
) -> None:
337337
"""Create a ModelicaSystem instance. To define the model use model() or convertFmu2Mo().
338338
339339
Args:
340-
command_line: List with extra command line options as elements. The list elements are
340+
command_line_options: List with extra command line options as elements. The list elements are
341341
provided to omc via setCommandLineOptions(). If set, the default values will be overridden.
342342
To disable any command line options, use an empty list.
343343
work_directory: Path to a directory to be used for temporary
@@ -378,14 +378,14 @@ def __init__(
378378
self._session = OMCSessionZMQ(omhome=omhome)
379379

380380
# set commandLineOptions using default values or the user defined list
381-
if command_line is None:
381+
if command_line_options is None:
382382
# set default command line options to improve the performance of linearization and to avoid recompilation if
383383
# the simulation executable is reused in linearize() via the runtime flag '-l'
384-
command_line = [
384+
command_line_options = [
385385
"--linearizationDumpLanguage=python",
386386
"--generateSymbolicLinearization",
387387
]
388-
for opt in command_line:
388+
for opt in command_line_options:
389389
self.set_command_line_options(command_line_option=opt)
390390

391391
self._simulated = False # True if the model has already been simulated
@@ -1958,7 +1958,7 @@ def __init__(
19581958
model_file: Optional[str | os.PathLike] = None,
19591959
model_name: Optional[str] = None,
19601960
libraries: Optional[list[str | tuple[str, str]]] = None,
1961-
command_line: Optional[list[str]] = None,
1961+
command_line_options: Optional[list[str]] = None,
19621962
variable_filter: Optional[str] = None,
19631963
work_directory: Optional[str | os.PathLike] = None,
19641964
omhome: Optional[str] = None,
@@ -1980,7 +1980,7 @@ def __init__(
19801980
raise ModelicaSystemError("No model name provided!")
19811981

19821982
self._mod = ModelicaSystem(
1983-
command_line=command_line,
1983+
command_line_options=command_line_options,
19841984
work_directory=work_directory,
19851985
omhome=omhome,
19861986
omc_process=omc_process,

tests/test_FMIImport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def test_FMIImport(model_firstorder):
3333

3434
# import FMU & check & simulate
3535
# TODO: why is '--allowNonStandardModelica=reinitInAlgorithms' needed? any example without this possible?
36-
mod2 = OMPython.ModelicaSystem(command_line=['--allowNonStandardModelica=reinitInAlgorithms'])
36+
mod2 = OMPython.ModelicaSystem(command_line_options=['--allowNonStandardModelica=reinitInAlgorithms'])
3737
mo = mod2.convertFmu2Mo(fmu=fmu)
3838
assert os.path.exists(mo)
3939

0 commit comments

Comments
 (0)