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