helics  2.8.1
Public Member Functions | List of all members
helics::TimeDependencies Class Reference

#include <TimeDependencies.hpp>

Public Member Functions

 TimeDependencies ()=default
 
bool isDependency (global_federate_id ofed) const
 
bool isDependent (global_federate_id ofed) const
 
bool addDependency (global_federate_id id)
 
void removeDependency (global_federate_id id)
 
bool addDependent (global_federate_id id)
 
void removeDependent (global_federate_id id)
 
void removeInterdependence (global_federate_id id)
 
bool updateTime (const ActionMessage &m)
 
auto size () const
 
auto begin ()
 
auto end ()
 
auto begin () const
 
auto end () const
 
auto cbegin () const
 
auto cend () const
 
bool empty () const
 
const DependencyInfogetDependencyInfo (global_federate_id id) const
 
DependencyInfogetDependencyInfo (global_federate_id id)
 
bool checkIfReadyForExecEntry (bool iterating) const
 
bool checkIfReadyForTimeGrant (bool iterating, Time desiredGrantTime) const
 
void resetIteratingExecRequests ()
 
void resetIteratingTimeRequests (Time requestTime)
 
void resetDependentEvents (Time grantTime)
 
bool hasActiveTimeDependencies () const
 
int activeDependencyCount () const
 
global_federate_id getMinDependency () const
 
void setDependencyVector (const std::vector< DependencyInfo > &deps)
 

Detailed Description

class for managing a set of dependencies

Constructor & Destructor Documentation

◆ TimeDependencies()

helics::TimeDependencies::TimeDependencies ( )
default

default constructor

Member Function Documentation

◆ activeDependencyCount()

int helics::TimeDependencies::activeDependencyCount ( ) const

◆ addDependency()

bool helics::TimeDependencies::addDependency ( global_federate_id  id)

insert a dependency into the structure

Returns
true if the dependency was added, false if it existed already

Referenced by helics::ForwardingTimeCoordinator::addDependency(), and helics::TimeCoordinator::addDependency().

◆ addDependent()

bool helics::TimeDependencies::addDependent ( global_federate_id  id)

update the info about a dependency based on a message

Referenced by helics::ForwardingTimeCoordinator::addDependent(), and helics::TimeCoordinator::addDependent().

◆ begin() [1/2]

auto helics::TimeDependencies::begin ( )
inline

◆ begin() [2/2]

auto helics::TimeDependencies::begin ( ) const
inline

const iterator to first dependency

◆ cbegin()

auto helics::TimeDependencies::cbegin ( ) const
inline

const iterator to first dependency

◆ cend()

auto helics::TimeDependencies::cend ( ) const
inline

const iterator to first dependency

◆ checkIfReadyForExecEntry()

bool helics::TimeDependencies::checkIfReadyForExecEntry ( bool  iterating) const

check if the dependencies would allow entry to exec mode

References helics::iterating.

Referenced by helics::ForwardingTimeCoordinator::checkExecEntry(), and helics::TimeCoordinator::checkExecEntry().

◆ checkIfReadyForTimeGrant()

bool helics::TimeDependencies::checkIfReadyForTimeGrant ( bool  iterating,
Time  desiredGrantTime 
) const

check if the dependencies would allow a grant of the time

Parameters
iteratingtrue if the object is iterating
desiredGrantTimethe time to check for granting
Returns
true if the object is ready

References helics::iterating.

Referenced by helics::TimeCoordinator::checkTimeGrant().

◆ empty()

bool helics::TimeDependencies::empty ( ) const
inline

◆ end() [1/2]

auto helics::TimeDependencies::end ( )
inline

iterator to end point

◆ end() [2/2]

auto helics::TimeDependencies::end ( ) const
inline

const iterator to end point

◆ getDependencyInfo() [1/2]

DependencyInfo * helics::TimeDependencies::getDependencyInfo ( global_federate_id  id)

get a pointer to the dependency information for a particular object

◆ getDependencyInfo() [2/2]

const DependencyInfo * helics::TimeDependencies::getDependencyInfo ( global_federate_id  id) const

◆ getMinDependency()

global_federate_id helics::TimeDependencies::getMinDependency ( ) const

◆ hasActiveTimeDependencies()

bool helics::TimeDependencies::hasActiveTimeDependencies ( ) const

◆ isDependency()

bool helics::TimeDependencies::isDependency ( global_federate_id  ofed) const

return true if the given federate is already a dependency

Referenced by helics::ForwardingTimeCoordinator::isDependency().

◆ isDependent()

bool helics::TimeDependencies::isDependent ( global_federate_id  ofed) const

return true if the given federate is already a dependent

◆ removeDependency()

void helics::TimeDependencies::removeDependency ( global_federate_id  id)

◆ removeDependent()

void helics::TimeDependencies::removeDependent ( global_federate_id  id)

◆ removeInterdependence()

void helics::TimeDependencies::removeInterdependence ( global_federate_id  id)

remove an interdependency from consideration

◆ resetDependentEvents()

void helics::TimeDependencies::resetDependentEvents ( helics::Time  grantTime)

reset the tdeMin

Referenced by helics::TimeCoordinator::timeRequest().

◆ resetIteratingExecRequests()

void helics::TimeDependencies::resetIteratingExecRequests ( )

reset the iterative exec requests to prepare for the next iteration

Referenced by helics::TimeCoordinator::checkExecEntry().

◆ resetIteratingTimeRequests()

void helics::TimeDependencies::resetIteratingTimeRequests ( helics::Time  requestTime)

reset iterative time requests to prepare for next iteration

Parameters
requestTimethe time that is being iterated

◆ size()

auto helics::TimeDependencies::size ( ) const
inline

◆ updateTime()

bool helics::TimeDependencies::updateTime ( const ActionMessage m)

update the info about a dependency based on a message

References helics::ActionMessage::action(), helics::ActionMessage::dest_id, getDependencyInfo(), and helics::ActionMessage::source_id.


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