File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1805,7 +1805,14 @@ def linearize(
18051805 csvfile = self ._createCSVData ()
18061806 om_cmd .arg_set (key = "csvInput" , val = csvfile .as_posix ())
18071807
1808- om_cmd .arg_set (key = "l" , val = str (lintime or self ._linearization_options ["stopTime" ]))
1808+ if lintime is None :
1809+ lintime = float (self ._linearization_options ["stopTime" ])
1810+ if (float (self ._linearization_options ["startTime" ]) > lintime
1811+ or float (self ._linearization_options ["stopTime" ]) < lintime ):
1812+ raise ModelicaSystemError (f"Invalid linearisation time: { lintime = } ; "
1813+ f"expected value: { self ._linearization_options ['startTime' ]} "
1814+ f"<= lintime <= { self ._linearization_options ['stopTime' ]} " )
1815+ om_cmd .arg_set (key = "l" , val = str (lintime ))
18091816
18101817 # allow runtime simulation flags from user input
18111818 if simflags is not None :
You can’t perform that action at this time.
0 commit comments