Network

Streamfall.create_networkMethod
create_network(name::String, network::AbstractDict)::StreamfallNetwork

Create a StreamNetwork from a YAML-derived specification.

Example

julia> using OrderedCollections
julia> network_spec = YAML.load_file("example_network.yml"; dicttype=OrderedDict{Any,Any})
julia> sn = create_network("Example Network", network_spec)
source
Streamfall.create_nodeMethod
create_node(mg::MetaDiGraph, node_name::String, details::AbstractDict, nid::Int)

Create a node specified with given name (if it does not exist).

Returns

  • this_id : ID of node (if pre-existing) and
  • nid : incremented node id for entire network (equal to this_id if exists)
source
Streamfall.inletsMethod
inlets(sn::StreamfallNetwork, node_name::String)

Find ID(s) of nodes which provides inflows for given node.

source
Streamfall.outletsMethod
outlets(sn::StreamfallNetwork, node_name::String)

Find ID(s) of node immediately downstream from given node.

source