Skip to content

Commit ac6597f

Browse files
committed
Merge branch 'ModelicaSystem_small_changes' into merge_me
2 parents 249f2e6 + ebcab5e commit ac6597f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

OMPython/ModelicaSystem.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,7 @@ def __init__(
323323
self._override_variables: dict[str, str] = {}
324324
self._simulate_options_override: dict[str, str] = {}
325325
self._linearization_options = {'startTime': 0.0, 'stopTime': 1.0, 'stepSize': 0.002, 'tolerance': 1e-8}
326-
self._optimization_options = {'startTime': 0.0, 'stopTime': 1.0, 'numberOfIntervals': 500, 'stepSize': 0.002,
327-
'tolerance': 1e-8}
326+
self._optimization_options = self._linearization_options | {'numberOfIntervals': 500}
328327
self._linearized_inputs: list[str] = [] # linearization input list
329328
self._linearized_outputs: list[str] = [] # linearization output list
330329
self._linearized_states: list[str] = [] # linearization states list
@@ -1407,7 +1406,7 @@ def _createCSVData(self, csvfile: Optional[OMCPath] = None) -> OMCPath:
14071406
interpolated_inputs[signal_name] = np.interp(
14081407
all_times,
14091408
signal[:, 0], # times
1410-
signal[:, 1] # values
1409+
signal[:, 1], # values
14111410
)
14121411

14131412
# Write CSV file
@@ -1419,7 +1418,7 @@ def _createCSVData(self, csvfile: Optional[OMCPath] = None) -> OMCPath:
14191418
row = [
14201419
t, # time
14211420
*(interpolated_inputs[name][i] for name in input_names), # input values
1422-
0 # trailing 'end' column
1421+
0, # trailing 'end' column
14231422
]
14241423
csv_rows.append(row)
14251424

0 commit comments

Comments
 (0)