Versions Compared

Key

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

...

This page describes the configuration of the General Adapter. This example was set-up as a template, where the name of the specific model is inserted via the $BASIN$ variable. Information on the functionality of the model adapter, and guidance for preparing the model are described in XXX.

Folder structure

Image Modified

The Model Adapter was developed to deal with a model structure as shown here. Both the model adapter and the SWMM executable reside in the bin folder, which is on the same level as model folders. In this example there is one model folder: Don. The model folder contains separate folders for input, logs, model files and output.

bin: common executable files to all models

...

  • The Rootdir needs to be the model folder. This is essential due to the SWMM executable needing this folder as current dir.
  • the WorkDir needs to point to the folder with the model files
  • the exportDir and importDir need to point to the input and output folder
  • the diagnosticsfile needs to point to the log/diag.xml file
  • TimeZone needs to be in GMT, because the Model Adapter expects and writes in GMT time


StartupActivities (optional)

the following settings are optional, but good practice:

...

Code Block
languagexml
themeEclipse
<function internalLocationSet="Don_subcatchments" externalLocationFunction="Don_@EXTERNAL_ID@" externalParameterFunction="P" internalParameter="PC.nwp" internalQualifier="DPS"/>


Control Rules (optional)

Control rules (time-dependent) can be exported, in order to have some control on structures in the model. The model needs to be set-up specifically to be able to use this functionality. This functionality has been developed aiming at changing the settings of a structure at specific moments: therefore the exported timeseries can be non-equidistant (equidistant is also possible).

...

the following object types are supported: pump, orifice, weir or outlet.

Rating Curves (optional)

Rating curves can be exported to replace existing rating curves in the model.

...

Code Block
languagexml
themeEclipse
<location internal="HY027wl" external="GRossDam"/>


Export ModuleDataSet (optional)

It is possible to export a ModuleDataSet containing the model file itself, directly into the model folder. This can be used to have the forecaster a model file with a different initial model state (eg dry, normal, wet). These files need to be included in the ModuleDataSets folder in the config folder, and can be configured as what-if scenarios.

Code Block
languagexml
themeEclipse
            <exportDataSetActivity>
                <moduleInstanceId>$moduledataset$</moduleInstanceId>
            </exportDataSetActivity>

Notice that the Model Adapter is not involved in this activity.

Execute Activities

The General Adapter has three execute activities:

...