OpenModelica FMU Running in Python (Real-time)

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ม.ค. 2025

ความคิดเห็น • 9

  • @reneradojcic
    @reneradojcic  7 หลายเดือนก่อน

    Hi everyone here is a short guide how to do the "python magic" with the FMU (at least the conceptual idea) sorry for my slow response...
    atristech.com/blogs/python-and-realtime-fmu/

  • @Pero12121
    @Pero12121 3 ปีที่แล้ว +1

    Hi, Rene.
    Could you please show how you ran the real-time simulation in Python? I also play simulations using the Pyfmi library. I am taking the OpenModellica model exported to FMU. However, nowhere could I find an option that allows you to simulate the model in real time and additionally set inputs during the simulation. In Python, using the simulate function, it immediately gets the whole array with the result, do you have to run it some other way? Did the model you created in OpenModellica require any special options to be set before exporting?
    Thanks in advance for your answer 😊

    • @JWalkind3
      @JWalkind3 2 ปีที่แล้ว

      Hi Piotr!
      Did you find an efficient python solution to be able to run infinitely an FMU and interact real-time with it?
      Thanks!
      Did you find an efficient solution to be able to

    • @reneradojcic
      @reneradojcic  7 หลายเดือนก่อน

      Please check out my pinned comment! Sorry for the delayed response Pero...

  • @sergioinfanteparedes5325
    @sergioinfanteparedes5325 2 หลายเดือนก่อน

    Hi, Rene.
    I'm trying to follow the post you made but im encountering several problems. The example doesn't work just with the things you mentioned in the post, do you have a github repo or similar to check what I'm doing wrong?

    • @reneradojcic
      @reneradojcic  2 หลายเดือนก่อน

      Hi Sergio,
      The blog is just guidance. With PySide6/Pyqt6 you manage the threads and run the simulation async to the GUI.
      I currently don't have time to recreate the code. If i manage I'll get back at you

    • @sergioinfanteparedes5325
      @sergioinfanteparedes5325 2 หลายเดือนก่อน

      @@reneradojcic Thanks for your reply, but the problem is related with cosimulation and model exchange. You say that the script must be modified for model exchange, but it doesnt work because of the doStep function. So, why did you used model exchange? Thank you very much

  • @Sanket1b
    @Sanket1b 7 หลายเดือนก่อน

    Hi Rene,
    I am trying to install PyFMI.
    I have an environment with Python 3.9. But somehow I am facing trouble with installation.
    I wanted to know if all the compilers need to be installed for Assimulo module installation?
    Also which version of Python you are using?
    If possible could you share all the dependencies in requirements.txt?

    • @reneradojcic
      @reneradojcic  7 หลายเดือนก่อน

      Hi! Please check out my pinned comment! Sorry for the delayed response...