Class redist_governor

Inheritance Relationships

Base Type

  • public rer::client< redist_governor >

Class Documentation

class redist_governor : public rer::client<redist_governor>

Supervises block re-distribution.

Determinies the conditions under which blocks should be re-distributed after being processed in a nest, if the # of blocks in the arena should become finite, and whether or not that change is permanent.

Conditions for disabling block re-distribution (and therefore the # blocks becoming finite) are one of:

  • none: the # blocks is always infinite/finite, depending what state the governor is initialized with.

  • A specified # of blocks have been collected (any type).

  • The swarm has converged, according to some measure.

  • A specified number of timesteps has elapsed.

Policies for determining if the switch to finite blocks is permanent or not are:

  • latch -> it is permanent; once the trigger condition signal goes “high” it is remembered and if the signal goes “low” later that change is ignored.

  • multi -> it is not permanent: if the trigger condition goes “low” after being initially triggered by going “high”, then block re-distribution is re-enabled until the trigger condition goes “high” again.

Public Functions

explicit redist_governor(const config::block_redist_governor_config *config)
inline bool enabled(void) const
void update(const rtypes::timestep &t, size_t blocks_collected, bool convergence_status)

Update the distribution status according to the policy parameters.

Parameters:
  • t – Current timestep.

  • blocks_collected – # blocks collected so far.

  • convergence_status – Current swarm convergence status.

Public Static Attributes

static const std::string kDisableTriggerBlockCount = "block_count"
static const std::string kDisableTriggerConvergence = "convergence"
static const std::string kDisableTriggerNone = rconfig::constants::kNoValue
static const std::string kDisableTriggerTime = "timestep"
static const std::string kRecurrencePolicyLatch = "latch"
static const std::string kRecurrencePolicyMulti = "multi"