12#ifndef WSFQUANTUMTASKERPROCESSOR_HPP
13#define WSFQUANTUMTASKERPROCESSOR_HPP
20#include "wsf_mil_export.h"
89 void Update(
double aSimTime)
override;
150 std::list<WsfTask*> TaskListReceivedOfType(
WsfStringId aTaskType);
151 std::list<WsfTask*> TaskListReceivedForTrack(
const WsfTrackId& aTrackId);
152 std::list<WsfTask*> TaskListReceivedOfTypeForTrack(
WsfStringId aTaskType,
const WsfTrackId& aTrackId);
153 std::list<WsfTask*> TaskListReceivedForResourceType(
int aResourceType);
154 std::list<WsfTask*> TaskListReceivedForResourceName(
WsfStringId aResourceName);
156 std::list<WsfTask*> TaskListAssignedOfType(
WsfStringId aTaskType);
157 std::list<WsfTask*> TaskListAssignedForTrack(
const WsfTrackId& aTrackId);
158 std::list<WsfTask*> TaskListAssignedForResourceType(
int aResourceType);
159 std::list<WsfTask*> TaskListAssignedForResourceName(
WsfStringId aResourceName);
170 std::set<WsfAssetPerception*> AssetAssigneesForTask(
WsfQuantumTask* aTaskPtr);
182 bool RejectTask(
double aSimTime,
WsfTask& aTask);
212 void SetMatrixAssets(
double aSimTime);
213 void SetMatrixTasks(
double aSimTime, std::map<
int, std::set<size_t>>& aAllocationMap);
222 AssetRepresentationType mAssetRep;
223 ReallocationStrategyType mReallocateStrategy;
224 bool mIgnoreAllyTracks;
227 int mPrevRejectCount;
230 ut::CloneablePtr<WsfQuantumGenerator> mGeneratorPtr;
231 ut::CloneablePtr<WsfQuantumEvaluator> mEvaluatorPtr;
232 ut::CloneablePtr<WsfQuantumAllocator> mAllocatorExtraTasksPtr;
233 ut::CloneablePtr<WsfQuantumAllocator> mAllocatorExtraAssetsPtr;
235 std::vector<ut::CloneablePtr<WsfQuantumAllocator>> mAllocators;
237 std::map<size_t, std::map<int, int>> mRejectedTaskMap;
238 std::map<int, int> mRejectedTasks;
240 std::map<int, double> mCompletedTaskTimes;
243 AllocationMap mAllocationMap;
245 bool mFilterAssignedTasks;
246 bool mFilterRejectedTasks;
247 bool mFilterCompletedTasks;
248 bool mUpdateAssignments;
std::vector< std::pair< WsfAssetPerception *, ut::CloneablePtr< WsfQuantumTask > > > AllocationList
Definition WsfQuantumAllocator.hpp:32
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
Definition WsfAssetPerception.hpp:32
A base class for messages sent among simulation communication objects, processors and sensors.
Definition WsfMessage.hpp:33
const std::string & GetName() const
Definition WsfObject.cpp:235
Definition WsfPerceptionProcessor.hpp:38
Definition WsfProcessor.hpp:39
WsfProcessor(const WsfScenario &aScenario)
Definition WsfProcessor.cpp:25
Definition WsfQuantumAllocator.hpp:36
Definition WsfQuantumEvaluator.hpp:31
Definition WsfQuantumGenerator.hpp:33
WsfQuantumMatrix()=default
virtual void UpdateEvaluations(double aSimTime, WsfQuantumEvaluator &aEvaluator, std::vector< WsfLocalTrack * > &aPerception)
Definition WsfQuantumMatrix.cpp:122
Definition WsfQuantumTask.hpp:85
WsfQuantumTaskerProcessor(WsfScenario &aScenario)
Definition WsfQuantumTaskerProcessor.cpp:40
WsfQuantumGenerator * Generator() const
Definition WsfQuantumTaskerProcessor.hpp:144
virtual void SetReallocationStrategy(ReallocationStrategyType aType)
See comments for ReallocationStrategyType enum.
Definition WsfQuantumTaskerProcessor.hpp:139
WsfQuantumTaskerProcessor & operator=(const WsfQuantumTaskerProcessor &)=delete
void PurgeTransmittedTask(double aSimTime, WsfTask &aTask) override
Definition WsfQuantumTaskerProcessor.cpp:895
ReallocationStrategyType
Definition WsfQuantumTaskerProcessor.hpp:65
@ cRESPONSE
Definition WsfQuantumTaskerProcessor.hpp:68
@ cEVENT
Definition WsfQuantumTaskerProcessor.hpp:69
@ cDYNAMIC
Definition WsfQuantumTaskerProcessor.hpp:67
@ cSTATIC
Definition WsfQuantumTaskerProcessor.hpp:66
AssetRepresentationType
Definition WsfQuantumTaskerProcessor.hpp:58
@ cRESOURCES
Definition WsfQuantumTaskerProcessor.hpp:61
@ cPLATFORM
Definition WsfQuantumTaskerProcessor.hpp:59
@ cSYSTEMS
Definition WsfQuantumTaskerProcessor.hpp:60
std::map< int, std::set< WsfAssetPerception * > > AllocationMap
Definition WsfQuantumTaskerProcessor.hpp:72
void PurgeReceivedTask(double aSimTime, WsfTask &aTask) override
Definition WsfQuantumTaskerProcessor.cpp:847
virtual void SetAssetRepresentation(AssetRepresentationType aType)
Definition WsfQuantumTaskerProcessor.hpp:137
WsfQuantumEvaluator * Evaluator() const
Definition WsfQuantumTaskerProcessor.hpp:145
void UpdateTaskCorrelation(double aSimTime, WsfTask &aTask) override
Update the task track/local track correlation in a received task.
Definition WsfQuantumTaskerProcessor.cpp:901
virtual void SetIgnoreAllyTracks(bool aVal)
Sets whether or not ally tracks are passed to the generator (and subsequently tasks on those tracks w...
Definition WsfQuantumTaskerProcessor.hpp:141
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Definition WsfScriptContext.hpp:71
bool Initialize2(double aSimTime) override
Definition WsfScriptProcessor.cpp:142
Definition WsfTaskAssignMessage.hpp:45
void AssigneesForTask(const WsfTrackId &aTrackId, WsfStringId aTaskType, std::vector< size_t > &aAssignees) const
Definition WsfTaskManager.cpp:1417
bool ReceiveMessage(double aSimTime, const WsfMessage &aMessage) override
Definition WsfTaskManager.cpp:519
bool ProcessMessage(double aSimTime, const WsfMessage &aMessage) override
Definition WsfTaskManager.cpp:480
void PlatformDeleted(WsfPlatform *aPlatformPtr) override
Definition WsfTaskManager.cpp:440
virtual bool ProcessTaskAssignMessage(double aSimTime, const WsfTaskAssignMessage &aMessage)
Definition WsfTaskManager.cpp:2021
virtual bool AcquireResource(double aSimTime, WsfTask &aTask, const WsfTrack &aTrack)
Definition WsfTaskManager.cpp:792
virtual bool ReleaseResource(double aSimTime, WsfTask &aTask)
Definition WsfTaskManager.cpp:873
virtual bool ProcessTaskStatusMessage(double aSimTime, const WsfTaskStatusMessage &aMessage)
Definition WsfTaskManager.cpp:2263
const char * GetScriptClassName() const override
Definition WsfTaskManager.cpp:244
WsfProcessor * Clone() const override
A virtual copy constructor.
Definition WsfTaskManager.cpp:252
bool Initialize(double aSimTime) override
Definition WsfTaskManager.cpp:285
bool ProcessInput(UtInput &aInput) override
Definition WsfTaskManager.cpp:362
bool Initialize2(double aSimTime) override
Definition WsfTaskManager.cpp:296
virtual void TaskCompleted(double aSimTime, WsfTask &aTask)
Definition WsfTaskManager.cpp:974
void Update(double aSimTime) override
Definition WsfTaskManager.cpp:639
static TaskList::iterator FindTask(TaskList &aTaskList, size_t aAssigneeIndex, const WsfTrackId &aTrackId, WsfStringId aTaskType, WsfStringId aResourceName)
Definition WsfTaskManager.cpp:1577
virtual bool ReportTaskProgress(double aSimTime, const WsfTrackId &aTrackId, WsfStringId aTaskType, WsfStringId aResourceName, WsfStringId aSubStatus)
Definition WsfTaskManager.cpp:1363
WsfTaskManager(WsfScenario &aScenario, const std::string &aClassName="WsfTaskManager")
Constructor.
Definition WsfTaskManager.cpp:146
bool PreInitialize(double aSimTime) override
Definition WsfTaskManager.cpp:277
virtual bool ReportTaskComplete(double aSimTime, const WsfTrackId &aTrackId, WsfStringId aTaskType, WsfStringId aResourceName, WsfStringId aSubStatus)
Definition WsfTaskManager.cpp:1283
virtual bool AssignTask(double aSimTime, const WsfTrack &aTrack, const WsfTask &aTask, bool aLockTrack=true)
Definition WsfTaskManager.cpp:655
Definition WsfTaskStatusMessage.hpp:42
A class that defines a task to be performed.
Definition WsfTask.hpp:28
Definition WsfTrackId.hpp:33
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120