Skip to content

Collections

Source-generated reference for configured-object lookup and family snapshots. See Inspect and configure a model and Collect results for workflows.

Specialized families

Definition handles have dedicated references:

  • Model definitions: identity handles, aquifers, and snowmelt.
  • RDII: AMM models, RTK unit hydrographs, and assignments.
  • LID: control layers and subcatchment-local usages.

ObjectCollection

Configured-order handles with synchronous, case-insensitive ID lookup and stable identity. Obtain simulation collections from the owner rather than constructing a replacement view. All access checks the owner lifecycle; no access is valid after close.

Extended by

Type Parameters

Type Parameter Description
T Handle type returned by lookup and iteration.

Implements

  • Iterable<T>

Constructors

Constructor

new ObjectCollection<T>(
   ids: readonly string[], 
   create: (id: string) => T, 
   assertOpen: () => void
): ObjectCollection<T>;

Construct the shared collection implementation.

Parameters
Parameter Type Description
ids readonly string[] Canonical IDs in configured order; copied on construction.
create (id: string) => T Factory called once per looked-up canonical ID.
assertOpen () => void Lifecycle guard called before collection access.
Returns

ObjectCollection<T>

Accessors

ids

Get Signature
get ids(): readonly string[];

Canonical IDs in configured order; a frozen array.

Returns

readonly string[]

size

Get Signature
get size(): number;

Number of configured objects.

Returns

number

Methods

has()

has(id: string): boolean;

Test membership synchronously.

Parameters
Parameter Type Description
id string Case-insensitive object ID.
Returns

boolean

Whether the ID is configured.

get()

get(id: string): T;

Look up a stable handle synchronously.

Parameters
Parameter Type Description
id string Case-insensitive object ID.
Returns

T

The same handle instance for repeated lookups of one canonical ID.

Throws

ObjectNotFoundError for an unknown ID; lifecycle errors after close.

at()

at(index: number): T;

Look up a configured-order handle synchronously.

Parameters
Parameter Type Description
index number Zero-based integer index; negative and fractional values are invalid.
Returns

T

The stable handle at the index.

Throws

RangeError for an out-of-range or noninteger index.

[iterator]()

iterator: IterableIterator<T>;

Iterate handles in configured order.

Returns

IterableIterator<T>

Synchronous iterator, checking the owner on each lookup.

Implementation of
Iterable.[iterator]

NodeCollection

Owner-bound node handles. Snapshot selections preserve requested order; omit IDs for all nodes.

Extends

Accessors

ids

Get Signature
get ids(): readonly string[];

Canonical IDs in configured order; a frozen array.

Returns

readonly string[]

Inherited from

ObjectCollection.ids

size

Get Signature
get size(): number;

Number of configured objects.

Returns

number

Inherited from

ObjectCollection.size

Methods

has()

has(id: string): boolean;

Test membership synchronously.

Parameters
Parameter Type Description
id string Case-insensitive object ID.
Returns

boolean

Whether the ID is configured.

Inherited from

ObjectCollection.has

get()

get(id: string): Node;

Look up a stable handle synchronously.

Parameters
Parameter Type Description
id string Case-insensitive object ID.
Returns

Node

The same handle instance for repeated lookups of one canonical ID.

Throws

ObjectNotFoundError for an unknown ID; lifecycle errors after close.

Inherited from

ObjectCollection.get

at()

at(index: number): Node;

Look up a configured-order handle synchronously.

Parameters
Parameter Type Description
index number Zero-based integer index; negative and fractional values are invalid.
Returns

Node

The stable handle at the index.

Throws

RangeError for an out-of-range or noninteger index.

Inherited from

ObjectCollection.at

[iterator]()

iterator: IterableIterator<Node>;

Iterate handles in configured order.

Returns

IterableIterator<Node>

Synchronous iterator, checking the owner on each lookup.

Inherited from

ObjectCollection.[iterator]

snapshot()

snapshot(ids?: readonly string[]): Promise<NodeSnapshot>;

Read node hydraulics in running, complete, or ended.

Parameters
Parameter Type Description
ids? readonly string[] Ordered selection; omit for all, use [] for empty columns. Unknown or case-insensitive duplicate IDs reject.
Returns

Promise<NodeSnapshot>

Detached columns aligned with canonical objectIds, without a timestamp.

qualitySnapshot()

qualitySnapshot(ids?: readonly string[]): Promise<NodeQualitySnapshot>;

Read node quality in running, complete, or ended.

Parameters
Parameter Type Description
ids? readonly string[] Ordered IDs; omit for all or use [] for none. Unknown/duplicate IDs reject.
Returns

Promise<NodeQualitySnapshot>

Detached pollutant-major matrices; inner rows follow objectIds.

statisticsSnapshot()

statisticsSnapshot(ids?: readonly string[]): Promise<NodeStatisticsSnapshot>;

Read cumulative node statistics in running or complete, before ending the run.

Parameters
Parameter Type Description
ids? readonly string[] Ordered IDs; omit for all or use [] for none. Unknown/duplicate IDs reject.
Returns

Promise<NodeStatisticsSnapshot>

Detached statistics columns aligned with canonical objectIds.


LinkCollection

Owner-bound link handles. Snapshot selections preserve requested order; omit IDs for all links.

Extends

Accessors

ids

Get Signature
get ids(): readonly string[];

Canonical IDs in configured order; a frozen array.

Returns

readonly string[]

Inherited from

ObjectCollection.ids

size

Get Signature
get size(): number;

Number of configured objects.

Returns

number

Inherited from

ObjectCollection.size

Methods

has()

has(id: string): boolean;

Test membership synchronously.

Parameters
Parameter Type Description
id string Case-insensitive object ID.
Returns

boolean

Whether the ID is configured.

Inherited from

ObjectCollection.has

get()

get(id: string): Link;

Look up a stable handle synchronously.

Parameters
Parameter Type Description
id string Case-insensitive object ID.
Returns

Link

The same handle instance for repeated lookups of one canonical ID.

Throws

ObjectNotFoundError for an unknown ID; lifecycle errors after close.

Inherited from

ObjectCollection.get

at()

at(index: number): Link;

Look up a configured-order handle synchronously.

Parameters
Parameter Type Description
index number Zero-based integer index; negative and fractional values are invalid.
Returns

Link

The stable handle at the index.

Throws

RangeError for an out-of-range or noninteger index.

Inherited from

ObjectCollection.at

[iterator]()

iterator: IterableIterator<Link>;

Iterate handles in configured order.

Returns

IterableIterator<Link>

Synchronous iterator, checking the owner on each lookup.

Inherited from

ObjectCollection.[iterator]

snapshot()

snapshot(ids?: readonly string[]): Promise<LinkSnapshot>;

Read link hydraulics in running, complete, or ended.

Parameters
Parameter Type Description
ids? readonly string[] Ordered IDs; omit for all or use [] for none. Unknown/duplicate IDs reject, including case-only duplicates.
Returns

Promise<LinkSnapshot>

Detached hydraulic columns aligned with canonical objectIds, without a timestamp.

qualitySnapshot()

qualitySnapshot(ids?: readonly string[]): Promise<LinkQualitySnapshot>;

Read link quality in running, complete, or ended.

Parameters
Parameter Type Description
ids? readonly string[] Ordered IDs; omit for all or use [] for none. Unknown/duplicate IDs reject.
Returns

Promise<LinkQualitySnapshot>

Detached pollutant-major matrices; inner rows follow objectIds.

statisticsSnapshot()

statisticsSnapshot(ids?: readonly string[]): Promise<LinkStatisticsSnapshot>;

Read cumulative link statistics in running or complete.

Parameters
Parameter Type Description
ids? readonly string[] Ordered IDs; omit for all or use [] for none. Unknown/duplicate IDs reject.
Returns

Promise<LinkStatisticsSnapshot>

Detached scalar columns; flow-class durations have one seven-value row per link.


SubcatchmentCollection

Owner-bound subcatchment handles and aligned hydraulic, quality, and statistics reads.

Extends

Accessors

ids

Get Signature
get ids(): readonly string[];

Canonical IDs in configured order; a frozen array.

Returns

readonly string[]

Inherited from

ObjectCollection.ids

size

Get Signature
get size(): number;

Number of configured objects.

Returns

number

Inherited from

ObjectCollection.size

Methods

has()

has(id: string): boolean;

Test membership synchronously.

Parameters
Parameter Type Description
id string Case-insensitive object ID.
Returns

boolean

Whether the ID is configured.

Inherited from

ObjectCollection.has

get()

get(id: string): Subcatchment;

Look up a stable handle synchronously.

Parameters
Parameter Type Description
id string Case-insensitive object ID.
Returns

Subcatchment

The same handle instance for repeated lookups of one canonical ID.

Throws

ObjectNotFoundError for an unknown ID; lifecycle errors after close.

Inherited from

ObjectCollection.get

at()

at(index: number): Subcatchment;

Look up a configured-order handle synchronously.

Parameters
Parameter Type Description
index number Zero-based integer index; negative and fractional values are invalid.
Returns

Subcatchment

The stable handle at the index.

Throws

RangeError for an out-of-range or noninteger index.

Inherited from

ObjectCollection.at

[iterator]()

iterator: IterableIterator<Subcatchment>;

Iterate handles in configured order.

Returns

IterableIterator<Subcatchment>

Synchronous iterator, checking the owner on each lookup.

Inherited from

ObjectCollection.[iterator]

snapshot()

snapshot(ids?: readonly string[]): Promise<SubcatchmentSnapshot>;

Read runoff results in running, complete, or ended.

Parameters
Parameter Type Description
ids? readonly string[] Ordered IDs; omit for all or use [] for none. Unknown/duplicate IDs reject, including case-only duplicates.
Returns

Promise<SubcatchmentSnapshot>

Detached runoff columns aligned with canonical objectIds, without a timestamp.

qualitySnapshot()

qualitySnapshot(ids?: readonly string[]): Promise<SubcatchmentQualitySnapshot>;

Read subcatchment quality in running, complete, or ended.

Parameters
Parameter Type Description
ids? readonly string[] Ordered IDs; omit for all or use [] for none. Unknown/duplicate IDs reject.
Returns

Promise<SubcatchmentQualitySnapshot>

Detached pollutant-major matrices; inner rows follow objectIds.

statisticsSnapshot()

statisticsSnapshot(ids?: readonly string[]): Promise<SubcatchmentStatisticsSnapshot>;

Read cumulative runoff statistics in running or complete.

Parameters
Parameter Type Description
ids? readonly string[] Ordered IDs; omit for all or use [] for none. Unknown/duplicate IDs reject.
Returns

Promise<SubcatchmentStatisticsSnapshot>

Detached statistics columns aligned with canonical objectIds.


RainGageCollection

Owner-bound rain-gage handles. Rain gages provide per-object results, not collection snapshots.

Extends

Accessors

ids

Get Signature
get ids(): readonly string[];

Canonical IDs in configured order; a frozen array.

Returns

readonly string[]

Inherited from

ObjectCollection.ids

size

Get Signature
get size(): number;

Number of configured objects.

Returns

number

Inherited from

ObjectCollection.size

Methods

has()

has(id: string): boolean;

Test membership synchronously.

Parameters
Parameter Type Description
id string Case-insensitive object ID.
Returns

boolean

Whether the ID is configured.

Inherited from

ObjectCollection.has

get()

get(id: string): RainGage;

Look up a stable handle synchronously.

Parameters
Parameter Type Description
id string Case-insensitive object ID.
Returns

RainGage

The same handle instance for repeated lookups of one canonical ID.

Throws

ObjectNotFoundError for an unknown ID; lifecycle errors after close.

Inherited from

ObjectCollection.get

at()

at(index: number): RainGage;

Look up a configured-order handle synchronously.

Parameters
Parameter Type Description
index number Zero-based integer index; negative and fractional values are invalid.
Returns

RainGage

The stable handle at the index.

Throws

RangeError for an out-of-range or noninteger index.

Inherited from

ObjectCollection.at

[iterator]()

iterator: IterableIterator<RainGage>;

Iterate handles in configured order.

Returns

IterableIterator<RainGage>

Synchronous iterator, checking the owner on each lookup.

Inherited from

ObjectCollection.[iterator]