Opened 6 years ago

Closed 6 years ago

#5228 closed defect (fixed)

OMSimulator cannot simulate two connected FMUs exported from OMEdit

Reported by: Boldizsár Németh <nboldi@…> Owned by: Lennart Ochel
Priority: high Milestone: 1.14.0
Component: Backend Version: v1.13.0-dev-nightly
Keywords: Cc:

Description

OMEdit v1.13.0-dev-253-g8f7c38ac (64-bit)
OMSimulator v2.0.0-dev-860-gf06327c-mingw

Steps to reproduce:

  • Open OMEdit.
  • Load OneDirection.mo
  • Export model Source
  • Export model Target
  • Put the generated OneDirection.Source.fmu and OneDirection.Target.fmu into a folder with one-direction.lua
  • Run OMSimulator on one-direction.lua

Result:

C:\Users\nboldi\Desktop\teszt>C:\OpenModelica1.13.0-dev-64bit\bin\OMSimulator.exe one-direction.lua
error:   [addConnection] [oms2::FMICompositeModel::addConnection] failed for Source:h -> Target:d
# FMI composite model "model"
## FMI sub model "Source"
type: FMU
## FMI sub model "Target"
type: FMU
## Connections
warning: No solver instance is assigned to FMU "Source"; A default solver will be selected: euler
warning: No solver instance is assigned to FMU "Target"; A default solver will be selected: euler

Attachments (2)

one-direction.lua (447 bytes ) - added by Boldizsár Németh <nboldi@…> 6 years ago.
OneDirection.mo (389 bytes ) - added by Boldizsár Németh <nboldi@…> 6 years ago.

Download all attachments as: .zip

Change History (5)

by Boldizsár Németh <nboldi@…>, 6 years ago

Attachment: one-direction.lua added

by Boldizsár Németh <nboldi@…>, 6 years ago

Attachment: OneDirection.mo added

comment:1 by Lennart Ochel, 6 years ago

Component: OMSimulatorBackend

The issue is introduced by the OpenModelica backend which renames outputs if they are also continuous states: The output appears as _D_outputStateAlias_h.

So this works from the Lua script:

-- add connections
oms2_addConnection("model", "Source:_D_outputStateAlias_h", "Target:d")

comment:2 by Lennart Ochel, 6 years ago

Milestone: Future1.14.0
Status: newaccepted

comment:3 by Lennart Ochel, 6 years ago

Resolution: fixed
Status: acceptedclosed

Outputs will no longer be renamed; see OMCompiler#2899.

Note: See TracTickets for help on using tickets.