Skip to content

This adapter enables use of GoldSim models within the MIKE Workbench.

About FEFLOW

Goldsim is software developed by GoldSim Technology Group to ** for dynamically modeling complex systems in engineering, science and business.**. Please refer to GoldSim Technology Group for more information.

Limitations

GoldSim adaptor supports constant scalar values and time series of the scalar values as inputs for the GoldSim computation and time series of scalar values as outputs of GoldSim computations. All results must be in GoldSim transformed to the Time series of recorded history.

Prerequisite

The Adaptor requires GoldSim to be installed on the MIKE Workbench computer (for registration) and the run machine. The execution of models will not require a license on the run machine (i.e. uses GoldSim Player).

Model objects

The GoldSim adapter supports 2 types of model objects for holding parameters and time series.

The model objects of each model object type are defined while registering the model.

  • Elements
    Obtaining information about Input Time series, Output Time series and initial values defined while registering. More TS and initial values can be connected to one element. Elements are grouped by feature classes used for spatial presentation. Element is connected to the feature in one of the feature classes.
  • GoldSim
    Contains a single model object GoldSim where a single parameter TimeType is available for setting the time type (Elapsed or Calendar) used in GoldSim.

Configuration

Model preparation

GoldSim model must be prepared for the MKE OPERATIONS registration in following way using GoldSim user interface.

  • Two External objects must be defined. One for reading data exported from MIKE OPERATIONS and second for writing of the results to the files to be imported into MIKE OPERATIONS.
  • Data from MIKE OPERATIONS to GoldSim.

    • External elements are defined.
      • Element have GoldSim_External.dll as dll path and read_input_time_series as a function.
      • For each constant value exported from MIKE OPERATIONS: one Output Interface Definition of the data type Value must be created.
      • For each Time series exported from MIKE OPERATIONS: One Output Interface Definition of the data type Time series definition must be created.
      • Interfaces for constant values must be on top of the list, followed by TS
    • For time series used in model as boundary condition – data source needs to be changed to the Linked to external. Time Series Definition – and Linked to the interface, defined in External elements
    • Constant values (initial conditions), defined across GoldSim computation can be changed from value, defined directly in GoldSim to the value, provided in the interface defined in external element.
    • Finally – XML info file used during registrationb is created using Ctrl+E in External Properties dialog.


    • Results to the MIKE OPERATIONS
    • For each results to be exported into the MIKE OPERATIONS – new Time series object needs to be created. Data source type is set to the Recording output history. In Recording options result is selected and Record at all time steps even if the input value is unchanged check as true.
    • External elements is defined

      • Element have GoldSim_External.dll as dll path and export_output_time_seriesand as function.
      • one dummy Output Interface Definition needs to be created.
      • Two Input Interface of the type Value needs to be created. Use ~EHour and ~EDay as Definition added. They are not used, but must be there for backword compatibility.
      • For each recorded result time series one Input Interface Definition needs to be created and connected to the definition of recorded TS
      • Interfaces for constant values must be on top of the list, followed by TS
      • Finally – XML info file is created using Ctrl+E.


As result of previously mentioned steps setup changed as follow:


Original GoldSim setup


Setup prepared for registration to the MIKE OPERATIONS.

Model Registration

The GoldSim model should be registered from within the Scenario Explorer of the MIKE Workbench. The below screens show how the registration could look like.


When registering a model, an entry for the GoldSim model will appear.


When selecting model type GoldSim, the Model register wizard will display a dialog where the necessary GoldSim model information can be specified.


On this first page of the wizard, the GSM or GSP file is specified. The XML information files, exported from GoldSim using Ctrl+E in External Property dialog for MIKE OPERATIONS inputs and results needs to be selected. Type of time series, Coordinate system for the project and model elements groups definition is defined there. One line in table represents one group of the elements.

  • Model file
    The GoldSim model file (.gsm) or a GoldSim Player file (.gsp).
    This file will be imported into the MIKE Workbench database and used when running the model
  • Inputs (Goldsim ExternalOutputs interfaces) definition
    XML file exported from GoldSim for the External element, reading data exported from MIKE OPERATIONS.
  • Results (Goldsim ExternalInputs interfaces) definition
    XML file exported from GoldSim for the External element, writing results, computed by GoldSim to the files, to be imported into MIKE OPERATIONS.
  • Coordinate system
    Coordinate system for the registered model. Input feature classes are projected to this system.
  • Time Type
    The time unit used in GoldSim.

    • Elapsed Time - In an Elapsed Time simulation (the default), you specify a Duration and the number of timesteps (and optionally, a Start date-time). The simulation is tracked in terms of elapsed time from the point the simulation began.
    • Calendar (Date-time) - In a Date-time simulation, you enter a Start date-time and an End date-time, along with the number of timesteps, and the simulation is tracked in terms of the date-time.
      The start and end timers are handled in the MIKE Workbench scenario.
  • Feature class
    Feature class used as source for the elements group definition and provide features elements are assigned to.
  • Name
    Name of the group.
  • Attribute
    Name of the attribute of the feature class to be used as element name. After selection of the feature class – combo is filled by all attribute names.
  • Type
    Not editable. Show geometry type.
  • NumOff
    Not editable. Show number of the features in selected feature class.
  • Used
    Number of the features used for the element definitions.

Click Next to continue.


This page is used to assign individual GoldSim interfaces to the features and editing additional parameters. All interfaces, defined in the GoldSim XML info files must be assign to some feature In model object groups, defined in previous dialog.

Each tab represents one group and its feature class. Button + create new line for the interface to be assigned. Button - unassign interface from group but not delete it.

  • Interface definition
    The GoldSim interface name, taken from XML info file. Value selected from list, containing all interface names. If interface is already assigned to the different group – it is assigned to the new one.
  • Type
    Filled automatically based on selected interface. Posible value are Value Input time series and Output time series.
  • Feature Name
    Name to the feature, where interface is assigned to. All values from attribute defined for group are filled to the combo box. More interfaces can (and typically be) connected to the same feature.
  • Variable
    MIKE value type. Selected from combo.
  • Value
    Initial value. Editable only for type Value.
  • Value TS Path
    Full path of time series, used for the obtaining initial value. Time series must exist in Time series Manager. If not empty, overwrite value, defined in previous column. Editable only for type Value.
  • Unit
    Unit of the Variable. Combo filled by units, applicable for selected variable type. If possible, information from XML info file is used.
  • TS type
    Type of time series as it is described in MIKE. Possible values are Instantaneous, Accumulated, Step_Accumulated, Mean_Step_Accumulated, Reverse_Mean_Step_Accumulated.
    Editable only for time series.
  • Info
    Open dialog, containing information from GoldSim XML info file.

GoldSim file info dialog.

Button Next provides the data check. If some interface is not assigned – warning dialog containing all not assigned interfaces is opened. User can select some of them and assign it to the group, selected from combo. This can significantly speed up registration.

Button Previous return to the group definition page.

Click Next to continue.

Review the model objects before continuing.

Click Next to display the default Specifications page.

Specify the necessary information and click Finish to register the model.

New feature class is created for each element group and all used features from original feature classes are copied (geometry) to them.

Editing of the initial values

Initial values can be defined by constant value or by time series. If time series is not empty the last value before start simulation is provided to the GoldSim.

More initial values can be assigned to element. In this case – values are shown by hovering of the cursor over text description. If both value and TS path are filled – value from TS have priority.

Values can be edited in scenario using following editor.

Open in Native Tool

After registration, the GoldSim model can be opened in native mode. This is done by selecting Open in Native Tool from the context menu of the Model Setup.

This will unzip the content of the GoldSim model into a temporary folder in the user’s default temp folder %temp% or open GoldSim with the model if the check box Open GoldSim has been checked.

The folder will contain any native GoldSim model file and the additional files specified. The additional files will be extracted into folders relative to the model file.

Adaptor implementation

GoldSim provides access to complex functions through external elements. The GoldSim adapter in MIKE Workbench are using these external elements (DLL elements) to integrate to GoldSim.

This means that initial conditions, model input time series and model output time series must be defined in GoldSim.

  • Model Input Time Series and initial conditions = GoldSim Output Interface Definitions
  • Model Output Time Series = GoldSim Input Interface Definitions

GoldSim external elements are used in cases where you may wish to define a complex function which cannot be readily implemented using the expression editing features supplied by GoldSim. For example, calculation of an output may require very complex logic which would be cumbersome to represent using a Selector element, or it may require a numerical solution technique (e.g., iteration).

GoldSim provides two separate ways to deal with such situations:

  • You can develop separate program modules (written in C, C++, FORTRAN or other compatible programming languages) which can then be directly coupled with the main GoldSim algorithms. These user-defined modules are referred to here as external functions, and the elements through which they are coupled to GoldSim are called External (DLL) elements. This is the method that MIKE OPERATIONS is using.

  • You can specify a sequence of statements directly within the GoldSim interface using a Script element.