<variables>

Top  Previous  Next

The <variables> section of a SIMPLACE ModelSolution contains the predefined constants that are meant to be used in all further sections of the model solution.

 

Technically, each variable declared in this section is converted into a SimVariable object and stored in the simulation data container (VarMap) to be exchanged between the following objects. These variables can be considered constants because no other object within the ModelSolution is allowed to modify its values.

 

However, when a ModelSolution is encapsulated with a SimulationProject, the values of matching SimVariable names declared in the SimulationProject XML file will be overridden in the underlying ModelSolution variables. This overriding feature is only applied to SimVariables declared in the <variables> section of a ModelSolution (more detail given in SimulationProject).

 

Examples of common constants declared in this section are the site, crop, and soil type names, which are typically used as control variables for the start and end of simulations, filenames to be used by the following section <interfaces>, and fixed model parameters (e.g. “latitude” or “SoilType”). The “startdate” and “enddate” are required global variables used by SIMPLACE to define the respective start and end of simulations.

 

A variable in a solution is defined between <var>...</var> tags:

 

 <variables>

          <var id="startdate" datatype="DATE" description="Starts at begin of year">01.01.1970</var>

          <var id="enddate" datatype="DATE" description="Runs until end of year">31.12.1970</var>

          <var id="vFINISHTSUM" datatype="DOUBLE" description="Determines when crop is harvested / simulation ends">2080</var>

          <var id="vLocation" datatype="CHAR">netherlands</var>

          <var id="vCrop" datatype="CHAR">wheat</var>

      </variables>