Skip to content

Commit 5b05821

Browse files
authored
fix solver override (#458)
1 parent ae967b5 commit 5b05821

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

OMPython/ModelicaSystem.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ def set_command_line_options(self, command_line_option: str):
517517
Set the provided command line option via OMC setCommandLineOptions().
518518
"""
519519
expr = f'setCommandLineOptions("{command_line_option}")'
520-
self.sendExpression(expr=expr)
520+
self.sendExpression(expr=expr, parsed=False)
521521

522522
def _loadFile(self, fileName: OMCPath):
523523
# load file
@@ -1236,7 +1236,11 @@ def _process_override_data(
12361236
if override_sim:
12371237
if self._version >= (1, 26, 0):
12381238
for key, opt_value in override_sim.items():
1239-
om_cmd.arg_set(key=key, val=str(opt_value))
1239+
if key == "solver":
1240+
k = "s"
1241+
else:
1242+
k = key
1243+
om_cmd.arg_set(key=k, val=str(opt_value))
12401244
else:
12411245
override_content += "\n".join([f"{key}={value}" for key, value in override_sim.items()]) + "\n"
12421246

0 commit comments

Comments
 (0)