Opened 9 years ago

Last modified 7 years ago

#3534 new enhancement

Optimize FMI getters and setters for aliases

Reported by: rfranke Owned by: adeas31
Priority: normal Milestone: Future
Component: FMI Version:
Keywords: Cc:

Description

5e6d738f1b768a0f1e9432e56f3b93bf9403de50/OMCompiler uses value references of the original variables for positive aliases in FMI 2.0 modelDescription.xml.

This causes two tests to fail:
openmodelica_fmi_ModelExchange_2.0.Modelica_Mechanics_MultiBody_Examples_Elementary_DoublePendulum.mos
openmodelica_fmi_ModelExchange_2.0.Modelica_Mechanics_MultiBody_Examples_Elementary_Pendulum.mos

This is why the elimination of alias references has been disabled again for C FMI export in 2490aa1ec587f5a97b2cb6db6167b4e3fce40ad7/OMCompiler.
The reason for the error (incorrect alias variables with start attribute) can still be considered there -- it is just not visible in modelDescription.xml if alias variables have own value references.

Once this is resolved, the respective case statements for getting or setting positive aliases can be removed from exported C code.

The new function SimCodeUtil.getValueReference takes the boolean input inElimNegAliases. This can be set to true for FMI 1.0 to also eliminate getter/setter code for negated aliases.

Change History (6)

comment:1 Changed 9 years ago by rfranke

693d9cff90c7b621dbce80e046102c4923b19df6/OMCompiler solves the first issue (overdetermined start values for alias variables in modelDescription.xml). The remaining task is to exploit the elimination of alias variables in the exported C code.

comment:2 Changed 9 years ago by sjoelund.se

  • Milestone changed from 1.9.4 to 1.9.5

Milestone pushed to 1.9.5

comment:3 Changed 9 years ago by sjoelund.se

  • Milestone changed from 1.9.5 to 1.10.0

Milestone renamed

comment:4 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.10.0 to 1.11.0

Ticket retargeted after milestone closed

comment:5 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.11.0 to 1.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:6 Changed 7 years ago by casella

  • Milestone changed from 1.12.0 to Future

The milestone of this ticket has been reassigned to "Future".

If you think the issue is still valid and relevant for you, please select milestone 1.13.0 for back-end, code generation and run-time issues, or 2.0.0 for front-end issues.

If you are aware that the problem is no longer present, please select the milestone corresponding to the version of OMC you used to check that, and set the status to "worksforme".

In both cases, a short informative comment would be welcome.

Note: See TracTickets for help on using tickets.