NGen
Loading...
Searching...
No Matches
HY_PointHydroNexus Class Reference

#include <HY_PointHydroNexus.hpp>

+ Inheritance diagram for HY_PointHydroNexus:
+ Collaboration diagram for HY_PointHydroNexus:

Public Types

typedef long time_step_t
 
using Catchments = std::vector<std::string>
 
using HydroLocation = std::shared_ptr<hy_features::hydrolocation::HY_HydroLocation>
 

Public Member Functions

 HY_PointHydroNexus (std::string nexus_id, Catchments receiving_catchments)
 
 HY_PointHydroNexus (std::string nexus_id, Catchments receiving_catchments, Catchments contributing_catchments)
 
virtual ~HY_PointHydroNexus ()
 
double get_downstream_flow (std::string catchment_id, time_step_t t, double percent_flow) override
 get the request percentage of downstream flow through this nexus at timestep t.
 
void add_upstream_flow (double val, std::string catchment_id, time_step_t t) override
 add flow to this nexus for timestep t.
 
std::pair< double, int > inspect_upstream_flows (time_step_t t) override
 inspect a nexus to see what flows are recorded at a time step.
 
virtual std::pair< double, int > inspect_downstream_requests (time_step_t t) override
 inspect a nexus to see what requests are recorded at a time step.
 
std::string get_flow_units () override
 get the units that flows are represented in.
 
void set_mintime (time_step_t)
 
const Catchmentsget_receiving_catchments ()
 
const Catchmentsget_contributing_catchments ()
 
std::string & get_id ()
 

Protected Types

using flows = std::pair<std::string, double>
 
using flow_vector = std::vector< flows >
 

Protected Attributes

std::unordered_map< time_step_t, flow_vectorupstream_flows
 The current downstream flow through this Point Nexus.
 
std::unordered_map< time_step_t, flow_vectordownstream_requests
 
std::unordered_map< time_step_t, double > summed_flows
 
std::unordered_map< time_step_t, double > total_requests
 
time_step_t min_timestep {0}
 
std::unordered_set< time_step_tcompleted
 
std::string id
 

Private Attributes

HydroLocation realization
 
Catchments receiving_catchments
 
Catchments contributing_catchments
 
int number_of_downstream_catchments
 

Member Typedef Documentation

◆ Catchments

using HY_HydroNexus::Catchments = std::vector<std::string>
inherited

◆ flow_vector

using HY_PointHydroNexus::flow_vector = std::vector< flows >
protected

◆ flows

using HY_PointHydroNexus::flows = std::pair<std::string, double>
protected

◆ HydroLocation

◆ time_step_t

Constructor & Destructor Documentation

◆ HY_PointHydroNexus() [1/2]

HY_PointHydroNexus::HY_PointHydroNexus ( std::string nexus_id,
Catchments receiving_catchments )

◆ HY_PointHydroNexus() [2/2]

HY_PointHydroNexus::HY_PointHydroNexus ( std::string nexus_id,
Catchments receiving_catchments,
Catchments contributing_catchments )

◆ ~HY_PointHydroNexus()

HY_PointHydroNexus::~HY_PointHydroNexus ( )
virtual

Member Function Documentation

◆ add_upstream_flow()

void HY_PointHydroNexus::add_upstream_flow ( double val,
std::string catchment_id,
time_step_t t )
overridevirtual

add flow to this nexus for timestep t.

Implements HY_HydroNexus.

References completed, min_timestep, summed_flows, and upstream_flows.

◆ get_contributing_catchments()

const Catchments & HY_HydroNexus::get_contributing_catchments ( )
inlineinherited

◆ get_downstream_flow()

double HY_PointHydroNexus::get_downstream_flow ( std::string catchment_id,
time_step_t t,
double percent_flow )
overridevirtual

get the request percentage of downstream flow through this nexus at timestep t.

Implements HY_HydroNexus.

References completed, downstream_requests, min_timestep, summed_flows, total_requests, and upstream_flows.

◆ get_flow_units()

std::string HY_PointHydroNexus::get_flow_units ( )
overridevirtual

get the units that flows are represented in.

Implements HY_HydroNexus.

◆ get_id()

std::string & HY_HydroNexus::get_id ( )
inlineinherited

References HY_HydroNexus::id.

◆ get_receiving_catchments()

const Catchments & HY_HydroNexus::get_receiving_catchments ( )
inlineinherited

◆ inspect_downstream_requests()

std::pair< double, int > HY_PointHydroNexus::inspect_downstream_requests ( time_step_t t)
overridevirtual

inspect a nexus to see what requests are recorded at a time step.

Implements HY_HydroNexus.

References downstream_requests.

◆ inspect_upstream_flows()

std::pair< double, int > HY_PointHydroNexus::inspect_upstream_flows ( time_step_t t)
overridevirtual

inspect a nexus to see what flows are recorded at a time step.

Implements HY_HydroNexus.

References upstream_flows.

◆ set_mintime()

void HY_PointHydroNexus::set_mintime ( time_step_t t)

Member Data Documentation

◆ completed

std::unordered_set<time_step_t> HY_PointHydroNexus::completed
protected

◆ contributing_catchments

Catchments HY_HydroNexus::contributing_catchments
privateinherited

◆ downstream_requests

std::unordered_map<time_step_t, flow_vector > HY_PointHydroNexus::downstream_requests
protected

◆ id

std::string HY_HydroNexus::id
protectedinherited

Referenced by HY_HydroNexus::get_id().

◆ min_timestep

time_step_t HY_PointHydroNexus::min_timestep {0}
protected

◆ number_of_downstream_catchments

int HY_HydroNexus::number_of_downstream_catchments
privateinherited

◆ realization

HydroLocation HY_HydroNexus::realization
privateinherited

◆ receiving_catchments

Catchments HY_HydroNexus::receiving_catchments
privateinherited

◆ summed_flows

std::unordered_map<time_step_t, double> HY_PointHydroNexus::summed_flows
protected

◆ total_requests

std::unordered_map<time_step_t, double> HY_PointHydroNexus::total_requests
protected

Referenced by get_downstream_flow(), and set_mintime().

◆ upstream_flows

std::unordered_map<time_step_t, flow_vector > HY_PointHydroNexus::upstream_flows
protected

The current downstream flow through this Point Nexus.

Referenced by add_upstream_flow(), get_downstream_flow(), inspect_upstream_flows(), and set_mintime().


The documentation for this class was generated from the following files: