Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Input Variables in OMPython

Input Variables in OMPython

I would like to have a OpenModelica model like the following:

[input u]--------------[do something]---------------[output y]

I would like to design the model with OMEdit and then run it in Python via OMPython. I need to run the same model with different input data.

My Question:

How can I assign a specific value to "u" from Python?

Is this possible at all?

The output "y" I can gat via the output file. With respect to performance this is a rather bad way.

Is it possible to get the output "y" directly as a Python variable (not reading it from a file)?

Thanks in advance.

There are 0 guests and 0 other users also viewing this topic