AbstractSourceBoundary Class

Many common tasks for an IBoundarySource are handled by the AbstractSourceBoundary. All MIKE 1D boundary sources extent from this. Current subclasses include

The AbstractSourceBoundary has a list of boundary items, Items

Definition

Namespace: DHI.Mike1D.BoundaryModule
Assembly: DHI.Mike1D.BoundaryModule (in DHI.Mike1D.BoundaryModule.dll) Version: 24.0.0.0 (11.1.1.1111)
C#
public abstract class AbstractSourceBoundary : IBoundarySource, 
	IBoundaryWithComponents
Inheritance
Object    AbstractSourceBoundary
Derived
More
Implements
IBoundarySource, IBoundaryWithComponents

Constructors

AbstractSourceBoundaryInitializes a new instance of the AbstractSourceBoundary class

Properties

BoundaryID ID of boundary
BoundarySourceType Returns the boundary source type of the boundary
Components A list of all components sources attached to the source. Each component may have more than one entry in this list.
Items A list of all items attached to the source
Modifier A modifier that you can assign run-time to the setup, to handle e.g. putting noise to the model or in other ways change the value.

Default is null

The value is provided in the engine unit and must be returned in the engine unit.

Methods

CalculateVariation Calculate variation (as difference from linear interpolation between start and end)

This method estimates the variation by checking values at 3 intermediate points within the interval.

Since this looks up in the time series 5 times, there may be performance issues with this, so use with care.

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetAccumulatedValue(DateTime, DateTime) Get accumulated value for this source at the given time span
GetAccumulatedValue(DateTime, DateTime, TimeSpan) Get accumulated value, and the span for which the values are not delete values.
GetAccumulatedValue(Int32, DateTime, DateTime) Get accumulated value for component at given index at the given time span
GetDeleteValue Return the delete value for this boundary.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetNextComponentTransitionTime Gets the next time for which there is a different value in the component boundary source.
GetNextTransitionTime Gets the next time for which there is a different value in the boundary source.
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetValue(DateTime) Get value for this source
GetValue(Int32, DateTime) Get value of the component in the boundary on the provided index.

The index is NOT into global index of AD components.

GetValueWithoutDWF Get value for this source without items marked as dry weather flow
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Prepare Prepare source.
PrepareComponents Prepare AD components. Called as part of Prepare(DateTime, DateTime, IDiagnostics).
ToStringReturns a string that represents the current object.
(Inherited from Object)
TryModify(Double, DateTime) Try modify boundary value, if Modifier is not null
TryModify(BoundarySourceComponent, Double, DateTime) Try modify boundary value, if Modifier is not null
Validate Validate whether this source is correctly setup
ValidateItems Validate _iItems of BoundarySource
ValidateItemsInSimTime Validate that the source has boundary items covering from start to end time.

Returns the type of data missing. In case of Start, the firstMiss will contain the start time of the data in the source. In case of Middle and End, the firstMiss will contain the time of the first missing data.

In case simStart is MinValue or simEnd is MaxValue, no validation will take place and Unknown will be returned.

Fields

_boundaryID See BoundaryID
_iItems A list of all items attached to the source

Extension Methods

FindTimeNextValue Findes the time where the boundary source has a value that is non-zero. The time interval is within the provided limits.
(Defined by BoundaryExtensions)
GetAccumulatedValue Method for IBoundarySource to support items implementing GetAccumulatedValue(DateTime, DateTime, TimeSpan)
(Defined by BoundaryExtensions)

See Also