Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As in the module datasets, module parameters are defined in a configuration where the name is the same as the moduleInstanceId of the General Adapter module it is to be used in (though a different name may also be called by the General Adapter- see the moduleInstance configuration section 05 General Adapter Module#05GeneralAdapterModule-exportParameterActivity).

When available on the file system, the name of the XML file for configuring Module Parameters for example for the Eden_Historical module may be:

Eden_Historical 1.00 default.xml

Eden_Historical

File name for the parameters for Eden_Historical.

1.00

Version number

default

Flag to indicate the version is the default configuration (otherwise omitted).

The structure of the module parameter XML configuration is the same as that applied in the Published Interface format. See the relevant documentation for the definition of the schema and required configuration.

...

Since 2012.01 it is possible to add location attributes to the parameter file, using a template. Below is an example of a template.

Code Block
titleModule patrameter template for individual model-parameters
<parameters version="1.5" xmlns="http://www.wldelft.nl/fews/PI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews/PI httphttps://fewsfewsdocs.wldelftdeltares.nl/schemas/version1.0/pi-schemas/pi_modelparameters.xsd">
&nbsp;&nbsp; &nbsp;    <group id="MATCHES" name="MATCHES">
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;        <model>ExportParams</model>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;        <parameter id="MATCH_ID" name="MATCH_ID">
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;            <description>Station used for matching</description>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<stringValue><at:var at:name="EXTLOCID" /></stringValue>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</parameter>
&nbsp;&nbsp; &nbsp;</group>
</parameters>            <stringValue>@EXTLOCID@</stringValue>
        </parameter>
    </group>
</parameters>

Use the templateLocationLoop-locationModelLoop functionality within the GeneralAdapter you can populate the file, either with a specific identifed location, or by looping over a locationset to create a group per location. The <model> element is the key to connect the group-template to the looping functionality.

Code Block
titletemplateLocationLooping for a specific model
<exportParameterActivity>
				<fileName>OutputParameters</fileName>
				<templateLocationLooping>
					<locationModelLoop>
						<locationId>3201</locationId>
						<model>ExportParams</model>
					</locationModelLoop>
					<locationModelLoop>
						<locationSetId>URBS_models</locationSetId>
						<model>ExportParams</model>
					</locationModelLoop>
				</templateLocationLooping>
				<moduleInstanceId>ParametersTemplate</moduleInstanceId>
			</exportParameterActivity>

A similar expansion loop-concept is available for to populate a parameter table, where the <parameter> element is the match between GA-loop and the template file

Code Block
titleModule parameter template for parameter table
<group id="@GROUPID@" name=”@NAMEID@”>     
     <locationId>@PROJECTID@<locationId>      
     < parameter id="SpillPriorityTable">
             <table>
                   < columnIds A="SP_LOC" B="SPIL_DAY" C="SPIL_NIGHT"/>
                   < columnTypes A="string" B="double" C="double"/>
                   < row A="@SP_LOC@" B="@SP_DAY@" C="@SP_NIGHT@"/>
           </table>
     < /parameter>
< /group>

Associated general adapter templateLocationLooping to create a group with a table per location

Code Block
<templateLocationLooping>
	<locationTableLoop>
		<locationSetId>SpillPriorityLocations</locationSetId>
		<parameterId>SpillPriorityTable</parameterId>
	</locationTableLoop>
</templateLocationLooping>