FeedbackGraphSimulation< FP, Graph > Class Template Reference

CPP API: mio::FeedbackGraphSimulation< FP, Graph > Class Template Reference
mio::FeedbackGraphSimulation< FP, Graph > Class Template Reference

#include <graph_simulation.h>

Collaboration diagram for mio::FeedbackGraphSimulation< FP, Graph >:

Public Member Functions

void advance (FP t_max)
 
 FeedbackGraphSimulation (Graph &&g, FP t0, FP dt)
 
Graphget_graph ()
 

Private Member Functions

void calculate_global_icu_occupancy ()
 Calculates the global ICU occupancy based on the ICU history of all nodes. More...
 
void calculate_regional_icu_occupancy ()
 Calculates the regional ICU occupancy for each region. More...
 
void distribute_icu_data ()
 Distributes the calculated global and regional ICU occupancy data to each node. More...
 
void update_global_icu_occupancy ()
 Updates the global ICU occupancy with the latest values from all nodes. More...
 
void update_regional_icu_occupancy ()
 Updates the regional ICU occupancy for each region with the latest values. More...
 

Private Attributes

FP m_dt
 
mio::TimeSeries< FP > m_global_icu_occupancy
 
Graph m_graph
 
bool m_initialized
 
std::unordered_map< int, mio::TimeSeries< FP > > m_regional_icu_occupancy
 
FP m_t
 

Constructor & Destructor Documentation

◆ FeedbackGraphSimulation()

template<typename FP , class Graph >
mio::FeedbackGraphSimulation< FP, Graph >::FeedbackGraphSimulation ( Graph &&  g,
FP  t0,
FP  dt 
)
inline

Member Function Documentation

◆ advance()

template<typename FP , class Graph >
void mio::FeedbackGraphSimulation< FP, Graph >::advance ( FP  t_max)
inline

◆ calculate_global_icu_occupancy()

template<typename FP , class Graph >
void mio::FeedbackGraphSimulation< FP, Graph >::calculate_global_icu_occupancy ( )
inlineprivate

Calculates the global ICU occupancy based on the ICU history of all nodes.

The result is stored in m_global_icu_occupancy.

◆ calculate_regional_icu_occupancy()

template<typename FP , class Graph >
void mio::FeedbackGraphSimulation< FP, Graph >::calculate_regional_icu_occupancy ( )
inlineprivate

Calculates the regional ICU occupancy for each region.

The calculation is based on the ICU history of the nodes in each region. The results are stored in m_regional_icu_occupancy.

◆ distribute_icu_data()

template<typename FP , class Graph >
void mio::FeedbackGraphSimulation< FP, Graph >::distribute_icu_data ( )
inlineprivate

Distributes the calculated global and regional ICU occupancy data to each node.

This makes the data available for feedback mechanisms within the node-local simulations.

◆ get_graph()

template<typename FP , class Graph >
Graph& mio::FeedbackGraphSimulation< FP, Graph >::get_graph ( )
inline

◆ update_global_icu_occupancy()

template<typename FP , class Graph >
void mio::FeedbackGraphSimulation< FP, Graph >::update_global_icu_occupancy ( )
inlineprivate

Updates the global ICU occupancy with the latest values from all nodes.

A new time point is added to m_global_icu_occupancy.

◆ update_regional_icu_occupancy()

template<typename FP , class Graph >
void mio::FeedbackGraphSimulation< FP, Graph >::update_regional_icu_occupancy ( )
inlineprivate

Updates the regional ICU occupancy for each region with the latest values.

A new time point is added to each TimeSeries in m_regional_icu_occupancy.

Member Data Documentation

◆ m_dt

template<typename FP , class Graph >
FP mio::FeedbackGraphSimulation< FP, Graph >::m_dt
private

◆ m_global_icu_occupancy

template<typename FP , class Graph >
mio::TimeSeries<FP> mio::FeedbackGraphSimulation< FP, Graph >::m_global_icu_occupancy
private

◆ m_graph

template<typename FP , class Graph >
Graph mio::FeedbackGraphSimulation< FP, Graph >::m_graph
private

◆ m_initialized

template<typename FP , class Graph >
bool mio::FeedbackGraphSimulation< FP, Graph >::m_initialized
private

◆ m_regional_icu_occupancy

template<typename FP , class Graph >
std::unordered_map<int, mio::TimeSeries<FP> > mio::FeedbackGraphSimulation< FP, Graph >::m_regional_icu_occupancy
private

◆ m_t

template<typename FP , class Graph >
FP mio::FeedbackGraphSimulation< FP, Graph >::m_t
private