Skip to content

Commit

Permalink
Fix list of iteration variables for more than one strong component (#…
Browse files Browse the repository at this point in the history
…10683)

* Fix list of iteration variables for more than one strong component

This prevents the removal of start attributes from iteration variables
during FMI export.
See issue #10680, e.g.:
translateModelFMU(ThermofluidStream.Examples.Utilities.Tests.Piston, version = "2.0");

* Update test for FMI attributes
  • Loading branch information
rfranke committed May 11, 2023
1 parent 81f67f6 commit 997b5e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion OMCompiler/Compiler/BackEnd/BackendDAEOptimize.mo
Original file line number Diff line number Diff line change
Expand Up @@ -5659,7 +5659,7 @@ protected
algorithm
if not listEmpty(varIndices) then
vars := list(BackendVariable.getVarAt(allVars, v) for v in varIndices);
crefs := list(BackendVariable.varCref(v) for v in vars);
crefs := List.append_reverse(list(BackendVariable.varCref(v) for v in vars), crefs);
warnings := (message + warnAboutVars(vars)) :: warnings;
end if;
end listAllIterationVariables3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ readFile("fmi_attributes_06.xml"); getErrorString();
// <ScalarVariable
// name=\"Fo\"
// valueReference=\"8\"
// >
// <Real/>
// initial=\"approx\">
// <Real start=\"0.0\"/>
// </ScalarVariable>
// <!-- Index of variable = \"10\" -->
// <ScalarVariable
Expand Down

0 comments on commit 997b5e0

Please sign in to comment.