Click or drag to resize

NetworkDataT Class

A network value is a value that can vary in the network. A value can be specified as a: - global value - value on an entire reach with a given ID - value on a number of locationspans - value on a number of locations - value on a nodeId

It is possible to specify two values on one location, one valid from the negative side, and one valid from the positive side.

If a value is given on the entire reach, then it can not be specified on locations.

When searching for a value on a given location, the priority is as follows: - A value on the entire reach is used, if existing. - If the given location is in a span, the span value is used - If the given location is in between two value-locations/spans, the value is interpolated, if CanInterpolate - It the given location is within ExtrapolationDistance of a value location, the value is used. - If nothing else is found, false is returned, and a default or the global value should be used.

If an entire network is to be populated with values, for performance reasons, you should work on a reach-by-reach manner, using GetReachData(String)

Inheritance Hierarchy

Namespace:  DHI.Mike1D.Generic
Assembly:  DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax
public class NetworkData<T> : INetworkData<T>, 
	INetworkDataInterpolator<T>

Type Parameters

T
Value in the network.

The NetworkDataT type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyCanInterpolate
Flag specifying whether it makes sense to interpolate in values on a reach.
Public propertyExtrapolationDistance
Distance from span/gridpoint where extrapolation takes place, i.e., if location chainage is outside the network value chainage span, but less than ExtrapolationDistance from the span, then the nearest value is extrapolated. Set to 0 to disable. Default is zero. Can not be negative.

When CanInterpolate is false, this specifies the distance to a chainage value/span that will return the point/span value, a tolerance value.

Public propertyGlobalValue
The global value. Used, if nothing better is found. Setting the global value automatically also sets HasGlobalValue to true.
Public propertyHasGlobalValue
Defines whether there is a global value, or strictly speaking, whether to use the global value.
Public propertyHasValues
Flag specifying whether this data has values defined at all
Public propertyLocalCount
Returns the number of locally defined values
Public propertyNodeIdValuePairs
The set of node id's and values defined.
Public propertyQuantity
Quantity stored in network data
Public propertyReachData
Collection of reach data sets currently active
Top
Methods
  NameDescription
Public methodAddGlobalReachValue
Add a value defined for an entire reach. This will fail if there is already defined values at locations or in spans of this reach. After successfull addition, values at locations or in spans can not be added.
Public methodAddValue(String, T)
Add a value for the node identified by nodeId
Public methodAddValue(ILocation, T)
Add a value on the given location.
Public methodAddValue(ILocationSpan, T)
Add a value defined within the given span. This corresponds to adding the value at the start and end location of the span.
Public methodAddValue(ILocation, T, Boolean)
Add a value on the given location.
Public methodClear
Delete all localized values. The global value is not deleted.
Public methodContainsValue(ILocation)
Check if a local value is specified at the location. Returns false if no value is defined for the location.

If more than one value is to be retrieved for the same reach, use the GetReachData(String) first and use that one (for performance).

Public methodContainsValue(ILocation, Direction)
Check if a local value is specified at the location. Returns false if no value is defined for the location.

If more than one value is to be retrieved for the same reach, use the GetReachData(String) first and use that one (for performance).

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 methodGetGlobalValue(T)
Get global value. Returns false if no global value is defined.
Public methodGetGlobalValue(String, T)
Get value for the specified id. Returns false if no value is defined for the node id.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetReachData
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValue(String, T)
Get value for the specified node. Returns false if no value is defined for the node id.
Public methodGetValue(ILocation, T)
Get value for the specified location. Returns false if no value is defined for the location.

If more than one value is to be retrieved for the same reach, use the GetReachData(String) first and use that one to get the values (for performance).

Public methodGetValue(ILocation, T, Boolean)
Get value for the specified location. Returns false if no value is defined for the location.

If more than one value is to be retrieved for the same reach, use the GetReachData(String) first and use that one to get the values (for performance).

Public methodGetValues
Get value at the given locations. The locations must have same Location.ID and be ordred in the list by increasing chainages.
Public methodHasNodeLocalValue
Returns true if the node has local value defined.
Public methodHasReachLocalValues
Returns true if the reach has local values defined.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Protected field_interpolator
Interpolator used when CanInterpolate is set
Protected field_nodeValueMap
Mapping node names to node values
Protected field_reachValueMap
Mapping reach names to reach data set
Top
Extension Methods
  NameDescription
Public Extension MethodGetValueT(ILocation)Overloaded.
Get a value from the networkData at the given location. If no value is found at location, the global value is used. If no global value is defined, an exception is thrown.
(Defined by GenericExtensions.)
Public Extension MethodGetValueT(ILocation, T)Overloaded.
Get a value from the networkData at the given location. If no value is found at location, the global value is used. If no global value is defined, the default value is returned.
(Defined by GenericExtensions.)
Public Extension MethodNetworkValuesT
Gives an enumerable that iterates over all point values in the network value set.

It will iterate first over all the nodes, and then over all the reaches and its locations.

(Defined by AbstractNetworkDataExtensions.)
Public Extension MethodPointValuesT
Gives an iterator that iterates over all point values in the network value set.

It will iterate first over all the nodes, and then over all the reaches and its locations.

(Defined by AbstractNetworkDataExtensions.)
Top
See Also