Examples from Modelica.Fluids (e.g. PumpingSystem and others) translation error when calling from python
Description
When I start Modelica.Fluid.Examples.PumpingSystem and other ((Fluid.Examples.Tanks.ThreeTanks, Fluid.Examples.Tanks.TanksWithOverflow, Fluid.Examples.Tanks.EmptyTanks) from OmEdit it simulates, but when I call the same model from python, I get an error:
`[OMC log for 'sendExpression(buildModel(Modelica.Fluid.Examples.PumpingSystem, variableFilter="."), True)']: [symbolic:warning:7017] The model contains alias variables with redundant start and/or conflicting nominal values. It is recommended to resolve the conflicts, because otherwise the system could be hard to solve. To print the conflicting alias sets and the chosen candidates please use -d=aliasConflicts. ... OMPython.OMCSession.OMCSessionException: [OMC log for 'sendExpression(buildModel(Modelica.Fluid.Examples.PumpingSystem, variableFilter="."), True)']: [translation:error:7024] Jacobian A contains non-linear components. This indicates a singular system or internal generation errors.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "mnt/c/test.py", line 12, in
Steps to Reproduce
Install a python environment with OMPython an run the following python code:
import sys
from OMPython import OMCSessionZMQ
from OMPython import ModelicaSystem
omc = OMCSessionZMQ()
mod = ModelicaSystem(modelName="Modelica.Fluid.Examples.PumpingSystem")
mod.simulate()
Expected Behavior
The model should simulate when called from python.
Version and OS
Tested with nightly 1.26 (in wsl) and 1.25.3 native on windows with different python-versions (3.12 and 3.14).
Additional Informations
Possibly duplicate or related to #283
I think https://github.com/OpenModelica/OMPython/issues/274 is more relevant. The error indicates that linearization failed. If you don't need to linearize your model, you can just remove the related command line options:
Python 3.12.3 (main, Nov 6 2025, 13:44:16) [GCC 13.3.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.20.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from OMPython import ModelicaSystem
In [2]: mod = ModelicaSystem(modelName="Modelica.Fluid.Examples.PumpingSystem", commandLineOptions=[])
[OMC log for 'sendExpression(buildModel(Modelica.Fluid.Examples.PumpingSystem, variableFilter=".*"), True)']: [symbolic:warning:7017] The model contains alias variables with redundant start and/or conflicting nominal values. It is recommended to resolve the conflicts, because otherwise the system could be hard to solve. To print the conflicting alias sets and the chosen candidates please use -d=aliasConflicts.
In [3]: mod.simulate()
In [4]:
(Tested with OMPython 4.0.0.)