Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive simulation #7477

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

adeas31
Copy link
Member

@adeas31 adeas31 commented May 18, 2021

Purpose

Interactive simulation using OMSimulator.

Approach

Communicate with OMSimulator using zmq for data exchange.

@adeas31 adeas31 added COMP/OMSimulator Issue and pull request related to OMSimulator COMP/GUI/OMEdit Issue and pull request related to OMEdit labels May 18, 2021
@adeas31 adeas31 self-assigned this May 18, 2021
@adeas31
Copy link
Member Author

adeas31 commented May 18, 2021

@lochel now checking/unchecking the variable sends the following json command to the server,

{'arg': 'enable', 'cref': 'TestSimulation.Root.CauerLowPassSC.C1.C', 'fcn': 'signals'}
{'arg': 'disable', 'cref': 'TestSimulation.Root.CauerLowPassSC.C1.C', 'fcn': 'signals'}

Based on the enabled signals the server should start sending the values.

@lochel
Copy link
Member

lochel commented Aug 24, 2021

@adeas31 I am now sending the time point and all active signals back to OMEdit. Please check if the format is okay, or if I should adjust the messages.

@max-privato
Copy link

max-privato commented Nov 22, 2021

We used to have interactive simulation as an experimental feature in OMEdit also for OMC (I mean not OMS). It is still mentioned in the OMEdit manual.

Interactive simulation is a near-mandatory feature for real-time simulations e.g. using Modelica_DeviceDrivers with RealTimeSynchnonize active: you cannot wait for the real-time session to be ended to look at what's going on, through watching some significant plots.

I understand that interactive simulation was dropped some time ago from OMEdit because it did not work as expected. But now it is being considered for OMS: wIll it be restored also for OMEdit?
I would appreciate it a lot, for my real-time simulations, which are nice Modelica (and Modelica_DeviceDrivers library)-based Hardware-In-the-Loop (HIL) simulations.

@lochel
Copy link
Member

lochel commented Nov 22, 2021

I think we still use the (old) interactive simulation for the Petri net simulator (not OMEdit). @cbrinkrolf is that correct?

@adeas31
Copy link
Member Author

adeas31 commented Nov 24, 2021

The interactive simulation for Modelica models is still there in OMEdit.

This one is for SSP models and the idea with this work is also to have a common GUI interface for both Modelica and SSP models interactive simulation.

@max-privato
Copy link

max-privato commented Nov 25, 2021

The interactive simulation for Modelica models is still there in OMEdit.

Do you mean that it can be used for Modelica simulations?
If the answer is yes, where can I find how to do?
Thanks

@adeas31
Copy link
Member Author

adeas31 commented Nov 25, 2021

https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/omedit.html#interactive-simulation

The video in the users guide is bit old. The interactive controls are moved to a new tab in simulation setup dialog.

@max-privato
Copy link

https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/omedit.html#interactive-simulation

The video in the users guide is bit old. The interactive controls are moved to a new tab in simulation setup dialog.

WOW!
It was really easy to find. Thank you very much. This helps me considerably.
Interactive simulation coupled with realTimeSynchronise opens a whole world to me.

@lochel
Copy link
Member

lochel commented Mar 7, 2022

@adeas31 how much work is left?

@adeas31
Copy link
Member Author

adeas31 commented Mar 8, 2022

Not much. I can read the data now. I just need to plot it.
The thing to think about is usability. I am trying to make it more user friendly. The way it works right now is confusing.

@CLAassistant
Copy link

CLAassistant commented Oct 5, 2023

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMP/GUI/OMEdit Issue and pull request related to OMEdit COMP/OMSimulator Issue and pull request related to OMSimulator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants