ABMSimulationNode< History > Class Template Reference

CPP API: mio::ABMSimulationNode< History > Class Template Reference
mio::ABMSimulationNode< History > Class Template Reference

Represents the ABM simulation in one node of the ABM graph model. More...

#include <graph_abm_mobility.h>

Collaboration diagram for mio::ABMSimulationNode< History >:

Public Types

using Sim = abm::Simulation< GraphABModel >
 

Public Member Functions

template<class... Args, typename = std::enable_if_t<std::is_constructible<Sim, Args...>::value, void>>
 ABMSimulationNode (std::tuple< History... > &&history, Args &&... args)
 
void advance (mio::abm::TimePoint t, mio::abm::TimeSpan dt)
 advances the simulation in this node by t+dt and logs information in History object(s) More...
 
std::tuple< History... > & get_history ()
 Get history object(s) in this node. More...
 
const std::tuple< History... > & get_history () const
 
Simget_simulation ()
 Get abm simulation in this node. More...
 
const Simget_simulation () const
 

Private Attributes

std::tuple< History... > m_history
 
Sim m_simulation
 ABM Simulation of the node. More...
 

Detailed Description

template<class... History>
class mio::ABMSimulationNode< History >

Represents the ABM simulation in one node of the ABM graph model.

Member Typedef Documentation

◆ Sim

template<class... History>
using mio::ABMSimulationNode< History >::Sim = abm::Simulation<GraphABModel>

Constructor & Destructor Documentation

◆ ABMSimulationNode()

template<class... History>
template<class... Args, typename = std::enable_if_t<std::is_constructible<Sim, Args...>::value, void>>
mio::ABMSimulationNode< History >::ABMSimulationNode ( std::tuple< History... > &&  history,
Args &&...  args 
)
inline

Member Function Documentation

◆ advance()

template<class... History>
void mio::ABMSimulationNode< History >::advance ( mio::abm::TimePoint  t,
mio::abm::TimeSpan  dt 
)
inline

advances the simulation in this node by t+dt and logs information in History object(s)

Template Parameters
Historyhistory object type(s)
Parameters
[in]tCurrent time point
[in]dtTime span that shoulb be advanced
[in,out]historyHistory object(s) storing simulation information

◆ get_history() [1/2]

template<class... History>
std::tuple<History...>& mio::ABMSimulationNode< History >::get_history ( )
inline

Get history object(s) in this node.

◆ get_history() [2/2]

template<class... History>
const std::tuple<History...>& mio::ABMSimulationNode< History >::get_history ( ) const
inline

◆ get_simulation() [1/2]

template<class... History>
Sim& mio::ABMSimulationNode< History >::get_simulation ( )
inline

Get abm simulation in this node.

◆ get_simulation() [2/2]

template<class... History>
const Sim& mio::ABMSimulationNode< History >::get_simulation ( ) const
inline

Member Data Documentation

◆ m_history

template<class... History>
std::tuple<History...> mio::ABMSimulationNode< History >::m_history
private

◆ m_simulation

template<class... History>
Sim mio::ABMSimulationNode< History >::m_simulation
private

ABM Simulation of the node.