Hang Yu
Hang Yu

Reputation: 486

FMU co-simulation using openMP or pThread

Say I have a vehicle model, the chassis will be used as a master FMU, its engine, transmission, tires, etc are from 3rd parties and I want to used them as slave FMUs. I want to parallel the model in this way, the master FMU is put on the main thread, and fork everything else on other threads.

  1. I want to know if this simple idea is achievable by using FMUs exported from Dymola...
  2. If possible, is it worthwhile doing it? I wander if the parallel model is as efficient as as a sequential one at the physics level. (I understand that a badly paralleled program is slower than a sequential one, but I just need to know if it is physically slower or faster)
  3. The latest Dymola has built in the openMP features, has anyone ever used it? What does it look like?

I found a paper about this: Master for Co-Simulation Using FMI http://www.ep.liu.se/ecp/063/014/ecp11063014.pdf

Upvotes: 1

Views: 506

Answers (1)

Danto N
Danto N

Reputation: 65

I think it can make perfect sense to launch several FMU in parallel if they can do their job separately. What is difficult in co-simulation is to understand when the simulators must be synchronized (for instance to exchange information). These synchronization should be minimal to increase efficiency but enough to avoid track back the simulator states (when possible). Also, it has chance to work when you have causal relations between your FMUs. If you have acausal relations, this is a different story...

technically, I would say:

  • for 1), you can always launch a FMU in a thread if you want, no problem with that
  • for 2), it mainly depends on the number and frequency of the synchronizations required between the different FMUs
  • for 3) I do not know but I think you should distinguish between launching different FMU in parallel and making one FMU parallel...

my two cents

Upvotes: 2

Related Questions