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

Fixed step timed output data

Fixed step timed output data

I have a model that contains lots of events due to usage of 'if' command. The model runs as i expected but the problem is that the generated output data is unusable in anywhere else since it does not have fixed step time. I have tried the both cases in both csv and mat;

-Enable equidistant time grid, disable store variables at events: I am missing short on the some data points possible reason some events are coinciding with the desired step size.

-Enable both equidistant time grid and store variables at events: In this case i have way many data due to the events can happen between the desired time steps and post processing is not an option because there are multiples of data for some time points and they are not exact duplicates.

Is there a way to properly get output data with fixed step time when the model has many events like my model? (Such as how MATLAB provides the fixed step time results even tough solver is not fixed step timed one)

Re: Fixed step timed output data

Try to resample the mat-file using:

https://openmodelica.org/doc/OpenModeli … ionresults

Re: Fixed step timed output data

Thank you for the reply, resampling solved the issue

Re: Fixed step timed output data

sjoelund.se wrote:


Try to resample the mat-file using:

https://openmodelica.org/doc/OpenModeli … ionresults

Is there any option to resample from the OMEdit graphical interface? I don't know exactly how to use the scripting commands. It would be nice to have an option to resample the plot file at a specific sample time directly from the GUI.

Thanks

There are 0 guests and 0 other users also viewing this topic
You are here: