| helics 3.6.1

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

`#include <TimeDependencies.hpp>`

## Public Member Functions
| TimeDependencies ()=default
bool | isDependency (GlobalFederateId ofed) const
bool | isDependent (GlobalFederateId ofed) const
bool | addDependency (GlobalFederateId gid)
void | removeDependency (GlobalFederateId gid)
bool | addDependent (GlobalFederateId gid)
void | removeDependent (GlobalFederateId gid)
void | resetDependency (GlobalFederateId id)
void | removeInterdependence (GlobalFederateId gid)
TimeProcessingResult | updateTime (const ActionMessage &cmd)
auto | size () const
auto | begin ()
auto | end ()
auto | begin () const
auto | end () const
auto | cbegin () const
auto | cend () const
bool | empty () const
const DependencyInfo * | getDependencyInfo (GlobalFederateId gid) const
DependencyInfo * | getDependencyInfo (GlobalFederateId gid)
bool | checkIfReadyForExecEntry (bool iterating, bool waiting) const
bool | checkIfAllDependenciesArePastExec (bool iterating) const
bool | checkIfReadyForTimeGrant (bool iterating, Time desiredGrantTime, GrantDelayMode delayMode) const
void | resetIteratingExecRequests ()
void | resetIteratingTimeRequests (Time requestTime)
void | resetDependentEvents (Time grantTime)
bool | hasActiveTimeDependencies () const
bool | verifySequenceCounter (Time tmin, std::int32_t sequenceCount)
int | activeDependencyCount () const
GlobalFederateId | getMinDependency () const
void | setDependencyVector (const std::vector< DependencyInfo > &deps)
std::pair< int, std::string > | checkForIssues (bool waiting) const
bool | hasDelayedDependency () const
GlobalFederateId | delayedDependency () const

## 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

get a count of the active dependencies

## ◆ addDependency()

bool helics::TimeDependencies::addDependency | ( | GlobalFederateId | gid | ) |

insert a dependency into the structure

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

References helics::negEpsilon, and helics::timeZero.

## ◆ addDependent()

bool helics::TimeDependencies::addDependent | ( | GlobalFederateId | gid | ) |

update the info about a dependency based on a message

## ◆ begin() [1/2]

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

iterator to first dependency

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

## ◆ 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

## ◆ checkForIssues()

std::pair< int, std::string > helics::TimeDependencies::checkForIssues | ( | bool | waiting | ) | const

check the dependency set for any issues

Returns
  an error code and string containing an error description

References helics::TimeData::delayedTiming, helics::DependencyInfo::dependency, and helics::DependencyInfo::dependent.

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

## ◆ checkIfAllDependenciesArePastExec()

bool helics::TimeDependencies::checkIfAllDependenciesArePastExec | ( | bool | iterating | ) | const

check if all dependencies have passed exec mode and are requesting time

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

## ◆ checkIfReadyForExecEntry()

bool helics::TimeDependencies::checkIfReadyForExecEntry | ( | bool | iterating,
|  | bool | waiting
| ) |  | const

check if the dependencies would allow entry to exec mode

References checkIfAllDependenciesArePastExec().

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

## ◆ checkIfReadyForTimeGrant()

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

check if the dependencies would allow a grant of the time

Parameters

  iterating | true if the object is iterating
  desiredGrantTime | the time to check for granting

Returns
  true if the object is ready

References helics::cBigTime, helics::DependencyInfo::dependency, and helics::TimeData::next.

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

## ◆ empty()

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

check if there are no dependencies

Referenced by helics::BaseTimeCoordinator::empty(), helics::TimeCoordinator::localError(), and helics::TimeCoordinator::timeRequest().

## ◆ 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 | ( | GlobalFederateId | gid | ) |

get a pointer to the dependency information for a particular object

## ◆ getDependencyInfo() [2/2]

const DependencyInfo * helics::TimeDependencies::getDependencyInfo | ( | GlobalFederateId | gid | ) | const

get a pointer to the dependency information for a particular object

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

## ◆ getMinDependency()

GlobalFederateId helics::TimeDependencies::getMinDependency | ( |  | ) | const

get a count of the active dependencies

References helics::cBigTime, helics::DependencyInfo::dependency, helics::DependencyInfo::fedID, helics::GlobalFederateId::isFederate(), and helics::TimeData::next.

## ◆ hasActiveTimeDependencies()

bool helics::TimeDependencies::hasActiveTimeDependencies | ( |  | ) | const

check if there are active dependencies

## ◆ isDependency()

bool helics::TimeDependencies::isDependency | ( | GlobalFederateId | ofed | ) | const

return true if the given federate is already a dependency

## ◆ isDependent()

bool helics::TimeDependencies::isDependent | ( | GlobalFederateId | ofed | ) | const

return true if the given federate is already a dependent

## ◆ removeDependency()

void helics::TimeDependencies::removeDependency | ( | GlobalFederateId | gid | ) |

remove dependency from consideration

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

## ◆ removeDependent()

void helics::TimeDependencies::removeDependent | ( | GlobalFederateId | gid | ) |

remove dependent from consideration

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

## ◆ removeInterdependence()

void helics::TimeDependencies::removeInterdependence | ( | GlobalFederateId | gid | ) |

remove an interdependency from consideration

## ◆ resetDependency()

void helics::TimeDependencies::resetDependency | ( | GlobalFederateId | id | ) |

reset a dependency for reentrant connection

References helics::cBigTime.

## ◆ resetDependentEvents()

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

reset the tdeMin

References helics::DependencyInfo::dependency, helics::TimeData::minDe, helics::TimeData::next, and helics::TimeData::Te.

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

## ◆ resetIteratingExecRequests()

void helics::TimeDependencies::resetIteratingExecRequests | ( |  | ) |

reset the iterative exec requests to prepare for the next iteration

References helics::DependencyInfo::dependency.

## ◆ resetIteratingTimeRequests()

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

reset iterative time requests to prepare for next iteration

Parameters

  requestTime | the time that is being iterated

References helics::DependencyInfo::dependency.

## ◆ size()

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

get the number of dependencies

Referenced by helics::TimeCoordinator::localError(), and helics::TimeCoordinator::updateTimeFactors().

## ◆ updateTime()

TimeProcessingResult helics::TimeDependencies::updateTime | ( | const ActionMessage & | cmd | ) |

update the info about a dependency based on a message

References getDependencyInfo(), helics::NOT_PROCESSED, and helics::ActionMessage::source_id.

## ◆ verifySequenceCounter()

bool helics::TimeDependencies::verifySequenceCounter | ( | Time | tmin,
|  | std::int32_t | sequenceCount
| ) |  |

verify that all the sequence Counters match

Referenced by helics::GlobalTimeCoordinator::updateTimeFactors().

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

- TimeDependencies.hpp
- TimeDependencies.cpp