Skip to content

Commit 6f61654

Browse files
committed
[ModelicaSystem] rename variable / function
setCommandLineOptions() => set_command_line_options() commandLineOptions => command_line_option
1 parent 82653e7 commit 6f61654

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

OMPython/ModelicaSystem.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def __init__(
386386
"--generateSymbolicLinearization",
387387
]
388388
for opt in command_line:
389-
self.setCommandLineOptions(commandLineOptions=opt)
389+
self.set_command_line_options(command_line_option=opt)
390390

391391
self._simulated = False # True if the model has already been simulated
392392
self._result_file: Optional[OMCPath] = None # for storing result file
@@ -487,11 +487,11 @@ def session(self) -> OMCSessionZMQ:
487487
"""
488488
return self._session
489489

490-
def setCommandLineOptions(self, commandLineOptions: str):
490+
def set_command_line_options(self, command_line_option: str):
491491
"""
492492
Set the provided command line option via OMC setCommandLineOptions().
493493
"""
494-
exp = f'setCommandLineOptions("{commandLineOptions}")'
494+
exp = f'setCommandLineOptions("{command_line_option}")'
495495
self.sendExpression(exp)
496496

497497
def _loadFile(self, fileName: OMCPath):
@@ -1744,7 +1744,7 @@ def optimize(self) -> dict[str, Any]:
17441744
"""
17451745
cName = self._model_name
17461746
properties = ','.join(f"{key}={val}" for key, val in self._optimization_options.items())
1747-
self.setCommandLineOptions("-g=Optimica")
1747+
self.set_command_line_options("-g=Optimica")
17481748
optimizeResult = self._requestApi(apiName='optimize', entity=cName, properties=properties)
17491749

17501750
return optimizeResult

0 commit comments

Comments
 (0)