Skip to content

Unit mismatch error although units are the same #1428

@larsviktorlarsson

Description

@larsviktorlarsson

I have an .ssp with a SystemStructure.ssd file that has an .fmu with unit = "" on all outputs in its ModelDescription file. When I add unit to one of these connectors in SystemStructure.ssd:
<ssd:Connector name="pLin.in.y" kind="output" description="">
<ssc:Real unit="bar"/>
</ssd:Connector>

and connect this connector to another connector in the .ssd with the same unit:

<ssd:Connector name="pLin" kind="input" description="Input load pressure">
<ssc:Real unit="bar"/>
</ssd:Connector>

<ssd:Connection endConnector="pLin" endElement="valve_model" startConnector="pLin.in.y" startElement="interface_model"/>

I get error:

error: [addConnection] Unit mismatch in connection: interface_model.pLin.in.y -> valve_model.pLin
error: [importFromSnapshot] Failed to import ssd:Connection

If I instead have

<ssd:Connector name="pLin.in.y" kind="output" description="">
<ssc:Real unit=""/>
</ssd:Connector>

I get no error.

Should not the units in the ssd override the units in the FMU?

Also, the fmu for valve_model has units on all connectors.

My ssp as zip:
ParkerSimPack.zip

Running OMiImulator python api, version 'OMSimulator v2.1.3-win-notlm'

Metadata

Metadata

Assignees

Labels

project/openscalingOpenSCALING related issues and pull requests

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions