Skip to content

Commit 60411b0

Browse files
authored
Work around non-scalarized connector lookup issue (#9960)
- If the lookup in ConnectEquations.lookupVarAttr fails, try again without subscripts in case lookup table only contains the non-scalarized variable.
1 parent b727a78 commit 60411b0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

OMCompiler/Compiler/NFFrontEnd/NFConnectEquations.mo

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,10 @@ protected
10221022
algorithm
10231023
ovar := UnorderedMap.get(varName, variables);
10241024

1025+
if isNone(ovar) then
1026+
ovar := UnorderedMap.get(ComponentRef.stripSubscriptsAll(varName), variables);
1027+
end if;
1028+
10251029
if isNone(ovar) then
10261030
Error.addInternalError(getInstanceName() + " could not find the variable " +
10271031
ComponentRef.toString(varName) + "\n", sourceInfo());

0 commit comments

Comments
 (0)