Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

iconfalse

...

Scenario input sets allow you to easily keep model structure, while switching between groups of input data and parameters. These may be used to represent changeable physical attributes, such as climate, land use decisions or even proposed infrastructure characteristics. You can switch between different scenario input sets to compare the effects on a model. For example, you can have one scenario input set consisting of rainfall, inflow and evapotranspiration data for natural conditions, another for wet conditions and a third set for dry conditions.

...

Scenario input sets can define both input parameters and data sources. Input parameters specific to a scenario are defined in the Scenario Input Sets dialog, either manually or using a file. Data sources are assigned to scenario input sets using the Load Data Source dialog, as explained here.

Figure 2. Scenario input sets, parameter entry

Anchor

...

In the Manual parameter set editor. Search can be triggered by pressing Ctrl+F while the editor is selected. A search bar in the top right hand corner will appear (see figure below). The search will highlight any matches, and can be configured by the drop down in the search box (match case, match whole and regular expressions).

Figure 3. Scenario Input sets, search dialog

Search dialog in input setsImage Removed

Anchor
ChildScenarioInputSets
ChildScenarioInputSets
Child Scenario Input Sets

Child scenario input sets allow you to further refine model scenarios. A child scenario input set inherits all parameters and data sources specified in its parents. If changes are made to the parent scenario input set, existing and new children will inherit those changes.  You can then set additional parameters, or alter existing ones, overwriting the inherited parameters. When you run a model with a child scenario input set, for any parameters that differ between the parent and child, the parameters from the child will take precedence. 

Figure

...

3. Child Scenario Input Sets, Example


For parent and child scenario input sets:

...

  • Right-click on the scenario input set that you wish to be the parent, and choose Add Child Scenario Input Set from the contextual menu (Figure 2). 
Figure

...

4. New Scenario Input Set

Input parameter entry

Parameters specific to a scenario input set are defined and managed using the parameter set editor in the Scenario Input Sets dialog (as shown in Figure 2). The panel on the right allows you to specify parameters, either manually, or by loading a text file.

...

  • An auto-complete functionality, press Ctrl + space to get a list of available elements;
  • Typing additional characters filters the auto-completion list. Items can also be selected by pressing the down arrow key ('↓');
  • Once the correct element is selected, pressing Tab or Return auto-fills an element from the list;
  • Pressing the period character ('.') displays a list of valid elements for the next step in the path;
  • For a valid path, pressing the equals character ('=') displays candidate values;
  • Click the Insert units icon for a list of available units. Note that these are not scenario-dependent so you must choose the correct item; and
  • An invalid parameter is identified with a red an underline (illustrated in Figure 2 for the Loss 3 node, which was deleted after the parameter was created). Acceptable parameter types are provided in Table 1.

Info
iconfalse
Note: Clicking the Apply values to scenario immediately icon will override any other values specified for the same parameter elsewhere in Source for all scenario runs. If disabled, the values take precedence for a single scenario run only, and the entered value from the scenario input sets will not change the default value (such as edited from the user interface) after run. Also, an error appears if there is a problem with one of the parameter specifications.
Table 1. Types of parameter values

...

Nodes.Wheat Fields.Inactive Demand Models.Irrigator #0.Crops.Wheat Crop.Planting Decision.Plant Date.Use Expression=False
Nodes.Wheat Fields.Inactive Demand Models.Irrigator #0.Crops.Wheat Crop.Planting Decision.Plant Date.Day=20
Nodes.Wheat Fields.Inactive Demand Models.Irrigator #0.Crops.Wheat Crop.Planting Decision.Plant Date.Month=12

You can also use scenario input sets to change the active demand model at a water user node, for example:

Nodes.Water User 3.Demand Model=MyInactiveDemandModel

If you wish to change some parameters in an inactive demand model, and also make it the active model, then you need to specify the parameter changes first. An example is shown in Figure 2 for the inactive demand model Irrigator #0. 

...

A function/value can be set in input sets with multiple lines. This is mostly useful if scenario input sets is used to merge changes from multiple users. For example, in a function one might want multiple lines with comments. The syntax looks like:

Functions.Functions.$f_rain.Expression = {MultiLineValue} 
// This is a comment in my function
IF($Now.Day = 30,
200,
0)
{/MultiLineValue}

Similarly, it can be the same syntax for: 

Nodes.Storage 1.Outlet Paths.Link #1.Outlets.Default Spillway.Minimum Discharge = {MultiLineValue}
[[0 0]
[100 0]
[101 864000000]]{m ML/d}
{/MultiLineValue}

Anchor
FileBasedEntry
FileBasedEntry
File-based parameter specification

The file-based parameter entry (shown in Figure 65) allows the specification of a file that will contain the element path and values. The formatting of this file must adhere to the same rules as the manual parameter set editor.

Note that the Reload on Run and Relative path checkboxes follows the same rules as for data sources.

Figure

...

5. Input parameter set using a file

Viewing scenario input sets from node/link feature editors

...

                                                                                               Figure 7. Accessing scenario input sets from node/link feature editor (a) when 'Inflow 1' node editor is selected (b) when 'Loss 3' node editor is selected

...

Image RemovedImage Removed

This functionality helps the user to identify the nodes or links to which the scenario input sets are applied, especially when the model is large and complicated.

Anchor
Functions
Functions
Referencing scenario input sets in functions

The built-in variable $ActiveInputSet allows you to use the active scenario input set as a variable in a function, for example if($ActiveInputSet = "Wet"1510). The active scenario input set is selected through the Configure dialog (Figure 1). When working with a scenario that contains parent and children scenario input sets (eg, Figure 86), the following conventions apply:

  • To identify a specific scenario input set, use its full path, eg. "Parent1.Child1", or "Parent2", or "Parent2.Child1.Grandchild.GreatGrandchild".
  • To identify any children of a specific scenario input set, use its full path followed by a full stop, eg. "Parent1.Child1." will be true for Parent1.Child1.Grandchild1 and Parent1.Child1.Grandchild2.
  • To identify a child scenario input set, regardless of its parents, use its name preceded by a full stop. For example ".Child1" will be true for Parent1.Child1 and Parent2.Child1
  • The previous two conventions can be combined to identify any children of a child input set, regardless of its parents. For example, ".Grandchild1." will be true for Parent2.Child1.Grandchild1.GreatGrandchild.
  • If you want to identify a specific scenario input set and any of its children, use an or function combined with an if function. For example if($ActiveInputSet=".Grandchild1" or $ActiveInputSet = ".Grandchild1."51) will be true for  Parent1.Child1.Grandchild1, Parent2.Child1.Grandchild1 and Parent2.Child1.Grandchild1.GreatGrandchild.
Figure

...

6. Figure 3. Child Scenario Input Sets, Example for function referencing.


Scenario input sets and Recorder sets

If a user is changing the demand model of a water user to crop model using Scenario input sets, say from time series, then a recorder in the recorder tree called 'Demand Model (All)' needs to be enabled in the Recorder sets. By doing this, all the active and inactive demand models of the water user can be viewed in the Results Manager. Therefore, in the Recorder Sets, the recorders of the needed demand models (the ones that are being enabled through the Input Set) can be activated as (for example): Water User>*>Demand Model (All)>Demand Model (All)>Irrigator #0>Crops>*>Area.