12#ifndef WSFCOVERAGENUMBEROFACCESSES_HPP
13#define WSFCOVERAGENUMBEROFACCESSES_HPP
15#include "wsf_coverage_export.h"
20#include "UtCalendar.hpp"
44 bool ProcessInput(UtInput& aInput)
override;
45 double GetDefaultValue()
const override;
46 double GetMeasuredValue(
const GridAsset& aGridAsset)
const override;
47 void CollectionStarting(
Coverage& aCoverage,
double aSimTime)
override;
48 std::string GetValueHeader()
const override;
50 constexpr static const char*
cTYPE{
"WSF_NUMBER_OF_ACCESSES_MOE"};
77 bool InitializeP(
Coverage& aCoverage)
override;
78 void CollectionCompletingP(
Coverage& aCoverage,
double aSimTime)
override;
80 double ComputeValue(std::vector<AccessInterval>& aIntervals)
const;
82 void ComputePerSampleCount(
const std::vector<AccessInterval>& aGaps, std::vector<int>& aSamples)
const;
84 double ComputeInSpan(std::vector<AccessInterval>& aIntervals)
const;
85 double ComputePerSampleInSpan(std::vector<AccessInterval>& aIntervals)
const;
86 double ComputePerSampleMax(std::vector<AccessInterval>& aIntervals)
const;
87 double ComputePerSampleMean(std::vector<AccessInterval>& aIntervals)
const;
88 double ComputePerSampleMin(std::vector<AccessInterval>& aIntervals)
const;
89 double ComputeTotal(std::vector<AccessInterval>& aIntervals)
const;
93 static SubType GetSubtypeFromIdentifier(
const std::string& aIdentifier);
94 static int SubtypeHasParameter(SubType aSubType);
97 std::map<GridAsset, std::vector<AccessInterval>> mIntervals{};
100 std::map<GridAsset, double> mData{};
103 AccessInterval mCoverageInterval{};
106 UtCalendar mStartEpoch{};
109 SubType mSubType{SubType::cUNKNOWN};
112 double mSampleSpan{UtCalendar::cSEC_IN_DAY};
115 double mMinParameter{-1.0};
118 double mMaxParameter{-1.0};
void SetType(WsfStringId aType)
Definition WsfObject.cpp:172
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Definition WsfCoverageAccessInterval.hpp:28
Definition WsfCoverage.hpp:57
Definition WsfCoverageAsset.hpp:81
Definition WsfCoverageAsset.hpp:37
Measure(const WsfScenario &aScenario)
Definition WsfCoverageMeasure.hpp:45
static constexpr const char * cTYPE
Definition WsfCoverageNumberOfAccesses.hpp:50
double GetSampleSpan() const
Get the duration of each sample for per-time subtypes.
Definition WsfCoverageNumberOfAccesses.hpp:68
double GetMinParameter() const
Get the minimum (first) parameter passed to in_span or per_day_in_span, or -1.0 if a different subtyp...
Definition WsfCoverageNumberOfAccesses.hpp:71
SubType
The available sub-types for this MOE.
Definition WsfCoverageNumberOfAccesses.hpp:54
NumberOfAccesses(const WsfScenario &aScenario)
Definition WsfCoverageNumberOfAccesses.hpp:34
double GetMaxParameter() const
Get the maximum (second) parameter passed to in_span or per_day_in_span, or -1.0 if a different subty...
Definition WsfCoverageNumberOfAccesses.hpp:74
NumberOfAccesses(const NumberOfAccesses &aOther)=default
SubType GetSubType() const
Get the subtype of the MoE.
Definition WsfCoverageNumberOfAccesses.hpp:65
~NumberOfAccesses() override=default
NumberOfAccesses * Clone() const override
Definition WsfCoverageNumberOfAccesses.hpp:43
Definition WsfCoverage.cpp:35
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32