12#ifndef WSFCOVERAGENASSETCOVERAGE_HPP
13#define WSFCOVERAGENASSETCOVERAGE_HPP
15#include "wsf_coverage_export.h"
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_N_ASSET_COVERAGE_MOE"};
73 std::set<FreeAsset> mAssetCount;
77 std::map<double, int> mCountFrames;
82 bool InitializeP(Coverage& aCoverage)
override;
83 void CollectionCompletingP(Coverage& aCoverage,
double aSimTime)
override;
84 double ComputeValue(
const GridData& aIntervals)
const;
85 double ComputeMean(
const std::map<double, int>& aFrames)
const;
86 double ComputeMax(
const std::map<double, int>& aFrames)
const;
87 double ComputeMin(
const std::map<double, int>& aFrames)
const;
88 double ComputePercentAbove(
const std::map<double, int>& aFrames)
const;
89 double ComputeUnique(
const std::set<FreeAsset>& aAssets)
const;
91 void OnAccessIntervalComplete(
const GridAsset& aGridAsset,
const FreeAsset& aFreeAsset,
const AccessInterval& aInterval);
93 static SubType GetSubtypeFromIdentifier(
const std::string& aIdentifier);
94 static bool SubtypeHasParameter(SubType aSubType);
97 std::map<GridAsset, GridData> mData{};
100 AccessInterval mCoverageInterval{};
103 SubType mSubType{SubType::cUNKNOWN};
106 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
Definition WsfCoverage.hpp:57
Definition WsfCoverageAsset.hpp:37
Measure(const WsfScenario &aScenario)
Definition WsfCoverageMeasure.hpp:45
SubType
The available sub-types for this MOE.
Definition WsfCoverageN_AssetCoverage.hpp:54
~N_AssetCoverage() override=default
N_AssetCoverage(const N_AssetCoverage &aOther)=default
N_AssetCoverage * Clone() const override
Definition WsfCoverageN_AssetCoverage.hpp:43
N_AssetCoverage(const WsfScenario &aScenario)
Definition WsfCoverageN_AssetCoverage.hpp:34
double GetParameter() const
Returns the parameter passed to percent_above, or -100.0 if a different subtype was used.
Definition WsfCoverageN_AssetCoverage.hpp:67
static constexpr const char * cTYPE
Definition WsfCoverageN_AssetCoverage.hpp:50
SubType GetSubType() const
Returns the MoE's subtype.
Definition WsfCoverageN_AssetCoverage.hpp:64
Definition WsfCoverage.cpp:35
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32