Skip to content

Commit 716e2ca

Browse files
committed
[ModelicaSystem] rename variable / function
setCommandLineOptions() => set_command_line_options() commandLineOptions => command_line_option
1 parent 7c086dd commit 716e2ca

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
@@ -382,7 +382,7 @@ def __init__(
382382
"--generateSymbolicLinearization",
383383
]
384384
for opt in command_line:
385-
self.setCommandLineOptions(commandLineOptions=opt)
385+
self.set_command_line_options(command_line_option=opt)
386386

387387
self._simulated = False # True if the model has already been simulated
388388
self._result_file: Optional[OMCPath] = None # for storing result file
@@ -483,11 +483,11 @@ def session(self) -> OMCSessionZMQ:
483483
"""
484484
return self._session
485485

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

493493
def _loadFile(self, fileName: OMCPath):
@@ -1740,7 +1740,7 @@ def optimize(self) -> dict[str, Any]:
17401740
"""
17411741
cName = self._model_name
17421742
properties = ','.join(f"{key}={val}" for key, val in self._optimization_options.items())
1743-
self.setCommandLineOptions("-g=Optimica")
1743+
self.set_command_line_options("-g=Optimica")
17441744
optimizeResult = self._requestApi(apiName='optimize', entity=cName, properties=properties)
17451745

17461746
return optimizeResult

0 commit comments

Comments
 (0)