The function constructor
is a C function that is called by a Modelica simulator
exactly once during the initialization.
The function returns the object adapter
that
will be used to store the data structure needed to communicate with EnergyPlus.
impure function constructor extends Modelica.Icons.Function; input Integer objectType "Type of the object (1: ThermalZone, 2: Schedule, 3: Actuator, 4: Surface)"; input Modelica.Units.SI.Time startTime "Start time of the simulation"; input String modelicaNameBuilding "Name of this Modelica building instance that connects to this thermal zone"; input String modelicaInstanceName "Name of the Modelica instance of this object"; input String spawnExe "Name of the spawn executable, without extension, such as spawn-0.2.0-d7f1e095f3"; input String idfVersion "IDF version with underscores, such as 9_6_0"; input String idfName "Name of the IDF"; input String epwName "Name of the weather file"; input Real relativeSurfaceTolerance "Relative tolerance of surface temperature calculations"; input String epName "Name of the object in EnergyPlus"; input Boolean usePrecompiledFMU "Set to true to use precompiled FMU with name specified by input fmuName"; input String fmuName "Specify if a pre-compiled FMU should be used instead of EnergyPlus (mainly for development)"; input String buildingsRootFileLocation "Name of top-level legal.html file of the Buildings library (used to find the spawn executable)"; input Buildings.ThermalZones.EnergyPlus_9_6_0.Types.LogLevels logLevel "LogLevels of EnergyPlus output"; input Boolean printUnit "Set to true to print units for OutputVariable object. Must be false for all other objects"; input String jsonName "Name of the object in the json configuration file"; input String jsonKeysValues "Keys and values string to be written to the json configuration file"; input String parOutNames[nParOut] "Names of parameter in modelDescription.xml file"; input String parOutUnits[nParOut] "Modelica units of the parameters"; input Integer nParOut "Number of parameters"; input String inpNames[nInp] "Names of inputs in modelDescription.xml file"; input String inpUnits[nInp] "Modelica units of the inputs"; input Integer nInp "Size of inpNames"; input String outNames[nOut] "Names of outputs in modelDescription.xml file"; input String outUnits[nOut] "Modelica units of the outputs"; input Integer nOut "Size of outNames"; input Integer derivatives_structure[nDer, 2] "List of derivatives (1-based index, [i,j] means dy_i/du_j"; input Integer nDer "Size of derivatives"; input Real derivatives_delta[nDer] "Increments for derivative calculation"; output SpawnExternalObject adapter; end constructor;
impure
for MSL 4.0.0.