Click or drag to resize

ControlData Class

Control Data object, specifying a number of controls in the form of state machines and states with actions.
Inheritance Hierarchy

Namespace:  DHI.Mike1D.ControlModule
Assembly:  DHI.Mike1D.ControlModule (in DHI.Mike1D.ControlModule.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax
public class ControlData : AbstractDataAccess, 
	IModelStateReadWrite

The ControlData type exposes the following members.

Constructors
  NameDescription
Public methodControlData
Default constructor
Top
Properties
  NameDescription
Public propertyActionTargetDescriptions
Dictionary with sensor descriptions as value and sensor ID as key
Public propertyAdditionalData
Additional data from the MIKE 1D data object. Set during initialize.
Public propertyBaseFilePath
Base file path is use to find supporting files when reading control structures For M11 setups, this points to the directory of the .nwk file
Public propertyBuildInVariables
List of build-in predefined variables. Contains variables like .

If a sensor or another variable is defined with the same name, variables in this list is ignored.

Public propertyConnection
Holder of read/write information
(Inherited from AbstractDataAccess.)
Public propertyControlStateMachines
List of controls handled by the control module.
Public propertyControlUpdaters
List of IControlFunctionTime objects, which need an explicit call to Update(DateTime, DateTime) before it can evaluate control/function/etc.

Used during simulation. Used e.g. by control functions (functions in expressions) that depend on time (added automatically during Prepare(DateTime, IDiagnostics)).

Public propertyCustomTypes
List of custom types stored in the data object and that must be serialized.

A custom type is e.g. a user implemented structure or catchment model. In order to store information on the custom type in the .m1dx file, the system needs to know which custom types are being used, and they must be added to this list.

(Inherited from AbstractDataAccess.)
Public propertyExpressionFactory
Expression factory that must be used when creating expressions for this control data object.
Public propertyExtensionData
Holds data from an extended DataContract
(Inherited from AbstractDataAccess.)
Public propertyNumberOfIterations
Number of iterations when applying the control.

Default value is 1. Only increase if there are controls depending on other controls.

In case some controls depends on other controls, it can be necessary to evaluate the controls twice, such having the second control updated in the second iteration, after the first control has updated in first iteration.

Public propertySensorDescriptions
Sensor descriptions, indexed by their id.
Public propertySensors
List of sensors.

Used during simulation. All sensors in SensorDescriptions are automatically created during Initialize(Diagnostics).

Sensors that are required but not part of SensorDescriptions must be added explicitly.

Public propertyTableInfos
Information on time series. Each time series info has their own unique ID.
Public propertyTimeSeriesInfos
Information on time series. Each time series info has their own unique ID.
Public propertyTsBuffer
A buffer containing all timeseries, so they can be reused as much as possible.
Public propertyUserFunctionFactories
Factory for creating user functions. All user defined functions must be added to the set of UserFunctions or be returned by a UserFunctionFactories.
Public propertyUserFunctions
User defined functions in the expression. All user defined functions must be added to the set of UserFunctions or be returned by a UserFunctionFactories.
Public propertyVariables
List of user defined variables.

User defined variables are variables that are evaluated in every Update(DateTime, DateTime) and can be used in other expressions.

The variables are evaluated in-order, if a variable "A" is used in the expression of another variable "B", then "A" must be defined before "B" in this list.

Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFinalizeTimeStep
Update control data and all its controls
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetOrCreateSensorT
Get or create sensor. This is relevant for sensors that is not connected to anything by default, but needs user interaction to get connected.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitialize
Initialize control module.

It creates all sensors defined in SensorDescriptions and initializes all ControlStateMachines.

Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPrepare
Prepare control data.
Public methodPrepareForTimestep
Prepare control data for time step.
Public methodReadState
Public methodReleaseLicense
Internal method
Public methodReset
Reset inner state of sensors, control state machines and actions
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdate
Update control data and all its controls
Public methodValidate
Validate control data, except time series sensors
Public methodValidate(DateTime, DateTime)
Validate all of control data, including time series sensors
Public methodWriteState
Top
Events
  NameDescription
Public eventPreUpdateEvent
Event that is triggered initially at any call to Update(DateTime, DateTime)
Top
Fields
  NameDescription
Protected field_connection
Protected holder of read/write info
(Inherited from AbstractDataAccess.)
Top
See Also