12#ifndef WSFCOVERAGEACCESSDURATION_HPP
13#define WSFCOVERAGEACCESSDURATION_HPP
15#include "wsf_coverage_export.h"
43 bool ProcessInput(UtInput& aInput)
override;
44 double GetDefaultValue()
const override;
45 double GetMeasuredValue(
const GridAsset& aGridAsset)
const override;
46 void CollectionStarting(
Coverage& aCoverage,
double aSimTime)
override;
47 std::string GetValueHeader()
const override;
49 constexpr static const char*
cTYPE{
"WSF_ACCESS_DURATION_MOE"};
70 bool InitializeP(
Coverage& aCoverage)
override;
71 void CollectionCompletingP(
Coverage& aCoverage,
double aSimTime)
override;
72 double ComputeValue(std::vector<AccessInterval>& aIntervals)
const;
73 double ComputeMean(std::vector<AccessInterval>& aIntervals)
const;
74 double ComputeMin(std::vector<AccessInterval>& aIntervals)
const;
75 double ComputeMax(std::vector<AccessInterval>& aIntervals)
const;
76 double ComputePercentAbove(std::vector<AccessInterval>& aIntervals)
const;
77 double ComputeStddev(std::vector<AccessInterval>& aIntervals)
const;
78 double ComputeSum(std::vector<AccessInterval>& aIntervals)
const;
80 void SortIntervalsByDuration(std::vector<AccessInterval>& aIntervals)
const;
84 static SubType GetSubtypeFromIdentifier(
const std::string& aIdentifier);
85 static bool SubtypeHasParameter(SubType aSubType);
88 mutable std::map<GridAsset, std::vector<AccessInterval>> mIntervals{};
91 std::map<GridAsset, double> mData{};
94 AccessInterval mCoverageInterval{};
97 SubType mSubType{SubType::cUNKNOWN};
100 double mParameter{-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
static constexpr const char * cTYPE
Definition WsfCoverageAccessDuration.hpp:49
double GetParameter() const
Get the parameter passed if the subtype is percent_above, or -100.0 otherwise.
Definition WsfCoverageAccessDuration.hpp:67
AccessDuration(const AccessDuration &aOther)=default
AccessDuration * Clone() const override
Definition WsfCoverageAccessDuration.hpp:42
~AccessDuration() override=default
AccessDuration(const WsfScenario &aScenario)
Definition WsfCoverageAccessDuration.hpp:33
SubType GetSubType() const
Get the MoE's subtype enum.
Definition WsfCoverageAccessDuration.hpp:64
SubType
The available sub-types for this MOE.
Definition WsfCoverageAccessDuration.hpp:53
Definition WsfCoverageAccessInterval.hpp:28
Definition WsfCoverage.hpp:57
Definition WsfCoverageAsset.hpp:81
Definition WsfCoverageAsset.hpp:37
Measure(const WsfScenario &aScenario)
Definition WsfCoverageMeasure.hpp:45
Definition WsfCoverage.cpp:35
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32