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)
Namespace: DHI.Mike1D.Generic
The NetworkDataT type exposes the following members.
Name | Description | |
---|---|---|
NetworkDataT |
Default constructor
| |
NetworkDataT(IInterpolatableT) |
Default constructor
|
Name | Description | |
---|---|---|
CanInterpolate |
Flag specifying whether it makes sense to interpolate
in values on a reach.
| |
ExtrapolationDistance |
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. | |
GlobalValue |
The global value. Used, if nothing better is found.
Setting the global value automatically also sets
HasGlobalValue to true.
| |
HasGlobalValue |
Defines whether there is a global value, or strictly
speaking, whether to use the global value.
| |
HasValues |
Flag specifying whether this data has values defined at all
| |
LocalCount |
Returns the number of locally defined values
| |
NodeIdValuePairs |
The set of node id's and values defined.
| |
Quantity |
Quantity stored in network data
| |
ReachData |
Collection of reach data sets currently active
|
Name | Description | |
---|---|---|
AddGlobalReachValue |
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.
| |
AddValue(String, T) |
Add a value for the node identified by nodeId | |
AddValue(ILocation, T) |
Add a value on the given location.
| |
AddValue(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.
| |
AddValue(ILocation, T, Boolean) |
Add a value on the given location.
| |
Clear |
Delete all localized values. The global value is not deleted.
| |
ContainsValue(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). | |
ContainsValue(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). | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetGlobalValue(T) |
Get global value. Returns false if no global value is defined.
| |
GetGlobalValue(String, T) |
Get value for the specified id. Returns false if no value is
defined for the node id.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetReachData |
Get a NetworkReachDataSetT for the reach with the given ID
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetValue(String, T) |
Get value for the specified node. Returns false if no value is
defined for the node id.
| |
GetValue(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). | |
GetValue(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). | |
GetValues |
Get value at the given locations. The locations must have same Location.ID and
be ordred in the list by increasing chainages.
| |
HasNodeLocalValue |
Returns true if the node has local value defined.
| |
HasReachLocalValues |
Returns true if the reach has local values defined.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
_interpolator |
Interpolator used when CanInterpolate is set
| |
_nodeValueMap |
Mapping node names to node values
| |
_reachValueMap |
Mapping reach names to reach data set
|
Name | Description | |
---|---|---|
GetValueT(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.) | |
GetValueT(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.) | |
NetworkValuesT |
Gives an enumerable that iterates over all point values in the network value set.
(Defined by AbstractNetworkDataExtensions.)It will iterate first over all the nodes, and then over all the reaches and its locations. | |
PointValuesT |
Gives an iterator that iterates over all point values in the network value set.
(Defined by AbstractNetworkDataExtensions.)It will iterate first over all the nodes, and then over all the reaches and its locations. |