I have a simulation model using different components. In order to get a quick overview of the used parameters I use the functionality of annotations to display certain model parameters (e.g. m_flow_nominal) via:
textString="Nominal Flow Rate = %m_flow_nominal"
in the annotation dialog. Which will give out something like
Nominal Flow Rate = 5
This is working perfectly fine for parameters that are integers.
I also have a parameter that is calculated from other values. Like, let's say the Volume of a body. When I try to display this parameters via:
textString="Volume = %volume"
Instead of the final value I will be given the formula the volume is calculated with. For example
Volume = a * b * c
How can I display the final value of the volume in this case, instead of the formula?
Here is the actual problem:
parameter Modelica.SIunits.Length xBorFie = 10 "Borefield length";
parameter Modelica.SIunits.Length yBorFie = 30 "Borefield width";
parameter Modelica.SIunits.Length dBorHol = 5 "Distance between two boreholes";
parameter Integer nXBorHol = integer((xBorFie+dBorHol)/dBorHol) "Number of boreholes in x-direction";
parameter Integer nYBorHol = integer((yBorFie+dBorHol)/dBorHol) "Number of boreholes in y-direction";
final parameter Integer nBorHol = nXBorHol*nYBorHol "Number of boreholes";
When using
textString="Number of boreholes = %nBorHol"
I get
Number of boreholes = nXBorHol*nYBorHol