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
  • » thiengo
  • » Profile

Posts

Posts

Oct-16-18 22:41:43
How it works, how integrate in a infinite loop? FMU2.0

Reading fmusdk 2.0 cs main.c file we have:

Code:

/ enter the simulation loop

    time = tStart;
    while (time < tEnd) {
        // check not to pass over end time
        if (h > tEnd - time) {
            hh = tEnd - time;
        }

What will happen if we pass over end time? Can we ignore this parameter? It is only a suggestion? We can change " while (time < tEnd)" to a every true loop and break when I want to?

Oct-16-18 21:24:06
How it works, how integrate in a infinite loop? FMU2.0

adrpo wrote:


As far as I know you can simulate forever, for FMI CS, just call doStep with currentTime+stepSize. I guess the boundary is DBL_MAX (the max for double).

Great news... In Co-Simulated do we can ignore stop time, or do we need to manipulate this parameters? Do we need to refill inputs and any other data to proceed with doStep?

Oct-16-18 14:24:00
How it works, how integrate in a infinite loop? FMU2.0

Hi fellows,

I am reading about Modelica and FMU and I think it will fit to my ambitions to use a complex algorithm (Modelica as FMU) in my flight simulator during all simulation time (real-time).

I know modelica can do the job to simulate my electrical system and I know that, I can export the simulation equations in C code (library) to be imported in FMU standardization and load  through my plugin (also writed in C) to run all the math and post results at the end, BUT and here are the great but, how can I load a FMU, input data to t0 and run the first iteration, recovery outputs, write to my simulator and request a new iteration to do everything again, in loop, without a stop time defined. Then FMU must to run until I want, when I send a signal to stop e free all?

Please I am a student and I want to do my Monograph about this, integration of functional mock-up interfaces to another environment to simulate in real-time and interfacing with a person for training or testing propose, so I need a explanation and material to read with specific aplication and examples, codes, etc. Thanks for helping and sorry my English.

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