Click or drag to resize

ResultData Class

The result data access is the class that all producers or users of MIKE 1D results should use. The class is used for recording the results, reading results, hot-starting the Mike1D engine and extracting specific results.
Inheritance Hierarchy

Namespace:  DHI.Mike1D.ResultDataAccess
Assembly:  DHI.Mike1D.ResultDataAccess (in DHI.Mike1D.ResultDataAccess.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax
public class ResultData : AbstractDataAccess, IResultData

The ResultData type exposes the following members.

Constructors
  NameDescription
Public methodResultData
Initializes a new instance of the ResultData class
Top
Properties
  NameDescription
Public propertyBridge
Get the bridge that was used for loading/saving
Public propertyCatchments
List of catchments
Public propertyClearDataItemsOnFlush
Flag indicating whether data items are cleared when flushing to file

Default is false.

Public propertyConnection
Holder of read/write information
(Inherited from AbstractDataAccess.)
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 propertyDataItems
Get an iterator that iterates over all data items
Public propertyDataSets
Get an iterator that iterates over all data sets
Public propertyDeleteValue
Delete value for double variables. Any double data value with this value should be treated as a missing value.
Public propertyEndTime
Data coverage end
Public propertyExtensionData
Holds data from an extended DataContract
(Inherited from AbstractDataAccess.)
Public propertyGlobalData
Global data. Valid for entire network
Public propertyLoadStatus
Public propertyMaxBufferSize Obsolete.
The MaxBufferSize is the limit for how many time steps that may be held in memory during file generation.
Public propertyNetworkDatas
Static data on the network.

Used for user defined markers from MIKE 11 and Critical Levels in MU.

Public propertyNetworkDataSet Obsolete.
Static data on the network.

Also used for user defined markers from MIKE 11

Public propertyNodes
List of nodes
Public propertyNumberOfTimeSteps
Number of time steps
Public propertyParameters
Parameters to use when loading results
Public propertyProjectionString
A WKT string for a spatial reference system.
Public propertyQuantities
List of the contained quantities. Note: This is a derived property
Public propertyReaches
List of branches
Public propertyReader
Reader used for reading the result file.
Public propertyResultSpecs
Result specification
Public propertyResultType
Result type
Public propertySecondsBetweenFileFlush
Seconds between flush to file. Set this lower if you need to read the result file while your calculations are running. WARNING: File flush is a potentially expensive operation. Use with care.
Public propertyStartTime
Data coverage start
Public propertyStructureTypes
List of the contained quantities. Note: This is a derived property
Public propertyTimeBetweenUpdates
Resultdata subscribes to the TimeStepPerformed(DateTime) event. Set this to non-zero to control how often data are stored. For non-zero values there will be AT LEAST TimeBetweenUpdates between store times in ResultData
Public propertyTimesList
Time axis for the data.
Public propertyTimingFlush
Timers used for flushing
Public propertyTimingUpdate
Timers used for flushing
Public propertyUnitSystem
Unit system of the simulation that produced the result data object.

When creating a result data object and storing: Properties of ResultData objects (coordinates, bottom levels etc.) must always be set in SI units.

When loading a result data object from storage: The UnitSystem and ConvertGeometry can be used to change units of data and properties in the Result Data object. This property will maintain the original value and will not be changed by updating the IResultDataParameters

Top
Methods
  NameDescription
Public methodContainsAtLeastOneDataItem
Returns true if there is at least one data item
Public methodDispose
Dispose of ressources
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 methodFinish
Closes persistant storage and frees related data structures.
Public methodFlush
Saves the contents of the class using the defined connection.
Public methodGenerateDerivedProperties
Generate derived properties
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetNumberOfDataItems
Total number of data items. This will iterate over all types of data sets and sum up the data items.
Public methodGetNumberOfElements
Total number of elements in all data items. This will iterate over all types of data sets and sum up the number of elements.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGridPointsWithStructure
List of gridpoints that contain a specific structure. Note: This is a derived property
Public methodLoad Obsolete.
Loads results from a persistent media into memory. Load uses the connection object to decide what and how it should load the data. Load is similar to a LoadHeader followed by LoadData
Public methodLoad(IDiagnostics)
Loads results from a persistent media into memory. Load uses the connection object to decide what and how it should load the data. Load is similar to a LoadHeader followed by LoadData
Public methodLoadData
Loads the header information of the results from a persistent media into memory. Load uses the connection object to decide what and how it should load the data. Using the filter argument the user may choose to load only a sub-selection of the entire data.
Public methodLoadHeader(IDiagnostics)
Loads the header information of the results from a persistent media into memory. Load uses the connection object to decide what and how it should load the data. Using the filter argument the user may choose to load only a sub-selection of the entire data.
Public methodLoadHeader(Boolean, IDiagnostics)
Loads the header information of the results from a persistent media into memory. Load uses the connection object to decide what and how it should load the data. Using the filter argument the user may choose to load only a sub-selection of the entire data.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPrepare
Prepare the result data for new data. After this is called, the result data should be ready to handle calls to Update(DateTime) and UpdateAndFlushIfNeeded(DateTime). This will usually open the file on the disc, making it ready to write to the file.
Public methodPrepareLoad
Prepare load call. This will setup bridge and reader, and make access to the bridge and the reader avaialable before actual loading of data starts, i.e. for progress bar implementation

If not called explicitly, it will be called automatically by the load methods.

Public methodReconnectNetwork
If network is changed (node/reach moved or reconnected), this will regenerate the network attributes in the ResultData object.
Public methodSave
Saves the contents of the resultdata using the specified connection properties.
Public methodTimeOfNextUpdate
Time of next update
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTriggerTimeStepEvent
Trigger the time step event, e.g. in case a time step has been added, updated or before writing to file.
Public methodUpdate(DateTime)
The method pulls data into the result data access module using the result items and passes the data to the dataItems.
Public methodUpdate(DateTime, Int32)
The method pulls data into the result data access module using the result items and passes the data to the dataItems.
Public methodUpdateAndFlushIfNeeded
The method pulls data into the result data access module using the result items and passes the data to the dataItems. After this it is tested whether the number of time steps kept in the DataItems are larger or equal to MaxBufferSize. In case it is the data is flushed to persistant storage.
Top
Events
  NameDescription
Public eventTimeStepEvent
Event triggered everytime a time step has been read
Top
Fields
  NameDescription
Protected field_connection
Protected holder of read/write info
(Inherited from AbstractDataAccess.)
Public fieldDoStoreUserFunction
Function used to override the build in functionality of when to store results in the result data object. See ResultDataDoStoreDelegate for details.

This is currently not supported for standalone RR simulations.

Top
Extension Methods
  NameDescription
Public Extension MethodFilterLoadsAllTimes
Check if filter will load all time steps. Header must have been loaded, such that resultData knows the extent in time of the data.
(Defined by ResultDataExtensions.)
Public Extension MethodInitializeTimeData
Initialize all data items with default time-data objects. This can be used when storing data for many time steps in a result data object, typically when reading.
(Defined by ResultDataExtensions.)
Public Extension MethodQuantities
Extract all quantities of a result data object.
(Defined by ResultDataExtensions.)
Public Extension MethodQuantityDataItems
Extract all quantities and dataitems of a result data object, grouped by their quantity
(Defined by ResultDataExtensions.)
Public Extension MethodRemoveTimestep
Extract all quantities of a result data object.
(Defined by ResultDataExtensions.)
Public Extension MethodRemoveUnusedDataItems
Remove unused data items from resultData object
(Defined by Res1DExtensions.)
Top
See Also