WSF
WsfCoverageTimeAverageGap.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2020 Infoscitex, a DCS Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFCOVERAGETIMEAVERAGEGAP_HPP
13#define WSFCOVERAGETIMEAVERAGEGAP_HPP
14
15#include "wsf_coverage_export.h"
16
17#include <map>
18#include <vector>
19
21#include "WsfCoverageAsset.hpp"
23
24namespace wsf
25{
26namespace coverage
27{
28
30class WSF_COVERAGE_EXPORT TimeAverageGap : public Measure
31{
32public:
33 explicit TimeAverageGap(const WsfScenario& aScenario)
34 : Measure{aScenario}
35 {
37 }
38 TimeAverageGap(const TimeAverageGap& aOther) = default;
39 ~TimeAverageGap() override = default;
40
41 // Measure overrides
42 TimeAverageGap* Clone() const override { return new TimeAverageGap{*this}; }
43 double GetMeasuredValue(const GridAsset& aGridAsset) const override;
44 double GetDefaultValue() const override;
45 void CollectionStarting(Coverage& aCoverage, double aSimTime) override;
46 std::string GetValueHeader() const override;
47
48 constexpr static const char* cTYPE{"WSF_TIME_AVERAGE_GAP_MOE"};
49
50private:
51 bool InitializeP(Coverage& aCoverage) override;
52 void CollectionCompletingP(Coverage& aCoverage, double aSimTime) override;
53
54 double ComputeValue(std::vector<AccessInterval>& aGaps) const;
55
56 void OnAccessIntervalComplete(const GridAsset& aGridAsset, const FreeAsset& aFreeAsset, const AccessInterval& aInterval);
57
59 std::map<GridAsset, std::vector<AccessInterval>> mIntervals{};
60
62 std::map<GridAsset, double> mData{};
63
65 AccessInterval mCoverageInterval{};
66};
67
68} // namespace coverage
69} // namespace wsf
70
71#endif // WSFCOVERAGETIMEAVERAGEGAP_HPP
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
TimeAverageGap * Clone() const override
Definition WsfCoverageTimeAverageGap.hpp:42
static constexpr const char * cTYPE
Definition WsfCoverageTimeAverageGap.hpp:48
TimeAverageGap(const TimeAverageGap &aOther)=default
TimeAverageGap(const WsfScenario &aScenario)
Definition WsfCoverageTimeAverageGap.hpp:33
~TimeAverageGap() override=default
Definition WsfCoverage.cpp:35
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved