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
  • Index
  • » Users
  • » jonie
  • » Profile

Posts

Posts

Jan-03-14 14:54:13
Is it possible to assign a value to a variable via 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.

Dec-19-13 14:51:52
How can I manipulate the real input signals of a model in python?

I am facing the same problem. Have you got any solution?

  • Index
  • » Users
  • » jonie
  • » Profile
You are here: