Changeset a8c9ded in OpenModelica

Timestamp:
2023-03-25T11:27:18+01:00 (13 months ago)
Author:
GitHub <noreply@…>
Branches:
maintenance/v1.21, maintenance/v1.22, maintenance/v1.23, master
Children:
38b6c06
Parents:
3647dc1c
git-author:
Mahder Gebremedhin <mahge@…> (03/25/23 11:27:18)
git-committer:
GitHub <noreply@…> (03/25/23 11:27:18)
Message:

Do not overwrite parameter values to compute attribute values. (#10445)

  • Do not overwrite values to compute attribute values.
  • The previous implementation used the parameter itself to temporarily store and return the computed attribute values. It then used this value to update the actual attribute value and resetted the parameter to its start value. This does not always work (I think) because the value of the parameter is different from the start value (which is saved in the init.xml file) if the value is not a constant (?)

On top of that it was quite confusing to read and understand. So modify
the codegen to treat this case specifically and generate in-place
updates to these non-constant min, max, nominal attribute values.

  • Do not disable optimization of some functions.
  • These are static functions and are marked for no optimization. I am not sure what the effect of the no-optimization attribute is in this case. Do not try to disable optimization for them anyway because they should be optimized if possible.
  • Reenable default extraction of min, max nominal assignments for params.
  • This reverts #9853 (#44dc29024c038c040e2e240d1c265ddec3dcad5e)
  • It was disabled because of #9825.
  • The handling has been improved now so it can be re-enabled.
Location:
OMCompiler/Compiler
Files:
3 edited

Note: See TracChangeset for help on using the changeset viewer.