.Buildings.DHC.Loads.BaseClasses.getPeakLoad

Information

Function that reads a double value from a text file.

This function scans a file that has a format such as

#1
#Some other text
#Peak space cooling load = -383165.6989 Watts
#Peak space heating load = 893931.4335 Watts
double tab1(8760,4)
0,0,5972.314925,16
3600,0,4925.839944,1750.915684
...

The parameter string is a string that the function searches for, starting at the first line. If it finds the string, it expects an equality sign, and returns the double value after this equality sign. If the function encounters the end of the file, it terminates the simulation with an assertion.

See Buildings.DHC.Loads.BaseClasses.Validation.GetPeakLoad for how to invoke this function.

Interface

pure function getPeakLoad
  extends Modelica.Icons.Function;
  input String string "String that is written before the '=' sign";
  input String filNam "Name of data file with heating and cooling load" annotation(
    Dialog(loadSelector(filter = "Load file (*.mos)", caption = "Select load file")));
  output Real number "Number that is read from the file";
end getPeakLoad;

Revisions


Generated at 2024-12-27T19:26:12Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos