Skip to content

Retrieving existing models

When registering a model, it will automatically appear in the Scenario explorer. However, after each restart of the shell, the scenario explorer will be empty until the existing model is retrieved from the database.

There are several ways to retrieve models which are convenient to use when a large number of models are stored in the database. The retrieval can be carried out using different search criteria. Search criteria are specified in the search control, which is located at the top of the Scenario Explorer.

The search control can be used in two modes, Quick Search mode and Assisted Search. To switch between modes, click the green arrow next to the search string text box:

Quick Search mode

Assisted Search mode

All types of queries can be performed in quick search mode, but for advanced queries it is recommended to use the assisted search mode to construct the search criteria.

By default, the search control will be in Quick Search mode. When in Quick Search mode, the control will consist of a single text box where the search string is specified.

The simplest search that can be executed is a get-all search:

Click without specifying any search criteria.

Searches are by default performed on Model.Name.

More advanced searches can be performed by typing in key-values pairs separated by commas as when the assisted search is used (see below).

In the Assisted search mode the control will expand. The search criteria text box will become read-only.

By default, the Model.Name criterion will be enabled. To search for a model with a given name, type in the name and press:

Enter or click the search button.

The tree under the Model Setups group will get populated with the models that match the name search criterion.

More advanced criteria can be constructed:

Click on the Add criteria button, and select a criterion from the drop-down list.

When new criteria are added, the corresponding search string is automatically constructed and displayed in the search string text box at the top of the control.

When done, the search is executed by clicking the search button, and the Model Setups list will get populated with the models that match the specified search criterion.

The search functionality can be expanded to include scenario- and simulation properties.

Get all models

Click the green arrow to bring the search control in Assisted search mode and type a * in the Model.Name field.

Execute the search by clicking the search button, or press Enter.

All models will be listed in the tree below the control.

Notice that the search string is created automatically in the read-only search string text box.

To obtain the same result using the Quick search, switch to Quick search mode.

The search string text box is cleared and becomes editable.

Now, type Model.Name:* in the search string field, and press Enter. All models will be retrieved listed.

Tip

Hint: As the quick search uses the Model.Name as default when no keyword has been supplied, the same result could have been obtained simply by writing * in the search field.

Moreover, as this is a common search criterion, an empty search string is interpreted as Model.Name:* and hence when in quick search mode, all models can be retrieved simply by executing an empty search.

Get models with specific names

Switch to Assisted search mode. If searching for a model with a specific name, type in the exact name in the Model.Name field and execute the search.

Only the models that have the specified name will be listed.

To get all models that contains a certain text, use the * in the query.

In the example shown here, the search will return all models that start with Blue Nile.

Notice that the search string is automatically constructed.

To obtain the same result using the Quick search, switch to Quick search mode.

The search string text box is cleared and becomes editable.

Now, type Model.Name:Blue Nile* in the search string field, and press Enter.

All models that start with Blue Nile will be listed.

Get models in specific groups

Switch to Assisted search mode.

To get all models in a specific group, change the search keyword from Model.Name to Group.Name.

This is done by selecting the new search keyword from the drop-down list as shown here.

Type in the group name, and execute the search

In the example here, the search for U* will return all models that are located in groups starting with U.

To obtain the same result using the Quick search, switch to Quick search mode.

The search string text box is cleared and becomes editable.

Now, type Group.Name:U* in the search string field, and press Enter.

All models that are located in groups starting with U will be listed.

Combine search criteria

Switch to Assisted search mode.

Multiple criteria can be combined in a single search by adding more criterion boxes to the search control.

Click the Add criteria button and select a search element (e.g. Model.Type).

A new criterion box is added to the search control.

Select one of the available model types, and execute the search.

In the example given here, all model that has Detailed in the model name, and is of type MIKE BASIN will be returned.

Note

Note: The list of available models will depend on which model adaptors that have been installed.

A criterion can be removed by selecting Remove from the criterion drop-down list.

To obtain the same result using the Quick search, switch to Quick search mode.

The search string text box is cleared and becomes editable. Now, type Model.Name:*Detailed*,Model.Type:MIKE BASIN in the search string field, and press Enter.

All the models that has Detailed in the model name and is of type MIKE BASIN will be returned.

Using Recent searches

To get a list of the most recent searches that was executed, switch to Assisted search mode.

Click the button marked in the figure and select a recent search string from the menu.

When a search string is selected, the search is executed.

Using saved search strings

Switch to Assisted search mode.

Build a search string and click the Save button. The search string will be saved and can be reused at a later time.

To use a saved search string, click the button marked in the figure, and select a saved search string from the menu.

When the search string is selected, the search is executed.

Copy a model setup

A new model setup can be created by copying an existing model setup.

This is done simply by selecting Copy from the Model setup context menu.

A new model is added to the group of the model being copied.

The default name is Clone of <Model being copied>

To rename the model: Select Rename from the model context menu, and type in a new name.

To move the copied model to another group: Drag the model node to the new group.

Search for model object variables

The model object explorer search functionality can be used to search for model object variables across model objects.

Searches are always performed at the current level in the model object hierarchy and below.

Hence, to search for model object variables in e.g. model objects of type Water users, enter the water user node object group, and perform the search from here, e.g. on the output variable Used Water

To clear the search list and return to the model object group: Click the Clear search button.

Copy an existing scenario

A new scenario can be created by copying an existing scenario.

This is done by selecting an existing scenario from the scenario explorer and select Copy from the context menu.

A new scenario is added under the Model setup.

By default, the name will be Clone of <scenario name>. The scenario can be renamed by selecting Rename from the context menu.

Initially, the new scenario will be an exact copy of the scenario that was copied.