Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[ModelicaSystem.linearize] remove old check / use of file in current dir
  • Loading branch information
syntron committed Jul 11, 2025
commit 191cd59a0cade1a19924cc3d563e38136c3d8110
4 changes: 0 additions & 4 deletions OMPython/ModelicaSystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1490,10 +1490,6 @@ def linearize(self, lintime: Optional[float] = None, simflags: Optional[str] = N
if not linear_file.exists():
raise ModelicaSystemError(f"Linearization failed: {linear_file} not found!")

# support older openmodelica versions before OpenModelica v1.16.2 where linearize() generates "linear_model_name.mo" file
if not linear_file.exists():
linear_file = pathlib.Path(f'linear_{self._model_name}.py')

# extract data from the python file with the linearized model using the ast module - this allows to get the
# needed information without executing the created code
linear_data = {}
Expand Down