We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d0a4bc commit a33dc68Copy full SHA for a33dc68
OMPython/ModelicaSystem.py
@@ -958,11 +958,9 @@ def simulate_cmd(
958
if self._override_variables or self._simulate_options_override:
959
tmpdict = self._override_variables.copy()
960
tmpdict.update(self._simulate_options_override)
961
- # write to override file
962
- with open(file=overrideFile, mode="w", encoding="utf-8") as fh:
963
- for key, value in tmpdict.items():
964
- fh.write(f"{key}={value}\n")
965
+ override_content = "\n".join([f"{key}={value}" for key, value in tmpdict.items()]) + "\n"
+ overrideFile.write_text(override_content)
966
om_cmd.arg_set(key="overrideFile", val=overrideFile.as_posix())
967
968
if self._has_inputs: # if model has input quantities
0 commit comments