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 e86154c commit b7bd6bcCopy full SHA for b7bd6bc
tests/test_optimization.py
@@ -35,10 +35,13 @@ def test_optimization_example(tmp_path):
35
36
mod = OMPython.ModelicaSystem(fileName=model_file.as_posix(), modelName="BangBang2021")
37
38
- mod.setOptimizationOptions(optimizationOptions={"numberOfIntervals": 16,
39
- "stopTime": 1,
40
- "stepSize": 0.001,
41
- "tolerance": 1e-8})
+ optimizationOptions = {
+ "numberOfIntervals": 16,
+ "stopTime": 1,
+ "stepSize": 0.001,
42
+ "tolerance": 1e-8,
43
+ }
44
+ mod.setOptimizationOptions(**optimizationOptions)
45
46
# test the getter
47
assert mod.getOptimizationOptions()["stopTime"] == "1"
0 commit comments