Program Listing for File population_dynamics_metrics.hpp

Return to documentation for file (cosm/tv/metrics/population_dynamics_metrics.hpp)

#pragma once

/*******************************************************************************
 * Includes
 ******************************************************************************/
#include "rcppsw/metrics/base_metrics.hpp"
#include "rcppsw/types/timestep.hpp"

#include "cosm/cosm.hpp"

/*******************************************************************************
 * Namespaces
 ******************************************************************************/
namespace cosm::tv::metrics {

/*******************************************************************************
 * Class Definitions
 ******************************************************************************/
class population_dynamics_metrics : public virtual rmetrics::base_metrics {
 public:
  struct queue_op_status {
    size_t count;
    rtypes::timestep interval_accum;
  };
  struct queue_status {
    size_t size;
    double lambda;
    double mu;
    struct queue_op_status enqueue;
    struct queue_op_status dequeue;
  };
  population_dynamics_metrics(void) = default;

  virtual queue_status death_queue_status(void) const = 0;
  virtual queue_status birth_queue_status(void) const = 0;
  virtual queue_status repair_queue_status(void) const = 0;

  virtual size_t swarm_total_population(void) const = 0;

  virtual size_t swarm_active_population(void) const = 0;

  virtual size_t swarm_max_population(void) const = 0;
};

} /* namespace cosm::tv::metrics */