TransiEnt-official / transient-lib

official and current version of TransiEnt library
BSD 3-Clause "New" or "Revised" License
9 stars 11 forks source link

Illegal Modelica code accessing value of Real #12

Open AnHeuermann opened 1 year ago

AnHeuermann commented 1 year ago

When testing TransiEnt in OpenModelica we noticed that some models are trying to access attribute value.

E.g. for TransiEnt.Storage.Gas.Check.TestGasStorage_varXi:

[/home/hudson/saved_omc/libraries/.openmodelica/libraries/TransiEnt 2.0.2-master/SimCenter.mo:388:54-388:133:writable] Error: Modified element value not found in class Real.

SimCenter.mo

  Modelica.Blocks.Interfaces.RealOutput T_ground_var(value=if variable_T_ground then Variable_Ground_Temperature.value else T_ground)  "Diffuse solar radiation (from component ambientConditions)";

According to the Modelica 3.6 specification section 4.8.1 it is not allowed to access attribute value of a variable of type Real.