MsxNetworkData#
module wntr.msx.model
- class MsxNetworkData[source]#
Bases:
NetworkDataBase
Network-specific values associated with a multi-species water quality model
Data is copied from dictionaries passed in, so once created, the dictionaries passed are not connected to this object.
- Parameters:
patterns (dict, optional) – Patterns to use for sources
sources (dict, optional) – Sources defined for the model
initial_quality (dict, optional) – Initial values for different species at different nodes, links, and the global value
parameter_values (dict, optional) – Parameter values for different pipes and tanks
Notes
patterns
Dictionary keyed by pattern name (str) with values being the multipliers (list of float)
sources
Dictionary keyed by species name (str) with values being dictionaries keyed by junction name (str) with values being the dictionary of settings for the source
initial_quality
Dictionary keyed by species name (str) with values being either an
InitialQuality
object or the appropriate dictionary representation thereof.parameter_values
Dictionary keyed by parameter name (str) with values being either a
ParameterValues
object or the appropriate dictionary representation thereof.
- init_new_parameter(param)[source]#
(Re)initialize parameter values for a parameter
- Parameters:
param (Parameter) – Parameter to be (re)initialized with network data
- Returns:
New network data for the specific parameter
- Return type:
- init_new_species(species)[source]#
(Re)set the initial quality values for a species
- Parameters:
species (Species) – Species to (re)initialized.
- Returns:
New initial quality values
- Return type:
- remove_parameter(param)[source]#
Remove values associated with a specific parameter
Ignores non-parameters.
- property initial_quality: Dict[str, InitialQuality]#
Dictionary of initial quality values, keyed by species name
- property parameter_values: Dict[str, ParameterValues]#
Dictionary of parameter values, keyed by parameter name
- property patterns#
Dictionary of patterns, specific for the water quality model, keyed by pattern name.
Note
the WaterNetworkModel cannot see these patterns, so names can be reused, so be careful. Likewise, this model cannot see the WaterNetworkModel patterns, so this could be a source of some confusion.
- property sources#
Dictionary of sources, keyed by species name