Network

Introduction

In its essence, a network (abbr: ntw) is a collection of sources, components and users mapped onto a directed multigraph.

Any network has eight attributes:

  1. a multigraph ntw.graph::DiMultigraph
  2. network properties ntw.props::PropDict
  3. components ntw.cmp::Vector{PropDict}
  4. sources ntw.src::Vector{PropDict}
  5. users ntw.usr::Vector{PropDict}
  6. component library ntw.clib::LibDict
  7. source library ntw.slib::LibDict
  8. users library ntw.ulib::LibDict

Constructors

One constructor is implemented:

Info

A number of properties are defined for networks captured by NetworkInfo.

  • solved: the solved property describes whether the ugf of a network's users have been determined.

  • dependent_source: the dependent source property flags that the output of all sources in the network are dependent on an uniform source, e.g., wind turbines in a single windfarm.

Component

Any component (abbr: cmp) is represented by a PropDict mapped onto either the vertices or edges of the multigraph ntw.graph. The collection of all components is stored in ntw.cmp, which is a vector.

The link between the component id, i.e., its index in ntw.cmp, and the vertex/edge of ntw.graph to which it is mapped is stored in ntw.clib (key: vertex/edge, value: [cmp...]).

Any property may be added to the Propdict representing the component, however certain properties are reserved for specific functionality of the tool, each linked to a specific key [Symbol].

  • :node is reserved for the component's node in the multigraph ntw.graph
  • :edge is reserved for the component's edge in the multigraph ntw.graph
  • :std is reserved for the state-transition diagram of the component
Note

In order to link the specific component to either a vertex or an edge of the network, it is obligatory to provide them through the named argument :node or :edge, respectively.

Components may either be added to a network individually or grouped using, respectively:

MultiStateSystems.add_component!Method
add_components!(ntw::MultiStateSystems.AbstractNetwork; kwargs...)

Adds a single component to the network ntw and fills their corresponding PropDict with the named arguments kwargs.

Example

julia> ntwᵖʷʳ = ntw()
julia> add_components!(ntwᵖʷʳ, edge = (1,2),
                               name = "cable 1",
                               std  = STD(power = [0u"MW",1500u"MW"],
                                          prob  = [0.2,0.8]))
source
MultiStateSystems.add_components!Method
add_components!(ntw::MultiStateSystems.AbstractNetwork; kwargs...)

Adds multiple components to the network ntw and fills their corresponding PropDict with the named arguments kwargs. Either an uniform arguments is given which holds for all components or an array is given whith specific argument for each component.

Example

julia> ntwᵖʷʳ = ntw()
julia> add_components!(ntwᵖʷʳ, edge = [(1,2),(1,2),(2,3)],
                               name = ["cable 1","cable 2","cable 3"],
                               std  = [STD(power = [0u"MW",1500u"MW"],
                                           prob  = [0.2,0.8]),
                                       STD(power = [0u"MW",2000u"MW"],
                                           prob  = [0.4,0.6]),
                                       STD(power = [0u"MW",1800u"MW",4000u"MW"],
                                           prob = [0.1,0.2,0.7])])
source

Source

Any source (abbr: src) is represented by a PropDict mapped onto either the vertices of the multigraph ntw.graph. The collection of all sources is stored in ntw.src, which is a vector.

The link between the source id, i.e., its index in ntw.src, and the vertex of ntw.graph to which it is mapped is stored in ntw.slib (key: vertex, value: [cmp...]).

Any property may be added to the Propdict representing the source, however certain properties are reserved for specific functionality of the tool, each linked to a specific key [Symbol].

  • :node is reserved for the source's node in the multigraph ntw.graph
  • :std is reserved for the state-transition diagram of the source
  • :ntw is reserved for the tuple (ntw,usr) representing the source, where usr is the user-id [Int] of the network ntw.
  • :dep_source is reserved for the dependent_source property.
  • :dep_eval is reserved for the dependent_evaluation property.
Note

In order to link the specific source to a vertex of the network, it is obligatory to provide them through the named argument :node.

Sources may either be added to a network individually or grouped using, respectively:

MultiStateSystems.add_source!Method
add_source!(ntw::MultiStateSystems.AbstractNetwork; kwargs...)

Adds a single source to the network ntw and fills their corresponding PropDict with the named arguments kwargs.

Example

julia> ntwᵖʷʳ = ntw()
julia> stdᵍᵉⁿ = solvedSTD(prob = [0.1,0.2,0.7],
                          flow = [0.0u"MW",0.5u"MW",2.0u"MW"])
julia> add_source!(ntwᵖʷʳ, node = 1,
                           name = "generator 1",
                           std  = stdᵍᵉⁿ)
source
MultiStateSystems.add_sources!Method
add_sources!(ntw::MultiStateSystems.AbstractNetwork; kwargs...)

Adds multiple sources to the network ntw and fills their corresponding PropDict with the named arguments kwargs. Either an uniform arguments is given which holds for all components or an array is given whith specific argument for each component.

Example

julia> ntwᵖʷʳ = ntw()
julia> stdᵍᵉⁿ = solvedSTD(prob = [0.1,0.2,0.7],
                          flow = [0.0u"MW",0.5u"MW",2.0u"MW"])
julia> add_sources!(ntwᵖʷʳ, node = 1:5,
                            std  = stdᵍᵉⁿ,
                            dep  = true)
source

Users

Any user (abbr: usr) is represented by a PropDict mapped onto either the vertices of the multigraph ntw.graph. The collection of all users is stored in ntw.usr, which is a vector.

The link between the user id, i.e., its index in ntw.usr, and the vertex of ntw.graph to which it is mapped is stored in ntw.ulib (key: vertex, value: [cmp...]).

Any property may be added to the Propdict representing the user, however certain properties are reserved for specific functionality of the tool, each linked to a specific key [Symbol].

  • :node is reserved for the user's vertex in the multigraph ntw.graph
  • :std is reserved for the state-transition diagram of the user
  • :ind is reserved for the user's indices
Note

In order to link the specific user to a vertex of the network, it is obligatory to provide them through the named argument :node.

Users may either be added to a network individually or grouped using, respectively:

MultiStateSystems.add_user!Method
add_user!(ntw::MultiStateSystems.AbstractNetwork; kwargs...)

Adds a single user to the network ntw and fills their corresponding PropDict with the named arguments kwargs.

Example

julia> ntwᵖʷʳ = ntw()
julia> add_source!(ntwᵖʷʳ, node = 1,
                           ind  = [:EENS])
source
MultiStateSystems.add_users!Method
add_users!(ntw::MultiStateSystems.AbstractNetwork; kwargs...)

Adds multiple users to the network ntw and fills their corresponding PropDict with the named arguments kwargs. Either an uniform arguments is given which holds for all components or an array is given whith specific argument for each component.

Example

julia> ntwᵖʷʳ = ntw()
julia> add_sources!(ntwᵖʷʳ, node = [1,5,8],
                            ind  = [:EENS])
source