OpenModelica: Errors about missing 'each' statements
Created by: jnettels
Describe the bug
When using certain components with OpenModelica, errors like this are shown (while Dymola is not complaining):
[AixLib.FastHVAC.Components.Storage.HeatStorageVariablePorts: 164:3-171:26]: Non-array modification ‘"K"‘ for array component ‘unit‘, possibly due to missing ‘each‘.
I found them in:
- AixLib/FastHVAC/Components/Storage/HeatStorageVariablePorts.mo
- AixLib/FastHVAC/Components/HeatGenerators/CHP/CHP_PT1.mo
To Reproduce
Use these components in an OpenModelica simulation.
Expected behavior
Simulation should run instead of throwing an error.
System and software specifications
- AixLib 0.9.1
- OpenModelica v1.14.1 (64-bit)
Approach to solve issue
Inserting the 'each' statement solves the issue easily. I am linking a pull request.