skip to main content
RiverWare DMI Event
The RiverWare DMI event allows you to specify configuration information that is applied to a DMI in a RiverWare model. The RiverWare Data Management Interface (DMI) provides a mechanism for importing data to a RiverWare model.
If you link a DMI event to the RiverWare event in the RiverSMART workspace, the DMI configuration is included as a variable in the generation of RiverWare scenarios. The DMI configurations generated by RiverSMART are passed to RiverWare before RiverWare executes. They are used to modify the DMI in the model for that RiverWare invocation.
DMI Configuration Dialog Box
This dialog box opens when you open a DMI Configuration event on the RiverSMART workspace.
Name
Enter a user-defined unique name for the DMI Configuration event.
DMI Configuration frame
Name
The menu lists all DMIs in the RiverWare model that have the type selected in the DMI Type field. Select the name of the DMI you want to use. If the name does not match a DMI in the model—for example, if the DMI was deleted from the model—the text box is highlighted yellow to indicate the error.
Category
Enter a user-defined category name. Categories allow you to group DMI events based on the type of data imported—for example, “Supply”, “Demand”, and “Evaporation”. The category is used as an input type when RiverSMART scenarios are generated. For example, all DMIs with the “Supply” category would be considered as alternative choices in the Supply dimension when inputs to the RiverWare event are combined into alternative scenarios. See Simulating Scenarios for details.
DMI Type
Select the DMI type, as follows.
• Direct Connect; see Direct Connect DMI.
• Control File / Executable; see Control File / Executable DMI.
• Trace Directory; see Trace Directory DMI.
Direct Connect DMI
If you select the Direct Connect option in the DMI Type field, the DMI Configuration dialog box appears as follows.
Execution Time
Select one of the following options to specify when the DMI is to be executed within the RiverWare invocation.
• Pre-run (Initialization). DMIs are executed once before the multiple run is started.
• Per Trace. DMIs are run at the beginning of each trace (run) of the multiple run. If you select this option, the Trace Count field is also required. Enter the number of traces (runs) you want in the multiple run. This number is incorporated in the multiple run configuration to control the number of runs when RiverWare is invoked.
Direct Connect Datasets frame
In this frame, you can modify the datasets specified for the DMI connection in the RiverWare model.
Note:  The DMI event Direct Connect Datasets supports Excel Datasets only.
To add a new dataset to the list, select Plus. To remove a selected dataset, select Minus. When you add a dataset, the following fields are available.
Dataset Name
Required field. Specify the name of the dataset to use. You can select the name from the menu, which lists all the Excel datasets in the RiverWare model, or you can enter the name directly in the text box. This entry must match exactly the name of an Excel dataset configured for the DMI in the RiverWare model. If the entry does not match—for example, if the dataset was deleted from the model—the text box is highlighted yellow to indicate the error.
Type
Display only. Indicates the dataset is an Excel workbook.
Workbook
Optional field. Open the field and enter the path for the Excel workbook to use as input when the DMI is invoked; this entry overrides the workbook path specified for the Excel dataset in the RiverWare model.
Sheet
Available only if the Pre-Run option is selected for Execution Time. Optionally, open the field and enter the workbook sheet name to use when the DMI is invoked; this entry overrides the sheet specified in the dataset configuration in the model.
Control File / Executable DMI
If you select the Control File / Executable option in the DMI Type field, the DMI Configuration dialog box appears as follows.
Execution Time
Select one of the following options to specify when the DMI is to be executed within the RiverWare invocation.
• Pre-run (Initialization). DMIs are executed once before the multiple run is started.
• Per Trace. DMIs are run at the beginning of each trace (run) of the multiple run. If you select this option, the Trace Count field is also required. Enter the number of traces (runs) you want in the multiple run. This number is incorporated in the multiple run configuration to control the number of runs when RiverWare is invoked.
Executable
This field allows you to override the executable configured for the DMI in the model. Enter the file path in the text box or select it through the File Chooser. This executable is invoked when the existing DMI in the model is run. Executables are typically developed by users to do certain data-related tasks. In the previous figure, the executable is a Perl script that copies trace data to a specified location.
Argument List
Enter arguments, one per line, to be passed to the DMI executable when the DMI is run. In the previous figure, a trace folder is passed to tell the CopyTraces.pl DMI executable where to find the traces to copy.
Trace Directory DMI
If you select the Trace Directory option in the DMI Type field, the DMI Configuration dialog box appears as follows.
Execution Time
Select one of the following options to specify when the DMI is to be executed within the RiverWare invocation.
Note:  For Trace Directory DMIs, the Per Trace option is most applicable. If the Pre-run option is selected, only the information for trace one is imported before the multiple run is started.
• Pre-run (Initialization). DMIs are executed once before the multiple run is started.
• Per Trace. DMIs are run at the beginning of each trace (run) of the multiple run. If you select this option, the Trace Count field is also required. Enter the number of traces (runs) you want in the multiple run. This number is incorporated in the multiple run configuration to control the number of runs when RiverWare is invoked.
Top Directory Containing Traces
This is the top-level folder that includes the trace folders to be imported. Enter the folder path in the text box or select it through the File Chooser.
It is assumed that trace folders are labeled trace1, trace2, and so on. The top-level folder specification allows RiverWare to find the trace data without an executable specification, as is required for the Control File / Executable DMI.
Control File
This file is used as a basis for RiverWare to create temporary control files for each trace of the multiple run. Enter the file path in the text box or select it through the File Chooser.
The control file lists slots to be imported, as well as optional keyword/value pairs, such as units and scale, that can be used with control files in Control File / Executable DMIs.
• If keyword/value pairs are specified, the path up to the file name is substituted with the path to the appropriate trace folder when the DMI is run in RiverWare.
• If keyword/value pairs are not specified, RiverWare inserts the trace path with the following file name:
%o%s
where:
• %o is the object name.
• %s is the slot name.
Revised: 08/02/2021